From d0422ba800dcc948fe422a007ecfdcb7536cd08d Mon Sep 17 00:00:00 2001
From: mage2-team <mage2-team@magento.com>
Date: Mon, 11 Nov 2013 03:11:05 -0800
Subject: [PATCH] 2.0.0.0-dev51 * Application areas rework:     * Single point
 of access to the current area code     * Declare Application Areas * Various
 improvements:   * Breakdown of the Adminhtml module:      * Moved the
 Customer-related logic to the Customer module      * Moved the System-related
 logic to the Backend module      * Moved the Checkout-related logic to the
 Checkout module      * Moved the Cms-related logic to the Cms module      *
 Moved the Promotions-related logic to the CatalogRule and SalesRule modules  
 * Eliminated the setNode/getNode methods from Magento\Core\Model\Config and
 adopted all client code   * Moved all application bootstrapping behavior to
 library   * Moved application-specific behavior from the entry points to the
 Magento\AppInterface implementations   * Removed the obsolete behavior from
 routing and front-controller   * Refactored the route configuration loading  
 * Extracted the modularity support behavior to the Magento\Module component  
 * Refactored the Resource configuration loading   * Removed the obsolete
 configuration loaders   * Removed the obsolete configuration from config.xml 
  * Refactored the code-generation mechanism   * Added constructor integrity
 verification to the Compiler tool   * Added strict naming rules for the
 auto-generated Factory and Proxy classes   * Global functions are now called
 from app\functions.php   * Removed functions.php from the Magento\Core module
   * Methods related to mageCoreErrorHandler, string and date were moved from
 functions.php to the Library components   * Moved the following methods from
 Core Helpers to the appropriate libraries:      * Moved the Abstract Helper
 to the Magento\Escaper and Magento\Filter libraries      * Moved the String
 Helper to the Magento\Filter, Magento\Stdlib\String,
 Magento\Stdlib\ArrayUtils libraries      * Moved the Data Helper to the
 Magento\Math, Magento\Filter, Magento\Convert, Magento\Encryption,
 Magento\Filesystem libraries and to Magento\Customer\Helper\Data libraries   
   * Moved the Http Magento Helper to the Magento\HTTP library   * The Hint
 Magento Helper, Http Magento Helper helpers were removed from the
 Magento\Core module   * Implemented SOAP faults declaration in WSDL   * Web
 API config reader was refactored to use Magento\Config\Reader\Filesystem   *
 Created integrations module. Added 'Integrations Grid' and 'New/Edit'
 Integration pages in the admin   * Removed obsolete page fragment code *
 Fixed bugs:   * Fixed inability to create an Invoice/Shipment/Credit Memo if
 the Sales Archive functionality is enabled   * Fixed the Minimum Advertised
 Price link on the Product view   * Fixed the View Files Population Tool   *
 Fixed the error on saving the Google AdWords configuration   * Fixed the
 error with the 'Invalid website code requested:' message appearing when
 enabling payment methods   * Fixed inability to insert spaces in credit card
 numbers   * Fixed inability to print orders from the frontend   * Fixed the
 fatal error on removal of reviews that have ratings   * Fixed JS error with
 the browser not responding when Virtual/Downloadable product are added to
 cart   * Fixed inability to delete a row from the 'Order By SKU' form in
 Internet Explorer   * Fixed inability to enable the Use Flat Catalog Product
 option   * Fixed inability to configure Grouped and Configurable products
 during order creation in the backend   * Fixed inability to insert a widget
 and/or a banner in CMS pages   * Fixed inability to set the Quantity value
 for Gift Cards   * Fixed the fatal error on the Customer Account > Gift
 Registry tab in the backend   * Fixed inability to import with the "Customers
 Main File" entity type selected   * Fixed the "Recently Viewed/Compared
 products" option missing on the New Frontend App Instance page   * Fixed the
 fatal error on managing Shopping Cart for a customer with a placed order in
 the backend   * Fixed the fatal error on an attempt to create an RMA request
 for Configurable products   * Fixed error on the backend dashboard if any
 value except "Last 24 Hours" is chosen in the "Select Range" dropdown   *
 Fixed duplicate values of options in the drop-downs on the RMA pages in the
 backend

---
 .htaccess                                     |   2 +-
 CHANGELOG.md                                  |  66 +-
 app/bootstrap.php                             |   3 +-
 .../Block/System/Messages.php                 |   2 +-
 .../Magento/AdminNotification/Model/Feed.php  |   6 +-
 .../Resource/System/Message/Collection.php    |   4 +-
 .../Model/System/Message/Security.php         |   6 +-
 .../Adminhtml/Block/Media/Uploader.php        |   2 +-
 .../Block/Newsletter/Queue/Edit/Form.php      |   6 +-
 .../Block/Newsletter/Template/Edit/Form.php   |   4 +-
 .../Sales/Grid/Column/Renderer/Date.php       |   2 +-
 .../Block/Report/Shopcart/Abandoned/Grid.php  |   2 +-
 .../Adminhtml/Block/Review/Add/Form.php       |   4 +-
 .../Magento/Adminhtml/Block/Review/Edit.php   |   2 +-
 .../Adminhtml/Block/Review/Edit/Form.php      |   8 +-
 .../Adminhtml/Block/Sitemap/Edit/Form.php     |   4 +-
 .../Block/Urlrewrite/Catalog/Edit/Form.php    |   4 +-
 .../Block/Urlrewrite/Cms/Page/Edit/Form.php   |   4 +-
 .../Block/Urlrewrite/Cms/Page/Grid.php        |   2 +-
 .../Adminhtml/Block/Urlrewrite/Edit/Form.php  |   4 +-
 .../Controller/Report/AbstractReport.php      |   2 +-
 .../Controller/Report/Statistics.php          |   4 +-
 .../Model/LayoutUpdate/Validator.php          |   6 +-
 .../Adminhtml/Model/Search/Catalog.php        |  22 +-
 .../Adminhtml/Model/Search/Customer.php       |   2 +-
 .../Magento/Adminhtml/Model/Session/Quote.php |  14 +-
 .../Magento/Adminhtml/etc/adminhtml/menu.xml  |   6 -
 app/code/Magento/Adminhtml/etc/config.xml     |  26 +-
 app/code/Magento/Adminhtml/etc/module.xml     |   8 -
 .../view/adminhtml/backup/dialogs.phtml       |   4 +-
 .../adminhtml_promo_quote_couponsgrid.xml     |  30 -
 .../view/adminhtml/layout/default.xml         |   2 +-
 .../view/adminhtml/layout/editor.xml          |   2 +-
 .../Authorizenet/Directpost/Payment.php       |  12 +-
 .../Controller/Directpost/Payment.php         |   4 +-
 .../Magento/Authorizenet/Model/Directpost.php |   8 +-
 ...thorizenet_directpost_payment_redirect.xml |   4 +-
 ...thorizenet_directpost_payment_response.xml |   4 +-
 .../Backend/App/Area/FrontNameResolver.php    |   9 +-
 app/code/Magento/Backend/App/DefaultPath.php  |  60 ++
 .../Backend/App/Request/PathInfoProcessor.php |   3 +
 .../Backend/App/Router/DefaultRouter.php      | 129 +++
 .../Backend/App/Router/NoRouteHandler.php     |   5 +-
 .../Magento/Backend/Block/AbstractBlock.php   |  16 +-
 app/code/Magento/Backend/Block/Context.php    |  14 +-
 app/code/Magento/Backend/Block/Dashboard.php  |   2 +-
 .../Block/Dashboard/AbstractDashboard.php     |   4 +-
 .../Magento/Backend/Block/Dashboard/Bar.php   |   4 +-
 .../Backend/Block/Dashboard/Diagrams.php      |   4 +-
 .../Magento/Backend/Block/Dashboard/Graph.php |   4 +-
 .../Magento/Backend/Block/Dashboard/Grid.php  |   4 +-
 .../Magento/Backend/Block/Dashboard/Grids.php |   4 +-
 .../Backend/Block/Dashboard/Orders/Grid.php   |   4 +-
 .../Magento/Backend/Block/Dashboard/Sales.php |   4 +-
 .../Backend/Block/Dashboard/Searches/Last.php |   4 +-
 .../Searches/Renderer/Searchquery.php         |   3 -
 .../Backend/Block/Dashboard/Searches/Top.php  |   4 +-
 .../Backend/Block/Dashboard/Tab/Amounts.php   |   4 +-
 .../Block/Dashboard/Tab/Customers/Most.php    |   6 +-
 .../Block/Dashboard/Tab/Customers/Newest.php  |   6 +-
 .../Backend/Block/Dashboard/Tab/Orders.php    |   4 +-
 .../Block/Dashboard/Tab/Products/Ordered.php  |   4 +-
 .../Block/Dashboard/Tab/Products/Viewed.php   |   4 +-
 .../Backend/Block/Dashboard/Totals.php        |   4 +-
 .../Magento/Backend/Block/GlobalSearch.php    |   2 +-
 .../Magento/Backend/Block/Store/Switcher.php  |  10 +-
 .../Block/System/Account/Edit.php             |   7 +-
 .../Block/System/Account/Edit/Form.php        |  10 +-
 .../Block/System/Cache/Edit.php               |  10 +-
 .../Block/System/Cache/Form.php               |   8 +-
 .../Backend/Block/System/Config/Form.php      |  12 +-
 .../Block/System/Config/Form/Field/Export.php |   6 +-
 .../Form/Fieldset/Modules/DisableOutput.php   |   6 +-
 .../Backend/Block/System/Config/Switcher.php  |   2 +-
 .../System/Storage/Media/Synchronize.php      |   2 +-
 .../Backend/Block/System/Config/Tabs.php      |   2 +-
 .../Block/System/Design.php                   |   6 +-
 .../Block/System/Design/Edit.php              |   6 +-
 .../Block/System/Design/Edit/Tab/General.php  |  10 +-
 .../Block/System/Design/Edit/Tabs.php         |   6 +-
 .../Block/System/Email/Template.php           |   8 +-
 .../Block/System/Email/Template/Edit.php      |  16 +-
 .../Block/System/Email/Template/Edit/Form.php |  12 +-
 .../Email/Template/Grid/Filter/Type.php       |   6 +-
 .../Email/Template/Grid/Renderer/Action.php   |   6 +-
 .../Email/Template/Grid/Renderer/Sender.php   |   6 +-
 .../Email/Template/Grid/Renderer/Type.php     |   6 +-
 .../Block/System/Email/Template/Preview.php   |   6 +-
 .../Block/System/Shipping/Ups.php             |   4 +-
 .../Block/System/Store/Delete.php             |  11 +-
 .../Block/System/Store/Delete/Form.php        |   6 +-
 .../Block/System/Store/Delete/Group.php       |   6 +-
 .../Block/System/Store/Delete/Website.php     |   6 +-
 .../Block/System/Store/Edit.php               |   5 +-
 .../Block/System/Store/Edit/AbstractForm.php  |   6 +-
 .../Block/System/Store/Edit/Form/Group.php    |  12 +-
 .../Block/System/Store/Edit/Form/Store.php    |  12 +-
 .../Block/System/Store/Edit/Form/Website.php  |  12 +-
 .../Block/System/Store/Grid/Render/Group.php  |   6 +-
 .../Block/System/Store/Grid/Render/Store.php  |   6 +-
 .../System/Store/Grid/Render/Website.php      |   6 +-
 .../Block/System/Store/Store.php              |   7 +-
 .../Block/System/Variable.php                 |   7 +-
 .../Block/System/Variable/Edit.php            |   7 +-
 .../Block/System/Variable/Edit/Form.php       |   8 +-
 app/code/Magento/Backend/Block/Template.php   |   6 +
 .../Backend/Block/Template/Context.php        |  60 +-
 app/code/Magento/Backend/Block/Widget.php     |   3 +-
 .../Magento/Backend/Block/Widget/Button.php   |   2 +-
 .../Block/Widget/Button/SplitButton.php       |   5 +-
 .../Backend/Block/Widget/Form/Container.php   |  13 +-
 .../Backend/Block/Widget/Form/Generic.php     |   6 +-
 .../Magento/Backend/Block/Widget/Grid.php     |  18 +-
 .../Block/Widget/Grid/Column/Filter/Date.php  |  14 +-
 .../Widget/Grid/Column/Filter/Datetime.php    |   2 +-
 .../Widget/Grid/Column/Renderer/Date.php      |   4 +-
 .../Widget/Grid/Column/Renderer/Datetime.php  |   4 +-
 .../Widget/Grid/Column/Renderer/Longtext.php  |  23 +-
 .../Widget/Grid/Column/Renderer/Wrapline.php  |  27 +-
 .../Grid/Massaction/AbstractMassaction.php    |   3 +-
 .../Widget/Grid/Massaction/Additional.php     |   4 +-
 .../Block/Widget/Grid/Massaction/Extended.php |   5 +-
 .../Backend/Controller/AbstractAction.php     |   8 +-
 .../Backend/Controller/Adminhtml/Action.php   |   8 +-
 .../Backend/Controller/Adminhtml/Ajax.php     |   2 +-
 .../Backend/Controller/Adminhtml/Cache.php    |   2 +-
 .../Controller/Adminhtml/Dashboard.php        |  16 +-
 .../Backend/Controller/Adminhtml/Index.php    |  29 +-
 .../{ => Adminhtml}/System/AbstractConfig.php |   2 +-
 .../Controller/Adminhtml}/System/Account.php  |   6 +-
 .../Controller/Adminhtml}/System/Backup.php   |  14 +-
 .../Controller/Adminhtml/System/Config.php    |   2 +-
 .../Adminhtml/System/Config/Save.php          |  16 +-
 .../System/Config/System/Storage.php          |  10 +-
 .../Controller/Adminhtml}/System/Design.php   |   8 +-
 .../Adminhtml}/System/Email/Template.php      |  20 +-
 .../Controller/Adminhtml}/System/Store.php    |  38 +-
 .../Controller/Adminhtml}/System/Variable.php |  12 +-
 .../Magento/Backend/Controller/Context.php    |  28 +-
 .../Controller/Router/DefaultRouter.php       | 305 -------
 .../Helper/Dashboard/AbstractDashboard.php    |   2 +-
 .../Magento/Backend/Helper/Dashboard/Data.php |  34 +-
 .../Backend/Helper/Dashboard/Order.php        |  25 +-
 app/code/Magento/Backend/Helper/Data.php      |  60 +-
 .../Magento/Backend/Model/Auth/Session.php    |   6 +-
 .../Backend/Currency/AbstractCurrency.php     |   2 +-
 .../Model/Config/Backend/Encrypted.php        |  36 +-
 .../Backend/Model/Config/Backend/Log/Cron.php |  16 +-
 .../Backend/Model/Config/SchemaLocator.php    |   4 +-
 .../Model/Config/Source/Dev/Dbautoup.php      |   6 +-
 .../Config/Source/Storage/Media/Database.php  |   6 +-
 .../Backend/Model/Config/Structure.php        |  10 +-
 .../Model/Email/Template.php                  |   6 +-
 app/code/Magento/Backend/Model/Locale.php     |  12 +-
 .../Magento/Backend/Model/Locale/Manager.php  |   2 +-
 app/code/Magento/Backend/Model/Menu.php       |   6 +-
 .../Backend/Model/Menu/AbstractDirector.php   |   4 +-
 .../Magento/Backend/Model/Menu/Config.php     |  29 +-
 .../Model/Menu/Config/SchemaLocator.php       |   4 +-
 .../Backend/Model/Menu/Director/Director.php  |   6 +-
 app/code/Magento/Backend/Model/Menu/Item.php  |  10 +-
 app/code/Magento/Backend/Model/Url.php        |  52 +-
 app/code/Magento/Backend/Model/Url/Proxy.php  | 826 ------------------
 app/code/Magento/Backend/etc/adminhtml/di.xml |  25 +-
 .../Magento/Backend/etc/adminhtml/menu.xml    |  37 +
 .../Magento/Backend/etc/adminhtml/system.xml  |   4 +-
 app/code/Magento/Backend/etc/di.xml           |  55 +-
 .../Backend/view/adminhtml/admin/login.phtml  |   2 +-
 .../view/adminhtml/admin/login_buttons.phtml  |   2 +-
 .../view/adminhtml/dashboard/graph.phtml      |   2 +-
 .../adminhtml/dashboard/graph/disabled.phtml  |   2 +-
 .../view/adminhtml/dashboard/grid.phtml       |   2 +-
 .../view/adminhtml/dashboard/index.phtml      |   2 +-
 .../view/adminhtml/dashboard/salebar.phtml    |   2 +-
 .../view/adminhtml/dashboard/searches.phtml   |   2 +-
 .../adminhtml/dashboard/store/switcher.phtml  |   2 +-
 .../view/adminhtml/dashboard/totalbar.phtml   |   2 +-
 .../layout/adminhtml_cache_index.xml          |   2 +-
 .../layout/adminhtml_system_account_index.xml |   2 +-
 .../layout/adminhtml_system_backup_block.xml  |   0
 .../layout/adminhtml_system_backup_grid.xml   |   0
 .../layout/adminhtml_system_backup_index.xml  |   0
 .../layout/adminhtml_system_config_edit.xml   |   6 +-
 .../layout/adminhtml_system_design_grid.xml   |   0
 .../adminhtml_system_design_grid_block.xml    |   0
 .../layout/adminhtml_system_design_index.xml  |   2 +-
 .../adminhtml_system_email_template_grid.xml  |   0
 ...nhtml_system_email_template_grid_block.xml |   6 +-
 .../adminhtml_system_email_template_index.xml |   2 +-
 .../layout/adminhtml_system_preview.xml}      |   4 +-
 .../adminhtml_system_store_grid_block.xml     |   6 +-
 .../layout/adminhtml_system_store_index.xml   |   2 +-
 .../adminhtml_system_variable_grid_block.xml  |   0
 .../adminhtml_system_variable_index.xml       |   2 +-
 .../Magento/Backend/view/adminhtml/menu.phtml |   2 +-
 .../view/adminhtml/store/switcher.phtml       |   2 +-
 .../switcher/form/renderer/fieldset.phtml     |   2 +-
 .../form/renderer/fieldset/element.phtml      |   2 +-
 .../view/adminhtml/system/autocomplete.phtml  |   2 +-
 .../adminhtml/system/cache/additional.phtml   |   2 +-
 .../view/adminhtml/system/cache/edit.phtml    |   2 +-
 .../view/adminhtml/system/config/edit.phtml   |   2 +-
 .../system/config/form/field/array.phtml      |   2 +-
 .../view/adminhtml/system/config/js.phtml     |   2 +-
 .../adminhtml/system/config/switcher.phtml    |   2 +-
 .../system/storage/media/synchronize.phtml    |   2 +-
 .../view/adminhtml/system/config/tabs.phtml   |   2 +-
 .../view/adminhtml/system/design/edit.phtml   |   2 +-
 .../view/adminhtml/system/design/index.phtml  |   2 +-
 .../system/email/template/edit.phtml          |   2 +-
 .../system/email/template/list.phtml          |   2 +-
 .../system/email/template/preview.phtml       |   2 +-
 .../view/adminhtml/system/info.phtml          |   2 +-
 .../view/adminhtml/system/search.phtml        |   2 +-
 .../system/shipping/applicable_country.phtml  |   2 +-
 .../view/adminhtml/system/shipping/ups.phtml  |   6 +-
 .../view/adminhtml/system/variable/js.phtml   |   2 +-
 .../view/adminhtml/variables.js               |   2 +-
 .../view/adminhtml/widget/accordion.phtml     |   2 +-
 .../view/adminhtml/widget/breadcrumbs.phtml   |   2 +-
 .../view/adminhtml/widget/button.phtml        |   2 +-
 .../view/adminhtml/widget/button/split.phtml  |   2 +-
 .../Backend/view/adminhtml/widget/form.phtml  |   2 +-
 .../adminhtml/widget/form/container.phtml     |   2 +-
 .../view/adminhtml/widget/form/element.phtml  |   2 +-
 .../widget/form/element/gallery.phtml         |   2 +-
 .../widget/form/renderer/element.phtml        |   2 +-
 .../widget/form/renderer/fieldset.phtml       |   2 +-
 .../form/renderer/fieldset/element.phtml      |   2 +-
 .../Backend/view/adminhtml/widget/grid.phtml  |   2 +-
 .../adminhtml/widget/grid/column_set.phtml    |   2 +-
 .../adminhtml/widget/grid/container.phtml     |   2 +-
 .../widget/grid/container/empty.phtml         |   2 +-
 .../view/adminhtml/widget/grid/export.phtml   |   2 +-
 .../view/adminhtml/widget/grid/extended.phtml |   2 +-
 .../adminhtml/widget/grid/massaction.phtml    |   2 +-
 .../widget/grid/massaction_extended.phtml     |   2 +-
 .../adminhtml/widget/grid/serializer.phtml    |   2 +-
 .../Backend/view/adminhtml/widget/tabs.phtml  |   2 +-
 .../adminhtml/widget/view/container.phtml     |   2 +-
 app/code/Magento/Backup/Model/Backup.php      |  22 +-
 .../Backup/Model/Config/Backend/Cron.php      |  15 +-
 app/code/Magento/Backup/Model/Db.php          |   6 +-
 app/code/Magento/Backup/Model/Observer.php    |   6 +-
 app/code/Magento/Backup/Model/Resource/Db.php |   4 +-
 .../Magento/Backup/Model/Resource/Helper.php  |   4 +-
 app/code/Magento/Backup/etc/di.xml            |   4 +-
 .../Adminhtml/Sales/Order/Items/Renderer.php  | 129 ++-
 .../Sales/Order/View/Items/Renderer.php       | 115 ++-
 .../Bundle/Block/Catalog/Product/Price.php    |  24 +-
 .../Helper/Catalog/Product/Configuration.php  |  12 +-
 .../Magento/Bundle/Model/Product/Type.php     |   4 +-
 .../Magento/Bundle/Model/Resource/Bundle.php  |   4 +-
 .../Bundle/Model/Resource/Price/Index.php     |   4 +-
 .../Sales/Order/Pdf/Items/Creditmemo.php      |  21 +-
 .../Model/Sales/Order/Pdf/Items/Invoice.php   |  23 +-
 .../Model/Sales/Order/Pdf/Items/Shipment.php  |  23 +-
 app/code/Magento/Bundle/etc/di.xml            |   2 +-
 ...shlist.xml => customer_index_wishlist.xml} |   0
 .../creditmemo/create/items/renderer.phtml    |   2 +-
 .../creditmemo/view/items/renderer.phtml      |   2 +-
 .../sales/invoice/create/items/renderer.phtml |   2 +-
 .../sales/invoice/view/items/renderer.phtml   |   2 +-
 .../sales/order/view/items/renderer.phtml     |   2 +-
 .../shipment/create/items/renderer.phtml      |   2 +-
 .../sales/shipment/view/items/renderer.phtml  |   2 +-
 .../frontend/sales/order/items/renderer.phtml |   4 +-
 app/code/Magento/Captcha/Helper/Data.php      |   6 +-
 .../Magento/Captcha/Model/DefaultModel.php    |  26 +-
 app/code/Magento/Captcha/Model/Observer.php   |   2 +-
 .../Magento/Captcha/Model/Resource/Log.php    |  24 +-
 .../Block/Adminhtml/Category/Helper/Image.php |   6 +-
 .../Adminhtml/Category/Tab/Attributes.php     |   4 +-
 .../Adminhtml/Category/Widget/Chooser.php     |   2 +-
 .../Block/Adminhtml/Helper/Form/Wysiwyg.php   |   6 +-
 .../Adminhtml/Helper/Form/Wysiwyg/Content.php |   4 +-
 .../Product/Attribute/Edit/Tab/Advanced.php   |   4 +-
 .../Product/Attribute/Edit/Tab/Front.php      |   4 +-
 .../Adminhtml/Product/Attribute/Set/Main.php  |   2 +-
 .../Product/Attribute/Set/Main/Formgroup.php  |   4 +-
 .../Product/Attribute/Set/Main/Formset.php    |   4 +-
 .../Attribute/Set/Toolbar/Main/Filter.php     |   4 +-
 .../Edit/Action/Attribute/Tab/Attributes.php  |   4 +-
 .../Adminhtml/Product/Edit/NewCategory.php    |   4 +-
 .../Adminhtml/Product/Edit/Tab/Attributes.php |   4 +-
 .../Product/Edit/Tab/Super/Config/Simple.php  |   4 +-
 .../Product/Edit/Tab/Super/Settings.php       |   4 +-
 .../Product/Frontend/Product/Watermark.php    |  22 +-
 .../Product/Helper/Form/BaseImage.php         |  10 +-
 .../Product/Helper/Form/Category.php          |  24 +-
 .../Adminhtml/Product/Helper/Form/Gallery.php |   6 +-
 .../Adminhtml/Product/Helper/Form/Price.php   |   6 +-
 .../Adminhtml/Product/Helper/Form/Weight.php  |   6 +-
 .../Catalog/Block/Adminhtml/Product/Price.php |  21 -
 .../Adminhtml/Product/Widget/Chooser.php      |   2 +-
 .../Block/Adminhtml/Search/Edit/Form.php      |   4 +-
 .../Catalog/Block/Product/NewProduct.php      |   4 +-
 .../Magento/Catalog/Block/Product/Price.php   |  39 +
 .../Magento/Catalog/Block/Product/View.php    |  22 +-
 .../Catalog/Controller/Adminhtml/Category.php |   2 +-
 .../Catalog/Controller/Adminhtml/Product.php  |  10 +-
 .../Adminhtml/Product/Action/Attribute.php    |   2 +-
 .../Adminhtml/Product/Attribute.php           |   2 +-
 .../Controller/Adminhtml/Product/Set.php      |  10 +-
 .../Magento/Catalog/Controller/Category.php   |   2 +-
 .../Magento/Catalog/Controller/Product.php    |   2 +-
 .../Catalog/Controller/Product/Compare.php    |   4 +-
 app/code/Magento/Catalog/Helper/Catalog.php   |  18 +-
 app/code/Magento/Catalog/Helper/Data.php      |  33 +-
 app/code/Magento/Catalog/Helper/Output.php    |  14 +-
 app/code/Magento/Catalog/Helper/Product.php   |   2 +-
 .../Catalog/Helper/Product/Configuration.php  |  44 +-
 .../Helper/Product/Edit/Action/Attribute.php  |  15 +-
 .../Magento/Catalog/Helper/Product/Flat.php   |   9 +-
 .../Magento/Catalog/Helper/Product/Url.php    |   2 +-
 .../Attribute/Backend/Customlayoutupdate.php  |   4 +-
 .../Model/Attribute/Config/SchemaLocator.php  |   4 +-
 app/code/Magento/Catalog/Model/Category.php   |  25 +-
 .../Category/Attribute/Backend/Image.php      |   4 +-
 .../Category/Attribute/Backend/Sortby.php     |   4 +-
 .../Catalog/Model/Layer/Filter/Attribute.php  |  16 +-
 .../Catalog/Model/Layer/Filter/Category.php   |  16 +-
 app/code/Magento/Catalog/Model/Product.php    |   1 -
 .../Product/Attribute/Backend/Groupprice.php  |   4 +-
 .../Backend/Groupprice/AbstractGroupprice.php |   4 +-
 .../Model/Product/Attribute/Backend/Media.php |   4 +-
 .../Model/Product/Attribute/Backend/Msrp.php  |   4 +-
 .../Model/Product/Attribute/Backend/Price.php |   4 +-
 .../Model/Product/Attribute/Backend/Sku.php   |  21 +-
 .../Product/Attribute/Backend/Startdate.php   |   4 +-
 .../Model/Product/Attribute/Backend/Stock.php |   4 +-
 .../Product/Attribute/Backend/Tierprice.php   |   4 +-
 .../Magento/Catalog/Model/Product/Option.php  |  12 +-
 .../Model/Product/Option/Type/Date.php        |   6 +-
 .../Model/Product/Option/Type/File.php        |  16 +-
 .../Model/Product/Option/Type/Select.php      | 118 ++-
 .../Model/Product/Option/Type/Text.php        |  38 +-
 .../Model/Product/Type/AbstractType.php       |   6 +-
 .../Model/Product/Type/Configurable.php       |   4 +-
 .../Catalog/Model/Product/Type/Grouped.php    |   4 +-
 .../ProductOptions/Config/SchemaLocator.php   |   4 +-
 .../Model/ProductTypes/Config/Converter.php   |   9 +-
 .../ProductTypes/Config/SchemaLocator.php     |   4 +-
 .../Model/Resource/AbstractResource.php       |   4 +-
 .../Catalog/Model/Resource/Attribute.php      |   4 +-
 .../Catalog/Model/Resource/Category.php       |   4 +-
 .../Category/Attribute/Collection.php         |   4 +-
 .../Category/Attribute/Source/Layout.php      |  22 +-
 .../Catalog/Model/Resource/Category/Flat.php  |   4 +-
 .../Resource/Category/Flat/Collection.php     |   4 +-
 .../Resource/Category/Indexer/Product.php     |   4 +-
 .../Catalog/Model/Resource/Category/Tree.php  |  29 +-
 .../Collection/AbstractCollection.php         |   8 +-
 .../Magento/Catalog/Model/Resource/Config.php |   4 +-
 .../Magento/Catalog/Model/Resource/Helper.php |   4 +-
 .../Model/Resource/Layer/Filter/Price.php     |   4 +-
 .../Catalog/Model/Resource/Product.php        |   4 +-
 .../Product/Attribute/Backend/Image.php       |   4 +-
 .../Product/Attribute/Backend/Urlkey.php      |   4 +-
 .../Resource/Product/Attribute/Collection.php |   4 +-
 .../Model/Resource/Product/Collection.php     |  20 +-
 .../Product/Collection/AssociatedProduct.php  |  12 +-
 .../Product/Compare/Item/Collection.php       |  15 +-
 .../Catalog/Model/Resource/Product/Flat.php   |   4 +-
 .../Model/Resource/Product/Flat/Indexer.php   |  14 +-
 .../Product/Indexer/AbstractIndexer.php       |   4 +-
 .../Model/Resource/Product/Indexer/Eav.php    |   4 +-
 .../Product/Indexer/Eav/AbstractEav.php       |   4 +-
 .../Resource/Product/Indexer/Eav/Source.php   |   4 +-
 .../Model/Resource/Product/Indexer/Price.php  |  16 +-
 .../Product/Indexer/Price/DefaultPrice.php    |   4 +-
 .../Catalog/Model/Resource/Product/Link.php   |   4 +-
 .../Catalog/Model/Resource/Product/Option.php |   4 +-
 .../Resource/Product/Option/Collection.php    |   4 +-
 .../Model/Resource/Product/Option/Value.php   |   4 +-
 .../Catalog/Model/Resource/Product/Status.php |   4 +-
 .../Resource/Product/Type/Configurable.php    |   4 +-
 .../Product/Type/Configurable/Attribute.php   |   4 +-
 .../Configurable/Attribute/Collection.php     |   4 +-
 .../Grouped/AssociatedProductsCollection.php  |  12 +-
 .../Model/Resource/Product/Website.php        |   4 +-
 .../Magento/Catalog/Model/Resource/Setup.php  |   4 +-
 .../Magento/Catalog/Model/Resource/Url.php    |  12 +-
 .../Magento/Catalog/Model/Template/Filter.php |   3 +
 app/code/Magento/Catalog/etc/adminhtml/di.xml |  22 +
 app/code/Magento/Catalog/etc/di.xml           |   2 +-
 .../catalog/product/attribute/set/main.phtml  |  14 +-
 .../fieldset/options/type/date.phtml          |   9 +-
 .../catalog/product/edit/price/group.phtml    |   4 +-
 .../catalog/product/edit/price/tier.phtml     |   4 +-
 .../Catalog/view/frontend/layer/state.phtml   |   2 +-
 .../frontend/product/price_msrp_item.phtml    |   4 +-
 .../Block/Adminhtml/Form/Field/Stock.php      |   6 +-
 .../CatalogInventory/Helper/Minsaleqty.php    |  22 +-
 .../Model/Resource/Indexer/Stock.php          |   4 +-
 .../Resource/Indexer/Stock/DefaultStock.php   |   4 +-
 .../CatalogInventory/Model/Resource/Stock.php |  18 +-
 .../Model/Resource/Stock/Item.php             |   4 +-
 .../Model/Resource/Stock/Item/Collection.php  |   4 +-
 .../Model/Resource/Stock/Status.php           |   4 +-
 .../CatalogInventory/Model/Stock/Item.php     |  22 +-
 app/code/Magento/CatalogInventory/etc/di.xml  |   2 +-
 .../Block/Adminhtml}/Promo/Catalog.php        |  11 +-
 .../Block/Adminhtml}/Promo/Catalog/Edit.php   |   7 +-
 .../Adminhtml}/Promo/Catalog/Edit/Form.php    |   8 +-
 .../Adminhtml}/Promo/Catalog/Edit/Js.php      |   6 +-
 .../Promo/Catalog/Edit/Tab/Actions.php        |   4 +-
 .../Promo/Catalog/Edit/Tab/Conditions.php     |  12 +-
 .../Promo/Catalog/Edit/Tab/Main.php           |  14 +-
 .../Adminhtml}/Promo/Catalog/Edit/Tabs.php    |   6 +-
 .../Block/Adminhtml}/Promo/Widget/Chooser.php |  10 +-
 .../Promo/Widget/Chooser/Daterange.php        |  36 +-
 .../Adminhtml}/Promo/Widget/Chooser/Sku.php   |  12 +-
 .../Controller/Adminhtml}/Promo.php           |   6 +-
 .../Controller/Adminhtml}/Promo/Catalog.php   |  35 +-
 .../Controller/Adminhtml}/Promo/Widget.php    |   8 +-
 .../Magento/CatalogRule/Model/Observer.php    |  43 +-
 .../CatalogRule/Model/Resource/Rule.php       |  28 +-
 app/code/Magento/CatalogRule/Model/Rule.php   |  28 +-
 .../CatalogRule/etc/adminhtml/menu.xml        |   2 +-
 .../CatalogRule/etc/adminhtml/routes.xml      |  32 +
 app/code/Magento/CatalogRule/etc/di.xml       |   2 +-
 .../catalog_rule_promo_catalog_block.xml}     |   2 +-
 .../catalog_rule_promo_catalog_edit.xml}      |  12 +-
 .../catalog_rule_promo_catalog_index.xml}     |   4 +-
 .../view/adminhtml/promo/fieldset.phtml       |   0
 .../view/adminhtml/promo/form.phtml           |   0
 .../view/adminhtml/promo/js.phtml             |   0
 .../Magento/CatalogSearch/Helper/Data.php     |  98 ++-
 .../CatalogSearch/Model/Resource/Advanced.php |   4 +-
 .../Model/Resource/Advanced/Collection.php    |  15 +-
 .../CatalogSearch/Model/Resource/Fulltext.php |  47 +-
 .../Model/Resource/Fulltext/Collection.php    |  15 +-
 .../Model/Resource/Fulltext/Engine.php        |   4 +-
 .../CatalogSearch/Model/Resource/Helper.php   |   4 +-
 .../CatalogSearch/Model/Resource/Query.php    |  18 +-
 .../Model/Resource/Query/Collection.php       |   4 +-
 .../Model/Resource/Search/Collection.php      |  26 +-
 .../layout/catalogsearch_ajax_suggest.xml     |   4 +-
 .../Controller/Adminhtml/Centinel/Index.php   |   2 +-
 app/code/Magento/Centinel/Model/Config.php    |  22 +-
 .../centinel_index_authenticationcomplete.xml |   2 +-
 .../centinel_index_authenticationstart.xml    |   2 +-
 .../Block/Adminhtml}/Agreement.php            |  13 +-
 .../Block/Adminhtml}/Agreement/Edit.php       |  11 +-
 .../Block/Adminhtml}/Agreement/Edit/Form.php  |  11 +-
 .../Block/Adminhtml}/Agreement/Grid.php       |   6 +-
 .../Magento/Checkout/Block/Cart/Totals.php    |   2 +-
 .../Checkout/Block/Onepage/Success.php        |   4 +-
 .../Controller/Adminhtml}/Agreement.php       |  25 +-
 app/code/Magento/Checkout/Controller/Cart.php |  30 +-
 .../Checkout/Controller/Multishipping.php     |   4 +-
 .../Magento/Checkout/Controller/Onepage.php   |   9 +-
 .../Checkout/Model/Resource/Agreement.php     |  22 +-
 .../Magento/Checkout/Model/Resource/Setup.php |   4 +-
 app/code/Magento/Checkout/Model/Session.php   |  10 +-
 .../Magento/Checkout/Model/Type/Onepage.php   |   6 +-
 .../Magento/Checkout/etc/adminhtml/menu.xml   |   2 +-
 .../Magento/Checkout/etc/adminhtml/routes.xml |  32 +
 app/code/Magento/Checkout/etc/di.xml          |   2 +-
 .../layout/checkout_onepage_paymentmethod.xml |  12 +-
 .../layout/checkout_onepage_review.xml        |  20 +-
 .../checkout_onepage_shippingmethod.xml       |   4 +-
 .../Cms => Cms/Block/Adminhtml}/Block.php     |   9 +-
 .../Block/Adminhtml}/Block/Edit.php           |   9 +-
 .../Block/Adminhtml}/Block/Edit/Form.php      |  10 +-
 .../Block/Adminhtml}/Block/Widget/Chooser.php |  12 +-
 .../Cms => Cms/Block/Adminhtml}/Page.php      |  10 +-
 .../Cms => Cms/Block/Adminhtml}/Page/Edit.php |  11 +-
 .../Block/Adminhtml}/Page/Edit/Form.php       |   6 +-
 .../Adminhtml}/Page/Edit/Tab/Content.php      |  10 +-
 .../Block/Adminhtml}/Page/Edit/Tab/Design.php |  10 +-
 .../Block/Adminhtml}/Page/Edit/Tab/Main.php   |   8 +-
 .../Block/Adminhtml}/Page/Edit/Tab/Meta.php   |   6 +-
 .../Block/Adminhtml}/Page/Edit/Tabs.php       |   6 +-
 .../Cms => Cms/Block/Adminhtml}/Page/Grid.php |  10 +-
 .../Adminhtml}/Page/Grid/Renderer/Action.php  |   4 +-
 .../Block/Adminhtml}/Page/Widget/Chooser.php  |  12 +-
 .../Adminhtml}/Wysiwyg/Images/Content.php     |  16 +-
 .../Wysiwyg/Images/Content/Files.php          |   6 +-
 .../Wysiwyg/Images/Content/Newfolder.php      |   6 +-
 .../Wysiwyg/Images/Content/Uploader.php       |   8 +-
 .../Block/Adminhtml}/Wysiwyg/Images/Tree.php  |   8 +-
 .../Controller/Adminhtml}/Block.php           |  26 +-
 .../Controller/Adminhtml}/Block/Widget.php    |   8 +-
 .../Cms => Cms/Controller/Adminhtml}/Page.php |  24 +-
 .../Controller/Adminhtml}/Page/Widget.php     |   8 +-
 .../Controller/Adminhtml}/Wysiwyg.php         |   8 +-
 .../Controller/Adminhtml}/Wysiwyg/Images.php  |  12 +-
 app/code/Magento/Cms/Controller/Router.php    |  13 +-
 app/code/Magento/Cms/Helper/Page.php          |  14 +-
 .../Magento/Cms/Helper/Wysiwyg/Images.php     |   2 +-
 app/code/Magento/Cms/Model/Resource/Block.php |   4 +-
 app/code/Magento/Cms/Model/Resource/Page.php  |  16 +-
 .../Cms/Model/Resource/Page/Collection.php    |   4 +-
 app/code/Magento/Cms/Model/Wysiwyg/Config.php |   4 +-
 .../Cms/Model/Wysiwyg/Images/Storage.php      |   2 +-
 app/code/Magento/Cms/etc/adminhtml/menu.xml   |   4 +-
 app/code/Magento/Cms/etc/adminhtml/routes.xml |  32 +
 app/code/Magento/Cms/etc/di.xml               |  18 +-
 app/code/Magento/Cms/etc/frontend/di.xml      |  38 +
 app/code/Magento/Cms/etc/widget.xml           |   4 +-
 .../view/adminhtml}/browser/content.phtml     |   4 +-
 .../adminhtml}/browser/content/files.phtml    |   2 +-
 .../adminhtml}/browser/content/uploader.phtml |   2 +-
 .../view/adminhtml}/browser/tree.phtml        |   2 +-
 .../view/adminhtml/layout/cms_block_edit.xml} |   2 +-
 .../adminhtml/layout/cms_block_index.xml}     |   4 +-
 .../view/adminhtml/layout/cms_block_new.xml}  |   2 +-
 .../view/adminhtml/layout/cms_page_edit.xml}  |  12 +-
 .../view/adminhtml/layout/cms_page_index.xml} |   2 +-
 .../view/adminhtml/layout/cms_page_new.xml}   |   2 +-
 .../layout/cms_wysiwyg_images_contents.xml}   |   2 +-
 .../layout/cms_wysiwyg_images_index.xml}      |   6 +-
 .../page/edit/form/renderer/content.phtml     |   0
 .../Extension/Custom/Edit/Tab/AbstractTab.php |   4 +-
 .../Extension/Custom/Edit/Tab/Contents.php    |   4 +-
 app/code/Magento/Connect/Helper/Data.php      |  45 +-
 app/code/Magento/Connect/Model/Extension.php  |  68 +-
 .../Plugin/DispatchExceptionHandler.php       |  75 ++
 .../Plugin/RequestPreprocessor.php            | 121 +--
 .../App/FrontController/Plugin/UrlRewrite.php |  66 ++
 .../Core/{Model/EntryPoint => App}/Media.php  |  64 +-
 app/code/Magento/Core/App/Router/Base.php     | 436 +++++++++
 .../Core/App/Router/NoRouteHandler.php        |   2 +-
 app/code/Magento/Core/Block/AbstractBlock.php |  47 +-
 app/code/Magento/Core/Block/Context.php       |  48 +-
 app/code/Magento/Core/Block/Template.php      |  29 +-
 .../Magento/Core/Block/Template/Context.php   |  56 +-
 .../Magento/Core/Controller/Front/Action.php  |  41 -
 .../Magento/Core/Controller/Varien/Action.php |  84 +-
 .../Core/Controller/Varien/Action/Context.php |  24 +-
 .../Core/Controller/Varien/Router/Base.php    | 698 ---------------
 .../Magento/Core/Helper/AbstractHelper.php    | 116 +--
 app/code/Magento/Core/Helper/Context.php      |  58 +-
 app/code/Magento/Core/Helper/Data.php         | 420 +--------
 .../File/Media.php}                           |  74 +-
 app/code/Magento/Core/Helper/File/Storage.php |  17 +-
 app/code/Magento/Core/Helper/Hint.php         | 103 ---
 app/code/Magento/Core/Helper/Http.php         | 291 ------
 app/code/Magento/Core/Helper/String.php       | 299 +------
 app/code/Magento/Core/Helper/Translate.php    |   8 +-
 .../Magento/Core/Model/AbstractEntryPoint.php | 119 ---
 app/code/Magento/Core/Model/AbstractModel.php |  14 +-
 app/code/Magento/Core/Model/App.php           |  51 +-
 app/code/Magento/Core/Model/App/Area.php      |  21 +-
 app/code/Magento/Core/Model/App/Emulation.php |   4 +-
 app/code/Magento/Core/Model/AppInterface.php  |  10 +-
 app/code/Magento/Core/Model/Cache.php         |   2 +-
 .../Core/Model/Cache/Config/SchemaLocator.php |   4 +-
 .../Core/Model/Cache/Frontend/Factory.php     |   6 +-
 app/code/Magento/Core/Model/Cache/Proxy.php   |   6 +-
 .../Magento/Core/Model/Cache/TypeList.php     |   6 +-
 app/code/Magento/Core/Model/Config.php        | 258 +-----
 .../Core/Model/Config/AbstractStorage.php     |  88 --
 app/code/Magento/Core/Model/Config/Base.php   |  10 +-
 .../Core/Model/Config/FileResolver.php        |   6 +-
 .../Core/Model/Config/Initial/Reader.php      |  22 +-
 .../Initial}/SchemaLocator.php                |  22 +-
 app/code/Magento/Core/Model/Config/Loader.php |  80 --
 .../Core/Model/Config/Loader/Primary.php      |  72 --
 .../Magento/Core/Model/Config/Primary.php     | 192 ----
 .../Magento/Core/Model/Config/Storage.php     |  66 --
 .../Magento/Core/Model/ConfigInterface.php    |  19 +-
 app/code/Magento/Core/Model/Context.php       |  18 +-
 .../Magento/Core/Model/DataService/Config.php |  11 +-
 .../Core/Model/DataService/Config/Reader.php  |   6 +-
 app/code/Magento/Core/Model/Date.php          |  42 +-
 app/code/Magento/Core/Model/Design.php        |  17 +-
 .../Magento/Core/Model/Email/Template.php     |   2 +-
 .../Core/Model/Email/Template/Config.php      |   6 +-
 .../Model/Email/Template/Config/Reader.php    |   6 +-
 .../Email/Template/Config/SchemaLocator.php   |   4 +-
 .../Core/Model/Email/Template/Filter.php      |  75 +-
 .../Magento/Core/Model/EntryPoint/Cron.php    |  45 -
 .../Magento/Core/Model/EntryPoint/Http.php    |  67 --
 .../Model/Fieldset/Config/SchemaLocator.php   |   4 +-
 app/code/Magento/Core/Model/File/Storage.php  |  20 +-
 .../Core/Model/File/Storage/Database.php      |  48 +-
 .../Storage/Database/AbstractDatabase.php     |  45 +-
 .../Model/File/Storage/Directory/Database.php |  42 +-
 .../Magento/Core/Model/File/Storage/File.php  | 103 ++-
 .../Core/Model/File/Storage/Response.php      |   2 +-
 .../Model/File/Storage/Synchronization.php    |   4 +
 .../File/Validator/NotProtectedExtension.php  |  48 +-
 app/code/Magento/Core/Model/Input/Filter.php  |   6 +-
 app/code/Magento/Core/Model/Layout.php        |  18 +-
 app/code/Magento/Core/Model/Layout/Merge.php  |   8 +-
 app/code/Magento/Core/Model/Layout/Update.php |  31 +-
 app/code/Magento/Core/Model/Locale.php        |  71 +-
 app/code/Magento/Core/Model/Locale/Config.php |  47 +-
 .../Locale/Hierarchy/Config/SchemaLocator.php |   4 +-
 .../Magento/Core/Model/LocaleInterface.php    |   2 -
 app/code/Magento/Core/Model/Log/Adapter.php   |   6 +-
 app/code/Magento/Core/Model/ModuleManager.php |   6 +-
 app/code/Magento/Core/Model/ObjectManager.php | 181 ----
 app/code/Magento/Core/Model/Observer.php      |   6 +-
 .../Magento/Core/Model/Page/Asset/Merged.php  |   8 +-
 .../Core/Model/Page/Asset/Minified.php        |   6 +-
 .../Core/Model/Resource/AbstractResource.php  |  25 +-
 .../Config/Value/Collection/Scoped.php        |   4 +-
 .../Core/Model/Resource/Db/AbstractDb.php     |   8 +-
 .../Db/Collection/AbstractCollection.php      |  18 +-
 .../Magento/Core/Model/Resource/Design.php    |  23 +-
 .../Core/Model/Resource/Design/Collection.php |  44 +-
 .../Core/Model/Resource/Email/Template.php    |  21 +-
 .../Resource/File/Storage/AbstractStorage.php |   9 +-
 .../Model/Resource/File/Storage/Database.php  |  19 +-
 .../File/Storage/Directory/Database.php       |   9 +-
 .../Core/Model/Resource/File/Storage/File.php |  41 +-
 .../Magento/Core/Model/Resource/Helper.php    |   4 +-
 .../Model/Resource/Helper/AbstractHelper.php  |   6 +-
 .../Model/Resource/Layout/Link/Collection.php |  31 +-
 .../Core/Model/Resource/Layout/Update.php     |   4 +-
 .../Resource/Layout/Update/Collection.php     |  27 +-
 .../Magento/Core/Model/Resource/Session.php   |   4 +-
 .../Magento/Core/Model/Resource/Setup.php     |   8 +-
 .../Core/Model/Resource/Setup/Context.php     |  50 +-
 .../Magento/Core/Model/Resource/Translate.php |   4 +-
 .../Core/Model/Resource/Translate/String.php  |   4 +-
 .../Core/Model/Resource/Type/Db/Pdo/Mysql.php |  20 +-
 .../Model/Resource/Url/Rewrite/Collection.php |   4 +-
 app/code/Magento/Core/Model/Route/Config.php  |  84 --
 app/code/Magento/Core/Model/Session.php       |  15 +-
 .../Core/Model/Session/AbstractSession.php    |  12 +-
 .../Magento/Core/Model/Session/Context.php    |  24 +-
 .../Magento/Core/Model/Session/Validator.php  |  14 +-
 app/code/Magento/Core/Model/Store.php         |  54 +-
 app/code/Magento/Core/Model/Store/Config.php  |  70 +-
 .../Magento/Core/Model/Store/Storage/Db.php   | 155 ++--
 .../Core/Model/Store/StorageFactory.php       |  41 +-
 app/code/Magento/Core/Model/Theme.php         |  15 +-
 app/code/Magento/Core/Model/Theme/Data.php    |  43 +
 .../Core/Model/Theme/Domain/Virtual.php       |   1 -
 app/code/Magento/Core/Model/Theme/Image.php   |   8 +-
 app/code/Magento/Core/Model/Translate.php     |  27 +-
 .../Magento/Core/Model/Translate/Inline.php   |  14 +-
 .../Core/Model/Translate/InlineParser.php     |  12 +-
 app/code/Magento/Core/Model/Url.php           |  43 +-
 .../Magento/Core/Model/Validator/Factory.php  |   4 +-
 app/code/Magento/Core/Model/Variable.php      |  14 +-
 app/code/Magento/Core/Model/View/Config.php   |   6 +-
 app/code/Magento/Core/Model/View/Design.php   |  23 +-
 .../Magento/Core/Model/View/Design/Proxy.php  |   2 +
 .../Magento/Core/Model/View/Publisher.php     |  12 +-
 app/code/Magento/Core/Model/Website.php       |   1 -
 app/code/Magento/Core/etc/config.xml          |   5 +
 app/code/Magento/Core/etc/config.xsd          |  42 +
 app/code/Magento/Core/etc/di.xml              |  70 +-
 app/code/Magento/Core/etc/frontend/di.xml     |  20 +
 app/code/Magento/Core/etc/layouts.xsd         |   2 -
 app/code/Magento/Core/functions.php           | 309 -------
 app/code/Magento/Core/i18n/de_DE.csv          |   4 +-
 app/code/Magento/Core/i18n/en_US.csv          |   4 +-
 app/code/Magento/Core/i18n/es_ES.csv          |   4 +-
 app/code/Magento/Core/i18n/fr_FR.csv          |   4 +-
 app/code/Magento/Core/i18n/nl_NL.csv          |   4 +-
 app/code/Magento/Core/i18n/pt_BR.csv          |   4 +-
 app/code/Magento/Core/i18n/zh_CN.csv          |   4 +-
 .../Cron/Plugin/ApplicationInitializer.php    |  59 ++
 .../Model/Config/Backend/Product/Alert.php    |  10 +-
 .../Cron/Model/Config/Backend/Sitemap.php     |  10 +-
 .../Cron/Model/Config/SchemaLocator.php       |   4 +-
 app/code/Magento/Cron/Model/Observer.php      |   4 +-
 app/code/Magento/Cron/etc/di.xml              |   9 +-
 .../Adminhtml/System/Currency/Rate/Matrix.php |   6 +-
 .../Block/Adminhtml/System/Currencysymbol.php |   6 +-
 .../Adminhtml/System/Currencysymbol.php       |   4 +-
 .../Magento/CurrencySymbol/Helper/Data.php    |  28 +-
 .../CurrencySymbol/view/adminhtml/grid.phtml  |   4 +-
 .../Magento/Customer/Block/Address/Edit.php   |   9 -
 .../Address/Renderer/DefaultRenderer.php      |  18 +-
 .../Block/Adminhtml}/Customer.php             |   9 +-
 .../Block/Adminhtml}/Edit.php                 |  15 +-
 .../Block/Adminhtml}/Edit/Form.php            |   6 +-
 .../Edit/Renderer/Attribute/Group.php         |   8 +-
 .../Adminhtml}/Edit/Renderer/Newpass.php      |   6 +-
 .../Block/Adminhtml}/Edit/Renderer/Region.php |   4 +-
 .../Block/Adminhtml}/Edit/Tab/Account.php     |  22 +-
 .../Block/Adminhtml}/Edit/Tab/Addresses.php   |  28 +-
 .../Block/Adminhtml}/Edit/Tab/Cart.php        |  14 +-
 .../Block/Adminhtml}/Edit/Tab/Carts.php       |   8 +-
 .../Block/Adminhtml}/Edit/Tab/Newsletter.php  |  14 +-
 .../Adminhtml}/Edit/Tab/Newsletter/Grid.php   |  14 +-
 .../Tab/Newsletter/Grid/Filter/Status.php     |   6 +-
 .../Tab/Newsletter/Grid/Renderer/Action.php   |   6 +-
 .../Tab/Newsletter/Grid/Renderer/Status.php   |   6 +-
 .../Block/Adminhtml}/Edit/Tab/Orders.php      |   8 +-
 .../Block/Adminhtml}/Edit/Tab/Reviews.php     |  10 +-
 .../Block/Adminhtml}/Edit/Tab/View.php        |  83 +-
 .../Adminhtml}/Edit/Tab/View/Accordion.php    |  12 +-
 .../Block/Adminhtml}/Edit/Tab/View/Cart.php   |   6 +-
 .../Edit/Tab/View/Grid/Renderer/Item.php      |   6 +-
 .../Block/Adminhtml}/Edit/Tab/View/Orders.php |   6 +-
 .../Block/Adminhtml}/Edit/Tab/View/Sales.php  |   6 +-
 .../Adminhtml}/Edit/Tab/View/Wishlist.php     |  12 +-
 .../Wishlist/Grid/Renderer/Description.php    |   6 +-
 .../Block/Adminhtml}/Edit/Tabs.php            |  18 +-
 .../Block/Adminhtml}/Form/Element/Boolean.php |   6 +-
 .../Block/Adminhtml}/Form/Element/File.php    |  16 +-
 .../Block/Adminhtml}/Form/Element/Image.php   |  12 +-
 .../Block/Adminhtml}/Grid.php                 |  18 +-
 .../Block/Adminhtml}/Grid/Filter/Country.php  |   6 +-
 .../Adminhtml}/Grid/Renderer/Multiaction.php  |   6 +-
 .../Block/Adminhtml}/Group.php                |   6 +-
 .../Block/Adminhtml}/Group/Edit.php           |   7 +-
 .../Block/Adminhtml}/Group/Edit/Form.php      |  12 +-
 .../Block/Adminhtml}/Online.php               |  10 +-
 .../Block/Adminhtml}/Online/Filter.php        |   6 +-
 .../Adminhtml}/Online/Grid/Renderer/Ip.php    |   6 +-
 .../Adminhtml}/Online/Grid/Renderer/Type.php  |   6 +-
 .../Adminhtml}/Online/Grid/Renderer/Url.php   |   6 +-
 .../Sales/Order/Address/Form/Renderer/Vat.php |  10 +-
 .../Adminhtml}/System/Config/Validatevat.php  |  18 +-
 .../Magento/Customer/Controller/Account.php   |  24 +-
 .../Cart/Product/Composite/Cart.php           |  14 +-
 .../Controller/Adminhtml}/Group.php           |  22 +-
 .../Controller/Adminhtml/Index.php}           |  36 +-
 .../Controller/Adminhtml}/Online.php          |   4 +-
 .../Adminhtml}/System/Config/Validatevat.php  |   6 +-
 .../Wishlist/Product/Composite/Wishlist.php   |  12 +-
 app/code/Magento/Customer/Helper/Data.php     |  96 +-
 .../Model/Address/Config/SchemaLocator.php    |   4 +-
 .../Model/Attribute/Data/Postcode.php         |   8 +-
 app/code/Magento/Customer/Model/Customer.php  |  64 +-
 .../Customer/Attribute/Backend/Password.php   |  46 +-
 .../Customer/Attribute/Backend/Store.php      |  10 +-
 .../Customer/Attribute/Backend/Website.php    |  10 +-
 app/code/Magento/Customer/Model/Group.php     |  12 +-
 app/code/Magento/Customer/Model/Observer.php  |  18 +-
 .../Model}/Renderer/Region.php                |  18 +-
 .../Customer/Model/Resource/Address.php       |   4 +-
 .../Address/Attribute/Backend/Region.php      |  10 +-
 .../Customer/Model/Resource/Customer.php      |  21 +-
 .../Model/Resource/Customer/Collection.php    |   8 +-
 .../Magento/Customer/Model/Resource/Group.php |   4 +-
 .../Magento/Customer/Model/Resource/Setup.php |   6 +-
 .../Magento/Customer/etc/adminhtml/menu.xml   |   6 +-
 .../Magento/Customer/etc/adminhtml/routes.xml |  32 +
 .../Magento/Customer/etc/adminhtml/system.xml |   2 +-
 app/code/Magento/Customer/etc/di.xml          |   2 +-
 .../view/adminhtml}/edit/js.phtml             |   0
 .../tab/account/form/renderer/group.phtml     |   0
 .../view/adminhtml}/edit/tab/js/addresses.js  |  12 +-
 .../layout/customer_group_index.xml}          |   4 +-
 .../adminhtml/layout/customer_index_cart.xml} |   2 +-
 .../layout/customer_index_carts.xml}          |   2 +-
 .../adminhtml/layout/customer_index_edit.xml} |  14 +-
 .../adminhtml/layout/customer_index_grid.xml} |   2 +-
 .../layout/customer_index_lastorders.xml}     |   2 +-
 .../layout/customer_index_newsletter.xml}     |   2 +-
 .../layout/customer_index_orders.xml}         |   2 +-
 .../layout/customer_index_productreviews.xml} |   2 +-
 .../layout/customer_index_viewcart.xml}       |   2 +-
 .../layout/customer_index_viewwishlist.xml}   |   2 +-
 .../layout/customer_online_index.xml}         |   8 +-
 .../view/adminhtml}/online.phtml              |   0
 .../create/address/form/renderer/vat.phtml    |   0
 .../system/config/validatevat.phtml           |   2 +-
 .../view/adminhtml}/tab/addresses.phtml       |   0
 .../view/adminhtml}/tab/cart.phtml            |  10 +-
 .../view/adminhtml}/tab/newsletter.phtml      |   0
 .../view/adminhtml}/tab/view.phtml            |   2 +-
 .../view/adminhtml}/tab/view/sales.phtml      |   2 +-
 .../Customer/view/frontend/address/edit.phtml |   4 +-
 .../Element/Composite/AbstractComposite.php   |   6 +-
 .../Adminhtml/Editor/Toolbar/Buttons/Edit.php |   6 +-
 .../Adminhtml/Editor/Toolbar/Buttons/Save.php |   5 +-
 .../Adminhtml/Editor/Tools/Code/Custom.php    |   4 +-
 .../Editor/Tools/Code/ImageSizing.php         |   8 +-
 .../Block/Adminhtml/Editor/Tools/Code/Js.php  |   4 +-
 .../Block/Adminhtml/Theme/Button.php          |   3 +-
 .../Adminhtml/System/Design/Editor.php        |  22 +-
 .../Adminhtml/System/Design/Editor/Files.php  |   2 +-
 .../Adminhtml/System/Design/Editor/Tools.php  |  44 +-
 .../Controller/Varien/Router/Standard.php     |  79 +-
 .../Model/Config/Control/ImageSizing.php      |   6 +-
 .../Model/Config/Control/QuickStyles.php      |   6 +-
 .../Editor/Tools/QuickStyles/Form/Builder.php |   6 +-
 .../Model/Theme/Resource/Change.php           |  17 +-
 .../DesignEditor/Model/Url/NavigationMode.php |  10 +-
 app/code/Magento/DesignEditor/etc/di.xml      |  17 -
 .../{Rss => DesignEditor}/etc/frontend/di.xml |  12 +-
 .../adminhtml/editor/tools/code/custom.phtml  |   4 +-
 .../adminhtml/editor/tools/files/tree.phtml   |   2 +-
 .../view/adminhtml/theme/customized.phtml     |   2 +-
 .../view/frontend/translate_inline.phtml      |   2 +-
 .../Model/Resource/Country/Collection.php     |  26 +-
 .../Directory/Model/Resource/Region.php       |   4 +-
 .../Model/Resource/Region/Collection.php      |   4 +-
 app/code/Magento/Directory/etc/di.xml         |   2 +-
 .../Sales/Items/Column/Downloadable/Name.php  |  14 +-
 .../Order/Item/Renderer/Downloadable.php      |  25 +-
 .../Magento/Downloadable/Helper/Download.php  |  85 +-
 app/code/Magento/Downloadable/Helper/File.php |  16 +-
 .../Downloadable/Model/Product/Type.php       |  10 +-
 .../Downloadable/Model/Resource/Link.php      |   4 +-
 .../Sales/Order/Pdf/Items/Creditmemo.php      |  22 +-
 .../Model/Sales/Order/Pdf/Items/Invoice.php   |  25 +-
 app/code/Magento/Downloadable/etc/di.xml      |   9 +-
 .../Downloadable/etc/product_types.xml        |   2 +-
 ...shlist.xml => customer_index_wishlist.xml} |   0
 .../column/downloadable/creditmemo/name.phtml |   2 +-
 .../column/downloadable/invoice/name.phtml    |   2 +-
 .../items/column/downloadable/name.phtml      |   2 +-
 .../items/renderer/downloadable.phtml         |   4 +-
 .../invoice/items/renderer/downloadable.phtml |   4 +-
 .../order/items/renderer/downloadable.phtml   |   4 +-
 .../Attribute/Edit/Main/AbstractMain.php      |   4 +-
 .../Eav/Model/Attribute/Data/AbstractData.php |   8 +-
 .../Magento/Eav/Model/Attribute/Data/File.php |   4 +-
 .../Magento/Eav/Model/Attribute/Data/Text.php |  14 +-
 .../Eav/Model/AttributeDataFactory.php        |  11 +-
 app/code/Magento/Eav/Model/Entity.php         |   8 +-
 .../Eav/Model/Entity/AbstractEntity.php       |  10 +-
 .../Attribute/Backend/AbstractBackend.php     |   9 +-
 .../Entity/Attribute/Backend/Datetime.php     |   6 +-
 .../Model/Entity/Attribute/Backend/Store.php  |   4 +-
 .../Entity/Attribute/Backend/Time/Created.php |  27 +-
 .../Entity/Attribute/Backend/Time/Updated.php |  28 +-
 .../Entity/Attribute/Config/SchemaLocator.php |   4 +-
 .../Entity/Collection/AbstractCollection.php  |  10 +-
 app/code/Magento/Eav/Model/Entity/Setup.php   |   6 +-
 app/code/Magento/Eav/Model/Form.php           |   6 +-
 .../Model/Resource/Attribute/Collection.php   |   4 +-
 .../Eav/Model/Resource/Entity/Attribute.php   |   4 +-
 .../Entity/Attribute/Grid/Collection.php      |   4 +-
 .../Entity/Attribute/Option/Collection.php    |  10 +-
 .../Model/Resource/Entity/Attribute/Set.php   |   4 +-
 .../Resource/Form/Attribute/Collection.php    |   4 +-
 .../Resource/Form/Fieldset/Collection.php     |   4 +-
 .../Magento/Eav/Model/Resource/Helper.php     |   4 +-
 app/code/Magento/Eav/etc/di.xml               |   2 +-
 .../Adminhtml/Product/Helper/Form/Config.php  |   6 +-
 .../Magento/GiftMessage/Helper/Message.php    |  81 +-
 .../GiftMessage/Model/Resource/Setup.php      |   8 +-
 app/code/Magento/GiftMessage/etc/di.xml       |   2 +-
 .../GoogleAdwords/Model/Validator/Factory.php |  31 +-
 app/code/Magento/GoogleAnalytics/Block/Ga.php |  14 +-
 app/code/Magento/GoogleCheckout/Model/Api.php |  13 +-
 .../GoogleCheckout/Model/Api/Xml/Callback.php |  16 +-
 .../Model/Resource/Notification.php           |  31 +-
 app/code/Magento/GoogleCheckout/etc/di.xml    |   2 +-
 .../Block/Adminhtml/AbstractTab.php           |   4 +-
 .../Category/Edit/Tab/Googleoptimizer.php     |   4 +-
 .../Block/Adminhtml/Types/Edit/Attributes.php |   2 +-
 .../Block/Adminhtml/Types/Edit/Form.php       |   6 +-
 .../Adminhtml/Googleshopping/Items.php        |   8 +-
 .../Adminhtml/Googleshopping/Types.php        |  12 +-
 .../Magento/GoogleShopping/Helper/Data.php    |  15 +-
 .../GoogleShopping/Model/AttributeFactory.php |  17 +-
 .../Magento/GoogleShopping/Model/Config.php   |  19 +-
 .../GoogleShopping/Model/MassOperations.php   |   6 +-
 .../Model/Resource/Item/Collection.php        |   4 +-
 app/code/Magento/GoogleShopping/etc/di.xml    |   2 +-
 .../Block/Adminhtml/Export/Edit/Form.php      |   4 +-
 .../Block/Adminhtml/Export/Filter.php         |  10 +-
 .../Block/Adminhtml/Import/Edit/Form.php      |   4 +-
 .../Controller/Adminhtml/Export.php           |   2 +-
 app/code/Magento/ImportExport/Helper/Data.php |  20 +-
 .../ImportExport/Model/AbstractModel.php      |   6 +-
 .../Magento/ImportExport/Model/Export.php     |   4 +-
 .../Model/Export/Config/SchemaLocator.php     |   4 +-
 .../Model/Export/Entity/AbstractEntity.php    |   4 +-
 .../Model/Export/Entity/Product.php           |  12 +-
 .../Model/HttpAdapterFactory.php}             |  23 +-
 .../Magento/ImportExport/Model/Import.php     |  20 +-
 .../Model/Import/AbstractEntity.php           |  47 +-
 .../Model/Import/Config/SchemaLocator.php     |   4 +-
 .../Model/Import/Entity/AbstractEav.php       |  10 +-
 .../Model/Import/Entity/AbstractEntity.php    |  41 +-
 .../Model/Import/Entity/CustomerComposite.php |  10 +-
 .../Import/Entity/Eav/AbstractCustomer.php    |  21 +-
 .../Model/Import/Entity/Eav/Customer.php      |  21 +-
 .../Import/Entity/Eav/Customer/Address.php    |  32 +-
 .../Model/Import/Entity/Product.php           |  39 +-
 .../Model/Import/Entity/Product/Option.php    |  16 +-
 .../Entity/Product/Type/Configurable.php      |   6 +-
 .../Import/Entity/Product/Type/Grouped.php    |   6 +-
 .../ImportExport/Model/Resource/Helper.php    |   4 +-
 .../Import/CustomerComposite/Data.php         |   7 +-
 .../Model/Resource/Import/Data.php            |   4 +-
 app/code/Magento/ImportExport/etc/import.xml  |   4 +-
 .../{Model/EntryPoint => App}/Indexer.php     |  38 +-
 .../Index/{Model/EntryPoint => App}/Shell.php |  40 +-
 .../EntryPoint => App}/Shell/ErrorHandler.php |   2 +-
 app/code/Magento/Index/Model/Event.php        |  10 +-
 .../Model/Indexer/Config/SchemaLocator.php    |   4 +-
 .../Magento/Index/Model/Resource/Process.php  |  26 +-
 app/code/Magento/Index/etc/di.xml             |   2 +-
 .../{Model/EntryPoint => App}/Console.php     | 138 +--
 .../{Model/EntryPoint => App}/Output.php      |   2 +-
 app/code/Magento/Install/Block/Download.php   |  12 +-
 app/code/Magento/Install/Controller/Index.php |   2 +-
 .../Magento/Install/Controller/Wizard.php     |   8 +-
 .../Install/Model/Config/SchemaLocator.php    |   4 +-
 .../Install/Model/EntryPoint/Upgrade.php      |  80 --
 app/code/Magento/Install/Model/Installer.php  |  81 +-
 .../Install/Model/Installer/Console.php       |  12 +-
 .../Magento/Install/Model/Installer/Db.php    |   6 +-
 .../Install/Model/Installer/Db/AbstractDb.php |   4 +-
 app/code/Magento/Install/etc/di.xml           |  17 +-
 app/code/Magento/Install/etc/install/di.xml   |  39 +
 .../Magento/Install/etc/install/routes.xml    |  32 +
 app/code/Magento/Install/etc/module.xml       |   1 -
 .../Block/Adminhtml/Integration.php           |  42 +
 .../Block/Adminhtml/Integration/Edit.php      |  94 ++
 .../Block/Adminhtml/Integration/Edit/Form.php |  63 ++
 .../Adminhtml/Integration/Edit/Tab/Info.php   | 195 +++++
 .../Block/Adminhtml/Integration/Edit/Tabs.php |  42 +
 .../Controller/Adminhtml/Integration.php      | 204 +++++
 .../Cache => Integration}/Exception.php       |   8 +-
 app/code/Magento/Integration/Helper/Data.php  |  32 +
 .../Magento/Integration/Model/Integration.php | 111 +++
 .../Integration/Model/Integration/Factory.php |  57 ++
 .../Integration/Source/Authentication.php     |  43 +
 .../Model/Integration/Source/Status.php       |  49 ++
 .../Model/Resource/Integration.php            |  43 +
 .../Resource/Integration/Collection.php}      |  21 +-
 .../Integration/Service/IntegrationV1.php     | 136 +++
 .../Service/IntegrationV1Interface.php        |  44 +-
 .../Integration/etc/adminhtml/menu.xml        |  33 +
 .../Integration/etc/adminhtml/routes.xml      |  33 +
 app/code/Magento/Integration/etc/di.xml       |  28 +
 app/code/Magento/Integration/etc/module.xml   |  37 +
 .../sql/integration_setup/install-1.0.0.0.php | 117 +++
 .../view/adminhtml/js/integration.js          |  77 ++
 .../layout/adminhtml_integration_edit.xml     |  47 +
 .../layout/adminhtml_integration_grid.xml}    |   6 +-
 .../adminhtml_integration_grid_block.xml      |  72 ++
 .../layout/adminhtml_integration_index.xml    |  33 +
 .../layout/adminhtml_integration_new.xml      |  35 +
 .../Log/{Model/EntryPoint => App}/Shell.php   |  33 +-
 app/code/Magento/Log/Model/Customer.php       |  28 +-
 app/code/Magento/Log/Model/Resource/Log.php   |  16 +-
 app/code/Magento/Log/Model/Resource/Shell.php |   6 +-
 .../Magento/Log/Model/Resource/Visitor.php    |  43 +-
 .../Log/Model/Resource/Visitor/Online.php     |   4 +-
 .../Resource/Visitor/Online/Collection.php    |   4 +-
 .../Visitor/Online/Grid/Collection.php        |   4 +-
 app/code/Magento/Log/Model/Visitor.php        | 102 ++-
 app/code/Magento/Log/Model/Visitor/Online.php |   6 +-
 .../Model/Resource/Problem/Collection.php     |   4 +-
 .../Newsletter/Model/Resource/Queue.php       |   4 +-
 .../Model/Resource/Queue/Collection.php       |   4 +-
 .../Newsletter/Model/Resource/Subscriber.php  |  26 +-
 .../Model/Resource/Subscriber/Collection.php  |   4 +-
 .../Newsletter/Model/Resource/Template.php    |   4 +-
 .../Magento/Newsletter/Model/Template.php     |  14 +-
 app/code/Magento/Newsletter/etc/di.xml        |   2 +-
 .../Block/Authorize/AbstractAuthorize.php     |   2 +-
 .../Controller/Adminhtml/Oauth/Consumer.php   |  16 +-
 app/code/Magento/Oauth/Exception.php          |  12 +-
 app/code/Magento/Oauth/Helper/Service.php     |  25 +-
 app/code/Magento/Oauth/Model/Nonce.php        |   4 +-
 .../Magento/Oauth/Model/Resource/Consumer.php |  17 +-
 .../Magento/Oauth/Model/Resource/Nonce.php    |   4 +-
 .../Magento/Oauth/Model/Resource/Token.php    |  19 +-
 app/code/Magento/Oauth/Model/Token.php        |  17 +-
 app/code/Magento/Oauth/Service/OauthV1.php    |   4 +-
 app/code/Magento/Oauth/etc/config.xml         |   2 -
 app/code/Magento/Oauth/etc/di.xml             |   7 +-
 app/code/Magento/Ogone/Model/Api.php          |  22 +-
 app/code/Magento/Ogone/Model/Config.php       |  20 +-
 app/code/Magento/Page/Block/Html/Welcome.php  |  18 +-
 app/code/Magento/Page/Block/Link/Current.php  |  27 +-
 app/code/Magento/Page/Block/Redirect.php      |   4 +-
 .../Page/Model/Config/SchemaLocator.php       |   4 +-
 .../PageCache/Model/CacheControlFactory.php   |  38 +-
 app/code/Magento/PageCache/Model/Observer.php |  28 +-
 app/code/Magento/PageCache/etc/config.xml     |  17 -
 app/code/Magento/PageCache/etc/di.xml         |  37 +
 .../Magento/PageCache/etc/frontend/di.xml     |  42 +
 .../Paygate/Authorizenet/Payment.php          |   4 +-
 .../Controller/Authorizenet/Payment.php       |   4 +-
 .../Magento/Paygate/Model/Authorizenet.php    |   8 +-
 .../Payment/Model/Config/SchemaLocator.php    |   4 +-
 app/code/Magento/Payment/Model/Info.php       |  16 +-
 app/code/Magento/Payment/Model/Method/Cc.php  |  12 +-
 .../Payment/Model/Recurring/Profile.php       |  10 +-
 .../Adminhtml/Settlement/Details/Form.php     |   4 +-
 .../System/Config/Fieldset/Location.php       |  10 +-
 .../Magento/Paypal/Block/Express/Shortcut.php |  10 +-
 .../Paypal/Block/Standard/Redirect.php        |  26 +-
 .../Controller/Adminhtml/Paypal/Reports.php   |   2 +-
 .../Controller/Express/AbstractExpress.php    |  18 +-
 app/code/Magento/Paypal/Controller/Ipn.php    |   2 +-
 .../Magento/Paypal/Controller/Payflow.php     |   2 +-
 .../Paypal/Controller/Payflowadvanced.php     |   2 +-
 .../Magento/Paypal/Model/Api/AbstractApi.php  |   6 +-
 app/code/Magento/Paypal/Model/Api/Nvp.php     |   4 +-
 app/code/Magento/Paypal/Model/Cert.php        |  18 +-
 app/code/Magento/Paypal/Model/Direct.php      |   8 +-
 .../Magento/Paypal/Model/Express/Checkout.php |   6 +-
 app/code/Magento/Paypal/Model/Hostedpro.php   |   8 +-
 app/code/Magento/Paypal/Model/Observer.php    |   6 +-
 app/code/Magento/Paypal/Model/Payflowlink.php |  18 +-
 app/code/Magento/Paypal/Model/Payflowpro.php  |  31 +-
 .../Paypal/Model/Report/Settlement.php        |   4 +-
 .../Magento/Paypal/Model/Resource/Cert.php    |  18 +-
 .../Model/Resource/Report/Settlement.php      |   4 +-
 .../Model/System/Config/Backend/Cert.php      |  18 +-
 app/code/Magento/Paypal/etc/di.xml            |   2 +-
 .../view/frontend/express/shortcut.phtml      |   4 +-
 .../layout/paypal_express_review_details.xml  |   2 +-
 .../layout/paypal_hostedpro_cancel.xml        |   4 +-
 .../layout/paypal_payflow_cancelpayment.xml   |   6 +-
 .../frontend/layout/paypal_payflow_form.xml   |   6 +-
 .../layout/paypal_payflow_returnurl.xml       |   6 +-
 .../paypal_payflowadvanced_cancelpayment.xml  |   6 +-
 .../layout/paypal_payflowadvanced_form.xml    |   6 +-
 .../paypal_payflowadvanced_returnurl.xml      |   6 +-
 app/code/Magento/PaypalUk/Model/Api/Nvp.php   |  20 +-
 app/code/Magento/PaypalUk/etc/module.xml      |   1 -
 .../layout/paypal_express_review_details.xml  |  20 +-
 app/code/Magento/Persistent/Helper/Data.php   |  43 +-
 .../Magento/Persistent/Helper/Session.php     |  25 +-
 .../Magento/Persistent/Model/Observer.php     |  27 +-
 .../Persistent/Model/Observer/Session.php     |   2 +-
 .../Persistent/Model/Persistent/Config.php    |   6 +-
 .../Persistent/Model/Resource/Session.php     |   4 +-
 app/code/Magento/Persistent/Model/Session.php |  10 +-
 app/code/Magento/Persistent/etc/di.xml        |   5 +-
 .../ProductAlert/Model/Resource/Price.php     |   4 +-
 .../ProductAlert/Model/Resource/Stock.php     |   4 +-
 .../Rating/Block/Adminhtml/Edit/Tab/Form.php  |   4 +-
 .../Block/Adminhtml/Edit/Tab/Options.php      |   4 +-
 .../Magento/Rating/Model/Resource/Rating.php  |  10 +-
 .../Model/Resource/Rating/Collection.php      |   4 +-
 .../Model/Resource/Rating/Grid/Collection.php |   4 +-
 .../Rating/Model/Resource/Rating/Option.php   |  23 +-
 .../Rating/Option/Vote/Collection.php         |   4 +-
 .../view/adminhtml/rating/detailed.phtml      |   2 +-
 .../adminhtml/rating}/validation-rules.js     |   4 +-
 app/code/Magento/Reports/Helper/Data.php      |   8 +-
 app/code/Magento/Reports/Model/Config.php     |   6 +-
 .../Magento/Reports/Model/DateFactory.php     |  41 +
 .../Magento/Reports/Model/Event/Observer.php  |   3 +-
 .../Model/Product/Index/AbstractIndex.php     |  18 +-
 .../Reports/Model/Product/Index/Compared.php  |   4 +-
 .../Model/Resource/Customer/Collection.php    |   8 +-
 .../Summary/Collection/AbstractCollection.php |  31 +-
 .../Magento/Reports/Model/Resource/Event.php  |   4 +-
 .../Magento/Reports/Model/Resource/Helper.php |   4 +-
 .../Model/Resource/Order/Collection.php       |   8 +-
 .../Model/Resource/Product/Collection.php     |  12 +-
 .../Resource/Product/Index/AbstractIndex.php  |  33 +-
 .../Index/Collection/AbstractCollection.php   |  12 +-
 .../Resource/Product/Lowstock/Collection.php  |  14 +-
 .../Model/Resource/Quote/Collection.php       |   2 +-
 .../Model/Resource/Refresh/Collection.php     |   2 +-
 .../Model/Resource/Report/AbstractReport.php  |  31 +-
 .../Model/Resource/Report/Collection.php      |  16 +-
 .../Model/Resource/Report/Product/Viewed.php  |  12 +-
 .../Report/Product/Viewed/Collection.php      |   6 +-
 .../Resource/Review/Customer/Collection.php   |   4 +-
 .../Model/Resource/Wishlist/Collection.php    |   4 +-
 app/code/Magento/Reports/etc/adminhtml/di.xml |  13 +-
 app/code/Magento/Reports/etc/di.xml           |  12 +-
 app/code/Magento/Reports/etc/frontend/di.xml  |  13 +-
 .../adminhtml_report_review_customer_grid.xml |   2 +-
 .../adminhtml_report_review_product_grid.xml  |   2 +-
 .../Magento/Review/Block/Customer/Recent.php  |  42 +-
 .../Magento/Review/Block/Product/View.php     |   8 +-
 .../Magento/Review/Controller/Product.php     |   6 +-
 app/code/Magento/Review/Helper/Data.php       |  40 +-
 .../Magento/Review/Model/Resource/Review.php  |  11 +-
 .../Model/Resource/Review/Collection.php      |   4 +-
 .../Resource/Review/Product/Collection.php    |  32 +-
 .../Resource/Review/Summary/Collection.php    |   8 +-
 .../Magento/Rss/Block/Catalog/NewCatalog.php  |   4 +-
 .../Magento/Rss/Block/Catalog/NotifyStock.php |  33 +-
 app/code/Magento/Rss/Block/Catalog/Review.php |  46 +-
 .../Magento/Rss/Block/Catalog/Special.php     |   2 +-
 app/code/Magento/Rss/Block/Order/NewOrder.php |  39 +-
 .../Rss/Controller/Adminhtml/Authenticate.php |  94 ++
 .../Rss/Controller/Adminhtml/Catalog.php      |  68 ++
 .../Rss/Controller/Adminhtml/Order.php        |  53 ++
 app/code/Magento/Rss/Controller/Catalog.php   |  48 +-
 app/code/Magento/Rss/Controller/Index.php     |   1 -
 app/code/Magento/Rss/Controller/Order.php     |  36 +-
 app/code/Magento/Rss/Helper/Data.php          |  82 --
 app/code/Magento/Rss/Model/Resource/Order.php |   8 +-
 app/code/Magento/Rss/etc/adminhtml/routes.xml |  34 +
 app/code/Magento/Rss/etc/frontend/routes.xml  |   4 +-
 app/code/Magento/Rss/etc/module.xml           |   2 +
 app/code/Magento/Rule/Block/Editable.php      |  19 +-
 app/code/Magento/Rule/Model/AbstractModel.php |  12 +-
 .../Model/Condition/AbstractCondition.php     |   6 +-
 .../Magento/Rule/Model/Condition/Combine.php  |   2 +-
 .../Magento/Rule/Model/Condition/Context.php  |   8 +-
 .../Condition/Product/AbstractProduct.php     |   2 +-
 .../Rule/Model/Resource/AbstractResource.php  |   4 +-
 app/code/Magento/Rule/Model/Rule.php          |   4 +-
 .../promo => Rule/view/adminhtml}/rules.js    |   2 +-
 .../Billing/Agreement/View/Tab/Info.php       |   2 +-
 .../Block/Adminhtml/Items/Column/Name.php     |  43 +-
 .../Block/Adminhtml/Order/Address/Form.php    |   4 +-
 .../Order/Create/Form/AbstractForm.php        |  14 +-
 .../Adminhtml/Order/Create/Form/Account.php   |   4 +-
 .../Adminhtml/Order/Create/Form/Address.php   |   6 +-
 .../Order/Create/Giftmessage/Form.php         |   4 +-
 .../Block/Adminhtml/Order/Create/Totals.php   |   2 +-
 .../Adminhtml/Order/Status/Assign/Form.php    |   4 +-
 .../Block/Adminhtml/Order/Totals/Tax.php      |   6 +-
 .../Sales/Block/Adminhtml/Order/View/Info.php |   2 +-
 .../Adminhtml/Recurring/Profile/Edit/Form.php |   6 +-
 .../Block/Adminhtml/Report/Filter/Form.php    |   4 +-
 .../Adminhtml/Report/Filter/Form/Coupon.php   |   4 +-
 .../Order/Item/Renderer/DefaultRenderer.php   |  56 +-
 app/code/Magento/Sales/Block/Order/Link.php   |   4 +-
 .../Adminhtml/Billing/Agreement.php           |   4 +-
 .../Sales/Controller/Adminhtml/Order.php      |   8 +-
 .../Controller/Adminhtml/Order/Create.php     |   5 +-
 .../Controller/Adminhtml/Order/Creditmemo.php |   2 +-
 .../Controller/Adminhtml/Order/Invoice.php    |   6 +-
 .../Controller/Adminhtml/Order/Shipment.php   |   6 +-
 .../Controller/Adminhtml/Order/Status.php     |  10 +-
 .../Adminhtml/Recurring/Profile.php           |  10 +-
 .../Controller/Adminhtml/Transactions.php     |   2 +-
 .../Sales/Controller/Billing/Agreement.php    |   6 +-
 .../Sales/Controller/Recurring/Profile.php    |   6 +-
 app/code/Magento/Sales/Helper/Guest.php       |  25 +-
 app/code/Magento/Sales/Helper/Reorder.php     |  20 +-
 .../Magento/Sales/Model/AbstractModel.php     |  15 +-
 .../Magento/Sales/Model/AdminOrder/Create.php |   6 +-
 app/code/Magento/Sales/Model/Config.php       |  18 +-
 .../Magento/Sales/Model/Config/Ordered.php    |   6 +-
 .../Sales/Model/Config/SchemaLocator.php      |   4 +-
 .../Magento/Sales/Model/ConfigInterface.php   |   3 +-
 app/code/Magento/Sales/Model/Observer.php     |  45 +-
 app/code/Magento/Sales/Model/Order.php        |   4 +-
 .../Magento/Sales/Model/Order/Creditmemo.php  |   3 +-
 .../Sales/Model/Order/Creditmemo/Comment.php  |   4 +-
 .../Magento/Sales/Model/Order/Invoice.php     |   3 +-
 .../Sales/Model/Order/Invoice/Comment.php     |   4 +-
 .../Magento/Sales/Model/Order/Payment.php     |  10 +-
 .../Sales/Model/Order/Pdf/AbstractPdf.php     |  26 +-
 .../Model/Order/Pdf/Config/SchemaLocator.php  |   4 +-
 .../Sales/Model/Order/Pdf/Creditmemo.php      |  18 +-
 .../Magento/Sales/Model/Order/Pdf/Invoice.php |   6 +-
 .../Items/Creditmemo/DefaultCreditmemo.php    |  18 +-
 .../Pdf/Items/Invoice/DefaultInvoice.php      |  16 +-
 .../Pdf/Items/Shipment/DefaultShipment.php    |  20 +-
 .../Sales/Model/Order/Pdf/Shipment.php        |   6 +-
 .../Model/Order/Pdf/Shipment/Packaging.php    |   6 +-
 .../Magento/Sales/Model/Order/Shipment.php    |   4 +-
 .../Sales/Model/Order/Shipment/Comment.php    |   3 +
 .../Sales/Model/Order/Shipment/Track.php      |   3 +
 .../Sales/Model/Order/Status/History.php      |   3 +
 .../Sales/Model/Order/Total/Config/Base.php   |   4 +-
 .../Sales/Model/Payment/Method/Converter.php  |  10 +-
 .../Model/Quote/Address/Total/Collector.php   |   4 +-
 .../Magento/Sales/Model/Quote/Payment.php     |   6 +-
 .../Magento/Sales/Model/Recurring/Profile.php |  22 +-
 .../Sales/Model/Resource/AbstractResource.php |  19 +-
 .../Resource/Billing/Agreement/Collection.php |   4 +-
 .../Magento/Sales/Model/Resource/Helper.php   |   4 +-
 .../Model/Resource/Order/AbstractOrder.php    |  12 +-
 .../Sales/Model/Resource/Order/Address.php    |   8 +-
 .../Sales/Model/Resource/Order/Collection.php |   4 +-
 .../Sales/Model/Resource/Order/Payment.php    |  13 +-
 .../Resource/Order/Payment/Collection.php     |   4 +-
 .../Magento/Sales/Model/Resource/Quote.php    |  12 +-
 .../Address/Attribute/Backend/Region.php      |   4 +-
 .../Model/Resource/Quote/Item/Collection.php  |   4 +-
 .../Sales/Model/Resource/Quote/Payment.php    |  15 +-
 .../Resource/Quote/Payment/Collection.php     |   4 +-
 .../Model/Resource/Report/Bestsellers.php     |  12 +-
 .../Report/Bestsellers/Collection.php         |   6 +-
 .../Report/Collection/AbstractCollection.php  |   4 +-
 .../Report/Invoiced/Collection/Invoiced.php   |   4 +-
 .../Report/Invoiced/Collection/Order.php      |   4 +-
 .../Sales/Model/Resource/Report/Order.php     |  16 +-
 .../Resource/Report/Order/Collection.php      |   4 +-
 .../Report/Refunded/Collection/Order.php      |   4 +-
 .../Report/Refunded/Collection/Refunded.php   |   4 +-
 .../Report/Shipping/Collection/Order.php      |   4 +-
 .../Report/Shipping/Collection/Shipment.php   |   4 +-
 .../Sales/Model/Resource/Sale/Collection.php  |   4 +-
 .../Magento/Sales/Model/Resource/Setup.php    |  32 +-
 .../data-upgrade-1.6.0.8-1.6.0.9.php          |  12 +-
 app/code/Magento/Sales/etc/di.xml             |   2 +-
 .../adminhtml/order/create/items/grid.phtml   |   4 +-
 .../view/adminhtml/order/create/sidebar.phtml |   2 +-
 ...r_printorder.xml => sales_order_print.xml} |   0
 .../creditmemo/items/renderer/default.phtml   |   2 +-
 .../invoice/items/renderer/default.phtml      |   2 +-
 .../order/items/renderer/default.phtml        |   2 +-
 .../shipment/items/renderer/default.phtml     |   2 +-
 .../Block/Adminhtml}/Promo/Quote.php          |   2 +-
 .../Block/Adminhtml}/Promo/Quote/Edit.php     |   5 +-
 .../Adminhtml}/Promo/Quote/Edit/Form.php      |   4 +-
 .../Promo/Quote/Edit/Tab/Actions.php          |  10 +-
 .../Promo/Quote/Edit/Tab/Conditions.php       |  10 +-
 .../Promo/Quote/Edit/Tab/Coupons.php          |   2 +-
 .../Promo/Quote/Edit/Tab/Coupons/Form.php     |   8 +-
 .../Promo/Quote/Edit/Tab/Coupons/Grid.php     |  10 +-
 .../Tab/Coupons/Grid/Column/Renderer/Used.php |   2 +-
 .../Promo/Quote/Edit/Tab/Labels.php           |   6 +-
 .../Adminhtml}/Promo/Quote/Edit/Tab/Main.php  |  12 +-
 .../Quote/Edit/Tab/Main/Renderer/Checkbox.php |   2 +-
 .../Adminhtml}/Promo/Quote/Edit/Tabs.php      |   2 +-
 .../Controller/Adminhtml}/Promo/Quote.php     |  42 +-
 .../SalesRule/Model/Coupon/Massgenerator.php  |  12 +-
 .../SalesRule/Model/Resource/Coupon.php       |   2 +-
 .../Model/Resource/Report/Collection.php      |   4 +-
 .../SalesRule/Model/Resource/Report/Rule.php  |  16 +-
 .../Magento/SalesRule/Model/Resource/Rule.php |  29 +-
 .../Model/Resource/Rule/Collection.php        |   4 +-
 app/code/Magento/SalesRule/Model/Rule.php     |   4 +-
 .../Magento/SalesRule/etc/adminhtml/menu.xml  |   2 +-
 .../SalesRule/etc/adminhtml/routes.xml        |  32 +
 app/code/Magento/SalesRule/etc/di.xml         |   2 +-
 .../sales_rule_promo_quote_couponsgrid.xml    |  30 +
 .../layout/sales_rule_promo_quote_edit.xml}   |  20 +-
 .../layout/sales_rule_promo_quote_index.xml}  |   4 +-
 .../view/adminhtml/promo/salesrulejs.phtml    |   0
 .../Magento/Sendfriend/Controller/Product.php |  21 +-
 .../Magento/Sendfriend/Model/Sendfriend.php   |  12 +-
 .../Sendfriend/view/frontend/send.phtml       |   2 +-
 .../Service/AuthorizationException.php        |   6 +-
 app/code/Magento/Service/Exception.php        |  25 +-
 .../Service/ResourceNotFoundException.php     |   6 +-
 .../Shipping/Model/Carrier/Factory.php        |   6 +-
 .../Model/Resource/Carrier/Tablerate.php      |  12 +-
 app/code/Magento/Shipping/Model/Shipping.php  |  22 +-
 .../Model/Resource/Catalog/Category.php       |   4 +-
 .../Model/Resource/Catalog/Product.php        |   2 +-
 app/code/Magento/Sitemap/Model/Sitemap.php    |  35 +-
 .../Magento/Tax/Block/Adminhtml/Rate/Form.php |   4 +-
 .../Block/Adminhtml/Rate/Title/Fieldset.php   |   6 +-
 .../Tax/Block/Adminhtml/Rule/Edit/Form.php    |   4 +-
 .../Magento/Tax/Controller/Adminhtml/Tax.php  |   2 +-
 app/code/Magento/Tax/Model/Calculation.php    |  21 +-
 .../Tax/Model/Resource/Calculation.php        |   4 +-
 .../Resource/Calculation/Rate/Collection.php  |   4 +-
 .../Tax/Model/Resource/Report/Collection.php  |   4 +-
 .../Magento/Tax/Model/Resource/Report/Tax.php |  16 +-
 app/code/Magento/Tax/Model/Resource/Setup.php |   8 +-
 .../Magento/Tax/Model/Sales/Order/Tax.php     |   8 +-
 .../Model/System/Config/Source/Tax/Region.php |   6 +-
 app/code/Magento/Tax/etc/di.xml               |   4 +-
 .../System/Design/Theme/Edit/AbstractTab.php  |   4 +-
 .../Design/Theme/Edit/Form/Element/Image.php  |   6 +-
 .../Design/Theme/Edit/Form/Element/Links.php  |   6 +-
 .../System/Design/Theme/Edit/Tab/Css.php      |   8 +-
 .../System/Design/Theme/Edit/Tab/General.php  |   4 +-
 .../Adminhtml/System/Design/Theme.php         |  15 +-
 .../Adminhtml/System/Design/Wysiwyg/Files.php |   6 +-
 .../Magento/Theme/Model/Wysiwyg/Storage.php   |   2 +-
 ...html_system_design_wysiwyg_files_index.xml |   2 +-
 .../Usa/Block/Adminhtml/Dhl/Unitofmeasure.php |  14 +-
 .../Usa/Model/Shipping/Carrier/Dhl.php        |  34 +-
 .../Shipping/Carrier/Dhl/International.php    |  63 +-
 .../Shipping/Carrier/Dhl/Label/Pdf/Page.php   |  24 +-
 .../Usa/Model/Shipping/Carrier/Fedex.php      |  10 +-
 .../Usa/Model/Shipping/Carrier/Ups.php        |   6 +-
 .../Magento/User/Block/User/Edit/Tab/Main.php |   4 +-
 .../User/Controller/Adminhtml/Auth.php        |   2 +-
 app/code/Magento/User/Helper/Data.php         |  20 +-
 .../Magento/User/Model/Acl/Loader/Role.php    |   6 +-
 .../Magento/User/Model/Acl/Loader/Rule.php    |   6 +-
 app/code/Magento/User/Model/Resource/Role.php |  22 +-
 .../Magento/User/Model/Resource/Rules.php     |  10 +-
 app/code/Magento/User/Model/Resource/User.php |  26 +-
 app/code/Magento/User/Model/Role.php          |   2 +-
 app/code/Magento/User/Model/User.php          |  58 +-
 app/code/Magento/User/etc/di.xml              |   2 +-
 .../Controller/Adminhtml/Webapi/User.php      |   4 +-
 .../Webapi/Controller/ErrorProcessor.php      |   9 +-
 app/code/Magento/Webapi/Controller/Rest.php   |  13 +-
 app/code/Magento/Webapi/Controller/Soap.php   |  11 +-
 .../Webapi/Controller/Soap/Handler.php        |   2 +-
 app/code/Magento/Webapi/Exception.php         |  28 +-
 .../Acl/Resource/Config/SchemaLocator.php     |   4 +-
 app/code/Magento/Webapi/Model/Config.php      | 198 +----
 .../Magento/Webapi/Model/Config/Converter.php |  91 ++
 .../Magento/Webapi/Model/Config/Reader.php    |  93 +-
 .../Model}/Config/SchemaLocator.php           |  25 +-
 .../Webapi/Model/Resource/Acl/Role.php        |   4 +-
 .../Webapi/Model/Resource/Acl/User.php        |   4 +-
 app/code/Magento/Webapi/Model/Rest/Config.php |  29 +-
 app/code/Magento/Webapi/Model/Soap/Config.php |  37 +-
 app/code/Magento/Webapi/Model/Soap/Fault.php  |  99 ++-
 app/code/Magento/Webapi/Model/Soap/Wsdl.php   |  86 +-
 .../Webapi/Model/Soap/Wsdl/Generator.php      | 269 +++++-
 app/code/Magento/Webapi/etc/di.xml            |  25 +
 app/code/Magento/Webapi/etc/webapi.xsd        |  58 +-
 .../Adminhtml/Registration/Create/Form.php    |   7 +-
 .../Adminhtml/Subscription/Edit/Form.php      |   4 +-
 .../Adminhtml/Webhook/Registration.php        |   6 +-
 .../Adminhtml/Webhook/Subscription.php        |   6 +-
 .../Model/Config.php}                         |  27 +-
 app/code/Magento/Webhook/Model/Endpoint.php   |  21 +-
 app/code/Magento/Webhook/Model/Event.php      |  39 +-
 app/code/Magento/Webhook/Model/Job.php        |  26 +-
 app/code/Magento/Webhook/Model/Observer.php   |   6 +-
 .../Model/Resource/Event/Collection.php       |  22 +-
 .../Webhook/Model/Resource/Job/Collection.php |  16 +-
 .../Webhook/Model/Resource/Subscription.php   |  28 +-
 .../Resource/Subscription/Collection.php      |   4 +-
 .../Resource/Subscription/Grid/Collection.php |   4 +-
 .../Magento/Webhook/Model/Source/Hook.php     |  23 +-
 .../Magento/Webhook/Model/Subscription.php    |  21 +-
 .../Webhook/Model/Subscription/Config.php     |  41 +-
 .../Webhook/Model/Webapi/User/Factory.php     |  14 +-
 app/code/Magento/Webhook/etc/di.xml           |   5 -
 .../Weee/Model/Attribute/Backend/Weee/Tax.php |   4 +-
 .../Resource/Attribute/Backend/Weee/Tax.php   |   4 +-
 app/code/Magento/Weee/Model/Resource/Tax.php  |  27 +-
 app/code/Magento/Weee/etc/di.xml              |   2 +-
 .../Widget/Block/Adminhtml/Widget/Form.php    |   4 +-
 .../Widget/Instance/Edit/Chooser/Layout.php   |  24 +-
 .../Widget/Instance/Edit/Tab/Main.php         |   4 +-
 .../Widget/Instance/Edit/Tab/Main/Layout.php  |  20 +-
 .../Widget/Instance/Edit/Tab/Settings.php     |   4 +-
 .../Widget/Block/Adminhtml/Widget/Options.php |   4 +-
 .../Controller/Adminhtml/Widget/Instance.php  |  27 +-
 .../Widget/Model/Config/FileResolver.php      |   6 +-
 .../Widget/Model/Config/SchemaLocator.php     |   4 +-
 .../Widget/Model/NamespaceResolver.php        |  93 ++
 .../Magento/Widget/Model/Template/Filter.php  |  40 +-
 app/code/Magento/Widget/Model/Widget.php      |  14 +-
 .../Magento/Widget/Model/Widget/Instance.php  |  40 +-
 app/code/Magento/Widget/etc/di.xml            |   2 +-
 .../view/adminhtml/instance/edit/layout.phtml |  28 +-
 .../Controller/AbstractController.php         |   2 +-
 .../Magento/Wishlist/Controller/Index.php     |  16 +-
 .../Model/Resource/Item/Collection.php        |  14 +-
 .../Model/Resource/Item/Collection/Grid.php   |   8 +-
 app/code/Magento/Wishlist/Model/Wishlist.php  |  37 +-
 .../customer/edit/tab/wishlist.phtml          |   4 +-
 ...shlist.xml => customer_index_wishlist.xml} |   8 +-
 .../wishlist_index_configure_type_simple.xml  |   2 +-
 .../frontend/layout/wishlist_index_share.xml  |   2 +-
 .../frontend/layout/wishlist_shared_index.xml |   2 +-
 .../render/item/price_msrp_item.phtml         |   4 +-
 .../adminhtml/magento_backend/css/debug.css   | 183 ++--
 .../adminhtml/magento_backend/css/pages.css   |   6 +-
 .../Magento_Paypal/express/shortcut.phtml     |   2 +-
 .../paypal_express_review_details.xml         |   2 +-
 .../override/paypal_hostedpro_cancel.xml      |   4 +-
 .../override/paypal_payflow_cancelpayment.xml |   4 +-
 .../layout/override/paypal_payflow_form.xml   |   4 +-
 .../override/paypal_payflow_returnurl.xml     |   4 +-
 .../paypal_payflowadvanced_cancelpayment.xml  |   4 +-
 .../override/paypal_payflowadvanced_form.xml  |   4 +-
 .../paypal_payflowadvanced_returnurl.xml      |   4 +-
 .../paypal_express_review_details.xml         |  12 +-
 .../sales_billing_agreement_index.xml         |   2 +-
 .../override/sales_billing_agreement_view.xml |   2 +-
 .../override/sales_guest_printorder.xml       |   2 +-
 .../sales_recurring_profile_index.xml         |   2 +-
 .../sales_recurring_profile_orders.xml        |   2 +-
 .../override/sales_recurring_profile_view.xml |   2 +-
 .../sales_recurring_profile_view__tabs.xml    |   2 +-
 .../creditmemo/items/renderer/default.phtml   |   2 +-
 .../invoice/items/renderer/default.phtml      |   4 +-
 .../order/items/renderer/default.phtml        |   2 +-
 .../sales/order/items/renderer.phtml          |   4 +-
 .../product/view/base-image.phtml             |   8 +-
 .../items/renderer/downloadable.phtml         |   4 +-
 .../invoice/items/renderer/downloadable.phtml |   4 +-
 .../order/items/renderer/downloadable.phtml   |   4 +-
 .../Magento_Sendfriend/send.phtml             |   2 +-
 .../override/base/wishlist_shared_index.xml   |   2 +-
 .../frontend/magento_plushe/js/theme.js       |   6 +-
 app/etc/config.xml                            |  55 --
 app/etc/di.xml                                |  97 +-
 app/functions.php                             |  41 +
 dev/shell/indexer.php                         |  10 +-
 dev/shell/install.php                         |   4 +-
 dev/shell/log.php                             |   9 +-
 .../TestFramework/Annotation/AppArea.php      |   2 +-
 .../Annotation/ConfigFixture.php              |  19 +-
 .../framework/Magento/TestFramework/App.php   |  41 +
 .../Magento/TestFramework/App/State.php       |  51 ++
 .../Magento/TestFramework/Application.php     | 123 +--
 .../TestFramework/Event/Transaction.php       |   4 +-
 .../Magento/TestFramework/Helper/Config.php   |   2 +-
 .../Magento/TestFramework/ObjectManager.php   |  20 +-
 .../ObjectManager/Configurator.php            |   2 +-
 .../TestFramework/ObjectManagerFactory.php    | 116 +++
 .../TestCase/AbstractConfigFiles.php          |   2 +-
 .../Workaround/Cleanup/StaticProperties.php   |   2 +-
 dev/tests/integration/framework/bootstrap.php |  34 +-
 .../Test/Annotation/ConfigFixtureTest.php     |  46 +-
 .../Magento/Test/ApplicationTest.php          |   8 +-
 .../testsuite/Magento/Test/CookieTest.php     |   2 +-
 .../Magento/Test/Helper/BootstrapTest.php     |   2 +-
 .../Magento/Test/ObjectManagerTest.php        |  31 +-
 .../testsuite/Magento/Test/RequestTest.php    |   2 +-
 .../Test/TestCase/ControllerAbstractTest.php  |   2 +-
 .../Block/Newsletter/Queue/Edit/FormTest.php  |   4 +-
 .../Block/Report/Filter/FormTest.php          |   2 +-
 .../Urlrewrite/Catalog/Category/EditTest.php  |   2 +-
 .../Urlrewrite/Catalog/Product/EditTest.php   |   2 +-
 .../Block/Urlrewrite/Cms/Page/EditTest.php    |   2 +-
 .../Adminhtml/Block/Urlrewrite/EditTest.php   |   2 +-
 .../Adminhtml/Block/Widget/ContainerTest.php  |   2 +-
 .../Magento/App/FrontControllerTest.php       |  13 +-
 .../Block/Directpost/IframeTest.php           |   1 +
 .../Backend/App/Router/DefaultRouterTest.php  |  76 ++
 .../Block/System/Account/Edit/FormTest.php    |   6 +-
 .../Backend/Block/System/Config/FormTest.php  |  19 +-
 .../System/Design/Edit/Tab/GeneralTest.php    |  10 +-
 .../Block/System/Store/DeleteTest.php         |   6 +-
 .../System/Store/Edit/Form/GroupTest.php      |   6 +-
 .../System/Store/Edit/Form/StoreTest.php      |   6 +-
 .../System/Store/Edit/Form/WebsiteTest.php    |   6 +-
 .../Block/System/Store/EditTest.php           |  38 +-
 .../Block/System/Variable/EditTest.php        |   4 +-
 .../Magento/Backend/Block/Widget/FormTest.php |   2 +-
 .../Block/Widget/Grid/MassactionTest.php      |   2 +-
 .../Magento/Backend/Block/WidgetTest.php      |   4 +-
 .../Backend/Block/_files/backend_theme.php    |   2 +-
 .../Backend/Controller/AbstractActionTest.php |   6 +-
 .../Controller/Adminhtml/DashboardTest.php    |  43 +
 .../Adminhtml/System/AccountTest.php          |   8 +-
 .../Adminhtml}/System/DesignTest.php          |   2 +-
 .../Adminhtml}/System/StoreTest.php           |   2 +-
 .../Adminhtml}/System/VariableTest.php        |   2 +-
 .../Controller/Router/DefaultRouterTest.php   | 153 ----
 .../Magento/Backend/Helper/DataTest.php       |   2 +-
 .../Backend/Model/Auth/SessionTest.php        |   2 +-
 .../Magento/Backend/Model/AuthTest.php        |   2 +-
 .../Magento/Backend/Model/ConfigTest.php      |  12 +-
 .../Magento/Backend/Model/MenuTest.php        |   4 +-
 .../Magento/Backend/Model/SessionTest.php     |   2 +-
 .../Magento/Backend/Model/UrlTest.php         |  34 +-
 .../Tab/Bundle/Option/Search/GridTest.php     |   6 +-
 .../Edit/Tab/Bundle/Option/SearchTest.php     |  12 +-
 .../Block/Adminhtml/Product/Edit/TabsTest.php |   6 +-
 .../Product/Helper/Form/CategoryTest.php      |   6 +-
 .../Product/Helper/Form/WeightTest.php        |   4 +-
 .../Catalog/Block/Product/AbstractTest.php    |   2 +
 .../Catalog/Block/Product/ListTest.php        |   2 +
 .../Magento/Catalog/Block/Product/NewTest.php |   4 +-
 .../Product/ProductList/CrosssellTest.php     |   2 +-
 .../Block/Product/ProductList/RelatedTest.php |   2 +-
 .../Product/Action/AttributeTest.php          |  15 +-
 .../Adminhtml/Product/AttributeTest.php       |   2 +-
 .../Controller/Product/CompareTest.php        |  14 +-
 .../Catalog/Helper/Product/ViewTest.php       |   5 +
 .../Magento/Catalog/Helper/ProductTest.php    |   2 +
 .../Model/Category/CategoryImageTest.php      |   5 -
 .../StubZendLogWriterStreamTest.php           |   6 -
 .../Catalog/Model/Layer/Filter/ItemTest.php   |   3 +
 .../Model/Product/Type/AbstractTest.php       |   4 +-
 .../Promo/Catalog/Edit/Tab/MainTest.php       |  10 +-
 .../Magento/CatalogSearch/Helper/DataTest.php |  24 +-
 .../Checkout/Block/Cart/Item/RendererTest.php |   2 +-
 .../Checkout/Block/Cart/SidebarTest.php       |   2 +
 .../Block/Multishipping/OverviewTest.php      |  23 +-
 .../Checkout/Controller/MultishippingTest.php |   2 +-
 .../Adminhtml}/Page/Edit/Tab/DesignTest.php   |  14 +-
 .../Magento/Cms/Controller/RouterTest.php     |   2 +-
 .../testsuite/Magento/Cms/Helper/PageTest.php |   4 +
 .../Magento/Cms/Model/Wysiwyg/ConfigTest.php  |   2 +-
 .../Cms/Model/Wysiwyg/Images/StorageTest.php  |   4 +-
 .../SourceClassWithNamespaceInterceptor.php   |   2 +-
 .../SourceClassWithNamespaceProxy.php         |   2 +-
 ...SourceClassWithoutNamespaceInterceptor.php |   2 +-
 .../SourceClassWithoutNamespaceProxy.php      |   2 +-
 ...ceInterfaceWithoutNamespaceInterceptor.php |   2 +-
 .../Varien => App}/Router/BaseTest.php        |  41 +-
 .../Magento/Core/Block/AbstractBlockTest.php  |   5 +-
 .../Magento/Core/Block/TemplateTest.php       |   8 +-
 .../Core/Controller/Varien/ActionTest.php     |  13 +-
 .../Magento/Core/Helper/AbstractTest.php      |  67 --
 .../Magento/Core/Helper/DataTest.php          | 112 +--
 .../Magento/Core/Helper/HttpTest.php          |  77 --
 .../Magento/Core/Helper/StringTest.php        |  97 --
 .../Magento/Core/Model/App/AreaTest.php       |   1 +
 .../Magento/Core/Model/App/EmulationTest.php  |  11 +-
 .../testsuite/Magento/Core/Model/AppTest.php  |   2 +-
 .../Magento/Core/Model/ConfigTest.php         | 112 ---
 .../Core/Model/DataService/ConfigTest.php     |  10 +-
 .../Core/Model/DataService/LayoutTest.php     |   4 +-
 .../Magento/Core/Model/DesignTest.php         |   5 +-
 .../Core/Model/Email/Template/FilterTest.php  |  10 +-
 .../Magento/Core/Model/Email/TemplateTest.php |   1 +
 .../Core/Model/Email/_files/themes.php        |  10 +-
 .../Core/Model/EntryPoint/HttpTest.php        |  57 --
 .../Core/Model/Fieldset/Config/ReaderTest.php |  16 +-
 .../Magento/Core/Model/LayoutTest.php         |   8 +-
 .../Magento/Core/Model/LocaleTest.php         |   2 +-
 .../Core/Model/Page/Asset/MergedTest.php      |   3 +-
 .../Magento/Core/Model/Resource/CacheTest.php |   2 +-
 .../Core/Model/Resource/Db/AbstractTest.php   |   6 +-
 .../Resource/Db/Collection/AbstractTest.php   |   4 +-
 .../Core/Model/Resource/Db/ProfilerTest.php   |  14 +-
 .../Core/Model/Resource/SessionTest.php       |   4 +-
 .../Magento/Core/Model/Resource/SetupTest.php |   4 +-
 .../Model/Resource/Theme/CollectionTest.php   |   9 +
 .../Magento/Core/Model/ResourceTest.php       |   6 +-
 .../Magento/Core/Model/RouterListTest.php     |  76 --
 .../Session/AbstractSession/VarienTest.php    |  14 +-
 .../Magento/Core/Model/Store/GroupTest.php    |  24 +-
 .../Magento/Core/Model/StoreTest.php          |   2 +-
 .../Core/Model/Theme/CollectionTest.php       |   1 +
 .../Core/Model/Translate/InlineParserTest.php |   2 +-
 .../Core/Model/Translate/InlineTest.php       |   1 +
 .../Magento/Core/Model/TranslateTest.php      |   5 +-
 .../testsuite/Magento/Core/Model/UrlTest.php  |   4 -
 .../Magento/Core/Model/View/DesignTest.php    |  10 +-
 .../Core/Model/View/FileSystemTest.php        |   3 +-
 .../Core/Model/View/PublicationTest.php       |  16 +-
 .../Core/Model/_files/design/themes.php       |  10 +-
 .../testsuite/Magento/Core/Utility/Layout.php |   3 +-
 .../Magento/Core/_files/layout_update.php     |   2 +-
 .../Magento/Core/_files/media_for_change.php  |   5 +-
 .../Edit/Tab/View/AccordionTest.php           |   8 +-
 .../Block/Adminhtml}/OnlineTest.php           |   8 +-
 .../Customer/Controller/AccountTest.php       |   2 +-
 .../Controller/Adminhtml}/GroupTest.php       |  10 +-
 .../Controller/Adminhtml/IndexTest.php}       |  36 +-
 .../Magento/Customer/Service/CustomerTest.php |   4 +
 .../_files/customer_sample.php                |   0
 .../Magento/DB/Adapter/Pdo/MysqlTest.php      |   4 +-
 .../Model/Config/QuickStylesTest.php          |   3 +-
 .../Tools/Controls/ConfigurationTest.php      |   4 +-
 .../Model/Translate/InlineVdeTest.php         |   1 +
 .../Model/_files/design/themes.php            |   4 +-
 .../_files/design_editor_active.php           |   2 +-
 .../Attribute/Edit/Main/AbstractTest.php      |   5 +-
 .../Magento/Encryption/ModelTest.php          |  74 ++
 .../Magento/Filesystem/Adapter/LocalTest.php  |   2 +-
 .../GiftMessage/Block/Message/InlineTest.php  |   2 +-
 .../Model/Validator/FactoryTest.php           |  63 ++
 .../testsuite/Magento/HTTP/HeaderTest.php     |  61 ++
 .../PhpEnvironment/RemoteAddressTest.php}     |  17 +-
 .../HTTP/PhpEnvironment/ServerAddressTest.php |  47 +
 .../Block/Adminhtml/Export/FilterTest.php     |   3 +-
 .../Import/Entity/CustomerCompositeTest.php   |   2 +-
 .../Entity/Eav/Customer/AddressTest.php       |   7 +-
 .../Import/Entity/Eav/CustomerImportTest.php  |   2 +-
 .../Model/Import/EntityAbstractTest.php       |   4 +-
 .../Magento/Install/Block/AdminTest.php       |   4 +-
 .../Magento/Install/Controller/WizardTest.php |   4 +-
 .../testsuite/Magento/Install/IndexTest.php   |  44 -
 .../Magento/Install/Model/ConfigTest.php      |  16 +-
 .../Controller/Adminhtml/IntegrationTest.php  | 130 +++
 .../Magento/Newsletter/Model/QueueTest.php    |   6 +-
 .../ObjectManager/Config/Reader/DomTest.php   |   8 +-
 .../ObjectManager/_files/config_merged.xml    |  12 +-
 .../ObjectManager/_files/config_one.xml       |  10 +-
 .../ObjectManager/_files/config_two.xml       |  10 +-
 .../Page/Block/Html/BreadcrumbsTest.php       |   1 +
 .../Magento/Page/Block/Html/FooterTest.php    |   1 +
 .../Magento/Page/Block/Html/HeadTest.php      |   4 +-
 .../testsuite/Magento/Page/Block/HtmlTest.php |  10 +-
 .../Catalog/Product/View/ProfileTest.php      |   1 +
 .../Magento/Payment/Block/InfoTest.php        |   8 +-
 .../Magento/Paypal/Model/VoidTest.php         |  10 +-
 .../ProductAlert/Block/Email/StockTest.php    |   2 +-
 .../Driver/Standard/Output/FirebugTest.php    |   2 +-
 .../Magento/PubSub/Event/QueueHandlerTest.php |   4 +-
 .../Magento/Rss/Controller/CatalogTest.php    |  14 +-
 .../Magento/Rss/Controller/OrderTest.php      |   2 +-
 .../Order/Create/Form/AbstractTest.php        |  10 +-
 .../Magento/Sales/Block/Order/TotalsTest.php  |   3 +
 .../Block/Recurring/Profile/ViewTest.php      |   2 +
 .../Magento/Sales/Model/AbstractTest.php      |   2 +-
 .../Sales/Model/Order/CreditmemoTest.php      |   2 +-
 .../Magento/Sales/Model/Order/InvoiceTest.php |   2 +-
 .../Magento/Sales/Model/Order/OrderTest.php   |   2 +-
 .../Sales/Model/Order/ShipmentTest.php        |   3 +-
 .../Magento/Sales/_files/order_info.php       |   2 +-
 .../Sales/_files/order_paid_with_saved_cc.php |   2 +-
 .../Promo/Quote/Edit/Tab/LabelsTest.php       |   6 +-
 .../Promo/Quote/Edit/Tab/MainTest.php         |  10 +-
 .../Block/Adminhtml/Rate/ImportExportTest.php |   5 +-
 .../Tax/Model/Calculation/RuleTest.php        |   2 +-
 .../Magento/Test/Integrity/LayoutTest.php     |   9 +
 .../Magento/Widget/TemplateFilesTest.php      |   5 +
 .../Modular/BlockInstantiationTest.php        |   2 +-
 .../Test/Integrity/Modular/CacheFilesTest.php |   4 +-
 .../Modular/CrontabConfigFilesTest.php        |   2 +-
 .../Integrity/Modular/DiConfigFilesTest.php   |   4 +-
 .../Integrity/Modular/MenuConfigFilesTest.php |   2 +-
 .../Modular/ResourcesConfigFilesTest.php      |   6 +-
 .../Modular/RouteConfigFilesTest.php          |   6 +-
 .../Modular/SalesConfigFilesTest.php          |   2 +-
 .../Modular/SystemConfigFilesTest.php         |   2 +-
 .../Integrity/Modular/TemplateFilesTest.php   |   4 +-
 .../Integrity/Modular/UsaConfigFilesTest.php  |   2 +-
 .../Integrity/Modular/ViewConfigFilesTest.php |   2 +-
 .../Test/Integrity/Modular/ViewFilesTest.php  |  13 +-
 .../Modular/_files/skip_blocks_ce.php         |   8 +-
 .../Test/Integrity/Theme/ViewFilesTest.php    |   5 +
 .../Test/Integrity/ViewFileReferenceTest.php  |   5 +
 .../User/Controller/Adminhtml/AuthTest.php    |  57 +-
 .../testsuite/Magento/User/Model/UserTest.php |  11 +-
 .../FileResolution/Strategy/FallbackTest.php  |   5 +-
 .../Block/Adminhtml/AbstractFormTest.php      |   2 +
 .../Webapi/ServiceNameCollisionTest.php       |  55 ++
 .../Magento/Webhook/Model/ObserverTest.php    |   6 -
 .../Model/Resource/Event/CollectionTest.php   |   4 +-
 .../Webhook/Model/Resource/EventTest.php      |   2 +-
 .../Model/Resource/Job/CollectionTest.php     |   4 +-
 .../Webhook/Model/Resource/JobTest.php        |   2 +-
 .../Resource/Subscription/CollectionTest.php  |  16 +-
 .../Subscription/Grid/CollectionTest.php      |  99 +--
 .../_files/Acme/Subscriber/etc/config.xml     |  50 --
 .../Webhook/Model/Subscription/ConfigTest.php |  82 +-
 .../_files/Acme/Subscriber/etc/config.xml     |  50 --
 .../Webhook/Model/SubscriptionTest.php        |  14 +-
 .../Instance/Edit/Chooser/LayoutTest.php      |   3 +
 .../Instance/Edit/Tab/Main/LayoutTest.php     |   3 +-
 .../Adminhtml/Widget/InstanceTest.php         |   3 +-
 .../Magento/Widget/Model/Config/DataTest.php  |  16 +-
 .../Widget/Model/Config/FileResolverTest.php  |   4 +-
 .../Widget/Model/Config/ReaderTest.php        |  16 +-
 .../Widget/Model/Widget/ConfigTest.php        |   4 +-
 .../Widget/Model/Widget/InstanceTest.php      |   8 +
 .../Magento/Widget/Model/WidgetTest.php       |   7 +-
 .../Magento/Widget/_files/themes.php          |   2 +-
 .../Magento/Wishlist/Block/AbstractTest.php   |   3 +-
 .../Magento/Wishlist/Controller/IndexTest.php |   2 +-
 .../Magento/TestFramework/Application.php     |   4 +-
 .../fixtures/shipping_flatrate_enabled.php    |   2 +-
 .../CodingStandard/Tool/CodeMessDetector.php  |   2 +-
 .../Magento/TestFramework/Utility/Files.php   |  13 +-
 .../Test/Integrity/Compiler/CompilerTest.php  |  86 --
 .../Test/Integrity/Di/CompilerTest.php        | 239 +++++
 .../Test/Integrity/Di/ConfigurationTest.php   | 104 ---
 .../Integrity/Magento/Page/ConfigTest.php     |   6 +-
 .../Magento/Payment/Model/ConfigTest.php      |   6 +-
 .../Magento/Persistent/ConfigTest.php         |   6 +-
 .../Magento/Test/Integrity/Phrase/JsTest.php  |   2 +-
 .../_files/blacklist/adminhtml_decoupling.php |  28 +-
 .../Integrity/_files/blacklist/namespace.txt  |  10 +
 .../Magento/Test/Js/_files/blacklist/core.txt |   2 +-
 .../Magento/Test/Legacy/LayoutTest.php        |  29 +
 .../Magento/Test/Legacy/ObsoleteCodeTest.php  |  12 +-
 .../Test/Legacy/_files/obsolete_classes.php   | 402 ++++++++-
 .../Legacy/_files/obsolete_config_nodes.php   |  21 +-
 .../Test/Legacy/_files/obsolete_constants.php | 197 ++++-
 .../Test/Legacy/_files/obsolete_methods.php   | 105 ++-
 .../Legacy/_files/obsolete_properties.php     |  15 +-
 .../Test/Php/_files/blacklist/common.txt      |  10 +-
 .../Php/_files/phpcpd/blacklist/common.txt    |   6 +
 .../Php/_files/phpcs/blacklist/common.txt     |   8 +-
 .../Magento/Test/Php/_files/phpcs/ruleset.xml |   1 +
 .../Test/Php/_files/whitelist/common.txt      |  18 +-
 .../Magento/Test/Block/Adminhtml.php          |  19 +-
 dev/tests/unit/framework/bootstrap.php        |   3 +-
 .../Helper/ObjectManagerTest.php              |  20 +-
 .../Magento/Acl/Resource/ProviderTest.php     |  16 +-
 .../Model/System/Message/SecurityTest.php     |   2 +-
 .../Page/System/Config/Robots/ResetTest.php   |   2 +-
 .../Magento/Adminhtml/DashboardTest.php       |   4 +-
 .../Model/LayoutUpdate/ValidatorTest.php      |   2 +-
 .../Config/FileResolver/PrimaryTest.php       |   6 +-
 .../FileResolver/_files/app/etc/config.xml    |  10 +-
 .../_files/app/etc/custom/config.xml          |  29 +
 .../_files/primary/app/etc/di.xml}            |   4 +-
 .../primary/app/etc/some_config/di.xml}       |   4 +-
 .../Magento/App/Config/LoaderTest.php         |  76 ++
 .../Magento/App/Config/_files/local.xml       |  30 +
 .../Config/_files/other/local_developer.xml   |  31 +
 .../unit/testsuite/Magento/App/ConfigTest.php |  74 ++
 .../unit/testsuite/Magento/App/CronTest.php   |  64 ++
 .../Magento/App/Dir/VerificationTest.php      |  16 +-
 .../Magento/App/EntryPoint/EntryPointTest.php |  89 ++
 .../Magento/App/Error/HandlerTest.php         | 130 +++
 .../{Core/Model => App}/FrontClass.php        |   2 +-
 .../Magento/App/FrontControllerTest.php       |  40 +-
 .../App/ObjectManager/ConfigCacheTest.php     |  66 ++
 .../ObjectManager/ConfigLoaderTest.php        |   6 +-
 .../Magento/App/Request/HttpTest.php          |  15 +-
 .../Resource/Config/ConverterTest.php         |   9 +-
 .../Resource/Config/ReaderTest.php            |  28 +-
 .../Resource}/Config/SchemaLocatorTest.php    |  20 +-
 .../Model => App}/Resource/Config/XsdTest.php |   4 +-
 .../_files/invalidResourcesXmlArray.php       |   0
 .../Resource/Config/_files/resources.php      |   0
 .../Resource/Config/_files/resources.xml      |   0
 .../Config/_files/valid_resources.xml         |   0
 .../Resource/ConfigTest.php}                  |  13 +-
 .../Route/Config/ConverterTest.php            |   6 +-
 .../Route/Config/_files/routes.php            |   4 +-
 .../Route/Config/_files/routes.xml            |   4 +-
 .../{Core/Model => App}/Route/ConfigTest.php  |  50 +-
 .../{Core/Model => App}/RouterListTest.php    |  18 +-
 .../unit/testsuite/Magento/App/StateTest.php  |  90 ++
 .../App/Area/FrontNameResolverTest.php        |   2 +-
 .../System/Config/Form/Field/ExportTest.php   |   8 +-
 .../Form/Field/FieldArray/AbstractTest.php    |   8 +-
 .../Backend/Block/System/Config/FormTest.php  |   2 +-
 .../Block/System/Email/Template/EditTest.php  |  10 +-
 .../Backend/Block/Widget/ButtonTest.php       |  13 -
 .../Magento/Backend/Block/Widget/GridTest.php |  22 +-
 .../Adminhtml}/System/AccountTest.php         |   8 +-
 .../Adminhtml/System/Config/SaveTest.php      |   2 +-
 .../Magento/Backend/Helper/DataTest.php       |  14 +-
 .../Model/Config/Backend/BaseurlTest.php      |   4 +-
 .../Model/Config/Backend/EncryptedTest.php    |  10 +-
 .../Model/Config/Backend/SecureTest.php       |   4 +-
 .../Model/Config/SchemaLocatorTest.php        |   2 +-
 .../Model/Config/Source/Admin/PageTest.php    |   2 +-
 .../Backend/Model/Menu/BuilderTest.php        |   2 +-
 .../Model/Menu/Config/SchemaLocatorTest.php   |   2 +-
 .../Magento/Backend/Model/Menu/ConfigTest.php |   9 +-
 .../Model/Menu/Director/DirectorTest.php      |   2 +-
 .../Model/Menu/Filter/IteratorTest.php        |   2 +-
 .../Magento/Backend/Model/Menu/ItemTest.php   |   2 +-
 .../Magento/Backend/Model/MenuTest.php        |   4 +-
 .../Model/Router/NoRouteHandlerTest.php       |   2 +-
 .../Magento/Backend/Model/UrlTest.php         |   9 +-
 .../Magento/Captcha/Helper/DataTest.php       |   4 +-
 .../Magento/Captcha/Model/DefaultTest.php     |   4 +-
 .../Adminhtml/Product/Attribute/GridTest.php  |   2 +-
 .../Edit/Tab/Super/Config/MatrixTest.php      |   2 +-
 .../Product/Helper/Form/WeightTest.php        |  16 +-
 .../Catalog/Helper/Product/FlatTest.php       |  37 +
 .../Model/Attribute/Config/ReaderTest.php     |   2 +-
 .../Attribute/Config/SchemaLocatorTest.php    |   4 +-
 .../Attribute/Backend/CategoryTest.php        |   2 +-
 .../Backend/Groupprice/AbstractTest.php       |   2 +-
 .../Model/Product/Type/ConfigurableTest.php   |   2 +-
 .../Model/Product/Type/GroupedTest.php        |   2 +-
 .../Catalog/Model/Product/Type/SimpleTest.php |   2 +-
 .../Model/Product/Type/VirtualTest.php        |   2 +-
 .../ProductTypes/Config/SchemaLocatorTest.php |   2 +-
 .../Config/_files/product_types.php           |  17 +-
 .../Config/_files/product_types.xml           |   9 +
 .../Catalog/Model/Resource/AbstractTest.php   |   2 +-
 .../Model/Resource/Category/TreeTest.php      |  32 +-
 .../Block/Adminhtml/Form/Field/StockTest.php  |  12 +-
 .../Magento/Code/Generator/ClassTest.php      |  60 --
 .../Validator/NotProtectedExtensionTest.php   |  86 ++
 .../GeneratorTest/SimpleObjectManager.php     |  13 +
 .../Validator/ConstructorIntegrityTest.php    |  91 ++
 .../SomeModule/Model/ElementFactory.php       |  28 +
 .../Magento/SomeModule/Model/Five/Test.php    |  42 +
 .../Magento/SomeModule/Model/Four/Test.php    |  43 +
 .../Magento/SomeModule/Model/One/Test.php     |  39 +
 .../code/Magento/SomeModule/Model/Proxy.php   |  28 +
 .../Magento/SomeModule/Model/Six/Test.php     |  43 +
 .../Magento/SomeModule/Model/Three/Test.php   |  48 +
 .../Magento/SomeModule/Model/Two/Test.php     |  41 +
 .../Magento/Config/ValidationStateTest.php    |   2 +-
 .../Magento/Convert/ConvertArrayTest.php      |  83 ++
 .../testsuite/Magento/Convert/XmlTest.php     |  50 ++
 .../Plugin/DispatchExceptionHandlerTest.php   |  60 ++
 .../FrontController/Plugin/InstallTest.php    |   6 +-
 .../Plugin/RequestPreprocessorTest.php        |  39 +-
 .../{Model/EntryPoint => App}/MediaTest.php   |  71 +-
 .../App/_files}/.gitignore                    |   0
 .../Magento/Core/Block/TemplateTest.php       |   8 +-
 .../Core/Controller/Request/HttpTest.php      |   2 +-
 .../Controller/Varien/AbstractActionTest.php  |   2 +-
 .../Controller/Varien/Action/ForwardTest.php  |   2 +-
 .../Controller/Varien/Action/RedirectTest.php |   2 +-
 .../Magento/Core/Helper/StringTest.php        | 108 +++
 .../Magento/Core/Helper/Url/RewriteTest.php   |   2 +-
 .../Magento/Core/Model/App/StateTest.php      |  12 +-
 .../testsuite/Magento/Core/Model/AppTest.php  |   2 +-
 .../Core/Model/Cache/Frontend/FactoryTest.php |   2 +-
 .../Core/Model/Config/FileResolverTest.php    |   2 +-
 .../Core/Model/Config/Initial/ReaderTest.php  |  11 +-
 .../Core/Model/Config/Initial/XsdTest.php     |  71 ++
 .../Model/Config/Initial/_files/config.xsd    |  28 +
 .../Initial/_files/invalidConfigXmlArray.php  |  29 +
 .../Config/Initial/_files/valid_config.xml    |  14 +-
 .../Magento/Core/Model/Config/LoaderTest.php  | 102 ---
 .../Magento/Core/Model/Config/PrimaryTest.php | 111 ---
 .../Magento/Core/Model/Config/StorageTest.php |  98 ---
 .../Magento/Core/Model/Config/XsdTest.php     |   3 +-
 .../Magento/Core/Model/ConfigTest.php         | 144 ---
 .../Model/DataService/Config/ReaderTest.php   |   2 +-
 .../Core/Model/DataService/ConfigTest.php     |   4 +-
 .../Email/Template/Config/ReaderTest.php      |   6 +-
 .../Template/Config/SchemaLocatorTest.php     |   4 +-
 .../Core/Model/Email/Template/ConfigTest.php  |   4 +-
 .../Magento/Core/Model/EncryptionTest.php     |  84 --
 .../Core/Model/EntryPoint/CronTest.php        |  68 --
 .../Core/Model/File/Storage/MediaTest.php     | 105 +++
 .../Magento/Core/Model/Layout/UpdateTest.php  |  15 +-
 .../Core/Model/Locale/ValidatorTest.php       |   3 +-
 .../Magento/Core/Model/ModuleManagerTest.php  |   2 +-
 .../Core/Model/Page/Asset/MergedTest.php      |   2 +-
 .../Core/Model/Page/Asset/MinifiedTest.php    |   4 +-
 .../Resource/Config/SchemaLocatorTest.php     |  68 --
 .../Core/Model/Resource/Db/AbstractTest.php   |   8 +-
 .../Resource/Layout/AbstractTestCase.php      |   5 +-
 .../Resource/Layout/Link/CollectionTest.php   |   3 +-
 .../Resource/Layout/Update/CollectionTest.php |   3 +-
 .../Core/Model/Resource/SessionTest.php       |   2 +-
 .../Model/Resource/Setup/MigrationTest.php    |  16 +-
 .../Core/Model/Store/Storage/DefaultTest.php  |  13 +-
 .../Core/Model/Store/StorageFactoryTest.php   |  34 +-
 .../Model/Theme/Customization/PathTest.php    |  11 +-
 .../Core/Model/Theme/Domain/VirtualTest.php   |   8 +-
 .../Magento/Core/Model/Theme/ImageTest.php    |   4 +-
 .../testsuite/Magento/Core/Model/UrlTest.php  |   7 +-
 .../Core/Model/Validator/FactoryTest.php      |   4 +-
 .../Plugin/ApplicationInitializerTest.php     |  52 ++
 .../Cron/Model/Config/Reader/XmlTest.php      |   2 +-
 .../Cron/Model/Config/SchemaLocatorTest.php   |   2 +-
 .../Magento/Cron/Model/ObserverTest.php       |   4 +-
 .../Controller/Adminhtml/IndexTest.php}       |  20 +-
 .../Model/Address/Config/ReaderTest.php       |   2 +-
 .../Address/Config/SchemaLocatorTest.php      |   4 +-
 .../Magento/Customer/Model/CustomerTest.php   |  15 +-
 .../Magento/Data/Collection/DbTest.php        |   4 +-
 .../FactoryTest.php => FormFactoryTest.php}   |  21 +-
 .../unit/testsuite/Magento/Data/FormTest.php  |  27 +-
 .../Editor/Toolbar/Buttons/SaveTest.php       |  79 +-
 .../Editor/Tools/Code/CustomTest.php          |   2 +-
 .../Adminhtml/Editor/Tools/Code/JsTest.php    |   2 +-
 .../Controller/Varien/Router/StandardTest.php |  92 +-
 .../Model/Config/Control/QuickStylesTest.php  |   4 +-
 .../Model/Url/NavigationModeTest.php          |   9 +-
 .../Model/Resource/Country/CollectionTest.php |   2 +-
 .../Downloadable/Model/Product/TypeTest.php   |   4 +-
 .../Sales/Order/Pdf/Items/CreditmemoTest.php  |   8 +-
 .../Eav/Model/Attribute/Data/TextTest.php     |   6 +-
 .../Magento/Eav/Model/Entity/AbstractTest.php |   8 +-
 .../Entity/Attribute/Backend/ArrayTest.php    |   2 +-
 .../Model/Resource/Entity/AttributeTest.php   |   4 +-
 .../Model/Validator/Attribute/DataTest.php    |  32 +-
 .../Crypt/_files/_cipher_info.php             |   0
 .../Crypt/_files/_crypt_fixtures.php          |   0
 .../Magento/{ => Encryption}/CryptTest.php    |  26 +-
 .../Magento/Encryption/EncryptorTest.php      | 238 +++++
 .../unit/testsuite/Magento/EscaperTest.php    | 106 +++
 .../Event/Invoker/InvokerDefaultTest.php      |   2 +-
 .../testsuite/Magento/Event/ManagerTest.php   |  23 +-
 .../unit/testsuite/Magento/FilesystemTest.php |  41 +
 .../Magento/Filter/AbstractFactoryTest.php    | 153 ++++
 .../Filter/FilterManager/ConfigTest.php       |  47 +
 .../Magento/Filter/FilterManagerTest.php      | 153 ++++
 .../RemoveAccentsTest.php}                    |  25 +-
 .../RemoveTagsTest.php}                       |  13 +-
 .../Magento/Filter/SplitWordsTest.php         |  40 +
 .../Magento/Filter/StripTagsTest.php          |  37 +
 .../testsuite/Magento/Filter/TruncateTest.php |  66 ++
 .../Model/Validator/FactoryTest.php           |  27 +-
 .../Block/SiteVerificationTest.php            |  27 +-
 .../Model/AttributeFactoryTest.php            |  20 +-
 .../AuthenticationTest.php}                   |  34 +-
 .../testsuite/Magento/Http/HeaderTest.php     | 207 +++++
 .../Http/PhpEnvironment/RemoteAddressTest.php | 115 +++
 .../Http/PhpEnvironment/ServerAddressTest.php |  78 ++
 .../Model/Export/Config/SchemaLocatorTest.php |   2 +-
 .../Magento/ImportExport/Model/ExportTest.php |   2 +-
 .../Model/Import/Config/SchemaLocatorTest.php |   2 +-
 .../Model/Import/Entity/AbstractTest.php      |   2 +-
 .../Import/Entity/CustomerCompositeTest.php   |  56 +-
 .../Entity/Eav/Customer/AddressTest.php       |  15 +-
 .../Model/Import/Entity/EavAbstractTest.php   |  40 +-
 .../Import/Entity/Product/OptionTest.php      |   7 +-
 .../Model/Import/EntityAbstractTest.php       |   6 +-
 .../CollectionByPagesIteratorTest.php         |   2 +-
 .../Import/CustomerComposite/DataTest.php     |   4 +-
 .../Magento/Index/App/IndexerTest.php         |  93 ++
 .../{Model/EntryPoint => App}/ShellTest.php   |  34 +-
 .../Index/Model/EntryPoint/IndexerTest.php    |  99 ---
 .../Indexer/Config/SchemaLocatorTest.php      |   2 +-
 .../{Model/EntryPoint => App}/ConsoleTest.php |  89 +-
 .../EntryPoint => App}/_files/config.php      |   0
 .../Install/Model/EntryPoint/UpgradeTest.php  | 103 ---
 .../Install/Model/Installer/Db/Mysql4Test.php |   4 +-
 .../Controller/Adminhtml/IntegrationTest.php  | 354 ++++++++
 .../Model/Integration/FactoryTest.php         |  59 ++
 .../Integration/Source/AuthenticationTest.php |  40 +
 .../Model/Integration/Source/StatusTest.php}  |  36 +-
 .../Integration/Service/IntegrationV1Test.php | 321 +++++++
 .../{Model/EntryPoint => App}/ShellTest.php   |  23 +-
 .../{Core/Model => Log}/LoggerTest.php        |  55 +-
 .../testsuite/Magento/Math/DivisionTest.php   |  50 ++
 .../testsuite/Magento/Math/RandomTest.php     |  88 ++
 .../Module/Declaration/Converter/DomTest.php  |   6 +-
 .../_files/converted_valid_module.php         |   0
 .../Converter/_files/valid_module.xml         |   0
 .../app/code/Module/Four/etc/module.xml       |   0
 .../_files/app/code/Module/One/etc/module.xml |   0
 .../app/code/Module/Three/etc/module.xml      |   0
 .../_files/app/code/Module/Two/etc/module.xml |   0
 .../_files/app/etc/custom/module.xml          |   0
 .../Module/Declaration/FileResolverTest.php   |   6 +-
 .../Declaration/Reader/FilesystemTest.php     |  12 +-
 .../Modules => Module/Dir}/ReaderTest.php     |  49 +-
 .../Module/Dir/ReverseResolverTest.php        |  14 +-
 .../Magento/{App => }/Module/DirTest.php      |  18 +-
 .../{App => }/Module/ResourceResolverTest.php |  13 +-
 .../Magento/{App => Module}/UpdaterTest.php   |  12 +-
 .../data/module_first_setup}/.gitignore       |   0
 .../data/module_second_setup}/.gitignore      |   0
 .../Module/sql/module_first_setup/.gitignore  |   0
 .../Magento/Newsletter/Model/TemplateTest.php |   4 +-
 .../Magento/Oauth/Helper/ServiceTest.php      |  12 +-
 .../Mapper/_files/mapped_simple_di_config.php |   2 +-
 .../Config/Mapper/_files/simple_di_config.xml |   4 +-
 .../Outbound/Formatter/FactoryTest.php        |   2 +-
 .../Magento/Page/Block/Link/CurrentTest.php   |  41 +-
 .../Magento/Persistent/Helper/DataTest.php    |  14 +-
 .../Model/Resource/Report/CollectionTest.php  |   7 +-
 .../Block/Adminhtml/Order/Totals/TaxTest.php  |   2 +-
 .../Magento/Sales/Model/Config/ReaderTest.php |   2 +-
 .../Sales/Model/Config/SchemaLocatorTest.php  |   2 +-
 .../Sales/Model/Order/Pdf/AbstractTest.php    |   4 +-
 .../Model/Order/Pdf/Config/ReaderTest.php     |   2 +-
 .../Order/Pdf/Config/SchemaLocatorTest.php    |   4 +-
 .../Sales/Model/Order/Pdf/InvoiceTest.php     |   4 +-
 .../Model/Resource/Report/RuleTest.php        |   2 +-
 .../Magento/Stdlib/ArrayUtilsTest.php         |  68 ++
 .../{DateTest.php => Stdlib/DateTimeTest.php} |  57 +-
 .../testsuite/Magento/Stdlib/StringTest.php   |  82 ++
 .../Di/Code/Scanner/CompositeScannerTest.php  |   8 +-
 .../Tools/Di/Code/Scanner/PhpScannerTest.php  |  43 +-
 .../Tools/Di/Code/Scanner/XmlScannerTest.php  |  25 +-
 .../app/code/Magento/SomeModule/Element.php}  |   9 +-
 .../Magento/SomeModule/ElementFactory.php     |  26 +-
 .../code/Magento/SomeModule/Helper/Test.php   |  25 +-
 .../app/code/Magento/SomeModule/etc/di.xml    |   9 +-
 .../System/Design/Theme/Tab/CssTest.php       |   2 +-
 .../System/Design/Theme/Tab/JsTest.php        |   2 +-
 .../System/Design/Theme/TabAbstractTest.php   |   2 +-
 .../User/Model/Acl/Loader/RoleTest.php        |   2 +-
 .../User/Model/Acl/Loader/RuleTest.php        |   2 +-
 .../Source/Decorator/ModuleDependencyTest.php |   2 +-
 .../Adminhtml/Role/Edit/Tab/ResourceTest.php  |   2 +-
 .../Webapi/Block/Adminhtml/Role/EditTest.php  |  30 +-
 .../Webapi/Block/Adminhtml/User/EditTest.php  |  45 +-
 .../Webapi/Controller/ErrorProcessorTest.php  |  11 +-
 .../Magento/Webapi/Controller/RestTest.php    |   3 -
 .../Acl/Resource/Config/SchemaLocatorTest.php |   2 +-
 .../Magento/Webapi/Model/Acl/RoleTest.php     |   6 +-
 .../Magento/Webapi/Model/Acl/RuleTest.php     |   6 +-
 .../Webapi/Model/Acl/User/RoleUpdaterTest.php |   2 +-
 .../Magento/Webapi/Model/Acl/UserTest.php     |   6 +-
 .../Model/Authorization/Loader/RoleTest.php   |   2 +-
 .../Model/Authorization/Loader/RuleTest.php   |   2 +-
 .../Webapi/Model/Config/ConverterTest.php     |  45 +
 .../Webapi/Model/Config/_files/webapi.php     |  65 ++
 .../Webapi/Model/Config/_files/webapi.xml     |  38 +
 .../Model/Resource/Acl/AbstractTest.php       |   2 +-
 .../Webapi/Model/Resource/Acl/RoleTest.php    |   2 +-
 .../Webapi/Model/Resource/Acl/RuleTest.php    |   4 +-
 .../Webapi/Model/Resource/Acl/UserTest.php    |   2 +-
 .../Magento/Webapi/Model/Soap/ConfigTest.php  | 103 ++-
 .../Magento/Webapi/Model/Soap/FaultTest.php   |  66 +-
 .../soap_fault/soap_fault_expected_xmls.php   |  12 +-
 .../Registration/Create/FormTest.php          |   2 +-
 .../Adminhtml/Subscription/Edit/FormTest.php  |   2 +-
 .../Adminhtml/Webhook/RegistrationTest.php    |   2 +-
 .../Adminhtml/Webhook/SubscriptionTest.php    |   2 +-
 .../Magento/Webhook/Model/EndpointTest.php    |   8 +-
 .../Magento/Webhook/Model/EventTest.php       |  27 +-
 .../Magento/Webhook/Model/JobTest.php         |  29 +-
 .../Magento/Webhook/Model/ObserverTest.php    |   2 +-
 .../Webhook/Model/Resource/EndpointTest.php   |   2 +-
 .../Model/Resource/Event/CollectionTest.php   |   5 +-
 .../Webhook/Model/Resource/EventTest.php      |   2 +-
 .../Model/Resource/Job/CollectionTest.php     |   7 +-
 .../Webhook/Model/Resource/JobTest.php        |   2 +-
 .../Resource/Subscription/CollectionTest.php  |   6 +-
 .../Subscription/Grid/CollectionTest.php      |   2 +-
 .../Model/Resource/SubscriptionTest.php       |  33 +-
 .../Magento/Webhook/Model/Source/Pkg.php      |  14 +-
 .../Webhook/Model/Subscription/ConfigTest.php |  94 +-
 .../Webhook/Model/SubscriptionTest.php        |  28 +-
 .../Webhook/Model/Webapi/User/FactoryTest.php |  16 +-
 .../Widget/Model/Widget/InstanceTest.php      |  38 +-
 .../Magento/Widget/Model/WidgetTest.php       |  23 +-
 .../Model/_files/mappedConfigArray1.php       |   2 +-
 .../Magento/_files/errors/report.php          |  26 +
 .../Di/Code/Scanner/CompositeScanner.php      |   3 +-
 .../Tools/Di/Code/Scanner/FileScanner.php     |  79 --
 .../Tools/Di/Code/Scanner/PhpScanner.php      | 152 +++-
 .../Tools/Di/Code/Scanner/XmlScanner.php      |  67 +-
 .../Magento/Tools/Di/Compiler/Directory.php   |   4 +
 .../Magento/Tools/Di/Compiler/Log/Log.php     |  62 +-
 .../Tools/Di/Compiler/Log/Writer/Console.php  |   8 +-
 dev/tools/Magento/Tools/Di/compiler.php       |  84 +-
 .../Tools/I18n/Code/ServiceLocator.php        |   2 +-
 .../Magento/Tools/Migration/themes_view.php   |   8 +-
 dev/tools/Magento/Tools/View/generator.php    |   9 +-
 .../app/Magento/Downloader/Controller.php     |  12 +-
 downloader/lib/Magento/Backup/Snapshot.php    |   8 +-
 index.php                                     |   7 +-
 lib/Magento/Acl/Resource/Provider.php         |  18 +-
 .../App/Area/FrontNameResolverFactory.php     |   2 +
 .../App/Area/FrontNameResolverInterface.php   |   2 +
 lib/Magento/App/AreaList.php                  |  15 +-
 .../Magento/App}/CacheInterface.php           |  10 +-
 .../Local.php => lib/Magento/App/Config.php   |  52 +-
 .../App}/Config/FileResolver/Primary.php      |   2 +-
 .../Magento/App/Config/Loader.php             |  30 +-
 .../Magento/App}/Config/ValidationState.php   |   2 +-
 lib/Magento/App/Cron.php                      |  67 ++
 lib/Magento/App/DefaultPath/DefaultPath.php   |  55 ++
 lib/Magento/App/DefaultPathInterface.php      |  35 +
 lib/Magento/App/Dir.php                       |  10 +
 lib/Magento/App/EntryPoint/EntryPoint.php     | 104 +++
 lib/Magento/App/EntryPointInterface.php       |  35 +
 lib/Magento/App/Error/Handler.php             | 102 +++
 lib/Magento/App/FrontController.php           |  58 +-
 lib/Magento/App/FrontControllerInterface.php  |   1 +
 lib/Magento/App/Http.php                      | 151 ++++
 lib/Magento/App/ObjectManager.php             |  83 ++
 .../App}/ObjectManager/ConfigCache.php        |   4 +-
 .../App}/ObjectManager/ConfigLoader.php       |   2 +-
 .../ObjectManager/ConfigLoader/Primary.php    |   8 +-
 lib/Magento/App/ObjectManagerFactory.php      | 173 ++++
 lib/Magento/App/Request/Http.php              |  19 +-
 .../Model => lib/Magento/App}/Resource.php    |  82 +-
 .../Magento/App/Resource/Config.php           |  25 +-
 .../App}/Resource/Config/Converter.php        |   2 +-
 .../Magento/App}/Resource/Config/Reader.php   |  29 +-
 .../App/Resource/Config/SchemaLocator.php     |  49 ++
 .../Magento/App/Resource/ConfigInterface.php  |   4 +-
 .../Resource/ConnectionAdapterInterface.php   |   2 +-
 .../App}/Resource/ConnectionFactory.php       |  10 +-
 lib/Magento/App/Route/Config.php              | 154 ++++
 .../Magento/App}/Route/Config/Converter.php   |   2 +-
 .../Magento/App}/Route/Config/Reader.php      |  10 +-
 .../App/Route/Config/SchemaLocator.php        |  49 ++
 .../Magento/App/Route/ConfigInterface.php     |  42 +-
 lib/Magento/App/Router/AbstractRouter.php     |  66 +-
 lib/Magento/App/Router/DefaultRouter.php      |   8 +-
 .../Router/NoRouteHandlerInterface.php        |   2 +-
 .../Magento/App/RouterInterface.php           |  15 +-
 lib/Magento/App/RouterList.php                | 164 ++--
 lib/Magento/App/RouterListInterface.php       |  25 +-
 lib/Magento/App/State.php                     |  77 +-
 .../Magento/App}/etc/resources.xsd            |   0
 .../Core => lib/Magento/App}/etc/routes.xsd   |   0
 .../Magento/App}/etc/routes_merged.xsd        |   0
 lib/Magento/AppInterface.php                  |  34 +
 lib/Magento/Code/Generator.php                |   2 +
 .../{ClassGenerator.php => Autoloader.php}    |  26 +-
 .../Code/Generator/DefinitionDecorator.php    |  97 --
 lib/Magento/Code/Generator/EntityAbstract.php |  12 +
 lib/Magento/Code/Generator/Factory.php        |  21 +
 lib/Magento/Code/Generator/Interceptor.php    |  23 +-
 lib/Magento/Code/Generator/Proxy.php          |  22 +-
 lib/Magento/Code/Reader/ClassReader.php       |   3 +-
 lib/Magento/Code/ValidationException.php      |  30 +
 .../Code/Validator/ConstructorIntegrity.php   | 209 +++++
 lib/Magento/Config/Data/Scoped.php            |  11 +-
 lib/Magento/Config/Scope.php                  |   2 +-
 lib/Magento/Convert/ConvertArray.php          |  96 ++
 lib/Magento/Convert/ConvertException.php      |   7 +-
 lib/Magento/Convert/Excel.php                 |   5 +-
 lib/Magento/Convert/Xml.php                   |  61 ++
 lib/Magento/DB/Adapter/Pdo/Mysql.php          |  24 +-
 lib/Magento/Data/Collection/Db.php            |   6 +-
 lib/Magento/Data/Form.php                     |  95 +-
 .../Data/Form/Element/AbstractElement.php     |  21 +-
 lib/Magento/Data/Form/Element/Button.php      |   6 +-
 lib/Magento/Data/Form/Element/Checkbox.php    |   6 +-
 lib/Magento/Data/Form/Element/Checkboxes.php  |   6 +-
 lib/Magento/Data/Form/Element/Column.php      |   6 +-
 lib/Magento/Data/Form/Element/Date.php        |   8 +-
 lib/Magento/Data/Form/Element/Editor.php      |   6 +-
 lib/Magento/Data/Form/Element/Fieldset.php    |   6 +-
 lib/Magento/Data/Form/Element/File.php        |   6 +-
 lib/Magento/Data/Form/Element/Gallery.php     |   6 +-
 lib/Magento/Data/Form/Element/Hidden.php      |   6 +-
 lib/Magento/Data/Form/Element/Image.php       |   6 +-
 lib/Magento/Data/Form/Element/Imagefile.php   |   6 +-
 lib/Magento/Data/Form/Element/Label.php       |   6 +-
 lib/Magento/Data/Form/Element/Link.php        |   6 +-
 lib/Magento/Data/Form/Element/Multiline.php   |   6 +-
 lib/Magento/Data/Form/Element/Multiselect.php |   6 +-
 lib/Magento/Data/Form/Element/Note.php        |   6 +-
 lib/Magento/Data/Form/Element/Password.php    |   6 +-
 lib/Magento/Data/Form/Element/Radio.php       |   6 +-
 lib/Magento/Data/Form/Element/Radios.php      |   6 +-
 lib/Magento/Data/Form/Element/Reset.php       |   6 +-
 lib/Magento/Data/Form/Element/Select.php      |   6 +-
 lib/Magento/Data/Form/Element/Submit.php      |   6 +-
 lib/Magento/Data/Form/Element/Text.php        |   6 +-
 lib/Magento/Data/Form/Element/Textarea.php    |   6 +-
 lib/Magento/Data/Form/Element/Time.php        |   6 +-
 lib/Magento/Data/Form/Filter/Date.php         |   6 +-
 .../{Form/Factory.php => FormFactory.php}     |  17 +-
 lib/Magento/Debug.php                         |  10 +-
 lib/Magento/{ => Encryption}/Crypt.php        |   4 +-
 lib/Magento/Encryption/CryptFactory.php       |  59 ++
 .../Magento/Encryption/Encryptor.php          | 116 ++-
 .../Magento/Encryption/EncryptorInterface.php |  20 +-
 lib/Magento/Error/Handler.php                 | 118 +++
 lib/Magento/Error/HandlerInterface.php        |  50 ++
 lib/Magento/Escaper.php                       | 108 +++
 lib/Magento/Event/Invoker/InvokerDefault.php  |   6 +-
 lib/Magento/Event/Manager.php                 |  34 +-
 lib/Magento/Filesystem.php                    |  17 +
 lib/Magento/Filter/AbstractFactory.php        | 119 +++
 lib/Magento/Filter/ArrayFilter.php            |  29 +-
 lib/Magento/Filter/Decrypt.php                |  39 +
 lib/Magento/Filter/Email.php                  |   9 +-
 lib/Magento/Filter/Encrypt.php                |  39 +
 .../Filter/Encrypt/AdapterInterface.php       |  33 +
 lib/Magento/Filter/Encrypt/Basic.php          |  63 ++
 lib/Magento/Filter/Factory.php                |  69 ++
 .../Magento/Filter/FactoryInterface.php       |  49 +-
 lib/Magento/Filter/FilterManager.php          | 144 +++
 lib/Magento/Filter/FilterManager/Config.php   |  61 ++
 .../Filter/FilterManager/ConfigInterface.php  |  40 +
 lib/Magento/Filter/GridArray/Grid.php         |   9 +-
 lib/Magento/Filter/Money.php                  |  17 +-
 lib/Magento/Filter/Object.php                 |  29 +-
 lib/Magento/Filter/Object/Grid.php            |   6 +-
 lib/Magento/Filter/RemoveAccents.php          | 102 +++
 lib/Magento/Filter/RemoveTags.php             |  59 ++
 lib/Magento/Filter/SplitWords.php             |  81 ++
 lib/Magento/Filter/Sprintf.php                |  40 +-
 lib/Magento/Filter/StripTags.php              |  70 ++
 lib/Magento/Filter/Template.php               |  17 +-
 lib/Magento/Filter/Template/Simple.php        |  21 +-
 .../Template/Tokenizer/AbstractTokenizer.php  |  50 +-
 .../Filter/Template/Tokenizer/Parameter.php   |  51 +-
 .../Filter/Template/Tokenizer/Variable.php    |  94 +-
 lib/Magento/Filter/Truncate.php               | 115 +++
 lib/Magento/Filter/ZendFactory.php            | 102 +++
 lib/Magento/HTTP/Authentication.php           | 111 +++
 lib/Magento/HTTP/Header.php                   | 145 +++
 .../HTTP/PhpEnvironment/RemoteAddress.php     | 101 +++
 .../HTTP/PhpEnvironment/ServerAddress.php     |  61 ++
 .../Core/Model => lib/Magento}/Logger.php     |  44 +-
 lib/Magento/Math/Division.php                 |  54 ++
 lib/Magento/Math/Random.php                   |  84 ++
 .../Module/Declaration/Converter/Dom.php      |   4 +-
 .../Module/Declaration/FileResolver.php       |   4 +-
 .../Module/Declaration/Reader/Filesystem.php  |  19 +-
 .../Module/Declaration/SchemaLocator.php      |   4 +-
 lib/Magento/{App => }/Module/Dir.php          |  13 +-
 .../Magento/Module/Dir}/Reader.php            |  67 +-
 .../{App => }/Module/Dir/ReverseResolver.php  |  14 +-
 .../FrontController/Plugin/Install.php        |  10 +-
 lib/Magento/{App => Module}/ModuleList.php    |  10 +-
 .../{App => Module}/ModuleListInterface.php   |   4 +-
 .../{App => }/Module/ResourceResolver.php     |  10 +-
 .../Module/ResourceResolverInterface.php      |   2 +-
 lib/Magento/{App => Module}/Updater.php       |  28 +-
 .../{App => Module}/Updater/SetupFactory.php  |  11 +-
 .../Updater/SetupInterface.php                |   8 +-
 .../{App => Module}/UpdaterInterface.php      |   2 +-
 lib/Magento/{App => Module}/etc/module.xsd    |   0
 lib/Magento/ObjectManager.php                 |   7 +
 lib/Magento/ObjectManager/Config.php          |   4 +-
 lib/Magento/ObjectManager/Config/Config.php   |   2 +-
 .../ObjectManager/DefinitionFactory.php       |  95 +-
 .../ObjectManager/DynamicConfigInterface.php  |   2 +-
 lib/Magento/ObjectManager/Factory/Factory.php |  25 +-
 lib/Magento/ObjectManager/ObjectManager.php   |  30 +-
 .../ObjectManager/Relations/Compiled.php      |   4 +-
 .../Outbound/Authentication/Factory.php       |   2 +-
 lib/Magento/Stdlib/ArrayUtils.php             |  61 ++
 lib/Magento/{Date.php => Stdlib/DateTime.php} |  52 +-
 lib/Magento/Stdlib/String.php                 | 234 +++++
 lib/Magento/UrlInterface.php                  |  17 -
 lib/Magento/View/Context.php                  |  17 +-
 lib/Magento/View/DesignInterface.php          |   2 +
 .../Source/Decorator/ModuleDependency.php     |   2 +-
 pub/cron.php                                  |   5 +-
 pub/get.php                                   |  14 +-
 pub/index.php                                 |   7 +-
 pub/lib/mage/item-table.js                    |   2 +-
 pub/lib/mage/validation.js                    |   2 +-
 2167 files changed, 26049 insertions(+), 18213 deletions(-)
 delete mode 100644 app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_couponsgrid.xml
 create mode 100644 app/code/Magento/Backend/App/DefaultPath.php
 create mode 100644 app/code/Magento/Backend/App/Router/DefaultRouter.php
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Account/Edit.php (90%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Account/Edit/Form.php (95%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Cache/Edit.php (94%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Cache/Form.php (92%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Design.php (90%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Design/Edit.php (95%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Design/Edit/Tab/General.php (94%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Design/Edit/Tabs.php (88%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Email/Template.php (92%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Email/Template/Edit.php (96%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Email/Template/Edit/Form.php (96%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Email/Template/Grid/Filter/Type.php (93%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Email/Template/Grid/Renderer/Action.php (93%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Email/Template/Grid/Renderer/Sender.php (92%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Email/Template/Grid/Renderer/Type.php (92%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Email/Template/Preview.php (96%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Shipping/Ups.php (97%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Delete.php (91%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Delete/Form.php (95%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Delete/Group.php (94%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Delete/Website.php (94%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Edit.php (97%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Edit/AbstractForm.php (95%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Edit/Form/Group.php (95%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Edit/Form/Store.php (95%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Edit/Form/Website.php (94%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Grid/Render/Group.php (92%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Grid/Render/Store.php (92%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Grid/Render/Website.php (92%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Store/Store.php (93%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Variable.php (90%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Variable/Edit.php (95%)
 rename app/code/Magento/{Adminhtml => Backend}/Block/System/Variable/Edit/Form.php (95%)
 rename app/code/Magento/Backend/Controller/{ => Adminhtml}/System/AbstractConfig.php (98%)
 rename app/code/Magento/{Adminhtml/Controller => Backend/Controller/Adminhtml}/System/Account.php (96%)
 rename app/code/Magento/{Adminhtml/Controller => Backend/Controller/Adminhtml}/System/Backup.php (96%)
 rename app/code/Magento/{Adminhtml/Controller => Backend/Controller/Adminhtml}/System/Config/System/Storage.php (96%)
 rename app/code/Magento/{Adminhtml/Controller => Backend/Controller/Adminhtml}/System/Design.php (96%)
 rename app/code/Magento/{Adminhtml/Controller => Backend/Controller/Adminhtml}/System/Email/Template.php (92%)
 rename app/code/Magento/{Adminhtml/Controller => Backend/Controller/Adminhtml}/System/Store.php (94%)
 rename app/code/Magento/{Adminhtml/Controller => Backend/Controller/Adminhtml}/System/Variable.php (95%)
 delete mode 100644 app/code/Magento/Backend/Controller/Router/DefaultRouter.php
 rename app/code/Magento/{Adminhtml => Backend}/Model/Email/Template.php (98%)
 delete mode 100644 app/code/Magento/Backend/Model/Url/Proxy.php
 create mode 100644 app/code/Magento/Backend/etc/adminhtml/menu.xml
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_account_index.xml (91%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_backup_block.xml (100%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_backup_grid.xml (100%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_backup_index.xml (100%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_design_grid.xml (100%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_design_grid_block.xml (100%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_design_index.xml (91%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_email_template_grid.xml (100%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_email_template_grid_block.xml (96%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_email_template_index.xml (90%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/systemPreview.xml => Backend/view/adminhtml/layout/adminhtml_system_preview.xml} (85%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_store_grid_block.xml (94%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_store_index.xml (91%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_variable_grid_block.xml (100%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/layout/adminhtml_system_variable_index.xml (91%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/autocomplete.phtml (97%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/cache/additional.phtml (98%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/cache/edit.phtml (99%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/design/edit.phtml (97%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/design/index.phtml (97%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/email/template/edit.phtml (99%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/email/template/list.phtml (97%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/email/template/preview.phtml (97%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/info.phtml (99%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/search.phtml (98%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/shipping/applicable_country.phtml (99%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/shipping/ups.phtml (98%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/system/variable/js.phtml (97%)
 rename app/code/Magento/{Adminhtml => Backend}/view/adminhtml/variables.js (99%)
 rename app/code/Magento/Bundle/view/adminhtml/layout/{adminhtml_customer_wishlist.xml => customer_index_wishlist.xml} (100%)
 rename app/code/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Catalog.php (82%)
 rename app/code/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Catalog/Edit.php (94%)
 rename app/code/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Catalog/Edit/Form.php (88%)
 rename app/code/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Catalog/Edit/Js.php (88%)
 rename app/code/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Catalog/Edit/Tab/Actions.php (97%)
 rename app/code/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Catalog/Edit/Tab/Conditions.php (90%)
 rename app/code/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Catalog/Edit/Tab/Main.php (94%)
 rename app/code/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Catalog/Edit/Tabs.php (90%)
 rename app/code/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Widget/Chooser.php (94%)
 rename app/code/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Widget/Chooser/Daterange.php (81%)
 rename app/code/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Widget/Chooser/Sku.php (95%)
 rename app/code/Magento/{Adminhtml/Controller => CatalogRule/Controller/Adminhtml}/Promo.php (92%)
 rename app/code/Magento/{Adminhtml/Controller => CatalogRule/Controller/Adminhtml}/Promo/Catalog.php (90%)
 rename app/code/Magento/{Adminhtml/Controller => CatalogRule/Controller/Adminhtml}/Promo/Widget.php (93%)
 create mode 100644 app/code/Magento/CatalogRule/etc/adminhtml/routes.xml
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_block.xml => CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_block.xml} (98%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_edit.xml => CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_edit.xml} (75%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_index.xml => CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_index.xml} (85%)
 rename app/code/Magento/{Adminhtml => CatalogRule}/view/adminhtml/promo/fieldset.phtml (100%)
 rename app/code/Magento/{Adminhtml => CatalogRule}/view/adminhtml/promo/form.phtml (100%)
 rename app/code/Magento/{Adminhtml => CatalogRule}/view/adminhtml/promo/js.phtml (100%)
 rename app/code/Magento/{Adminhtml/Block/Checkout => Checkout/Block/Adminhtml}/Agreement.php (79%)
 rename app/code/Magento/{Adminhtml/Block/Checkout => Checkout/Block/Adminhtml}/Agreement/Edit.php (92%)
 rename app/code/Magento/{Adminhtml/Block/Checkout => Checkout/Block/Adminhtml}/Agreement/Edit/Form.php (96%)
 rename app/code/Magento/{Adminhtml/Block/Checkout => Checkout/Block/Adminhtml}/Agreement/Grid.php (96%)
 rename app/code/Magento/{Adminhtml/Controller/Checkout => Checkout/Controller/Adminhtml}/Agreement.php (89%)
 create mode 100644 app/code/Magento/Checkout/etc/adminhtml/routes.xml
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Block.php (87%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Block/Edit.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Block/Edit/Form.php (96%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Block/Widget/Chooser.php (93%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page.php (90%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page/Edit.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page/Edit/Form.php (93%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page/Edit/Tab/Content.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page/Edit/Tab/Design.php (96%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page/Edit/Tab/Main.php (96%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page/Edit/Tab/Meta.php (96%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page/Edit/Tabs.php (91%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page/Grid.php (95%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page/Grid/Renderer/Action.php (95%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page/Widget/Chooser.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Wysiwyg/Images/Content.php (89%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Wysiwyg/Images/Content/Files.php (97%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Wysiwyg/Images/Content/Newfolder.php (89%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Wysiwyg/Images/Content/Uploader.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Wysiwyg/Images/Tree.php (96%)
 rename app/code/Magento/{Adminhtml/Controller/Cms => Cms/Controller/Adminhtml}/Block.php (89%)
 rename app/code/Magento/{Adminhtml/Controller/Cms => Cms/Controller/Adminhtml}/Block/Widget.php (85%)
 rename app/code/Magento/{Adminhtml/Controller/Cms => Cms/Controller/Adminhtml}/Page.php (91%)
 rename app/code/Magento/{Adminhtml/Controller/Cms => Cms/Controller/Adminhtml}/Page/Widget.php (86%)
 rename app/code/Magento/{Adminhtml/Controller/Cms => Cms/Controller/Adminhtml}/Wysiwyg.php (91%)
 rename app/code/Magento/{Adminhtml/Controller/Cms => Cms/Controller/Adminhtml}/Wysiwyg/Images.php (96%)
 create mode 100644 app/code/Magento/Cms/etc/adminhtml/routes.xml
 create mode 100644 app/code/Magento/Cms/etc/frontend/di.xml
 rename app/code/Magento/{Adminhtml/view/adminhtml/cms => Cms/view/adminhtml}/browser/content.phtml (96%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/cms => Cms/view/adminhtml}/browser/content/files.phtml (96%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/cms => Cms/view/adminhtml}/browser/content/uploader.phtml (98%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/cms => Cms/view/adminhtml}/browser/tree.phtml (96%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_cms_block_edit.xml => Cms/view/adminhtml/layout/cms_block_edit.xml} (97%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_cms_block_index.xml => Cms/view/adminhtml/layout/cms_block_index.xml} (98%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_cms_page_new.xml => Cms/view/adminhtml/layout/cms_block_new.xml} (95%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_cms_page_edit.xml => Cms/view/adminhtml/layout/cms_page_edit.xml} (91%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_cms_page_index.xml => Cms/view/adminhtml/layout/cms_page_index.xml} (94%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_cms_block_new.xml => Cms/view/adminhtml/layout/cms_page_new.xml} (95%)
 rename app/code/Magento/{PaypalUk/view/frontend/layout/paypaluk_express_review_details.xml => Cms/view/adminhtml/layout/cms_wysiwyg_images_contents.xml} (86%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_cms_wysiwyg_images_index.xml => Cms/view/adminhtml/layout/cms_wysiwyg_images_index.xml} (76%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/cms => Cms/view/adminhtml}/page/edit/form/renderer/content.phtml (100%)
 create mode 100644 app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php
 create mode 100644 app/code/Magento/Core/App/FrontController/Plugin/UrlRewrite.php
 rename app/code/Magento/Core/{Model/EntryPoint => App}/Media.php (77%)
 create mode 100644 app/code/Magento/Core/App/Router/Base.php
 delete mode 100644 app/code/Magento/Core/Controller/Varien/Router/Base.php
 rename app/code/Magento/Core/{Model/File/Storage/AbstractStorage.php => Helper/File/Media.php} (52%)
 delete mode 100644 app/code/Magento/Core/Helper/Hint.php
 delete mode 100644 app/code/Magento/Core/Helper/Http.php
 delete mode 100644 app/code/Magento/Core/Model/AbstractEntryPoint.php
 delete mode 100644 app/code/Magento/Core/Model/Config/AbstractStorage.php
 rename app/code/Magento/Core/Model/{Route/Config => Config/Initial}/SchemaLocator.php (70%)
 delete mode 100644 app/code/Magento/Core/Model/Config/Loader.php
 delete mode 100644 app/code/Magento/Core/Model/Config/Loader/Primary.php
 delete mode 100644 app/code/Magento/Core/Model/Config/Primary.php
 delete mode 100644 app/code/Magento/Core/Model/Config/Storage.php
 delete mode 100644 app/code/Magento/Core/Model/EntryPoint/Cron.php
 delete mode 100644 app/code/Magento/Core/Model/EntryPoint/Http.php
 delete mode 100644 app/code/Magento/Core/Model/ObjectManager.php
 delete mode 100644 app/code/Magento/Core/Model/Route/Config.php
 create mode 100644 app/code/Magento/Core/Model/Theme/Data.php
 create mode 100644 app/code/Magento/Core/etc/config.xsd
 delete mode 100644 app/code/Magento/Core/functions.php
 create mode 100644 app/code/Magento/Cron/App/Cron/Plugin/ApplicationInitializer.php
 rename app/code/Magento/{Adminhtml/Block => Customer/Block/Adminhtml}/Customer.php (86%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit.php (91%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Form.php (92%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Renderer/Attribute/Group.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Renderer/Newpass.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Renderer/Region.php (96%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Account.php (96%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Addresses.php (92%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Cart.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Carts.php (91%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Newsletter.php (91%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Newsletter/Grid.php (92%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Newsletter/Grid/Filter/Status.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Newsletter/Grid/Renderer/Action.php (95%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Newsletter/Grid/Renderer/Status.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Orders.php (96%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Reviews.php (83%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/View.php (84%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/View/Accordion.php (90%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/View/Cart.php (97%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/View/Grid/Renderer/Item.php (97%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/View/Orders.php (97%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/View/Sales.php (97%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/View/Wishlist.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/Wishlist/Grid/Renderer/Description.php (91%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tabs.php (85%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Form/Element/Boolean.php (92%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Form/Element/File.php (93%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Form/Element/Image.php (88%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Grid.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Grid/Filter/Country.php (94%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Grid/Renderer/Multiaction.php (95%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Group.php (93%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Group/Edit.php (93%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Group/Edit/Form.php (93%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Online.php (85%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Online/Filter.php (95%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Online/Grid/Renderer/Ip.php (91%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Online/Grid/Renderer/Type.php (91%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Online/Grid/Renderer/Url.php (91%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Sales/Order/Address/Form/Renderer/Vat.php (91%)
 rename app/code/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/System/Config/Validatevat.php (87%)
 rename app/code/Magento/{Adminhtml/Controller/Customer => Customer/Controller/Adminhtml}/Cart/Product/Composite/Cart.php (92%)
 rename app/code/Magento/{Adminhtml/Controller/Customer => Customer/Controller/Adminhtml}/Group.php (91%)
 rename app/code/Magento/{Adminhtml/Controller/Customer.php => Customer/Controller/Adminhtml/Index.php} (96%)
 rename app/code/Magento/{Adminhtml/Controller/Customer => Customer/Controller/Adminhtml}/Online.php (95%)
 rename app/code/Magento/{Adminhtml/Controller/Customer => Customer/Controller/Adminhtml}/System/Config/Validatevat.php (95%)
 rename app/code/Magento/{Adminhtml/Controller/Customer => Customer/Controller/Adminhtml}/Wishlist/Product/Composite/Wishlist.php (93%)
 rename app/code/Magento/{Adminhtml/Model/Customer => Customer/Model}/Renderer/Region.php (92%)
 create mode 100644 app/code/Magento/Customer/etc/adminhtml/routes.xml
 rename app/code/Magento/{Adminhtml/view/adminhtml/customer => Customer/view/adminhtml}/edit/js.phtml (100%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/customer => Customer/view/adminhtml}/edit/tab/account/form/renderer/group.phtml (100%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/customer => Customer/view/adminhtml}/edit/tab/js/addresses.js (96%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_group_index.xml => Customer/view/adminhtml/layout/customer_group_index.xml} (97%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_cart.xml => Customer/view/adminhtml/layout/customer_index_cart.xml} (94%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_carts.xml => Customer/view/adminhtml/layout/customer_index_carts.xml} (94%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_edit.xml => Customer/view/adminhtml/layout/customer_index_edit.xml} (84%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_grid.xml => Customer/view/adminhtml/layout/customer_index_grid.xml} (94%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_lastorders.xml => Customer/view/adminhtml/layout/customer_index_lastorders.xml} (94%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_newsletter.xml => Customer/view/adminhtml/layout/customer_index_newsletter.xml} (94%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_orders.xml => Customer/view/adminhtml/layout/customer_index_orders.xml} (94%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_productreviews.xml => Customer/view/adminhtml/layout/customer_index_productreviews.xml} (94%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_viewcart.xml => Customer/view/adminhtml/layout/customer_index_viewcart.xml} (94%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_viewwishlist.xml => Customer/view/adminhtml/layout/customer_index_viewwishlist.xml} (94%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_customer_online_index.xml => Customer/view/adminhtml/layout/customer_online_index.xml} (97%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/customer => Customer/view/adminhtml}/online.phtml (100%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/customer => Customer/view/adminhtml}/sales/order/create/address/form/renderer/vat.phtml (100%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/customer => Customer/view/adminhtml}/system/config/validatevat.phtml (97%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/customer => Customer/view/adminhtml}/tab/addresses.phtml (100%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/customer => Customer/view/adminhtml}/tab/cart.phtml (81%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/customer => Customer/view/adminhtml}/tab/newsletter.phtml (100%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/customer => Customer/view/adminhtml}/tab/view.phtml (98%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/customer => Customer/view/adminhtml}/tab/view/sales.phtml (98%)
 rename app/code/Magento/{Rss => DesignEditor}/etc/frontend/di.xml (76%)
 rename app/code/Magento/Downloadable/view/adminhtml/layout/{adminhtml_customer_wishlist.xml => customer_index_wishlist.xml} (100%)
 rename app/code/Magento/{Core/Model/Config/StorageInterface.php => ImportExport/Model/HttpAdapterFactory.php} (74%)
 rename app/code/Magento/Index/{Model/EntryPoint => App}/Indexer.php (71%)
 rename app/code/Magento/Index/{Model/EntryPoint => App}/Shell.php (62%)
 rename app/code/Magento/Index/{Model/EntryPoint => App}/Shell/ErrorHandler.php (96%)
 rename app/code/Magento/Install/{Model/EntryPoint => App}/Console.php (50%)
 rename app/code/Magento/Install/{Model/EntryPoint => App}/Output.php (97%)
 delete mode 100644 app/code/Magento/Install/Model/EntryPoint/Upgrade.php
 create mode 100644 app/code/Magento/Install/etc/install/di.xml
 create mode 100644 app/code/Magento/Install/etc/install/routes.xml
 create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Integration.php
 create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php
 create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Form.php
 create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php
 create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tabs.php
 create mode 100644 app/code/Magento/Integration/Controller/Adminhtml/Integration.php
 rename app/code/Magento/{Core/Model/Config/Cache => Integration}/Exception.php (85%)
 create mode 100644 app/code/Magento/Integration/Helper/Data.php
 create mode 100644 app/code/Magento/Integration/Model/Integration.php
 create mode 100644 app/code/Magento/Integration/Model/Integration/Factory.php
 create mode 100644 app/code/Magento/Integration/Model/Integration/Source/Authentication.php
 create mode 100644 app/code/Magento/Integration/Model/Integration/Source/Status.php
 create mode 100644 app/code/Magento/Integration/Model/Resource/Integration.php
 rename app/code/Magento/{Webapi/Model/Config/Dom.php => Integration/Model/Resource/Integration/Collection.php} (71%)
 create mode 100644 app/code/Magento/Integration/Service/IntegrationV1.php
 rename dev/tests/unit/testsuite/Magento/Core/Model/AbstractEntryPointTest.php => app/code/Magento/Integration/Service/IntegrationV1Interface.php (55%)
 create mode 100644 app/code/Magento/Integration/etc/adminhtml/menu.xml
 create mode 100644 app/code/Magento/Integration/etc/adminhtml/routes.xml
 create mode 100644 app/code/Magento/Integration/etc/di.xml
 create mode 100755 app/code/Magento/Integration/etc/module.xml
 create mode 100644 app/code/Magento/Integration/sql/integration_setup/install-1.0.0.0.php
 create mode 100644 app/code/Magento/Integration/view/adminhtml/js/integration.js
 create mode 100644 app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_edit.xml
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_cms_wysiwyg_images_contents.xml => Integration/view/adminhtml/layout/adminhtml_integration_grid.xml} (80%)
 create mode 100644 app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml
 create mode 100644 app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_index.xml
 create mode 100644 app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_new.xml
 rename app/code/Magento/Log/{Model/EntryPoint => App}/Shell.php (66%)
 create mode 100644 app/code/Magento/PageCache/etc/di.xml
 create mode 100644 app/code/Magento/PageCache/etc/frontend/di.xml
 rename app/code/Magento/{Adminhtml/view/adminhtml => Rating/view/adminhtml/rating}/validation-rules.js (95%)
 create mode 100644 app/code/Magento/Reports/Model/DateFactory.php
 create mode 100644 app/code/Magento/Rss/Controller/Adminhtml/Authenticate.php
 create mode 100644 app/code/Magento/Rss/Controller/Adminhtml/Catalog.php
 create mode 100644 app/code/Magento/Rss/Controller/Adminhtml/Order.php
 delete mode 100644 app/code/Magento/Rss/Helper/Data.php
 create mode 100644 app/code/Magento/Rss/etc/adminhtml/routes.xml
 rename app/code/Magento/{Adminhtml/view/adminhtml/promo => Rule/view/adminhtml}/rules.js (99%)
 rename app/code/Magento/Sales/view/frontend/layout/{sales_order_printorder.xml => sales_order_print.xml} (100%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote.php (96%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit.php (94%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Form.php (92%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tab/Actions.php (95%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tab/Conditions.php (91%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tab/Coupons.php (97%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tab/Coupons/Form.php (96%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tab/Coupons/Grid.php (92%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php (93%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tab/Labels.php (97%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tab/Main.php (96%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php (97%)
 rename app/code/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tabs.php (95%)
 rename app/code/Magento/{Adminhtml/Controller => SalesRule/Controller/Adminhtml}/Promo/Quote.php (89%)
 create mode 100644 app/code/Magento/SalesRule/etc/adminhtml/routes.xml
 create mode 100644 app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_couponsgrid.xml
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_edit.xml => SalesRule/view/adminhtml/layout/sales_rule_promo_quote_edit.xml} (69%)
 rename app/code/Magento/{Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_index.xml => SalesRule/view/adminhtml/layout/sales_rule_promo_quote_index.xml} (98%)
 rename app/code/Magento/{Adminhtml => SalesRule}/view/adminhtml/promo/salesrulejs.phtml (100%)
 create mode 100644 app/code/Magento/Webapi/Model/Config/Converter.php
 rename app/code/Magento/{Core/Model/Resource => Webapi/Model}/Config/SchemaLocator.php (85%)
 rename app/code/Magento/{Core/Model/Route/ConfigInterface.php => Webhook/Model/Config.php} (76%)
 create mode 100644 app/code/Magento/Widget/Model/NamespaceResolver.php
 rename app/code/Magento/Wishlist/view/adminhtml/layout/{adminhtml_customer_wishlist.xml => customer_index_wishlist.xml} (96%)
 delete mode 100644 app/etc/config.xml
 create mode 100644 app/functions.php
 create mode 100644 dev/tests/integration/framework/Magento/TestFramework/App.php
 create mode 100644 dev/tests/integration/framework/Magento/TestFramework/App/State.php
 create mode 100644 dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Backend/App/Router/DefaultRouterTest.php
 rename dev/tests/integration/testsuite/Magento/{Adminhtml => Backend}/Block/System/Account/Edit/FormTest.php (95%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml => Backend}/Block/System/Design/Edit/Tab/GeneralTest.php (84%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml => Backend}/Block/System/Store/DeleteTest.php (88%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml => Backend}/Block/System/Store/Edit/Form/GroupTest.php (92%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml => Backend}/Block/System/Store/Edit/Form/StoreTest.php (92%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml => Backend}/Block/System/Store/Edit/Form/WebsiteTest.php (92%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml => Backend}/Block/System/Store/EditTest.php (81%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml => Backend}/Block/System/Variable/EditTest.php (93%)
 create mode 100644 dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php
 rename dev/tests/integration/testsuite/Magento/{ => Backend/Controller}/Adminhtml/System/AccountTest.php (89%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/Controller => Backend/Controller/Adminhtml}/System/DesignTest.php (96%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/Controller => Backend/Controller/Adminhtml}/System/StoreTest.php (96%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/Controller => Backend/Controller/Adminhtml}/System/VariableTest.php (96%)
 delete mode 100644 dev/tests/integration/testsuite/Magento/Backend/Controller/Router/DefaultRouterTest.php
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/Block => CatalogRule/Block/Adminhtml}/Promo/Catalog/Edit/Tab/MainTest.php (83%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/Block/Cms => Cms/Block/Adminhtml}/Page/Edit/Tab/DesignTest.php (81%)
 rename dev/tests/integration/testsuite/Magento/Core/{Controller/Varien => App}/Router/BaseTest.php (63%)
 delete mode 100644 dev/tests/integration/testsuite/Magento/Core/Helper/HttpTest.php
 delete mode 100644 dev/tests/integration/testsuite/Magento/Core/Helper/StringTest.php
 delete mode 100644 dev/tests/integration/testsuite/Magento/Core/Model/ConfigTest.php
 delete mode 100644 dev/tests/integration/testsuite/Magento/Core/Model/EntryPoint/HttpTest.php
 delete mode 100644 dev/tests/integration/testsuite/Magento/Core/Model/RouterListTest.php
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/Edit/Tab/View/AccordionTest.php (86%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/Block/Customer => Customer/Block/Adminhtml}/OnlineTest.php (83%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/Controller/Customer => Customer/Controller/Adminhtml}/GroupTest.php (90%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/Controller/CustomerTest.php => Customer/Controller/Adminhtml/IndexTest.php} (91%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/controllers => Customer}/_files/customer_sample.php (100%)
 create mode 100644 dev/tests/integration/testsuite/Magento/Encryption/ModelTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/GoogleAdwords/Model/Validator/FactoryTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/HTTP/HeaderTest.php
 rename dev/tests/integration/testsuite/Magento/{Core/Model/EncryptionTest.php => HTTP/PhpEnvironment/RemoteAddressTest.php} (67%)
 create mode 100644 dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/ServerAddressTest.php
 delete mode 100644 dev/tests/integration/testsuite/Magento/Install/IndexTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tab/LabelsTest.php (83%)
 rename dev/tests/integration/testsuite/Magento/{Adminhtml/Block => SalesRule/Block/Adminhtml}/Promo/Quote/Edit/Tab/MainTest.php (83%)
 create mode 100644 dev/tests/integration/testsuite/Magento/Webapi/ServiceNameCollisionTest.php
 delete mode 100644 dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/_files/Acme/Subscriber/etc/config.xml
 delete mode 100644 dev/tests/integration/testsuite/Magento/Webhook/Model/Subscription/_files/Acme/Subscriber/etc/config.xml
 delete mode 100644 dev/tests/static/testsuite/Magento/Test/Integrity/Compiler/CompilerTest.php
 create mode 100644 dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php
 delete mode 100644 dev/tests/static/testsuite/Magento/Test/Integrity/Di/ConfigurationTest.php
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Config/FileResolver/PrimaryTest.php (92%)
 rename app/code/Magento/Page/view/frontend/page_fragment.phtml => dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/app/etc/config.xml (91%)
 create mode 100644 dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/app/etc/custom/config.xml
 rename dev/tests/{integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/_files/Acme/Subscriber/etc/module.xml => unit/testsuite/Magento/App/Config/FileResolver/_files/primary/app/etc/di.xml} (91%)
 rename dev/tests/{integration/testsuite/Magento/Webhook/Model/Subscription/_files/Acme/Subscriber/etc/module.xml => unit/testsuite/Magento/App/Config/FileResolver/_files/primary/app/etc/some_config/di.xml} (91%)
 create mode 100644 dev/tests/unit/testsuite/Magento/App/Config/LoaderTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/App/Config/_files/local.xml
 create mode 100644 dev/tests/unit/testsuite/Magento/App/Config/_files/other/local_developer.xml
 create mode 100644 dev/tests/unit/testsuite/Magento/App/ConfigTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/App/CronTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/App/EntryPoint/EntryPointTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/FrontClass.php (97%)
 create mode 100644 dev/tests/unit/testsuite/Magento/App/ObjectManager/ConfigCacheTest.php
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/ObjectManager/ConfigLoaderTest.php (91%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Resource/Config/ConverterTest.php (85%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Resource/Config/ReaderTest.php (78%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model/Route => App/Resource}/Config/SchemaLocatorTest.php (58%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Resource/Config/XsdTest.php (94%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Resource/Config/_files/invalidResourcesXmlArray.php (100%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Resource/Config/_files/resources.php (100%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Resource/Config/_files/resources.xml (100%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Resource/Config/_files/valid_resources.xml (100%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model/Config/ResourceTest.php => App/Resource/ConfigTest.php} (88%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Route/Config/ConverterTest.php (89%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Route/Config/_files/routes.php (95%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Route/Config/_files/routes.xml (92%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/Route/ConfigTest.php (53%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => App}/RouterListTest.php (80%)
 create mode 100644 dev/tests/unit/testsuite/Magento/App/StateTest.php
 rename dev/tests/unit/testsuite/Magento/{Adminhtml => Backend}/Block/System/Email/Template/EditTest.php (95%)
 rename dev/tests/unit/testsuite/Magento/{Adminhtml/Controller => Backend/Controller/Adminhtml}/System/AccountTest.php (96%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/FlatTest.php
 delete mode 100644 dev/tests/unit/testsuite/Magento/Code/Generator/ClassTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Code/Model/File/Validator/NotProtectedExtensionTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Code/Validator/ConstructorIntegrityTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Convert/ConvertArrayTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Convert/XmlTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandlerTest.php
 rename dev/tests/unit/testsuite/Magento/Core/{Model/EntryPoint => App}/MediaTest.php (84%)
 rename dev/tests/unit/testsuite/Magento/{App/Module/ResourceResolver/_files/Module/data/module_first_setup => Core/App/_files}/.gitignore (100%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Core/Helper/StringTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/XsdTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/config.xsd
 create mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/invalidConfigXmlArray.php
 rename app/design/frontend/magento_backup/Magento_PaypalUk/layput/override/paypaluk_express_review_details.xml => dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/valid_config.xml (84%)
 delete mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/Config/LoaderTest.php
 delete mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/Config/PrimaryTest.php
 delete mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/Config/StorageTest.php
 delete mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/ConfigTest.php
 delete mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/EncryptionTest.php
 delete mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/EntryPoint/CronTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php
 delete mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/SchemaLocatorTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Cron/App/Cron/Plugin/ApplicationInitializerTest.php
 rename dev/tests/unit/testsuite/Magento/{Adminhtml/Controller/CustomerTest.php => Customer/Controller/Adminhtml/IndexTest.php} (93%)
 rename dev/tests/unit/testsuite/Magento/Data/{Form/FactoryTest.php => FormFactoryTest.php} (73%)
 rename dev/tests/unit/testsuite/Magento/{ => Encryption}/Crypt/_files/_cipher_info.php (100%)
 mode change 100755 => 100644
 rename dev/tests/unit/testsuite/Magento/{ => Encryption}/Crypt/_files/_crypt_fixtures.php (100%)
 mode change 100755 => 100644
 rename dev/tests/unit/testsuite/Magento/{ => Encryption}/CryptTest.php (88%)
 mode change 100755 => 100644
 create mode 100644 dev/tests/unit/testsuite/Magento/Encryption/EncryptorTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/EscaperTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Filter/AbstractFactoryTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Filter/FilterManager/ConfigTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Filter/FilterManagerTest.php
 rename dev/tests/unit/testsuite/Magento/{Core/Helper/DataTest.php => Filter/RemoveAccentsTest.php} (73%)
 rename dev/tests/unit/testsuite/Magento/{Core/Helper/AbstractTest.php => Filter/RemoveTagsTest.php} (78%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Filter/SplitWordsTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Filter/StripTagsTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Filter/TruncateTest.php
 rename dev/tests/unit/testsuite/Magento/{Core/Helper/HttpTest.php => Http/AuthenticationTest.php} (77%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Http/HeaderTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/RemoteAddressTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/ServerAddressTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Index/App/IndexerTest.php
 rename dev/tests/unit/testsuite/Magento/Index/{Model/EntryPoint => App}/ShellTest.php (70%)
 delete mode 100644 dev/tests/unit/testsuite/Magento/Index/Model/EntryPoint/IndexerTest.php
 rename dev/tests/unit/testsuite/Magento/Install/{Model/EntryPoint => App}/ConsoleTest.php (71%)
 rename dev/tests/unit/testsuite/Magento/Install/{Model/EntryPoint => App}/_files/config.php (100%)
 delete mode 100644 dev/tests/unit/testsuite/Magento/Install/Model/EntryPoint/UpgradeTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Integration/Model/Integration/FactoryTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Integration/Model/Integration/Source/AuthenticationTest.php
 rename dev/tests/{integration/testsuite/Magento/Backend/Controller/Router/Validator/DefaultTest.php => unit/testsuite/Magento/Integration/Model/Integration/Source/StatusTest.php} (53%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Integration/Service/IntegrationV1Test.php
 rename dev/tests/unit/testsuite/Magento/Log/{Model/EntryPoint => App}/ShellTest.php (64%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model => Log}/LoggerTest.php (60%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Math/DivisionTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Math/RandomTest.php
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/Declaration/Converter/DomTest.php (94%)
 mode change 100755 => 100644
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/Declaration/Converter/_files/converted_valid_module.php (100%)
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/Declaration/Converter/_files/valid_module.xml (100%)
 mode change 100755 => 100644
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml (100%)
 mode change 100755 => 100644
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml (100%)
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml (100%)
 mode change 100755 => 100644
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml (100%)
 mode change 100755 => 100644
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml (100%)
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/Declaration/FileResolverTest.php (93%)
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/Declaration/Reader/FilesystemTest.php (89%)
 rename dev/tests/unit/testsuite/Magento/{Core/Model/Config/Modules => Module/Dir}/ReaderTest.php (53%)
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/Dir/ReverseResolverTest.php (86%)
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/DirTest.php (79%)
 rename dev/tests/unit/testsuite/Magento/{App => }/Module/ResourceResolverTest.php (84%)
 rename dev/tests/unit/testsuite/Magento/{App => Module}/UpdaterTest.php (90%)
 rename dev/tests/unit/testsuite/Magento/{App/Module/ResourceResolver/_files/Module/data/module_second_setup => Module/_files/Module/data/module_first_setup}/.gitignore (100%)
 rename dev/tests/unit/testsuite/Magento/{App/Module/ResourceResolver/_files/Module/sql/module_first_setup => Module/_files/Module/data/module_second_setup}/.gitignore (100%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Module/_files/Module/sql/module_first_setup/.gitignore
 create mode 100644 dev/tests/unit/testsuite/Magento/Stdlib/ArrayUtilsTest.php
 rename dev/tests/unit/testsuite/Magento/{DateTest.php => Stdlib/DateTimeTest.php} (63%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Stdlib/StringTest.php
 rename dev/tests/unit/testsuite/Magento/{Core/Model/DefaultClass.php => Test/Tools/Di/_files/app/code/Magento/SomeModule/Element.php} (91%)
 rename app/code/Magento/Core/Model/EncryptionFactory.php => dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/ElementFactory.php (63%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Webapi/Model/Config/ConverterTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Webapi/Model/Config/_files/webapi.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Webapi/Model/Config/_files/webapi.xml
 create mode 100644 dev/tests/unit/testsuite/Magento/_files/errors/report.php
 delete mode 100644 dev/tools/Magento/Tools/Di/Code/Scanner/FileScanner.php
 rename {app/code/Magento/Core/Model => lib/Magento/App}/CacheInterface.php (95%)
 rename app/code/Magento/Core/Model/Config/Local.php => lib/Magento/App/Config.php (67%)
 rename {app/code/Magento/Core/Model => lib/Magento/App}/Config/FileResolver/Primary.php (97%)
 rename app/code/Magento/Core/Model/Config/Loader/Local.php => lib/Magento/App/Config/Loader.php (82%)
 rename {app/code/Magento/Core/Model => lib/Magento/App}/Config/ValidationState.php (97%)
 create mode 100644 lib/Magento/App/Cron.php
 create mode 100644 lib/Magento/App/DefaultPath/DefaultPath.php
 create mode 100644 lib/Magento/App/DefaultPathInterface.php
 create mode 100644 lib/Magento/App/EntryPoint/EntryPoint.php
 create mode 100644 lib/Magento/App/EntryPointInterface.php
 create mode 100644 lib/Magento/App/Error/Handler.php
 create mode 100644 lib/Magento/App/Http.php
 create mode 100644 lib/Magento/App/ObjectManager.php
 rename {app/code/Magento/Core/Model => lib/Magento/App}/ObjectManager/ConfigCache.php (96%)
 rename {app/code/Magento/Core/Model => lib/Magento/App}/ObjectManager/ConfigLoader.php (97%)
 rename {app/code/Magento/Core/Model => lib/Magento/App}/ObjectManager/ConfigLoader/Primary.php (87%)
 create mode 100644 lib/Magento/App/ObjectManagerFactory.php
 rename {app/code/Magento/Core/Model => lib/Magento/App}/Resource.php (71%)
 rename app/code/Magento/Core/Model/Config/Resource.php => lib/Magento/App/Resource/Config.php (74%)
 rename {app/code/Magento/Core/Model => lib/Magento/App}/Resource/Config/Converter.php (97%)
 rename {app/code/Magento/Core/Model => lib/Magento/App}/Resource/Config/Reader.php (66%)
 create mode 100644 lib/Magento/App/Resource/Config/SchemaLocator.php
 rename app/code/Magento/Core/Model/Config/ResourceInterface.php => lib/Magento/App/Resource/ConfigInterface.php (94%)
 rename {app/code/Magento/Core/Model => lib/Magento/App}/Resource/ConnectionAdapterInterface.php (96%)
 rename {app/code/Magento/Core/Model => lib/Magento/App}/Resource/ConnectionFactory.php (88%)
 create mode 100644 lib/Magento/App/Route/Config.php
 rename {app/code/Magento/Core/Model => lib/Magento/App}/Route/Config/Converter.php (98%)
 rename {app/code/Magento/Core/Model => lib/Magento/App}/Route/Config/Reader.php (84%)
 create mode 100644 lib/Magento/App/Route/Config/SchemaLocator.php
 rename app/code/Magento/Core/Model/Config/Resource/Primary.php => lib/Magento/App/Route/ConfigInterface.php (58%)
 rename lib/Magento/{Appl => App}/Router/NoRouteHandlerInterface.php (97%)
 rename app/code/Magento/Core/Model/Config/LoaderInterface.php => lib/Magento/App/RouterInterface.php (78%)
 rename {app/code/Magento/Core => lib/Magento/App}/etc/resources.xsd (100%)
 rename {app/code/Magento/Core => lib/Magento/App}/etc/routes.xsd (100%)
 rename {app/code/Magento/Core => lib/Magento/App}/etc/routes_merged.xsd (100%)
 create mode 100644 lib/Magento/AppInterface.php
 rename lib/Magento/Code/Generator/{ClassGenerator.php => Autoloader.php} (58%)
 delete mode 100644 lib/Magento/Code/Generator/DefinitionDecorator.php
 create mode 100644 lib/Magento/Code/ValidationException.php
 create mode 100644 lib/Magento/Code/Validator/ConstructorIntegrity.php
 create mode 100644 lib/Magento/Convert/ConvertArray.php
 create mode 100644 lib/Magento/Convert/Xml.php
 rename lib/Magento/Data/{Form/Factory.php => FormFactory.php} (83%)
 rename lib/Magento/{ => Encryption}/Crypt.php (98%)
 mode change 100755 => 100644
 create mode 100644 lib/Magento/Encryption/CryptFactory.php
 rename app/code/Magento/Core/Model/Encryption.php => lib/Magento/Encryption/Encryptor.php (67%)
 rename app/code/Magento/Core/Model/EncryptionInterface.php => lib/Magento/Encryption/EncryptorInterface.php (85%)
 create mode 100644 lib/Magento/Error/Handler.php
 create mode 100644 lib/Magento/Error/HandlerInterface.php
 create mode 100644 lib/Magento/Escaper.php
 create mode 100644 lib/Magento/Filter/AbstractFactory.php
 create mode 100644 lib/Magento/Filter/Decrypt.php
 create mode 100644 lib/Magento/Filter/Encrypt.php
 create mode 100644 lib/Magento/Filter/Encrypt/AdapterInterface.php
 create mode 100644 lib/Magento/Filter/Encrypt/Basic.php
 create mode 100644 lib/Magento/Filter/Factory.php
 rename app/code/Magento/Backend/Controller/Factory.php => lib/Magento/Filter/FactoryInterface.php (50%)
 create mode 100644 lib/Magento/Filter/FilterManager.php
 create mode 100644 lib/Magento/Filter/FilterManager/Config.php
 create mode 100644 lib/Magento/Filter/FilterManager/ConfigInterface.php
 create mode 100644 lib/Magento/Filter/RemoveAccents.php
 create mode 100644 lib/Magento/Filter/RemoveTags.php
 create mode 100644 lib/Magento/Filter/SplitWords.php
 create mode 100644 lib/Magento/Filter/StripTags.php
 create mode 100644 lib/Magento/Filter/Truncate.php
 create mode 100644 lib/Magento/Filter/ZendFactory.php
 create mode 100644 lib/Magento/HTTP/Authentication.php
 create mode 100644 lib/Magento/HTTP/Header.php
 create mode 100644 lib/Magento/HTTP/PhpEnvironment/RemoteAddress.php
 create mode 100644 lib/Magento/HTTP/PhpEnvironment/ServerAddress.php
 rename {app/code/Magento/Core/Model => lib/Magento}/Logger.php (77%)
 create mode 100644 lib/Magento/Math/Division.php
 create mode 100644 lib/Magento/Math/Random.php
 rename lib/Magento/{App => }/Module/Declaration/Converter/Dom.php (97%)
 rename lib/Magento/{App => }/Module/Declaration/FileResolver.php (94%)
 rename lib/Magento/{App => }/Module/Declaration/Reader/Filesystem.php (93%)
 rename lib/Magento/{App => }/Module/Declaration/SchemaLocator.php (92%)
 rename lib/Magento/{App => }/Module/Dir.php (87%)
 rename {app/code/Magento/Core/Model/Config/Modules => lib/Magento/Module/Dir}/Reader.php (53%)
 rename lib/Magento/{App => }/Module/Dir/ReverseResolver.php (85%)
 rename {app/code/Magento/Core/App => lib/Magento/Module}/FrontController/Plugin/Install.php (86%)
 rename lib/Magento/{App => Module}/ModuleList.php (88%)
 rename lib/Magento/{App => Module}/ModuleListInterface.php (94%)
 rename lib/Magento/{App => }/Module/ResourceResolver.php (88%)
 rename lib/Magento/{App => }/Module/ResourceResolverInterface.php (97%)
 rename lib/Magento/{App => Module}/Updater.php (83%)
 rename lib/Magento/{App => Module}/Updater/SetupFactory.php (86%)
 rename lib/Magento/{App => Module}/Updater/SetupInterface.php (90%)
 rename lib/Magento/{App => Module}/UpdaterInterface.php (97%)
 rename lib/Magento/{App => Module}/etc/module.xsd (100%)
 mode change 100755 => 100644
 rename {app/code/Magento/Core/Model => lib/Magento}/ObjectManager/DefinitionFactory.php (50%)
 rename {app/code/Magento/Core/Model => lib/Magento}/ObjectManager/DynamicConfigInterface.php (96%)
 rename app/code/Magento/Core/Model/ObjectManager/Relations.php => lib/Magento/ObjectManager/Relations/Compiled.php (93%)
 create mode 100644 lib/Magento/Stdlib/ArrayUtils.php
 rename lib/Magento/{Date.php => Stdlib/DateTime.php} (75%)
 create mode 100644 lib/Magento/Stdlib/String.php

diff --git a/.htaccess b/.htaccess
index 7ea7e5501ef..891fbd1f181 100644
--- a/.htaccess
+++ b/.htaccess
@@ -181,4 +181,4 @@
 ## If running in cluster environment, uncomment this
 ## http://developer.yahoo.com/performance/rules.html#etags
 
-    #FileETag none
\ No newline at end of file
+    #FileETag none
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 32477535ddc..b00766c9f50 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,69 @@
+2.0.0.0-dev51
+=============
+* Application areas rework:
+    * Single point of access to the current area code
+    * Declare Application Areas
+* Various improvements:
+  * Breakdown of the Adminhtml module:
+     * Moved the Customer-related logic to the Customer module
+     * Moved the System-related logic to the Backend module
+     * Moved the Checkout-related logic to the Checkout module
+     * Moved the Cms-related logic to the Cms module
+     * Moved the Promotions-related logic to the CatalogRule and SalesRule modules
+  * Eliminated the setNode/getNode methods from Magento\Core\Model\Config and adopted all client code
+  * Moved all application bootstrapping behavior to library
+  * Moved application-specific behavior from the entry points to the Magento\AppInterface implementations
+  * Removed the obsolete behavior from routing and front-controller
+  * Refactored the route configuration loading
+  * Extracted the modularity support behavior to the Magento\Module component
+  * Refactored the Resource configuration loading
+  * Removed the obsolete configuration loaders
+  * Removed the obsolete configuration from config.xml
+  * Refactored the code-generation mechanism
+  * Added constructor integrity verification to the Compiler tool
+  * Added strict naming rules for the auto-generated Factory and Proxy classes
+  * Global functions are now called from app\functions.php
+  * Removed functions.php from the Magento\Core module
+  * Methods related to mageCoreErrorHandler, string and date were moved from functions.php to the Library components
+  * Moved the following methods from Core Helpers to the appropriate libraries:
+     * Moved the Abstract Helper to the Magento\Escaper and Magento\Filter libraries
+     * Moved the String Helper to the Magento\Filter, Magento\Stdlib\String, Magento\Stdlib\ArrayUtils libraries
+     * Moved the Data Helper to the Magento\Math, Magento\Filter, Magento\Convert, Magento\Encryption, Magento\Filesystem libraries and to Magento\Customer\Helper\Data libraries
+     * Moved the Http Magento Helper to the Magento\HTTP library
+  * The Hint Magento Helper, Http Magento Helper helpers were removed from the Magento\Core module
+  * Implemented SOAP faults declaration in WSDL
+  * Web API config reader was refactored to use Magento\Config\Reader\Filesystem
+  * Created integrations module. Added 'Integrations Grid' and 'New/Edit' Integration pages in the admin
+  * Removed obsolete page fragment code
+* Fixed bugs:
+  * Fixed inability to create an Invoice/Shipment/Credit Memo if the Sales Archive functionality is enabled
+  * Fixed the Minimum Advertised Price link on the Product view
+  * Fixed the View Files Population Tool
+  * Fixed the error on saving the Google AdWords configuration
+  * Fixed the error with the 'Invalid website code requested:' message appearing when enabling payment methods
+  * Fixed inability to insert spaces in credit card numbers
+  * Fixed inability to print orders from the frontend
+  * Fixed the fatal error on removal of reviews that have ratings
+  * Fixed JS error with the browser not responding when Virtual/Downloadable product are added to cart
+  * Fixed inability to delete a row from the 'Order By SKU' form in Internet Explorer
+  * Fixed inability to enable the Use Flat Catalog Product option
+  * Fixed inability to configure Grouped and Configurable products during order creation in the backend
+  * Fixed inability to insert a widget and/or a banner in CMS pages
+  * Fixed inability to set the Quantity value for Gift Cards
+  * Fixed the fatal error on the Customer Account > Gift Registry tab in the backend
+  * Fixed inability to import with the "Customers Main File" entity type selected
+  * Fixed the "Recently Viewed/Compared products" option missing on the New Frontend App Instance page
+  * Fixed the fatal error on managing Shopping Cart for a customer with a placed order in the backend
+  * Fixed the fatal error on an attempt to create an RMA request for Configurable products
+  * Fixed error on the backend dashboard if any value except "Last 24 Hours" is chosen in the "Select Range" dropdown
+  * Fixed duplicate values of options in the drop-downs on the RMA pages in the backend
+
 2.0.0.0-dev50
 =============
 * Modularity improvements:
-  * Cleavage of Adminhtml module
-    * Moved Sales, Catalog, Tax-related logic to respective modules
-    * Moved Action, Cache, Ajax, Dashboard, Index, Json, Rating, Sitemap, Survey, UrlRewrite from root of Adminhtml Controller folder
+  * Breakdown of the Adminhtml module:
+     * Moved Sales, Catalog, Tax-related logic to respective modules
+     * Moved Action, Cache, Ajax, Dashboard, Index, Json, Rating, Sitemap, Survey, UrlRewrite from root of Adminhtml Controller folder
   * View abstraction was moved into library
   * Eliminated dependency in Magento\Data\Form from Magento\Core module
   * Eliminated Magento\Media module
diff --git a/app/bootstrap.php b/app/bootstrap.php
index 3afb200c5e1..ddb065617c0 100644
--- a/app/bootstrap.php
+++ b/app/bootstrap.php
@@ -61,7 +61,7 @@ define('BP', dirname(__DIR__));
 /**
  * Require necessary files
  */
-require_once BP . '/app/code/Magento/Core/functions.php';
+require_once BP . '/app/functions.php';
 
 require_once __DIR__ . '/autoload.php';
 \Magento\Autoload\IncludePath::addIncludePath(array(
@@ -90,5 +90,4 @@ if (!defined('BARE_BOOTSTRAP')) {
         \Magento\Profiler::applyConfig($_SERVER['MAGE_PROFILER'], dirname(__DIR__), !empty($_REQUEST['isAjax']));
     }
 }
-set_error_handler('mageCoreErrorHandler');
 date_default_timezone_set(\Magento\Core\Model\LocaleInterface::DEFAULT_TIMEZONE);
diff --git a/app/code/Magento/AdminNotification/Block/System/Messages.php b/app/code/Magento/AdminNotification/Block/System/Messages.php
index 7824cf712d2..af0ab846362 100644
--- a/app/code/Magento/AdminNotification/Block/System/Messages.php
+++ b/app/code/Magento/AdminNotification/Block/System/Messages.php
@@ -33,7 +33,7 @@ class Messages extends \Magento\Backend\Block\Template
     protected $_messages;
 
     /**
-     * @param Magento\Core\Helper\Data $coreData
+     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages
      * @param array $data
diff --git a/app/code/Magento/AdminNotification/Model/Feed.php b/app/code/Magento/AdminNotification/Model/Feed.php
index f193aba100c..a0f94bf5ec8 100644
--- a/app/code/Magento/AdminNotification/Model/Feed.php
+++ b/app/code/Magento/AdminNotification/Model/Feed.php
@@ -59,7 +59,7 @@ class Feed extends \Magento\Core\Model\AbstractModel
     protected $_inboxFactory;
 
     /**
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cache;
 
@@ -68,7 +68,7 @@ class Feed extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\AdminNotification\Model\InboxFactory $inboxFactory
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -78,7 +78,7 @@ class Feed extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\AdminNotification\Model\InboxFactory $inboxFactory,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
diff --git a/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php b/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php
index dc167a99ea8..6ca88914496 100644
--- a/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php
+++ b/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php
@@ -43,7 +43,7 @@ class Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\AdminNotification\Model\System\MessageList $messageList
@@ -51,7 +51,7 @@ class Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\AdminNotification\Model\System\MessageList $messageList,
diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Security.php b/app/code/Magento/AdminNotification/Model/System/Message/Security.php
index 70d77037eed..ed4045d5c38 100644
--- a/app/code/Magento/AdminNotification/Model/System/Message/Security.php
+++ b/app/code/Magento/AdminNotification/Model/System/Message/Security.php
@@ -45,7 +45,7 @@ class Security
     private $_verificationTimeOut  = 2;
 
     /**
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cache;
 
@@ -65,13 +65,13 @@ class Security
     protected $_curlFactory;
 
     /**
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Core\Model\Store\Config $storeConfig
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\HTTP\Adapter\CurlFactory $curlFactory
      */
     public function __construct(
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Core\Model\Store\Config $storeConfig,
         \Magento\Core\Model\Config $config,
         \Magento\HTTP\Adapter\CurlFactory $curlFactory
diff --git a/app/code/Magento/Adminhtml/Block/Media/Uploader.php b/app/code/Magento/Adminhtml/Block/Media/Uploader.php
index edf4b2951f1..4bb0f7e8326 100644
--- a/app/code/Magento/Adminhtml/Block/Media/Uploader.php
+++ b/app/code/Magento/Adminhtml/Block/Media/Uploader.php
@@ -39,7 +39,7 @@ class Uploader extends \Magento\Adminhtml\Block\Widget
     /**
      * @var string
      */
-    protected $_template = 'media/uploader.phtml';
+    protected $_template = 'Magento_Adminhtml::media/uploader.phtml';
 
     /**
      * @var \Magento\Core\Model\View\Url
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
index f99d9d89a72..40ce922592a 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
@@ -56,7 +56,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -66,7 +66,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -154,7 +154,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
 
         if ($queue->getQueueStartAt()) {
             $form->getElement('date')->setValue(
-                $this->_locale->date($queue->getQueueStartAt(), \Magento\Date::DATETIME_INTERNAL_FORMAT)
+                $this->_locale->date($queue->getQueueStartAt(), \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)
             );
         }
 
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php
index 3fc43a3f267..e4739860bab 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php
@@ -44,7 +44,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -52,7 +52,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     public function __construct(
         \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php
index cba05c6f1d6..a2099f27cd5 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php
@@ -87,7 +87,7 @@ class Date
                     $dateFormat = 'yyyy';
                     break;
                 default:
-                    $dateFormat = \Magento\Date::DATE_INTERNAL_FORMAT;
+                    $dateFormat = \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT;
                     break;
             }
 
diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php
index 08e6dd3f3e1..89335c84910 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php
@@ -204,6 +204,6 @@ class Grid extends \Magento\Adminhtml\Block\Report\Grid\Shopcart
 
     public function getRowUrl($row)
     {
-        return $this->getUrl('adminhtml/customer/edit', array('id'=>$row->getCustomerId(), 'active_tab'=>'cart'));
+        return $this->getUrl('customer/index/edit', array('id'=>$row->getCustomerId(), 'active_tab'=>'cart'));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Review/Add/Form.php b/app/code/Magento/Adminhtml/Block/Review/Add/Form.php
index 9df6b28ad36..49843a68a04 100644
--- a/app/code/Magento/Adminhtml/Block/Review/Add/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Review/Add/Form.php
@@ -52,7 +52,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Review\Helper\Data $reviewData
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -61,7 +61,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Review\Helper\Data $reviewData,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/Review/Edit.php b/app/code/Magento/Adminhtml/Block/Review/Edit.php
index 820a22e7757..19aec366970 100644
--- a/app/code/Magento/Adminhtml/Block/Review/Edit.php
+++ b/app/code/Magento/Adminhtml/Block/Review/Edit.php
@@ -157,7 +157,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
                 'onclick',
                 'setLocation(\''
                     . $this->getUrl(
-                        'adminhtml/customer/edit',
+                        'customer/index/edit',
                         array('id' => $this->getRequest()->getParam('customerId', false))
                     )
                     .'\')'
diff --git a/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php
index 99a6bb12641..41c5fac3f07 100644
--- a/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php
@@ -59,7 +59,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Review\Helper\Data $reviewData
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -70,7 +70,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Review\Helper\Data $reviewData,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -108,12 +108,12 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         $fieldset->addField('product_name', 'note', array(
             'label'     => __('Product'),
             'text'      => '<a href="' . $this->getUrl('catalog/product/edit', array('id' => $product->getId()))
-                . '" onclick="this.target=\'blank\'">' . $this->_reviewData->escapeHtml($product->getName()) . '</a>'
+                . '" onclick="this.target=\'blank\'">' . $this->escapeHtml($product->getName()) . '</a>'
         ));
 
         if ($customer->getId()) {
             $customerText = __('<a href="%1" onclick="this.target=\'blank\'">%2 %3</a> <a href="mailto:%4">(%4)</a>',
-                $this->getUrl('adminhtml/customer/edit', array('id' => $customer->getId(), 'active_tab'=>'review')),
+                $this->getUrl('customer/index/edit', array('id' => $customer->getId(), 'active_tab'=>'review')),
                 $this->escapeHtml($customer->getFirstname()),
                 $this->escapeHtml($customer->getLastname()),
                 $this->escapeHtml($customer->getEmail()));
diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php
index 60a72f75a45..35e38bb6a1e 100644
--- a/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php
@@ -43,7 +43,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -51,7 +51,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     public function __construct(
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php
index 55b7614b3f6..87e2bbf6f94 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php
@@ -71,7 +71,7 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form
      * @param \Magento\Backend\Model\Session $backendSession
      * @param \Magento\Backend\Helper\Data $adminhtmlData
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -89,7 +89,7 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form
         \Magento\Backend\Model\Session $backendSession,
         \Magento\Backend\Helper\Data $adminhtmlData,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php
index 8013bc87706..f7a1a53addb 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php
@@ -63,7 +63,7 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form
      * @param \Magento\Backend\Model\Session $backendSession
      * @param \Magento\Backend\Helper\Data $adminhtmlData
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -80,7 +80,7 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form
         \Magento\Backend\Model\Session $backendSession,
         \Magento\Backend\Helper\Data $adminhtmlData,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Grid.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Grid.php
index e042d50d091..3c6b2c1c2c5 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Grid.php
@@ -33,7 +33,7 @@
  */
 namespace Magento\Adminhtml\Block\Urlrewrite\Cms\Page;
 
-class Grid extends \Magento\Adminhtml\Block\Cms\Page\Grid
+class Grid extends \Magento\Cms\Block\Adminhtml\Page\Grid
 {
     /**
      * Constructor
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php
index ca19c7659c8..7c2b06f3fe9 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php
@@ -102,7 +102,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Backend\Model\Session $backendSession
      * @param \Magento\Backend\Helper\Data $adminhtmlData
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -117,7 +117,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Backend\Model\Session $backendSession,
         \Magento\Backend\Helper\Data $adminhtmlData,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php b/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php
index 2d3a87439e2..5d6a4d569e6 100644
--- a/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php
+++ b/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php
@@ -114,7 +114,7 @@ abstract class AbstractReport extends \Magento\Backend\Controller\Adminhtml\Acti
         $flag = $this->_objectManager->create('Magento\Reports\Model\Flag')->setReportFlagCode($flagCode)->loadSelf();
         $updatedAt = ($flag->hasData())
             ? $this->_objectManager->get('Magento\Core\Model\LocaleInterface')->storeDate(
-                0, new \Zend_Date($flag->getLastUpdate(), \Magento\Date::DATETIME_INTERNAL_FORMAT), true
+                0, new \Zend_Date($flag->getLastUpdate(), \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT), true
             )
             : 'undefined';
 
diff --git a/app/code/Magento/Adminhtml/Controller/Report/Statistics.php b/app/code/Magento/Adminhtml/Controller/Report/Statistics.php
index 2b1a66ec2af..7671ef5b814 100644
--- a/app/code/Magento/Adminhtml/Controller/Report/Statistics.php
+++ b/app/code/Magento/Adminhtml/Controller/Report/Statistics.php
@@ -135,7 +135,7 @@ class Statistics extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Exception $e) {
             $this->_objectManager->get('Magento\Adminhtml\Model\Session')
                 ->addError(__('We can\'t refresh recent statistics.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
 
         if($this->_getSession()->isFirstPageAfterLogin()) {
@@ -166,7 +166,7 @@ class Statistics extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Exception $e) {
             $this->_objectManager->get('Magento\Adminhtml\Model\Session')
                 ->addError(__('We can\'t refresh lifetime statistics.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
 
         if($this->_getSession()->isFirstPageAfterLogin()) {
diff --git a/app/code/Magento/Adminhtml/Model/LayoutUpdate/Validator.php b/app/code/Magento/Adminhtml/Model/LayoutUpdate/Validator.php
index 2f1c87e3dc6..f0225f5f5b1 100644
--- a/app/code/Magento/Adminhtml/Model/LayoutUpdate/Validator.php
+++ b/app/code/Magento/Adminhtml/Model/LayoutUpdate/Validator.php
@@ -72,7 +72,7 @@ class Validator extends \Zend_Validate_Abstract
     protected $_xsdSchemas;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_modulesReader;
 
@@ -82,11 +82,11 @@ class Validator extends \Zend_Validate_Abstract
     protected $_domConfigFactory;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $modulesReader
+     * @param \Magento\Module\Dir\Reader $modulesReader
      * @param \Magento\Config\DomFactory $domConfigFactory
      */
     public function __construct(
-        \Magento\Core\Model\Config\Modules\Reader $modulesReader,
+        \Magento\Module\Dir\Reader $modulesReader,
         \Magento\Config\DomFactory $domConfigFactory
     ) {
         $this->_modulesReader = $modulesReader;
diff --git a/app/code/Magento/Adminhtml/Model/Search/Catalog.php b/app/code/Magento/Adminhtml/Model/Search/Catalog.php
index a34a54267bb..39d6edb9bdd 100644
--- a/app/code/Magento/Adminhtml/Model/Search/Catalog.php
+++ b/app/code/Magento/Adminhtml/Model/Search/Catalog.php
@@ -24,15 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Adminhtml\Model\Search;
+
 /**
  * Search Catalog Model
- *
- * @category    Magento
- * @package     Magento_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Model\Search;
-
 class Catalog extends \Magento\Object
 {
     /**
@@ -43,11 +39,11 @@ class Catalog extends \Magento\Object
     protected $_catalogSearchData = null;
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
      * Adminhtml data
@@ -58,16 +54,16 @@ class Catalog extends \Magento\Object
 
     /**
      * @param \Magento\Adminhtml\Helper\Data $adminhtmlData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\CatalogSearch\Helper\Data $catalogSearchData
      */
     public function __construct(
         \Magento\Adminhtml\Helper\Data $adminhtmlData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\CatalogSearch\Helper\Data $catalogSearchData
     ) {
         $this->_adminhtmlData = $adminhtmlData;
-        $this->_coreString = $coreString;
+        $this->string = $string;
         $this->_catalogSearchData = $catalogSearchData;
     }
 
@@ -98,7 +94,7 @@ class Catalog extends \Magento\Object
                 'id'            => 'product/1/'.$product->getId(),
                 'type'          => __('Product'),
                 'name'          => $product->getName(),
-                'description'   => $this->_coreString->substr($description, 0, 30),
+                'description'   => $this->string->substr($description, 0, 30),
                 'url' => $this->_adminhtmlData->getUrl('catalog/product/edit', array('id' => $product->getId())),
             );
         }
diff --git a/app/code/Magento/Adminhtml/Model/Search/Customer.php b/app/code/Magento/Adminhtml/Model/Search/Customer.php
index 3129e9d5885..fa11df0c69b 100644
--- a/app/code/Magento/Adminhtml/Model/Search/Customer.php
+++ b/app/code/Magento/Adminhtml/Model/Search/Customer.php
@@ -89,7 +89,7 @@ class Customer extends \Magento\Object
                 'type'          => __('Customer'),
                 'name'          => $customer->getName(),
                 'description'   => $customer->getCompany(),
-                'url' => $this->_adminhtmlData->getUrl('adminhtml/customer/edit', array('id' => $customer->getId())),
+                'url' => $this->_adminhtmlData->getUrl('customer/index/edit', array('id' => $customer->getId())),
             );
         }
 
diff --git a/app/code/Magento/Adminhtml/Model/Session/Quote.php b/app/code/Magento/Adminhtml/Model/Session/Quote.php
index 3f61ec71413..c7759239aa3 100644
--- a/app/code/Magento/Adminhtml/Model/Session/Quote.php
+++ b/app/code/Magento/Adminhtml/Model/Session/Quote.php
@@ -24,15 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Adminhtml\Model\Session;
+
 /**
  * Adminhtml quote session
- *
- * @category   Magento
- * @package    Magento_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Model\Session;
-
 class Quote extends \Magento\Core\Model\Session\AbstractSession
 {
     const XML_PATH_DEFAULT_CREATEACCOUNT_GROUP = 'customer/create_account/default_group';
@@ -163,7 +159,8 @@ class Quote extends \Magento\Core\Model\Session\AbstractSession
             if ($useSetStore && $this->getStore()->getId()) {
                 $this->_customer->setStore($this->getStore());
             }
-            if ($customerId = $this->getCustomerId()) {
+            $customerId = $this->getCustomerId();
+            if ($customerId) {
                 $this->_customer->load($customerId);
             }
         }
@@ -179,7 +176,8 @@ class Quote extends \Magento\Core\Model\Session\AbstractSession
     {
         if (is_null($this->_store)) {
             $this->_store = $this->_storeManager->getStore($this->getStoreId());
-            if ($currencyId = $this->getCurrencyId()) {
+            $currencyId = $this->getCurrencyId();
+            if ($currencyId) {
                 $this->_store->setCurrentCurrencyCode($currencyId);
             }
         }
diff --git a/app/code/Magento/Adminhtml/etc/adminhtml/menu.xml b/app/code/Magento/Adminhtml/etc/adminhtml/menu.xml
index 68de1fb3dcd..27d92ec34c8 100644
--- a/app/code/Magento/Adminhtml/etc/adminhtml/menu.xml
+++ b/app/code/Magento/Adminhtml/etc/adminhtml/menu.xml
@@ -31,14 +31,8 @@
         <add id="Magento_Adminhtml::system" title="System" module="Magento_Adminhtml" sortOrder="80" resource="Magento_Adminhtml::system"/>
         <add id="Magento_Adminhtml::system_tools" title="Tools" module="Magento_Adminhtml" sortOrder="50" parent="Magento_Adminhtml::system" resource="Magento_Adminhtml::tools"/>
         <add id="Magento_Adminhtml::system_design" title="Design" module="Magento_Adminhtml" sortOrder="20" parent="Magento_Adminhtml::content" resource="Magento_Adminhtml::design"/>
-        <add id="Magento_Adminhtml::system_design_schedule" title="Schedule" module="Magento_Adminhtml" sortOrder="30" parent="Magento_Adminhtml::system_design" action="adminhtml/system_design" resource="Magento_Adminhtml::schedule"/>
         <add id="Magento_Adminhtml::system_convert" title="Data Transfer" module="Magento_Adminhtml" sortOrder="10" parent="Magento_Adminhtml::system" resource="Magento_Adminhtml::convert"/>
-        <add id="Magento_Adminhtml::system_currency" title="Currency" module="Magento_Adminhtml" sortOrder="30" parent="Magento_Adminhtml::stores" action="adminhtml/system_currency" resource="Magento_CurrencySymbol::system_currency"/>
-        <add id="Magento_Adminhtml::system_email_template" title="Email Templates" module="Magento_Adminhtml" sortOrder="10" parent="Magento_Adminhtml::marketing_communications" action="adminhtml/system_email_template" resource="Magento_Adminhtml::email_template"/>
-        <add id="Magento_Adminhtml::system_variable" title="Custom Variables" module="Magento_Adminhtml" sortOrder="20" parent="Magento_Adminhtml::system_other_settings" action="adminhtml/system_variable" resource="Magento_Adminhtml::variable"/>
         <add id="Magento_Adminhtml::system_cache" title="Cache Management" module="Magento_Adminhtml" sortOrder="10" parent="Magento_Adminhtml::system_tools" action="adminhtml/cache" resource="Magento_Adminhtml::cache"/>
-        <add id="Magento_Adminhtml::system_store" title="All Stores" module="Magento_Core" sortOrder="10" parent="Magento_Adminhtml::stores_settings" action="adminhtml/system_store/" resource="Magento_Adminhtml::store"/>
-        <add id="Magento_Adminhtml::system_config" title="Configuration" module="Magento_Adminhtml" sortOrder="20" parent="Magento_Adminhtml::stores_settings" action="adminhtml/system_config" resource="Magento_Adminhtml::config"/>
 
         <add id="Magento_Catalog::inventory" title="Inventory" module="Magento_Catalog" sortOrder="10" parent="Magento_Catalog::catalog" dependsOnModule="Magento_Catalog" resource="Magento_Catalog::catalog"/>
 
diff --git a/app/code/Magento/Adminhtml/etc/config.xml b/app/code/Magento/Adminhtml/etc/config.xml
index 7f3ff1cc81a..2142978ee0c 100644
--- a/app/code/Magento/Adminhtml/etc/config.xml
+++ b/app/code/Magento/Adminhtml/etc/config.xml
@@ -26,22 +26,6 @@
  */
 -->
 <config>
-    <adminhtml>
-        <global_search>
-            <products>
-                <class>Magento\Adminhtml\Model\Search\Catalog</class>
-                <acl>Magento_Catalog::catalog</acl>
-            </products>
-            <customers>
-                <class>Magento\Adminhtml\Model\Search\Customer</class>
-                <acl>Magento_Customer::customer</acl>
-            </customers>
-            <sales>
-                <class>Magento\Adminhtml\Model\Search\Order</class>
-                <acl>Magento_Sales::sales</acl>
-            </sales>
-        </global_search>
-    </adminhtml>
     <default>
         <system>
             <media_storage_configuration>
@@ -73,14 +57,6 @@
                 </input_types>
             </validator_data>
         </general>
-        <hints>
-            <store_switcher>
-                <url>
-                    <![CDATA[http://www.magentocommerce.com/knowledge-base/entry/understanding-store-scopes]]>
-</url>
-                <enabled>1</enabled>
-            </store_switcher>
-        </hints>
     </default>
     <stores>
         <admin>
@@ -108,4 +84,4 @@
             </web>
         </admin>
     </websites>
-</config>
+</config>
\ No newline at end of file
diff --git a/app/code/Magento/Adminhtml/etc/module.xml b/app/code/Magento/Adminhtml/etc/module.xml
index f34309c3f0d..4c589cb95b4 100755
--- a/app/code/Magento/Adminhtml/etc/module.xml
+++ b/app/code/Magento/Adminhtml/etc/module.xml
@@ -30,32 +30,24 @@
             <module name="Magento_Reports"/>
             <module name="Magento_Customer"/>
             <module name="Magento_Newsletter"/>
-            <module name="Magento_Wishlist"/>
             <module name="Magento_Sales"/>
             <module name="Magento_Sitemap"/>
-            <module name="Magento_Directory"/>
             <module name="Magento_Backend"/>
             <module name="Magento_Catalog"/>
             <module name="Magento_Cms"/>
-            <module name="Magento_CatalogRule"/>
             <module name="Magento_Review"/>
             <module name="Magento_Rating"/>
             <module name="Magento_Tax"/>
             <module name="Magento_Eav"/>
             <module name="Magento_CatalogSearch"/>
-            <module name="Magento_Rule"/>
             <module name="Magento_SalesRule"/>
             <module name="Magento_Downloadable"/>
             <module name="Magento_Shipping"/>
             <module name="Magento_Backup"/>
-            <module name="Magento_User"/>
             <module name="Magento_Checkout"/>
-            <module name="Magento_Widget"/>
-            <module name="Magento_Log"/>
             <module name="Magento_Page"/>
             <module name="Magento_GiftMessage"/>
             <module name="Magento_Weee"/>
-            <module name="Magento_Usa"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/backup/dialogs.phtml b/app/code/Magento/Adminhtml/view/adminhtml/backup/dialogs.phtml
index 6b6ed9d329b..9a06acd722c 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/backup/dialogs.phtml
+++ b/app/code/Magento/Adminhtml/view/adminhtml/backup/dialogs.phtml
@@ -158,8 +158,8 @@
 //<![CDATA[
     document.observe('dom:loaded', function () {
         backup = new AdminBackup();
-        backup.rollbackUrl = '<?php echo $helper->jsQuoteEscape($rollbackUrl);?>';
-        backup.backupUrl = '<?php echo $helper->jsQuoteEscape($backupUrl);?>';
+        backup.rollbackUrl = '<?php echo $helper->escapeJsQuote($rollbackUrl);?>';
+        backup.backupUrl = '<?php echo $helper->escapeJsQuote($backupUrl);?>';
     });
 //]]>
 </script>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_couponsgrid.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_couponsgrid.xml
deleted file mode 100644
index 7425011f5f8..00000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_couponsgrid.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?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)
- */
--->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <container name="root" label="Root" output="1">
-        <block class="Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons\Grid" name="promo_quote_edit_tab_coupons_grid"/>
-    </container>
-</layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml
index dc046bfc44e..3980c42ad63 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml
+++ b/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml
@@ -253,7 +253,7 @@
             </block>
             <block class="Magento\Page\Block\Html\Head\Script" name="magento-adminhtml-promo-rules-js">
                 <arguments>
-                    <argument name="file" xsi:type="string">Magento_Adminhtml::promo/rules.js</argument>
+                    <argument name="file" xsi:type="string">Magento_Rule::rules.js</argument>
                     <argument name="properties" xsi:type="array">
                         <item name="attributes" xsi:type="string"/>
                         <item name="ie_condition" xsi:type="string"/>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/editor.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/editor.xml
index 81d9fd649cc..9bb06c3802b 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/editor.xml
+++ b/app/code/Magento/Adminhtml/view/adminhtml/layout/editor.xml
@@ -30,7 +30,7 @@
         </action>
         <block class="Magento\Page\Block\Html\Head\Script" name="magento-adminhtml-variables-js">
             <arguments>
-                <argument name="file" xsi:type="string">Magento_Adminhtml::variables.js</argument>
+                <argument name="file" xsi:type="string">Magento_Backend::variables.js</argument>
             </arguments>
         </block>
         <block class="Magento\Page\Block\Html\Head\Script" name="magento-adminhtml-wysiwyg-widget-js">
diff --git a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php
index 4e52666b5fd..09086d4d674 100644
--- a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php
+++ b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Admihtml DirtectPost Payment Controller
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -18,19 +20,9 @@
  * 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_Authorizenet
  * @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)
  */
-
-/**
- * Admihtml DirtectPost Payment Controller
- *
- * @category   Magento
- * @package    Magento_DirtectPost
- * @author     Magento Core Team <core@magentocommerce.com>
- */
 namespace Magento\Authorizenet\Controller\Adminhtml\Authorizenet\Directpost;
 
 class Payment
diff --git a/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php b/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php
index 6b7468235f2..d8c19d1021f 100644
--- a/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php
+++ b/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php
@@ -95,11 +95,11 @@ class Payment extends \Magento\Core\Controller\Front\Action
             $paymentMethod->process($data);
             $result['success'] = 1;
         } catch (\Magento\Core\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $result['success'] = 0;
             $result['error_msg'] = $e->getMessage();
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $result['success'] = 0;
             $result['error_msg'] = __('We couldn\'t process your order right now. Please try again later.');
         }
diff --git a/app/code/Magento/Authorizenet/Model/Directpost.php b/app/code/Magento/Authorizenet/Model/Directpost.php
index 76b9b4b57a9..e497766c0bd 100644
--- a/app/code/Magento/Authorizenet/Model/Directpost.php
+++ b/app/code/Magento/Authorizenet/Model/Directpost.php
@@ -81,10 +81,10 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet
      * @param \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
      * @param \Magento\Core\Model\Session\AbstractSession $session
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Paygate\Helper\Data $paygateData
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\Module\ModuleListInterface $moduleList
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
@@ -103,10 +103,10 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet
         \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory,
         \Magento\Sales\Model\OrderFactory $orderFactory,
         \Magento\Core\Model\Session\AbstractSession $session,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Paygate\Helper\Data $paygateData,
-        \Magento\App\ModuleListInterface $moduleList,
+        \Magento\Module\ModuleListInterface $moduleList,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
diff --git a/app/code/Magento/Authorizenet/view/frontend/layout/authorizenet_directpost_payment_redirect.xml b/app/code/Magento/Authorizenet/view/frontend/layout/authorizenet_directpost_payment_redirect.xml
index 09482313117..a6f7da16376 100644
--- a/app/code/Magento/Authorizenet/view/frontend/layout/authorizenet_directpost_payment_redirect.xml
+++ b/app/code/Magento/Authorizenet/view/frontend/layout/authorizenet_directpost_payment_redirect.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="AuthorizeNet Directpost Redirect" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Authorizenet\Block\Directpost\Iframe" name="iframe" template="directpost/iframe.phtml"/>
-    </block>
+    <block class="Magento\Authorizenet\Block\Directpost\Iframe" name="iframe" output="1" template="directpost/iframe.phtml"/>
 </layout>
diff --git a/app/code/Magento/Authorizenet/view/frontend/layout/authorizenet_directpost_payment_response.xml b/app/code/Magento/Authorizenet/view/frontend/layout/authorizenet_directpost_payment_response.xml
index 27bcc151dbb..31ad3f320f7 100644
--- a/app/code/Magento/Authorizenet/view/frontend/layout/authorizenet_directpost_payment_response.xml
+++ b/app/code/Magento/Authorizenet/view/frontend/layout/authorizenet_directpost_payment_response.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="AuthorizeNet Directpost Response" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Authorizenet\Block\Directpost\Iframe" name="iframe" template="directpost/iframe.phtml"/>
-    </block>
+    <block class="Magento\Authorizenet\Block\Directpost\Iframe" name="iframe" output="1" template="directpost/iframe.phtml"/>
 </layout>
diff --git a/app/code/Magento/Backend/App/Area/FrontNameResolver.php b/app/code/Magento/Backend/App/Area/FrontNameResolver.php
index 85dd32d939e..17271109824 100644
--- a/app/code/Magento/Backend/App/Area/FrontNameResolver.php
+++ b/app/code/Magento/Backend/App/Area/FrontNameResolver.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Backend area front name resolver. Reads front name from configuration
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -30,6 +32,11 @@ class FrontNameResolver implements \Magento\App\Area\FrontNameResolverInterface
 
     const PARAM_BACKEND_FRONT_NAME              = 'backend.frontName';
 
+    /**
+     * Backend area code
+     */
+    const AREA_CODE = 'adminhtml';
+
     /**
      * @var string
      */
@@ -63,4 +70,4 @@ class FrontNameResolver implements \Magento\App\Area\FrontNameResolverInterface
         }
         return $this->_defaultFrontName;
     }
-}
\ No newline at end of file
+}
diff --git a/app/code/Magento/Backend/App/DefaultPath.php b/app/code/Magento/Backend/App/DefaultPath.php
new file mode 100644
index 00000000000..b69472565a7
--- /dev/null
+++ b/app/code/Magento/Backend/App/DefaultPath.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Default application path for backend area
+ *
+ * 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\App;
+
+class DefaultPath implements \Magento\App\DefaultPathInterface
+{
+    /**
+     * @var array
+     */
+    protected $_parts;
+
+    /**
+     * @param \Magento\Core\Model\Config $config
+     */
+    public function __construct(\Magento\Core\Model\Config $config)
+    {
+        $pathParts = explode('/', $config->getValue('web/default/admin', 'default'));
+
+        $this->_parts = array(
+            'area'       => isset($pathParts[0]) ? $pathParts[0] : '',
+            'module'     => isset($pathParts[1]) ? $pathParts[1] : 'admin',
+            'controller' => isset($pathParts[2]) ? $pathParts[2] : 'index',
+            'action'     => isset($pathParts[3]) ? $pathParts[3] : 'index',
+        );
+    }
+
+    /**
+     * Retrieve default path part by code
+     *
+     * @param string $code
+     * @return string
+     */
+    public function getPart($code)
+    {
+        return isset($this->_parts[$code]) ? $this->_parts[$code] : null;
+    }
+}
\ No newline at end of file
diff --git a/app/code/Magento/Backend/App/Request/PathInfoProcessor.php b/app/code/Magento/Backend/App/Request/PathInfoProcessor.php
index e88af14ad33..c81b8048079 100644
--- a/app/code/Magento/Backend/App/Request/PathInfoProcessor.php
+++ b/app/code/Magento/Backend/App/Request/PathInfoProcessor.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Prevents path info processing for admin store
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -29,6 +31,7 @@ class PathInfoProcessor implements \Magento\App\Request\PathInfoProcessorInterfa
      * @var \Magento\Backend\Helper\Data
      */
     private $_helper;
+
     /**
      * @var \Magento\Core\App\Request\PathInfoProcessor
      */
diff --git a/app/code/Magento/Backend/App/Router/DefaultRouter.php b/app/code/Magento/Backend/App/Router/DefaultRouter.php
new file mode 100644
index 00000000000..8f377599555
--- /dev/null
+++ b/app/code/Magento/Backend/App/Router/DefaultRouter.php
@@ -0,0 +1,129 @@
+<?php
+/**
+ * Backend router
+ *
+ * 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\App\Router;
+
+class DefaultRouter extends \Magento\Core\App\Router\Base
+{
+    /**
+     * List of required request parameters
+     * Order sensitive
+     * @var array
+     */
+    protected $_requiredParams = array(
+        'areaFrontName',
+        'moduleFrontName',
+        'controllerName',
+        'actionName',
+    );
+
+    /**
+     * Get router default request path
+     * @return string
+     */
+    protected function _getDefaultPath()
+    {
+        return (string)$this->_storeConfig->getConfig('web/default/admin', 'admin');
+    }
+
+    /**
+     * We need to have noroute action in this router
+     * not to pass dispatching to next routers
+     *
+     * @return bool
+     */
+    protected function _noRouteShouldBeApplied()
+    {
+        return true;
+    }
+
+    /**
+     * Check whether URL for corresponding path should use https protocol
+     *
+     * @param string $path
+     * @return bool
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    protected function _shouldBeSecure($path)
+    {
+        return substr((string)$this->_storeConfig->getConfig('web/unsecure/base_url'), 0, 5) === 'https'
+            || $this->_storeConfig->getConfigFlag(
+                'web/secure/use_in_adminhtml',
+                \Magento\Core\Model\AppInterface::ADMIN_STORE_ID
+            ) && substr((string)$this->_storeConfig->getConfig('web/secure/base_url'), 0, 5) === 'https';
+    }
+
+    /**
+     * Retrieve current secure url
+     *
+     * @param \Magento\App\RequestInterface $request
+     * @return string
+     */
+    protected function _getCurrentSecureUrl($request)
+    {
+        return $this->_storeManager->getStore(\Magento\Core\Model\AppInterface::ADMIN_STORE_ID)
+            ->getBaseUrl('link', true) . ltrim($request->getPathInfo(), '/');
+    }
+
+    /**
+     * Check whether redirect should be used for secure routes
+     *
+     * @return bool
+     */
+    protected function _shouldRedirectToSecure()
+    {
+        return false;
+    }
+
+    /**
+     * Build controller class name based on moduleName and controllerName
+     *
+     * @param string $realModule
+     * @param string $controller
+     * @return string
+     */
+    public function getControllerClassName($realModule, $controller)
+    {
+        /**
+         * Start temporary block
+         * TODO: Sprint#27. Delete after adminhtml refactoring
+         */
+        if ($realModule == 'Magento_Adminhtml') {
+            return parent::getControllerClassName($realModule, $controller);
+        }
+        /**
+         * End temporary block
+         */
+
+        $parts = explode('_', $realModule);
+        $parts = array_splice($parts, 0, 2);
+        $parts[] = 'Controller';
+        $parts[] = \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE;
+        $parts[] = $controller;
+
+        return \Magento\Core\Helper\String::buildClassName($parts);
+    }
+}
diff --git a/app/code/Magento/Backend/App/Router/NoRouteHandler.php b/app/code/Magento/Backend/App/Router/NoRouteHandler.php
index da35e1856de..5db07afe0fe 100644
--- a/app/code/Magento/Backend/App/Router/NoRouteHandler.php
+++ b/app/code/Magento/Backend/App/Router/NoRouteHandler.php
@@ -23,10 +23,9 @@
  * @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\App\Router;
 
-class NoRouteHandler implements \Magento\Appl\Router\NoRouteHandlerInterface
+class NoRouteHandler implements \Magento\App\Router\NoRouteHandlerInterface
 {
     /**
      * @var \Magento\Backend\Helper\Data
@@ -54,7 +53,7 @@ class NoRouteHandler implements \Magento\Appl\Router\NoRouteHandlerInterface
 
         if ($areaFrontName == $this->_helper->getAreaFrontName()) {
 
-            $moduleName     = 'core';
+            $moduleName     = 'admin';
             $controllerName = 'index';
             $actionName     = 'noRoute';
 
diff --git a/app/code/Magento/Backend/Block/AbstractBlock.php b/app/code/Magento/Backend/Block/AbstractBlock.php
index 5f622082df5..4b6938b6d96 100644
--- a/app/code/Magento/Backend/Block/AbstractBlock.php
+++ b/app/code/Magento/Backend/Block/AbstractBlock.php
@@ -24,17 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-/**
- * Backend abstract block
- *
- * @category   Magento
- * @package    Magento_Backend
- * @author     Magento Core Team <core@magentocommerce.com>
- *
- */
 namespace Magento\Backend\Block;
 
 /**
+ * Backend abstract block
+ *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class AbstractBlock extends \Magento\Core\Block\AbstractBlock
@@ -44,11 +38,6 @@ class AbstractBlock extends \Magento\Core\Block\AbstractBlock
      */
     protected $_authorization;
 
-    /**
-     * @var \Magento\Core\Model\Logger
-     */
-    protected $_logger;
-
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param array $data
@@ -59,6 +48,5 @@ class AbstractBlock extends \Magento\Core\Block\AbstractBlock
     ) {
         parent::__construct($context, $data);
         $this->_authorization = $context->getAuthorization();
-        $this->_logger = $context->getLogger();
     }
 }
diff --git a/app/code/Magento/Backend/Block/Context.php b/app/code/Magento/Backend/Block/Context.php
index c7213a9dddd..5cefccfe479 100644
--- a/app/code/Magento/Backend/Block/Context.php
+++ b/app/code/Magento/Backend/Block/Context.php
@@ -41,7 +41,7 @@ class Context extends \Magento\Core\Block\Context
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\UrlInterface $urlBuilder
      * @param \Magento\Core\Model\Translate $translator
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\View\DesignInterface $design
      * @param \Magento\Core\Model\Session\AbstractSession $session
      * @param \Magento\Core\Model\Store\Config $storeConfig
@@ -51,8 +51,10 @@ class Context extends \Magento\Core\Block\Context
      * @param \Magento\View\ConfigInterface $viewConfig
      * @param \Magento\Core\Model\Cache\StateInterface $cacheState
      * @param \Magento\AuthorizationInterface $authorization
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\App $app
+     * @param \Magento\Escaper $escaper
+     * @param \Magento\Filter\FilterManager $filterManager
      * @param array $data
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -63,7 +65,7 @@ class Context extends \Magento\Core\Block\Context
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\UrlInterface $urlBuilder,
         \Magento\Core\Model\Translate $translator,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\View\DesignInterface $design,
         \Magento\Core\Model\Session\AbstractSession $session,
         \Magento\Core\Model\Store\Config $storeConfig,
@@ -73,14 +75,16 @@ class Context extends \Magento\Core\Block\Context
         \Magento\View\ConfigInterface $viewConfig,
         \Magento\Core\Model\Cache\StateInterface $cacheState,
         \Magento\AuthorizationInterface $authorization,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\App $app,
+        \Magento\Escaper $escaper,
+        \Magento\Filter\FilterManager $filterManager,
         array $data = array()
     ) {
         $this->_authorization = $authorization;
         parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $design,
             $session, $storeConfig, $frontController, $helperFactory, $viewUrl, $viewConfig, $cacheState, $logger, $app,
-            $data
+            $escaper, $filterManager, $data
         );
     }
 
diff --git a/app/code/Magento/Backend/Block/Dashboard.php b/app/code/Magento/Backend/Block/Dashboard.php
index a1568bb961a..309a8c54b3e 100644
--- a/app/code/Magento/Backend/Block/Dashboard.php
+++ b/app/code/Magento/Backend/Block/Dashboard.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php
index 49096dd63f8..96b3a8860c8 100644
--- a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php
+++ b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard tab abstract
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Bar.php b/app/code/Magento/Backend/Block/Dashboard/Bar.php
index 7829f508cbc..83974093b46 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Bar.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Bar.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard bar block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Diagrams.php b/app/code/Magento/Backend/Block/Dashboard/Diagrams.php
index 30293996e80..6350b999480 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Diagrams.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Diagrams.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard diagram tabs
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php
index f62e3d26343..31b7da638ef 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Graph.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard google chart block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author     Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Grid.php
index 034a4df364a..b76681b7126 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Grid.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Grid.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard grid
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Grids.php b/app/code/Magento/Backend/Block/Dashboard/Grids.php
index e927e658f43..f0d09b59a1f 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Grids.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Grids.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard bottom tabs
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php
index c101cf0dd60..93c1f246cf9 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard recent orders grid
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Sales.php b/app/code/Magento/Backend/Block/Dashboard/Sales.php
index 0220b643a4b..48893c077f2 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Sales.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Sales.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard sales statistics bar
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php
index 4de111d5d70..b5e82583b7c 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard last search keywords block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php
index 559aebebda7..153d2ca483b 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php
@@ -27,9 +27,6 @@
 
 /**
  * Dashboard search query column renderer
- *
- * @category   Magento
- * @package    Magento_Adminhtml
  */
 namespace Magento\Backend\Block\Dashboard\Searches\Renderer;
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php
index 453ed8f84e1..c440370317c 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard last search keywords block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php
index a1bcc0c1568..4d63408b824 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard order amounts diagram
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author     Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php
index 74bd1d70e36..4b4839f51e4 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard most active buyers
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
@@ -140,6 +140,6 @@ class Most extends \Magento\Backend\Block\Dashboard\Grid
 
     public function getRowUrl($row)
     {
-        return $this->getUrl('adminhtml/customer/edit', array('id'=>$row->getCustomerId()));
+        return $this->getUrl('customer/index/edit', array('id'=>$row->getCustomerId()));
     }
 }
diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php
index dfb8b578183..e07c4254b63 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard most recent customers grid
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
@@ -138,6 +138,6 @@ class Newest extends \Magento\Backend\Block\Dashboard\Grid
 
     public function getRowUrl($row)
     {
-        return $this->getUrl('adminhtml/customer/edit', array('id'=>$row->getId()));
+        return $this->getUrl('customer/index/edit', array('id'=>$row->getId()));
     }
 }
diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php
index 12799a540dd..ff24fa61da3 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard orders diagram
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author     Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php
index 5cb3852864a..01881f2902d 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard most ordered products grid
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php
index a6021ff461b..937f782d4a1 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml dashboard most viewed products grid
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
diff --git a/app/code/Magento/Backend/Block/Dashboard/Totals.php b/app/code/Magento/Backend/Block/Dashboard/Totals.php
index dcd1ff8feee..3f6879a491e 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Totals.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Totals.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -29,7 +29,7 @@
  * Adminhtml dashboard totals bar
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author     Magento Core Team <core@magentocommerce.com>
  */
 namespace Magento\Backend\Block\Dashboard;
diff --git a/app/code/Magento/Backend/Block/GlobalSearch.php b/app/code/Magento/Backend/Block/GlobalSearch.php
index 93f0419e561..a40b0585a6d 100644
--- a/app/code/Magento/Backend/Block/GlobalSearch.php
+++ b/app/code/Magento/Backend/Block/GlobalSearch.php
@@ -31,7 +31,7 @@ class GlobalSearch extends \Magento\Backend\Block\Template
     /**
      * @var string
      */
-    protected $_template = 'Magento_Adminhtml::system/search.phtml';
+    protected $_template = 'Magento_Backend::system/search.phtml';
 
     /**
      * Get components configuration
diff --git a/app/code/Magento/Backend/Block/Store/Switcher.php b/app/code/Magento/Backend/Block/Store/Switcher.php
index 347905d605f..6f557d2761f 100644
--- a/app/code/Magento/Backend/Block/Store/Switcher.php
+++ b/app/code/Magento/Backend/Block/Store/Switcher.php
@@ -39,9 +39,9 @@ namespace Magento\Backend\Block\Store;
 class Switcher extends \Magento\Backend\Block\Template
 {
     /**
-     * Key in config for store switcher hint
+     * URL for store switcher hint
      */
-    const XPATH_HINT_KEY = 'store_switcher';
+    const HINT_URL = 'http://www.magentocommerce.com/knowledge-base/entry/understanding-store-scopes';
 
     /**
      * @var array
@@ -127,7 +127,6 @@ class Switcher extends \Magento\Backend\Block\Template
         $this->_storeFactory = $storeFactory;
     }
 
-
     protected function _construct()
     {
         parent::_construct();
@@ -338,10 +337,7 @@ class Switcher extends \Magento\Backend\Block\Template
      */
     public function getHintUrl()
     {
-        if (null === $this->_hintUrl) {
-            $this->_hintUrl = $this->helper('Magento\Core\Helper\Hint')->getHintByCode(self::XPATH_HINT_KEY);
-        }
-        return $this->_hintUrl;
+        return self::HINT_URL;
     }
 
     /**
diff --git a/app/code/Magento/Adminhtml/Block/System/Account/Edit.php b/app/code/Magento/Backend/Block/System/Account/Edit.php
similarity index 90%
rename from app/code/Magento/Adminhtml/Block/System/Account/Edit.php
rename to app/code/Magento/Backend/Block/System/Account/Edit.php
index a830c4edfc1..02698202807 100644
--- a/app/code/Magento/Adminhtml/Block/System/Account/Edit.php
+++ b/app/code/Magento/Backend/Block/System/Account/Edit.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml edit admin user account
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System\Account;
+namespace Magento\Backend\Block\System\Account;
 
 class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 {
@@ -40,6 +40,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
     {
         parent::_construct();
 
+        $this->_blockGroup = 'Magento_Backend';
         $this->_controller = 'system_account';
         $this->_updateButton('save', 'label', __('Save Account'));
         $this->_removeButton('delete');
diff --git a/app/code/Magento/Adminhtml/Block/System/Account/Edit/Form.php b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/System/Account/Edit/Form.php
rename to app/code/Magento/Backend/Block/System/Account/Edit/Form.php
index fadde160eba..40e5c2607ae 100644
--- a/app/code/Magento/Adminhtml/Block/System/Account/Edit/Form.php
+++ b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml edit admin user account form
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System\Account\Edit;
+namespace Magento\Backend\Block\System\Account\Edit;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
@@ -50,7 +50,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\User\Model\UserFactory $userFactory
      * @param \Magento\Backend\Model\Auth\Session $authSession
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -59,7 +59,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\User\Model\UserFactory $userFactory,
         \Magento\Backend\Model\Auth\Session $authSession,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/System/Cache/Edit.php b/app/code/Magento/Backend/Block/System/Cache/Edit.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/System/Cache/Edit.php
rename to app/code/Magento/Backend/Block/System/Cache/Edit.php
index c31263adf6c..db9796f3178 100644
--- a/app/code/Magento/Adminhtml/Block/System/Cache/Edit.php
+++ b/app/code/Magento/Backend/Block/System/Cache/Edit.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,15 +28,15 @@
  * Cache management edit page
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\System\Cache;
+namespace Magento\Backend\Block\System\Cache;
 
 class Edit extends \Magento\Adminhtml\Block\Widget
 {
 
-    protected $_template = 'system/cache/edit.phtml';
+    protected $_template = 'Magento_Backend::system/cache/edit.phtml';
 
     protected function _construct()
     {
@@ -72,7 +72,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget
     public function initForm()
     {
         $this->setChild('form',
-            $this->getLayout()->createBlock('Magento\Adminhtml\Block\System\Cache\Form')
+            $this->getLayout()->createBlock('Magento\Backend\Block\System\Cache\Form')
                 ->initForm()
         );
         return $this;
diff --git a/app/code/Magento/Adminhtml/Block/System/Cache/Form.php b/app/code/Magento/Backend/Block/System/Cache/Form.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/System/Cache/Form.php
rename to app/code/Magento/Backend/Block/System/Cache/Form.php
index c761d03a9a0..2cf01c41a9e 100644
--- a/app/code/Magento/Adminhtml/Block/System/Cache/Form.php
+++ b/app/code/Magento/Backend/Block/System/Cache/Form.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -29,17 +29,17 @@
  * Cache management form page
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\System\Cache;
+namespace Magento\Backend\Block\System\Cache;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
     /**
      * Initialize cache management form
      *
-     * @return \Magento\Adminhtml\Block\System\Cache\Form
+     * @return \Magento\Backend\Block\System\Cache\Form
      */
     public function initForm()
     {
diff --git a/app/code/Magento/Backend/Block/System/Config/Form.php b/app/code/Magento/Backend/Block/System/Config/Form.php
index 0ccb76f8a7e..b35c713e547 100644
--- a/app/code/Magento/Backend/Block/System/Config/Form.php
+++ b/app/code/Magento/Backend/Block/System/Config/Form.php
@@ -90,9 +90,9 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     protected $_configFactory;
 
     /**
-     * \Magento\Data\Form\Factory
+     * \Magento\Data\FormFactory
      *
-     * @var \Magento\Data\Form\Factory
+     * @var \Magento\Data\FormFactory
      */
     protected $_formFactory;
 
@@ -137,7 +137,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Core\Model\Config $coreConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -152,7 +152,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Core\Model\Config $coreConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -466,10 +466,6 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     public function getConfigValue($path)
     {
         return $this->_config->getValue($path, $this->getScope(), $this->getScopeCode());
-        if (empty($this->_configRoot)) {
-            $this->_configRoot = $this->_coreConfig->getNode(null, $this->getScope(), $this->getScopeCode());
-        }
-        return $this->_configRoot;
     }
 
     /**
diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Export.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Export.php
index 24d9cfe5082..380ac862d61 100644
--- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Export.php
+++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Export.php
@@ -41,21 +41,21 @@ class Export extends \Magento\Data\Form\Element\AbstractElement
     protected $_helperFactory;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\Core\Model\Factory\Helper $helperFactory
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\Core\Model\Factory\Helper $helperFactory,
         array $attributes = array()
     ) {
         $this->_helperFactory = $helperFactory;
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
     }
 
     public function getElementHtml()
diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php b/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php
index 923206ff93b..2e3e9a7c2ce 100644
--- a/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php
+++ b/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php
@@ -49,20 +49,20 @@ class DisableOutput
     protected $_values;
 
     /**
-     * @var \Magento\App\ModuleListInterface
+     * @var \Magento\Module\ModuleListInterface
      */
     protected $_moduleList;
 
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Backend\Model\Auth\Session $authSession
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\Module\ModuleListInterface $moduleList
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Backend\Model\Auth\Session $authSession,
-        \Magento\App\ModuleListInterface $moduleList,
+        \Magento\Module\ModuleListInterface $moduleList,
         array $data = array()
     ) {
         parent::__construct($context, $authSession, $data);
diff --git a/app/code/Magento/Backend/Block/System/Config/Switcher.php b/app/code/Magento/Backend/Block/System/Config/Switcher.php
index b8388e4b79f..c7c5f07be63 100644
--- a/app/code/Magento/Backend/Block/System/Config/Switcher.php
+++ b/app/code/Magento/Backend/Block/System/Config/Switcher.php
@@ -62,7 +62,7 @@ class Switcher extends \Magento\Backend\Block\Template
      */
     protected function _prepareLayout()
     {
-        $this->setTemplate('system/config/switcher.phtml');
+        $this->setTemplate('Magento_Backend::system/config/switcher.phtml');
         return parent::_prepareLayout();
     }
 
diff --git a/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php b/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php
index 0fc731332cf..dd8743738cf 100644
--- a/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php
+++ b/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php
@@ -32,7 +32,7 @@ namespace Magento\Backend\Block\System\Config\System\Storage\Media;
 class Synchronize
     extends \Magento\Backend\Block\System\Config\Form\Field
 {
-    protected $_template = 'system/config/system/storage/media/synchronize.phtml';
+    protected $_template = 'Magento_Backend::system/config/system/storage/media/synchronize.phtml';
 
     /**
      * @var \Magento\Core\Model\File\Storage
diff --git a/app/code/Magento/Backend/Block/System/Config/Tabs.php b/app/code/Magento/Backend/Block/System/Config/Tabs.php
index ebaea6bc0e8..5bae0bf86e4 100644
--- a/app/code/Magento/Backend/Block/System/Config/Tabs.php
+++ b/app/code/Magento/Backend/Block/System/Config/Tabs.php
@@ -53,7 +53,7 @@ class Tabs extends \Magento\Backend\Block\Widget
      *
      * @var string
      */
-    protected $_template = 'system/config/tabs.phtml';
+    protected $_template = 'Magento_Backend::system/config/tabs.phtml';
 
     /**
      * Currently selected section id
diff --git a/app/code/Magento/Adminhtml/Block/System/Design.php b/app/code/Magento/Backend/Block/System/Design.php
similarity index 90%
rename from app/code/Magento/Adminhtml/Block/System/Design.php
rename to app/code/Magento/Backend/Block/System/Design.php
index c627207bfc9..07cbdd28d74 100644
--- a/app/code/Magento/Adminhtml/Block/System/Design.php
+++ b/app/code/Magento/Backend/Block/System/Design.php
@@ -19,19 +19,19 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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\Adminhtml\Block\System;
+namespace Magento\Backend\Block\System;
 
 class Design extends \Magento\Adminhtml\Block\Template
 {
     protected function _prepareLayout()
     {
-        $this->setTemplate('system/design/index.phtml');
+        $this->setTemplate('Magento_Backend::system/design/index.phtml');
 
         $this->addChild('add_new_button', 'Magento\Adminhtml\Block\Widget\Button', array(
             'label'     => __('Add Design Change'),
diff --git a/app/code/Magento/Adminhtml/Block/System/Design/Edit.php b/app/code/Magento/Backend/Block/System/Design/Edit.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/System/Design/Edit.php
rename to app/code/Magento/Backend/Block/System/Design/Edit.php
index f91ca37a681..599bfd2fccc 100644
--- a/app/code/Magento/Adminhtml/Block/System/Design/Edit.php
+++ b/app/code/Magento/Backend/Block/System/Design/Edit.php
@@ -19,17 +19,17 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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\Adminhtml\Block\System\Design;
+namespace Magento\Backend\Block\System\Design;
 
 class Edit extends \Magento\Adminhtml\Block\Widget
 {
 
-    protected $_template = 'system/design/edit.phtml';
+    protected $_template = 'Magento_Backend::system/design/edit.phtml';
 
     /**
      * Core registry
diff --git a/app/code/Magento/Adminhtml/Block/System/Design/Edit/Tab/General.php b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/System/Design/Edit/Tab/General.php
rename to app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php
index 10188bca091..b353c44dd71 100644
--- a/app/code/Magento/Adminhtml/Block/System/Design/Edit/Tab/General.php
+++ b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php
@@ -19,11 +19,11 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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\Adminhtml\Block\System\Design\Edit\Tab;
+namespace Magento\Backend\Block\System\Design\Edit\Tab;
 
 class General extends \Magento\Backend\Block\Widget\Form\Generic
 {
@@ -47,7 +47,7 @@ class General extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Backend\Model\Session $backendSession
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -57,7 +57,7 @@ class General extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Backend\Model\Session $backendSession,
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -71,7 +71,7 @@ class General extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * Initialise form fields
      *
-     * @return \Magento\Adminhtml\Block\System\Design\Edit\Tab\General
+     * @return \Magento\Backend\Block\System\Design\Edit\Tab\General
      */
     protected function _prepareForm()
     {
diff --git a/app/code/Magento/Adminhtml/Block/System/Design/Edit/Tabs.php b/app/code/Magento/Backend/Block/System/Design/Edit/Tabs.php
similarity index 88%
rename from app/code/Magento/Adminhtml/Block/System/Design/Edit/Tabs.php
rename to app/code/Magento/Backend/Block/System/Design/Edit/Tabs.php
index 83a95698c72..56f07b4ea53 100644
--- a/app/code/Magento/Adminhtml/Block/System/Design/Edit/Tabs.php
+++ b/app/code/Magento/Backend/Block/System/Design/Edit/Tabs.php
@@ -19,12 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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\Adminhtml\Block\System\Design\Edit;
+namespace Magento\Backend\Block\System\Design\Edit;
 
 class Tabs extends \Magento\Adminhtml\Block\Widget\Tabs
 {
@@ -41,7 +41,7 @@ class Tabs extends \Magento\Adminhtml\Block\Widget\Tabs
         $this->addTab('general', array(
             'label'     => __('General'),
             'content'   => $this->getLayout()
-                ->createBlock('Magento\Adminhtml\Block\System\Design\Edit\Tab\General')->toHtml(),
+                ->createBlock('Magento\Backend\Block\System\Design\Edit\Tab\General')->toHtml(),
         ));
 
         return parent::_prepareLayout();
diff --git a/app/code/Magento/Adminhtml/Block/System/Email/Template.php b/app/code/Magento/Backend/Block/System/Email/Template.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/System/Email/Template.php
rename to app/code/Magento/Backend/Block/System/Email/Template.php
index 944913eaf2d..e8e00e46f57 100644
--- a/app/code/Magento/Adminhtml/Block/System/Email/Template.php
+++ b/app/code/Magento/Backend/Block/System/Email/Template.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,16 +28,16 @@
  * Adminhtml system templates page content block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System\Email;
+namespace Magento\Backend\Block\System\Email;
 
 class Template extends \Magento\Adminhtml\Block\Template
 {
 
-    protected $_template = 'system/email/template/list.phtml';
+    protected $_template = 'Magento_Backend::system/email/template/list.phtml';
 
     /**
      * Create add button and grid blocks
diff --git a/app/code/Magento/Adminhtml/Block/System/Email/Template/Edit.php b/app/code/Magento/Backend/Block/System/Email/Template/Edit.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/System/Email/Template/Edit.php
rename to app/code/Magento/Backend/Block/System/Email/Template/Edit.php
index d1cd8171a56..337fe6274d0 100644
--- a/app/code/Magento/Adminhtml/Block/System/Email/Template/Edit.php
+++ b/app/code/Magento/Backend/Block/System/Email/Template/Edit.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml system template edit block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  * @method array getTemplateOptions()
  */
-namespace Magento\Adminhtml\Block\System\Email\Template;
+namespace Magento\Backend\Block\System\Email\Template;
 
 class Edit extends \Magento\Adminhtml\Block\Widget
 {
@@ -61,7 +61,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget
      *
      * @var string
      */
-    protected $_template = 'system/email/template/edit.phtml';
+    protected $_template = 'Magento_Backend::system/email/template/edit.phtml';
     
     /**
      * @param \Magento\Core\Helper\Data $coreData
@@ -189,14 +189,14 @@ class Edit extends \Magento\Adminhtml\Block\Widget
                 )
         );
 
-        $this->addChild('form', 'Magento\Adminhtml\Block\System\Email\Template\Edit\Form');
+        $this->addChild('form', 'Magento\Backend\Block\System\Email\Template\Edit\Form');
         return parent::_prepareLayout();
     }
 
     /**
      * Collect, sort and set template options
      *
-     * @return \Magento\Adminhtml\Block\System\Email\Template\Edit
+     * @return \Magento\Backend\Block\System\Email\Template\Edit
      */
     protected function _beforeToHtml()
     {
@@ -372,7 +372,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget
      */
     public function getUsedDefaultForPaths($asJSON = true)
     {
-        /** @var $template \Magento\Adminhtml\Model\Email\Template */
+        /** @var $template \Magento\Backend\Model\Email\Template */
         $template = $this->getEmailTemplate();
         $paths = $template->getSystemConfigPathsWhereUsedAsDefault();
         $pathsParts = $this->_getSystemConfigPathsParts($paths);
@@ -390,7 +390,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget
      */
     public function getUsedCurrentlyForPaths($asJSON = true)
     {
-        /** @var $template \Magento\Adminhtml\Model\Email\Template */
+        /** @var $template \Magento\Backend\Model\Email\Template */
         $template = $this->getEmailTemplate();
         $paths = $template->getSystemConfigPathsWhereUsedCurrently();
         $pathsParts = $this->_getSystemConfigPathsParts($paths);
diff --git a/app/code/Magento/Adminhtml/Block/System/Email/Template/Edit/Form.php b/app/code/Magento/Backend/Block/System/Email/Template/Edit/Form.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/System/Email/Template/Edit/Form.php
rename to app/code/Magento/Backend/Block/System/Email/Template/Edit/Form.php
index 7916596053f..6e0004524a8 100644
--- a/app/code/Magento/Adminhtml/Block/System/Email/Template/Edit/Form.php
+++ b/app/code/Magento/Backend/Block/System/Email/Template/Edit/Form.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml system template edit form
  */
 
-namespace Magento\Adminhtml\Block\System\Email\Template\Edit;
+namespace Magento\Backend\Block\System\Email\Template\Edit;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
@@ -52,7 +52,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Core\Model\Source\Email\Variables $variables
      * @param \Magento\Backend\Model\Session $backendSession
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -62,7 +62,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Core\Model\Source\Email\Variables $variables,
         \Magento\Backend\Model\Session $backendSession,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -77,7 +77,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * Prepare layout.
      * Add files to use dialog windows
      *
-     * @return \Magento\Adminhtml\Block\System\Email\Template\Edit\Form
+     * @return \Magento\Backend\Block\System\Email\Template\Edit\Form
      */
     protected function _prepareLayout()
     {
@@ -107,7 +107,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
                 'magento-adminhtml-variables-js',
                 'Magento\Page\Block\Html\Head\Script',
                 array(
-                    'file' => 'Magento_Adminhtml::variables.js'
+                    'file' => 'Magento_Backend::variables.js'
                 )
             );
         }
diff --git a/app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Filter/Type.php b/app/code/Magento/Backend/Block/System/Email/Template/Grid/Filter/Type.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Filter/Type.php
rename to app/code/Magento/Backend/Block/System/Email/Template/Grid/Filter/Type.php
index e4d85ffdf72..b178130deb9 100644
--- a/app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Filter/Type.php
+++ b/app/code/Magento/Backend/Block/System/Email/Template/Grid/Filter/Type.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml system template grid type filter
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System\Email\Template\Grid\Filter;
+namespace Magento\Backend\Block\System\Email\Template\Grid\Filter;
 
 class Type
     extends \Magento\Adminhtml\Block\Widget\Grid\Column\Filter\Select
diff --git a/app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Renderer/Action.php b/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Action.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Renderer/Action.php
rename to app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Action.php
index 55ff7edcd49..2c1f2f54a50 100644
--- a/app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Renderer/Action.php
+++ b/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Action.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml newsletter templates grid block action item renderer
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer;
+namespace Magento\Backend\Block\System\Email\Template\Grid\Renderer;
 
 class Action extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Action
 {
diff --git a/app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php b/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Sender.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php
rename to app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Sender.php
index fd2181e37c8..0dda95acf89 100644
--- a/app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php
+++ b/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Sender.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml system templates grid block sender item renderer
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
  
-namespace Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer;
+namespace Magento\Backend\Block\System\Email\Template\Grid\Renderer;
 
 class Sender extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
 {
diff --git a/app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Renderer/Type.php b/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Type.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Renderer/Type.php
rename to app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Type.php
index 8ad515bef13..367b713ee68 100644
--- a/app/code/Magento/Adminhtml/Block/System/Email/Template/Grid/Renderer/Type.php
+++ b/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Type.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml system templates grid block type item renderer
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer;
+namespace Magento\Backend\Block\System\Email\Template\Grid\Renderer;
 
 class Type
     extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
diff --git a/app/code/Magento/Adminhtml/Block/System/Email/Template/Preview.php b/app/code/Magento/Backend/Block/System/Email/Template/Preview.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/System/Email/Template/Preview.php
rename to app/code/Magento/Backend/Block/System/Email/Template/Preview.php
index 0c33516e90e..3378f8e3a08 100644
--- a/app/code/Magento/Adminhtml/Block/System/Email/Template/Preview.php
+++ b/app/code/Magento/Backend/Block/System/Email/Template/Preview.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml system template preview block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\System\Email\Template;
+namespace Magento\Backend\Block\System\Email\Template;
 
 class Preview extends \Magento\Adminhtml\Block\Widget
 {
diff --git a/app/code/Magento/Adminhtml/Block/System/Shipping/Ups.php b/app/code/Magento/Backend/Block/System/Shipping/Ups.php
similarity index 97%
rename from app/code/Magento/Adminhtml/Block/System/Shipping/Ups.php
rename to app/code/Magento/Backend/Block/System/Shipping/Ups.php
index 1a47a04662c..17d4f85f699 100644
--- a/app/code/Magento/Adminhtml/Block/System/Shipping/Ups.php
+++ b/app/code/Magento/Backend/Block/System/Shipping/Ups.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -27,7 +27,7 @@
 /**
  * Adminhtml shipping UPS content block
  */
-namespace Magento\Adminhtml\Block\System\Shipping;
+namespace Magento\Backend\Block\System\Shipping;
 
 class Ups extends \Magento\Backend\Block\Template
 {
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Delete.php b/app/code/Magento/Backend/Block/System/Store/Delete.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Block/System/Store/Delete.php
rename to app/code/Magento/Backend/Block/System/Store/Delete.php
index bb02681babf..536d7de13c5 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Delete.php
+++ b/app/code/Magento/Backend/Block/System/Store/Delete.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -29,10 +29,10 @@
  * Store / store view / website delete form container
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\System\Store;
+namespace Magento\Backend\Block\System\Store;
 
 class Delete extends \Magento\Adminhtml\Block\Widget\Form\Container
 {
@@ -45,6 +45,7 @@ class Delete extends \Magento\Adminhtml\Block\Widget\Form\Container
     {
         $this->_objectId = 'item_id';
         $this->_mode = 'delete';
+        $this->_blockGroup = 'Magento_Backend';
         $this->_controller = 'system_store';
 
         parent::_construct();
@@ -82,7 +83,7 @@ class Delete extends \Magento\Adminhtml\Block\Widget\Form\Container
      * Set store type title
      *
      * @param string $title
-     * @return \Magento\Adminhtml\Block\System\Store\Delete
+     * @return \Magento\Backend\Block\System\Store\Delete
      */
     public function setStoreTypeTitle($title)
     {
@@ -94,7 +95,7 @@ class Delete extends \Magento\Adminhtml\Block\Widget\Form\Container
      * Set back URL for "Cancel" and "Back" buttons
      *
      * @param string $url
-     * @return \Magento\Adminhtml\Block\System\Store\Delete
+     * @return \Magento\Backend\Block\System\Store\Delete
      */
     public function setBackUrl($url)
     {
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Delete/Form.php b/app/code/Magento/Backend/Block/System/Store/Delete/Form.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/System/Store/Delete/Form.php
rename to app/code/Magento/Backend/Block/System/Store/Delete/Form.php
index cc155554249..24afcf4cd7a 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Delete/Form.php
+++ b/app/code/Magento/Backend/Block/System/Store/Delete/Form.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -29,10 +29,10 @@
  * Adminhtml cms block edit form
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\System\Store\Delete;
+namespace Magento\Backend\Block\System\Store\Delete;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Delete/Group.php b/app/code/Magento/Backend/Block/System/Store/Delete/Group.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/System/Store/Delete/Group.php
rename to app/code/Magento/Backend/Block/System/Store/Delete/Group.php
index 3c9bf889bca..35f0a61524f 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Delete/Group.php
+++ b/app/code/Magento/Backend/Block/System/Store/Delete/Group.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml store delete group block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System\Store\Delete;
+namespace Magento\Backend\Block\System\Store\Delete;
 
 class Group extends \Magento\Adminhtml\Block\Template
 {
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Delete/Website.php b/app/code/Magento/Backend/Block/System/Store/Delete/Website.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/System/Store/Delete/Website.php
rename to app/code/Magento/Backend/Block/System/Store/Delete/Website.php
index e3a36bf3237..6ece68ecb70 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Delete/Website.php
+++ b/app/code/Magento/Backend/Block/System/Store/Delete/Website.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml store delete group block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\System\Store\Delete;
+namespace Magento\Backend\Block\System\Store\Delete;
 
 class Website extends \Magento\Adminhtml\Block\Template
 {
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Edit.php b/app/code/Magento/Backend/Block/System/Store/Edit.php
similarity index 97%
rename from app/code/Magento/Adminhtml/Block/System/Store/Edit.php
rename to app/code/Magento/Backend/Block/System/Store/Edit.php
index dde44d3340f..c46b8beaf38 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Edit.php
+++ b/app/code/Magento/Backend/Block/System/Store/Edit.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Adminhtml store edit
  */
 
-namespace Magento\Adminhtml\Block\System\Store;
+namespace Magento\Backend\Block\System\Store;
 
 class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 {
@@ -94,6 +94,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
                 $deleteLabel = '';
                 $deleteUrl = '';
         }
+        $this->_blockGroup = 'Magento_Backend';
         $this->_controller = 'system_store';
 
         parent::_construct();
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Edit/AbstractForm.php b/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/System/Store/Edit/AbstractForm.php
rename to app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php
index 868357a09ac..c2b29edc020 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Edit/AbstractForm.php
+++ b/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php
@@ -19,18 +19,18 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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\Adminhtml\Block\System\Store\Edit;
+namespace Magento\Backend\Block\System\Store\Edit;
 
 /**
  * Adminhtml store edit form
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  *
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Edit/Form/Group.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/System/Store/Edit/Form/Group.php
rename to app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php
index 2168448b55e..ad1392b7b5d 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Edit/Form/Group.php
+++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,16 +28,16 @@
  * Adminhtml store edit form for group
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\System\Store\Edit\Form;
+namespace Magento\Backend\Block\System\Store\Edit\Form;
 
 /**
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
  */
 class Group
-    extends \Magento\Adminhtml\Block\System\Store\Edit\AbstractForm
+    extends \Magento\Backend\Block\System\Store\Edit\AbstractForm
 {
     /**
      * @var \Magento\Catalog\Model\Config\Source\Category
@@ -59,7 +59,7 @@ class Group
      * @param \Magento\Core\Model\StoreFactory $storeFactory
      * @param \Magento\Core\Model\Website\Factory $websiteFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -69,7 +69,7 @@ class Group
         \Magento\Core\Model\StoreFactory $storeFactory,
         \Magento\Core\Model\Website\Factory $websiteFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Edit/Form/Store.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/System/Store/Edit/Form/Store.php
rename to app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php
index 4cf3d84952c..fa9b3af8a5b 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Edit/Form/Store.php
+++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,16 +28,16 @@
  * Adminhtml store edit form for store
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\System\Store\Edit\Form;
+namespace Magento\Backend\Block\System\Store\Edit\Form;
 
 /**
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
  */
 class Store
-    extends \Magento\Adminhtml\Block\System\Store\Edit\AbstractForm
+    extends \Magento\Backend\Block\System\Store\Edit\AbstractForm
 {
     /**
      * @var \Magento\Core\Model\Website\Factory
@@ -53,7 +53,7 @@ class Store
      * @param \Magento\Core\Model\Store\Group\Factory $groupFactory
      * @param \Magento\Core\Model\Website\Factory $websiteFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -62,7 +62,7 @@ class Store
         \Magento\Core\Model\Store\Group\Factory $groupFactory,
         \Magento\Core\Model\Website\Factory $websiteFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Edit/Form/Website.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/System/Store/Edit/Form/Website.php
rename to app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php
index b8bdc4b0a80..45fa7e16811 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Edit/Form/Website.php
+++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,16 +28,16 @@
  * Adminhtml store edit form for website
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\System\Store\Edit\Form;
+namespace Magento\Backend\Block\System\Store\Edit\Form;
 
 /**
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
  */
 class Website
-    extends \Magento\Adminhtml\Block\System\Store\Edit\AbstractForm
+    extends \Magento\Backend\Block\System\Store\Edit\AbstractForm
 {
     /**
      * @var \Magento\Core\Model\Store\GroupFactory
@@ -47,7 +47,7 @@ class Website
     /**
      * @param \Magento\Core\Model\Store\GroupFactory $groupFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -55,7 +55,7 @@ class Website
     public function __construct(
         \Magento\Core\Model\Store\GroupFactory $groupFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Grid/Render/Group.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/System/Store/Grid/Render/Group.php
rename to app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php
index f5a4b8b06d0..346df9d58ce 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Grid/Render/Group.php
+++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Store render group
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System\Store\Grid\Render;
+namespace Magento\Backend\Block\System\Store\Grid\Render;
 
 class Group
     extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Grid/Render/Store.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/System/Store/Grid/Render/Store.php
rename to app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php
index bb95effa01a..68f82bae201 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Grid/Render/Store.php
+++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Store render store
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System\Store\Grid\Render;
+namespace Magento\Backend\Block\System\Store\Grid\Render;
 
 class Store
     extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Grid/Render/Website.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/System/Store/Grid/Render/Website.php
rename to app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php
index ca6ddc77fb9..ffacc3a6d2e 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Grid/Render/Website.php
+++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Store render website
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System\Store\Grid\Render;
+namespace Magento\Backend\Block\System\Store\Grid\Render;
 
 class Website
     extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
diff --git a/app/code/Magento/Adminhtml/Block/System/Store/Store.php b/app/code/Magento/Backend/Block/System/Store/Store.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Block/System/Store/Store.php
rename to app/code/Magento/Backend/Block/System/Store/Store.php
index 5358ead9a6f..e629cf44ba2 100644
--- a/app/code/Magento/Adminhtml/Block/System/Store/Store.php
+++ b/app/code/Magento/Backend/Block/System/Store/Store.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml store content block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System\Store;
+namespace Magento\Backend\Block\System\Store;
 
 class Store extends \Magento\Backend\Block\Widget\Grid\Container
 {
@@ -43,6 +43,7 @@ class Store extends \Magento\Backend\Block\Widget\Grid\Container
 
     protected function _construct()
     {
+        $this->_blockGroup = 'Magento_Backend';
         $this->_controller  = 'system_store';
         $this->_headerText  = __('Stores');
         parent::_construct();
diff --git a/app/code/Magento/Adminhtml/Block/System/Variable.php b/app/code/Magento/Backend/Block/System/Variable.php
similarity index 90%
rename from app/code/Magento/Adminhtml/Block/System/Variable.php
rename to app/code/Magento/Backend/Block/System/Variable.php
index ccec4c604b6..3218f18310d 100644
--- a/app/code/Magento/Adminhtml/Block/System/Variable.php
+++ b/app/code/Magento/Backend/Block/System/Variable.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Custom Varieble Block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author     Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\System;
+namespace Magento\Backend\Block\System;
 
 class Variable extends \Magento\Adminhtml\Block\Widget\Grid\Container
 {
@@ -41,6 +41,7 @@ class Variable extends \Magento\Adminhtml\Block\Widget\Grid\Container
      */
     protected function _construct()
     {
+        $this->_blockGroup = 'Magento_Backend';
         $this->_controller = 'system_variable';
         $this->_headerText = __('Custom Variables');
         parent::_construct();
diff --git a/app/code/Magento/Adminhtml/Block/System/Variable/Edit.php b/app/code/Magento/Backend/Block/System/Variable/Edit.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/System/Variable/Edit.php
rename to app/code/Magento/Backend/Block/System/Variable/Edit.php
index 42a702ee9c5..70e9d491045 100644
--- a/app/code/Magento/Adminhtml/Block/System/Variable/Edit.php
+++ b/app/code/Magento/Backend/Block/System/Variable/Edit.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -27,7 +27,7 @@
 /**
  * Custom Variable Edit Container
  */
-namespace Magento\Adminhtml\Block\System\Variable;
+namespace Magento\Backend\Block\System\Variable;
 
 class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 {
@@ -61,6 +61,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
     protected function _construct()
     {
         $this->_objectId = 'variable_id';
+        $this->_blockGroup = 'Magento_Backend';
         $this->_controller = 'system_variable';
 
         parent::_construct();
@@ -80,7 +81,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
      * Prepare layout.
      * Adding save_and_continue button
      *
-     * @return \Magento\Adminhtml\Block\System\Variable\Edit
+     * @return \Magento\Backend\Block\System\Variable\Edit
      */
     protected function _preparelayout()
     {
diff --git a/app/code/Magento/Adminhtml/Block/System/Variable/Edit/Form.php b/app/code/Magento/Backend/Block/System/Variable/Edit/Form.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/System/Variable/Edit/Form.php
rename to app/code/Magento/Backend/Block/System/Variable/Edit/Form.php
index a323441b6be..418f10eadd8 100644
--- a/app/code/Magento/Adminhtml/Block/System/Variable/Edit/Form.php
+++ b/app/code/Magento/Backend/Block/System/Variable/Edit/Form.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,10 +28,10 @@
  * Custom Variable Edit Form
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\System\Variable\Edit;
+namespace Magento\Backend\Block\System\Variable\Edit;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
@@ -48,7 +48,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * Prepare form before rendering HTML
      *
-     * @return \Magento\Adminhtml\Block\System\Variable\Edit\Form
+     * @return \Magento\Backend\Block\System\Variable\Edit\Form
      */
     protected function _prepareForm()
     {
diff --git a/app/code/Magento/Backend/Block/Template.php b/app/code/Magento/Backend/Block/Template.php
index 7cfaeb27f28..aff926903f8 100644
--- a/app/code/Magento/Backend/Block/Template.php
+++ b/app/code/Magento/Backend/Block/Template.php
@@ -48,6 +48,11 @@ class Template extends \Magento\Core\Block\Template
      */
     protected $_locale;
 
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
     /**
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
@@ -61,6 +66,7 @@ class Template extends \Magento\Core\Block\Template
         $this->_storeManager = $context->getStoreManager();
         $this->_locale = $context->getLocale();
         $this->_authorization = $context->getAuthorization();
+        $this->mathRandom = $context->getMathRandom();
         parent::__construct($coreData, $context, $data);
     }
 
diff --git a/app/code/Magento/Backend/Block/Template/Context.php b/app/code/Magento/Backend/Block/Template/Context.php
index eaf911dcd52..4f15d4831ee 100644
--- a/app/code/Magento/Backend/Block/Template/Context.php
+++ b/app/code/Magento/Backend/Block/Template/Context.php
@@ -45,6 +45,11 @@ class Context extends \Magento\Core\Block\Template\Context
      */
     protected $_storeManager;
 
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
     /**
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\App\RequestInterface $request
@@ -52,7 +57,7 @@ class Context extends \Magento\Core\Block\Template\Context
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\UrlInterface $urlBuilder
      * @param \Magento\Core\Model\Translate $translator
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\View\DesignInterface $design
      * @param \Magento\Core\Model\Session $session
      * @param \Magento\Core\Model\Store\Config $storeConfig
@@ -62,15 +67,19 @@ class Context extends \Magento\Core\Block\Template\Context
      * @param \Magento\View\ConfigInterface $viewConfig
      * @param \Magento\Core\Model\Cache\StateInterface $cacheState
      * @param \Magento\App\Dir $dirs
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Model\View\FileSystem $viewFileSystem
      * @param \Magento\View\TemplateEngineFactory $engineFactory
      * @param \Magento\AuthorizationInterface $authorization
      * @param \Magento\Core\Model\App $app
+     * @param \Magento\App\State $appState
+     * @param \Magento\Escaper $escaper
+     * @param \Magento\Filter\FilterManager $filterManager
      * @param \Magento\Backend\Model\Session $backendSession
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * 
+     * @param \Magento\Math\Random $mathRandom
+     *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -80,7 +89,7 @@ class Context extends \Magento\Core\Block\Template\Context
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\UrlInterface $urlBuilder,
         \Magento\Core\Model\Translate $translator,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\View\DesignInterface $design,
         \Magento\Core\Model\Session $session,
         \Magento\Core\Model\Store\Config $storeConfig,
@@ -90,24 +99,49 @@ class Context extends \Magento\Core\Block\Template\Context
         \Magento\View\ConfigInterface $viewConfig,
         \Magento\Core\Model\Cache\StateInterface $cacheState,
         \Magento\App\Dir $dirs,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Filesystem $filesystem,
         \Magento\Core\Model\View\FileSystem $viewFileSystem,
         \Magento\View\TemplateEngineFactory $engineFactory,
         \Magento\AuthorizationInterface $authorization,
         \Magento\Core\Model\App $app,
+        \Magento\App\State $appState,
+        \Magento\Escaper $escaper,
+        \Magento\Filter\FilterManager $filterManager,
         \Magento\Backend\Model\Session $backendSession,
-        \Magento\Core\Model\LocaleInterface $locale
+        \Magento\Core\Model\LocaleInterface $locale,
+        \Magento\Math\Random $mathRandom
     ) {
         parent::__construct(
-            $request, $layout, $eventManager, $urlBuilder, $translator, $cache, $design, $session, $storeConfig,
-            $frontController, $helperFactory, $viewUrl, $viewConfig, $cacheState,
-            $dirs, $logger, $filesystem, $viewFileSystem, $engineFactory, $app
+            $request,
+            $layout,
+            $eventManager,
+            $urlBuilder,
+            $translator,
+            $cache,
+            $design,
+            $session,
+            $storeConfig,
+            $frontController,
+            $helperFactory,
+            $viewUrl,
+            $viewConfig,
+            $cacheState,
+            $dirs,
+            $logger,
+            $filesystem,
+            $viewFileSystem,
+            $engineFactory,
+            $app,
+            $appState,
+            $escaper,
+            $filterManager
         );
         $this->_storeManager = $storeManager;
         $this->_authorization = $authorization;
         $this->_backendSession = $backendSession;
         $this->_locale = $locale;
+        $this->mathRandom = $mathRandom;
     }
 
     /**
@@ -145,4 +179,12 @@ class Context extends \Magento\Core\Block\Template\Context
     {
         return $this->_locale;
     }
+
+    /**
+     * @return \Magento\Math\Random
+     */
+    public function getMathRandom()
+    {
+        return $this->mathRandom;
+    }
 }
diff --git a/app/code/Magento/Backend/Block/Widget.php b/app/code/Magento/Backend/Block/Widget.php
index 9f4ba7952c9..db86f7d1957 100644
--- a/app/code/Magento/Backend/Block/Widget.php
+++ b/app/code/Magento/Backend/Block/Widget.php
@@ -42,8 +42,7 @@ class Widget extends \Magento\Backend\Block\Template
     public function getId()
     {
         if (null === $this->getData('id')) {
-            $helper = $this->helper('Magento\Core\Helper\Data');
-            $this->setData('id', $helper->uniqHash('id_'));
+            $this->setData('id', $this->mathRandom->getUniqueHash('id_'));
         }
         return $this->getData('id');
     }
diff --git a/app/code/Magento/Backend/Block/Widget/Button.php b/app/code/Magento/Backend/Block/Widget/Button.php
index 9b487fd606a..bcb67e46051 100644
--- a/app/code/Magento/Backend/Block/Widget/Button.php
+++ b/app/code/Magento/Backend/Block/Widget/Button.php
@@ -137,7 +137,7 @@ class Button extends \Magento\Backend\Block\Widget
                 continue;
             }
             $html .= $attributeKey . '="'
-                . $this->helper('Magento\Backend\Helper\Data')->escapeHtml($attributeValue) . '" ';
+                . $this->escapeHtml($attributeValue) . '" ';
         }
 
         return $html;
diff --git a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
index 41e78317b5f..1b9d5f9ecac 100644
--- a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
+++ b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
@@ -250,15 +250,12 @@ class SplitButton extends \Magento\Backend\Block\Widget
      */
     protected function _getAttributesString($attributes)
     {
-        /** @var $helper \Magento\Backend\Helper\Data */
-        $helper = $this->helper('Magento\Backend\Helper\Data');
-
         $html = array();
         foreach ($attributes as $attributeKey => $attributeValue) {
             if ($attributeValue === null || $attributeValue == '') {
                 continue;
             }
-            $html[] = $attributeKey . '="' . $helper->escapeHtml($attributeValue) . '"';
+            $html[] = $attributeKey . '="' . $this->escapeHtml($attributeValue) . '"';
         }
         return join(' ', $html);
     }
diff --git a/app/code/Magento/Backend/Block/Widget/Form/Container.php b/app/code/Magento/Backend/Block/Widget/Form/Container.php
index b7f113228a8..ec3aa2de942 100644
--- a/app/code/Magento/Backend/Block/Widget/Form/Container.php
+++ b/app/code/Magento/Backend/Block/Widget/Form/Container.php
@@ -103,10 +103,13 @@ class Container extends \Magento\Backend\Block\Widget\Container
      */
     protected function _buildFormClassName()
     {
-        return ucwords(str_replace('_', '\\', $this->_blockGroup))
-        . '\\Block\\'
-        . str_replace('_', '\\', uc_words(str_replace('_', ' ', $this->_controller) . '\\' . uc_words($this->_mode)))
-        . '\\Form';
+        return \Magento\Core\Helper\String::buildClassName(array(
+            $this->_blockGroup,
+            'Block',
+            $this->_controller,
+            $this->_mode,
+            'Form'
+        ));
     }
 
     /**
@@ -145,7 +148,7 @@ class Container extends \Magento\Backend\Block\Widget\Container
         if ($this->hasFormActionUrl()) {
             return $this->getData('form_action_url');
         }
-        return $this->getUrl('*/' . $this->_controller . '/save');
+        return $this->getUrl('*/*/save');
     }
 
     public function getFormHtml()
diff --git a/app/code/Magento/Backend/Block/Widget/Form/Generic.php b/app/code/Magento/Backend/Block/Widget/Form/Generic.php
index aa038ba7bbb..8cee1231e12 100644
--- a/app/code/Magento/Backend/Block/Widget/Form/Generic.php
+++ b/app/code/Magento/Backend/Block/Widget/Form/Generic.php
@@ -36,7 +36,7 @@ namespace Magento\Backend\Block\Widget\Form;
 class Generic extends \Magento\Backend\Block\Widget\Form
 {
     /**
-     * @var \Magento\Data\Form\Factory
+     * @var \Magento\Data\FormFactory
      */
     protected $_formFactory;
 
@@ -49,14 +49,14 @@ class Generic extends \Magento\Backend\Block\Widget\Form
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Backend/Block/Widget/Grid.php b/app/code/Magento/Backend/Block/Widget/Grid.php
index e538afc8701..582288bc398 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid.php
@@ -674,22 +674,6 @@ class Grid extends \Magento\Backend\Block\Widget
         return empty($this->_rssLists) ? false : $this->_rssLists;
     }
 
-    /**
-     * Returns url for RSS
-     * Can be overloaded in descendant classes to perform custom changes to url passed to addRssList()
-     *
-     * @param string $url
-     * @return string
-     */
-    protected function _getRssUrl($url)
-    {
-        if ($this->_storeManager->getStore()->isUseStoreInUrl()) {
-            // Url in 'admin' store view won't be accessible, so form it in default store view frontend
-            $this->_urlModel->setStore($this->_storeManager->getDefaultStoreView());
-        }
-        return $this->_urlModel->getUrl($url);
-    }
-
     /**
      * Add new rss list to grid
      *
@@ -701,7 +685,7 @@ class Grid extends \Magento\Backend\Block\Widget
     {
         $this->_rssLists[] = new \Magento\Object(
             array(
-                'url'   => $this->_getRssUrl($url),
+                'url'   => $this->getUrl($url, array('_nosecret' => true)),
                 'label' => $label
             )
         );
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php
index a406093604d..016098c1020 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php
@@ -38,28 +38,26 @@ class Date
     protected $_locale;
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Math\Random
      */
-    protected $_coreData;
+    protected $mathRandom;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\Resource\Helper $resourceHelper
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Core\Model\LocaleInterface $locale
+     * @param \Magento\Math\Random $mathRandom
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\Resource\Helper $resourceHelper,
         \Magento\Backend\Block\Context $context,
         \Magento\Core\Model\LocaleInterface $locale,
+        \Magento\Math\Random $mathRandom,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
         $this->_locale = $locale;
+        $this->mathRandom = $mathRandom;
         parent::__construct($context, $resourceHelper, $data);
     }
 
@@ -73,7 +71,7 @@ class Date
 
     public function getHtml()
     {
-        $htmlId = $this->_coreData->uniqHash($this->_getHtmlId());
+        $htmlId = $this->mathRandom->getUniqueHash($this->_getHtmlId());
         $format = $this->getLocale()->getDateFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT);
         $html = '<div class="range" id="' . $htmlId . '_range"><div class="range-line date">'
             . '<input type="text" name="' . $this->_getHtmlName() . '[from]" id="' . $htmlId . '_from"'
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
index a448409c2ae..4efdf791c67 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
@@ -110,7 +110,7 @@ class Datetime
      */
     public function getHtml()
     {
-        $htmlId = $this->_coreData->uniqHash($this->_getHtmlId());
+        $htmlId = $this->mathRandom->getUniqueHash($this->_getHtmlId());
         $format = $this->getLocale()->getDateFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT);
         $timeFormat = '';
 
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Date.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Date.php
index 332b1be94c4..a28975c7375 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Date.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Date.php
@@ -93,7 +93,7 @@ class Date
             $format = $this->_getFormat();
             try {
                 if ($this->getColumn()->getGmtoffset()) {
-                    $data = $this->_locale->date($data, \Magento\Date::DATETIME_INTERNAL_FORMAT)->toString($format);
+                    $data = $this->_locale->date($data, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)->toString($format);
                 } else {
                     $data = $this->_locale->date($data, \Zend_Date::ISO_8601, null, false)->toString($format);
                 }
@@ -101,7 +101,7 @@ class Date
             catch (\Exception $e)
             {
                 if ($this->getColumn()->getTimezone()) {
-                    $data = $this->_locale->date($data, \Magento\Date::DATETIME_INTERNAL_FORMAT)->toString($format);
+                    $data = $this->_locale->date($data, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)->toString($format);
                 } else {
                     $data = $this->_locale->date($data, null, null, false)->toString($format);
                 }
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Datetime.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Datetime.php
index 1576115932a..6eb6c5bf23e 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Datetime.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Datetime.php
@@ -91,11 +91,11 @@ class Datetime
         if ($data = $this->_getValue($row)) {
             $format = $this->_getFormat();
             try {
-                $data = $this->_locale->date($data, \Magento\Date::DATETIME_INTERNAL_FORMAT)->toString($format);
+                $data = $this->_locale->date($data, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)->toString($format);
             }
             catch (\Exception $e)
             {
-                $data = $this->_locale->date($data, \Magento\Date::DATETIME_INTERNAL_FORMAT)->toString($format);
+                $data = $this->_locale->date($data, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)->toString($format);
             }
             return $data;
         }
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php
index 855607b8a36..f1521180522 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php
@@ -24,36 +24,31 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Backend\Block\Widget\Grid\Column\Renderer;
+
 /**
  * Backend Grid Renderer
- *
- * @category   Magento
- * @package    Magento_Backend
- * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Backend\Block\Widget\Grid\Column\Renderer;
-
-class Longtext
-    extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
+class Longtext extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
 {
     /**
      * Core string
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Filter\FilterManager
      */
-    protected $_coreString = null;
+    protected $filter;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
      * @param \Magento\Backend\Block\Context $context
+     * @param \Magento\Filter\FilterManager $filter
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
         \Magento\Backend\Block\Context $context,
+        \Magento\Filter\FilterManager $filter,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->filter = $filter;
         parent::__construct($context, $data);
     }
 
@@ -76,7 +71,7 @@ class Longtext
         if ($this->getColumn()->getTruncate()) {
             $truncateLength = $this->getColumn()->getTruncate();
         }
-        $text = $this->_coreString->truncate(parent::_getValue($row), $truncateLength);
+        $text = $this->filter->truncate(parent::_getValue($row), array('length' => $truncateLength));
         if ($this->getColumn()->getEscape()) {
             $text = $this->escapeHtml($text);
         }
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Wrapline.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Wrapline.php
index 8b146ac581b..e823978995e 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Wrapline.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Wrapline.php
@@ -24,17 +24,12 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Backend\Block\Widget\Grid\Column\Renderer;
+
 /**
  * Backend grid item renderer line to wrap
- *
- * @category   Magento
- * @package    Magento_Backend
- * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Backend\Block\Widget\Grid\Column\Renderer;
-
-class Wrapline
-    extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
+class Wrapline extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
 {
     /**
      * Default max length of a line at one row
@@ -44,23 +39,23 @@ class Wrapline
     protected $_defaultMaxLineLength = 60;
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
      * @param \Magento\Backend\Block\Context $context
+     * @param \Magento\Stdlib\String $string
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
         \Magento\Backend\Block\Context $context,
+        \Magento\Stdlib\String $string,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct($context, $data);
     }
 
@@ -77,8 +72,8 @@ class Wrapline
         $lineLength = $this->getColumn()->getData('lineLength')
             ? $this->getColumn()->getData('lineLength')
             : $this->_defaultMaxLineLength;
-        for ($i = 0, $n = floor($this->_coreString->strlen($line) / $lineLength); $i <= $n; $i++) {
-            $wrappedLine .= $this->_coreString->substr($line, ($lineLength * $i), $lineLength)
+        for ($i = 0, $n = floor($this->string->strlen($line) / $lineLength); $i <= $n; $i++) {
+            $wrappedLine .= $this->string->substr($line, ($lineLength * $i), $lineLength)
                 . "<br />";
         }
         return $wrappedLine;
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
index d2e8a1c7c25..88c70aad1f0 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
@@ -57,8 +57,7 @@ abstract class AbstractMassaction extends \Magento\Backend\Block\Widget
     {
         parent::_construct();
 
-        $this->setErrorText($this->helper('Magento\Backend\Helper\Data')
-            ->jsQuoteEscape(__('Please select items.')));
+        $this->escapeJsQuote(__('Please select items.'));
 
         if (null !== $this->getOptions()) {
             foreach ($this->getOptions() as $optionId => $option) {
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php
index 5855972ee9b..69ccd8cb849 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php
@@ -46,7 +46,7 @@ class Additional extends \Magento\Backend\Block\Widget\Form\Generic
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\Layout\Argument\HandlerFactory $handlerFactory
@@ -54,7 +54,7 @@ class Additional extends \Magento\Backend\Block\Widget\Form\Generic
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Core\Model\Layout\Argument\HandlerFactory $handlerFactory,
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php
index 87b65c23ce0..9d439f94933 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php
@@ -81,10 +81,7 @@ class Extended extends \Magento\Backend\Block\Widget
     public function _construct()
     {
         parent::_construct();
-        $this->setErrorText(
-            $this->_backendData
-                ->jsQuoteEscape(__('Please select items.'))
-        );
+        $this->setErrorText($this->escapeJsQuote(__('Please select items.')));
     }
 
     /**
diff --git a/app/code/Magento/Backend/Controller/AbstractAction.php b/app/code/Magento/Backend/Controller/AbstractAction.php
index a0f745f5175..f5969a7cf01 100644
--- a/app/code/Magento/Backend/Controller/AbstractAction.php
+++ b/app/code/Magento/Backend/Controller/AbstractAction.php
@@ -92,6 +92,11 @@ abstract class AbstractAction extends \Magento\Core\Controller\Varien\Action
      */
     protected $_locale;
 
+    /**
+     * @var bool
+     */
+    protected $_canUseBaseUrl;
+
     /**
      * @param \Magento\Backend\Controller\Context $context
      */
@@ -105,6 +110,7 @@ abstract class AbstractAction extends \Magento\Core\Controller\Varien\Action
         $this->_auth = $context->getAuth();
         $this->_backendUrl = $context->getBackendUrl();
         $this->_locale = $context->getLocale();
+        $this->_canUseBaseUrl = $context->getCanUseBaseUrl();
     }
 
     protected function _isAllowed()
@@ -249,7 +255,7 @@ abstract class AbstractAction extends \Magento\Core\Controller\Varien\Action
         return !$this->getFlag('', self::FLAG_IS_URLS_CHECKED)
             && !$this->getRequest()->getParam('forwarded')
             && !$this->_getSession()->getIsUrlNotice(true)
-            && !$this->_objectManager->get('Magento\Core\Model\Config')->getNode('global/can_use_base_url');
+            && !$this->_canUseBaseUrl;
     }
 
     /**
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Action.php b/app/code/Magento/Backend/Controller/Adminhtml/Action.php
index e41636898d6..bc612975e59 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/Action.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/Action.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -31,10 +31,4 @@ namespace Magento\Backend\Controller\Adminhtml;
 
 class Action extends \Magento\Backend\Controller\AbstractAction
 {
-    /**
-     * Currently used area
-     *
-     * @var string
-     */
-    protected $_currentArea = 'adminhtml';
 }
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Ajax.php b/app/code/Magento/Backend/Controller/Adminhtml/Ajax.php
index 9e843632f74..a8ff8da09e0 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/Ajax.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/Ajax.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  */
 namespace Magento\Backend\Controller\Adminhtml;
 
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Cache.php b/app/code/Magento/Backend/Controller/Adminhtml/Cache.php
index 7fc6334cf5b..05c8ae2024a 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/Cache.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/Cache.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php b/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php
index 209dd13fe79..859a2eb70bd 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,7 +28,7 @@
  * Dashboard admin controller
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 namespace Magento\Backend\Controller\Adminhtml;
@@ -79,11 +79,13 @@ class Dashboard extends \Magento\Backend\Controller\Adminhtml\Action
     {
         $output   = '';
         $blockTab = $this->getRequest()->getParam('block');
-        $blockClassSuffix = str_replace(' ', \Magento\Autoload\IncludePath::NS_SEPARATOR,
-            ucwords(str_replace(\Magento\Autoload\IncludePath::NS_SEPARATOR, ' ', $blockTab)));
-
+        $blockClassSuffix = str_replace(
+            ' ',
+            \Magento\Autoload\IncludePath::NS_SEPARATOR,
+            ucwords(str_replace('_', ' ', $blockTab))
+        );
         if (in_array($blockTab, array('tab_orders', 'tab_amounts', 'totals'))) {
-            $output = $this->getLayout()->createBlock('Magento\\Adminhtml\\Block\\Dashboard\\' . $blockClassSuffix)
+            $output = $this->getLayout()->createBlock('Magento\\Backend\\Block\\Dashboard\\' . $blockClassSuffix)
                 ->toHtml();
         }
         $this->getResponse()->setBody($output);
@@ -122,7 +124,7 @@ class Dashboard extends \Magento\Backend\Controller\Adminhtml\Action
                             ->setBody($response->getBody());
                         return;
                     } catch (\Exception $e) {
-                        $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                        $this->_objectManager->get('Magento\Logger')->logException($e);
                         $error = __('see error log for details');
                         $httpCode = 503;
                     }
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Index.php b/app/code/Magento/Backend/Controller/Adminhtml/Index.php
index e52af1e505e..a9893978394 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/Index.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/Index.php
@@ -31,12 +31,30 @@ namespace Magento\Backend\Controller\Adminhtml;
 
 class Index extends \Magento\Backend\Controller\AbstractAction
 {
+    /**
+     * Search modules list
+     *
+     * @var array
+     */
+    protected $_searchModules;
+
+    /**
+     * @param \Magento\Backend\Controller\Context $context
+     * @param array $searchModules
+     */
+    public function __construct(
+        \Magento\Backend\Controller\Context $context,
+        array $searchModules = array()
+    ) {
+        $this->_searchModules = $searchModules;
+        parent::__construct($context);
+    }
+
     /**
      * Global Search Action
      */
     public function globalSearchAction()
     {
-        $searchModules = $this->_objectManager->get('Magento\Core\Model\Config')->getNode("adminhtml/global_search");
         $items = array();
 
         if (!$this->_authorization->isAllowed('Magento_Adminhtml::global_search')) {
@@ -47,7 +65,7 @@ class Index extends \Magento\Backend\Controller\AbstractAction
                 'description' => __('You need more permissions to do this.')
             );
         } else {
-            if (empty($searchModules)) {
+            if (empty($this->_searchModules)) {
                 $items[] = array(
                     'id' => 'error',
                     'type' => __('Error'),
@@ -58,14 +76,13 @@ class Index extends \Magento\Backend\Controller\AbstractAction
                 $start = $this->getRequest()->getParam('start', 1);
                 $limit = $this->getRequest()->getParam('limit', 10);
                 $query = $this->getRequest()->getParam('query', '');
-                foreach ($searchModules->children() as $searchConfig) {
+                foreach ($this->_searchModules as $searchConfig) {
 
-                    if ($searchConfig->acl && !$this->_authorization->isAllowed($searchConfig->acl)){
+                    if ($searchConfig['acl'] && !$this->_authorization->isAllowed($searchConfig['acl'])){
                         continue;
                     }
 
-                    $className = $searchConfig->getClassName();
-
+                    $className = $searchConfig['class'];
                     if (empty($className)) {
                         continue;
                     }
diff --git a/app/code/Magento/Backend/Controller/System/AbstractConfig.php b/app/code/Magento/Backend/Controller/Adminhtml/System/AbstractConfig.php
similarity index 98%
rename from app/code/Magento/Backend/Controller/System/AbstractConfig.php
rename to app/code/Magento/Backend/Controller/Adminhtml/System/AbstractConfig.php
index fd223a110c8..b85f4cdb54b 100644
--- a/app/code/Magento/Backend/Controller/System/AbstractConfig.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/AbstractConfig.php
@@ -27,7 +27,7 @@
 /**
  * System Configuration Abstract Controller
  */
-namespace Magento\Backend\Controller\System;
+namespace Magento\Backend\Controller\Adminhtml\System;
 
 abstract class AbstractConfig extends \Magento\Backend\Controller\AbstractAction
 {
diff --git a/app/code/Magento/Adminhtml/Controller/System/Account.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Controller/System/Account.php
rename to app/code/Magento/Backend/Controller/Adminhtml/System/Account.php
index 2dbb3514b15..1a425ff8dab 100644
--- a/app/code/Magento/Adminhtml/Controller/System/Account.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml account controller
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Controller\System;
+namespace Magento\Backend\Controller\Adminhtml\System;
 
 class Account extends \Magento\Backend\Controller\Adminhtml\Action
 {
diff --git a/app/code/Magento/Adminhtml/Controller/System/Backup.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Backup.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Controller/System/Backup.php
rename to app/code/Magento/Backend/Controller/Adminhtml/System/Backup.php
index 44e7b667e84..d0359eaf83f 100644
--- a/app/code/Magento/Adminhtml/Controller/System/Backup.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Backup.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,10 +28,10 @@
  * Backup admin controller
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\System;
+namespace Magento\Backend\Controller\Adminhtml\System;
 
 class Backup extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -157,10 +157,10 @@ class Backup extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Magento\Backup\Exception\NotEnoughFreeSpace $e) {
             $errorMessage = __('You need more free space to create a backup.');
         } catch (\Magento\Backup\Exception\NotEnoughPermissions $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->log($e->getMessage());
+            $this->_objectManager->get('Magento\Logger')->log($e->getMessage());
             $errorMessage = __('You need more permissions to create a backup.');
         } catch (\Exception  $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->log($e->getMessage());
+            $this->_objectManager->get('Magento\Logger')->log($e->getMessage());
             $errorMessage = __('Something went wrong creating the backup.');
         }
 
@@ -303,10 +303,10 @@ class Backup extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Magento\Backup\Exception\FtpValidationFailed $e) {
             $errorMsg = __('Failed to validate FTP');
         } catch (\Magento\Backup\Exception\NotEnoughPermissions $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->log($e->getMessage());
+            $this->_objectManager->get('Magento\Logger')->log($e->getMessage());
             $errorMsg = __('You need more permissions to create a backup.');
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->log($e->getMessage());
+            $this->_objectManager->get('Magento\Logger')->log($e->getMessage());
             $errorMsg = __('Failed to rollback');
         }
 
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php
index f8ea5e8a3d7..7ee8fb21bd0 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php
@@ -29,7 +29,7 @@
  */
 namespace Magento\Backend\Controller\Adminhtml\System;
 
-class Config extends \Magento\Backend\Controller\System\AbstractConfig
+class Config extends \Magento\Backend\Controller\Adminhtml\System\AbstractConfig
 {
     /**
      * @var \Magento\Core\Model\StoreManagerInterface
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/Save.php
index 8625ffdcbcf..e2794d4d203 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/System/Config/Save.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/Save.php
@@ -37,7 +37,7 @@ namespace Magento\Backend\Controller\Adminhtml\System\Config;
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-class Save extends \Magento\Backend\Controller\System\AbstractConfig
+class Save extends \Magento\Backend\Controller\Adminhtml\System\AbstractConfig
 {
     /**
      * Backend Config Model Factory
@@ -51,21 +51,29 @@ class Save extends \Magento\Backend\Controller\System\AbstractConfig
      */
     protected $_cache;
 
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
     /**
      * @param \Magento\Backend\Controller\Context $context
      * @param \Magento\Backend\Model\Config\Structure $configStructure
      * @param \Magento\Backend\Model\Config\Factory $configFactory
      * @param \Magento\Cache\FrontendInterface $cache
+     * @param \Magento\Stdlib\String $string
      */
     public function __construct(
         \Magento\Backend\Controller\Context $context,
         \Magento\Backend\Model\Config\Structure $configStructure,
         \Magento\Backend\Model\Config\Factory $configFactory,
-        \Magento\Cache\FrontendInterface $cache
+        \Magento\Cache\FrontendInterface $cache,
+        \Magento\Stdlib\String $string
     ) {
         parent::__construct($context, $configStructure);
         $this->_configFactory = $configFactory;
         $this->_cache = $cache;
+        $this->string = $string;
     }
 
     /**
@@ -177,7 +185,9 @@ class Save extends \Magento\Backend\Controller\System\AbstractConfig
      */
     protected function _saveSection()
     {
-        $method = '_save' . uc_words($this->getRequest()->getParam('section'), '');
+        $method = '_save' . $this->string->upperCaseWords(
+            $this->getRequest()->getParam('section'), '_', ''
+        );
         if (method_exists($this, $method)) {
             $this->$method();
         }
diff --git a/app/code/Magento/Adminhtml/Controller/System/Config/System/Storage.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Controller/System/Config/System/Storage.php
rename to app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage.php
index 2752ac1f3ef..74067e8c961 100644
--- a/app/code/Magento/Adminhtml/Controller/System/Config/System/Storage.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml account controller
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\System\Config\System;
+namespace Magento\Backend\Controller\Adminhtml\System\Config\System;
 
 class Storage extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -88,7 +88,7 @@ class Storage extends \Magento\Backend\Controller\Adminhtml\Action
         try {
             $this->_getSyncSingleton()->synchronize($storage);
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $flag->passError($e);
         }
 
@@ -139,7 +139,7 @@ class Storage extends \Magento\Backend\Controller\Adminhtml\Action
                         if (is_array($flagData)
                             && !(isset($flagData['timeout_reached']) && $flagData['timeout_reached'])
                         ) {
-                            $this->_objectManager->get('Magento\Core\Model\Logger')
+                            $this->_objectManager->get('Magento\Logger')
                                 ->logException(new \Magento\Exception(
                                 __('The timeout limit for response from synchronize process was reached.')
                             ));
diff --git a/app/code/Magento/Adminhtml/Controller/System/Design.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Design.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Controller/System/Design.php
rename to app/code/Magento/Backend/Controller/Adminhtml/System/Design.php
index add865cab9e..71293d03c95 100644
--- a/app/code/Magento/Adminhtml/Controller/System/Design.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Design.php
@@ -19,12 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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\Adminhtml\Controller\System;
+namespace Magento\Backend\Controller\Adminhtml\System;
 
 class Design extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -85,8 +85,8 @@ class Design extends \Magento\Backend\Controller\Adminhtml\Action
 
         $this->_coreRegistry->register('design', $design);
 
-        $this->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\System\Design\Edit'));
-        $this->_addLeft($this->getLayout()->createBlock('Magento\Adminhtml\Block\System\Design\Edit\Tabs', 'design_tabs'));
+        $this->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Design\Edit'));
+        $this->_addLeft($this->getLayout()->createBlock('Magento\Backend\Block\System\Design\Edit\Tabs', 'design_tabs'));
 
         $this->renderLayout();
     }
diff --git a/app/code/Magento/Adminhtml/Controller/System/Email/Template.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Email/Template.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Controller/System/Email/Template.php
rename to app/code/Magento/Backend/Controller/Adminhtml/System/Email/Template.php
index ff57dec4d25..43c7009bd8c 100644
--- a/app/code/Magento/Adminhtml/Controller/System/Email/Template.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Email/Template.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,10 +28,10 @@
  * System Template admin controller
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\System\Email;
+namespace Magento\Backend\Controller\Adminhtml\System\Email;
 
 class Template extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -104,7 +104,7 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action
         $this->_title($template->getId() ? $template->getTemplateCode() : __('New Template'));
 
         $this->_addContent($this->getLayout()
-            ->createBlock('Magento\Adminhtml\Block\System\Email\Template\Edit', 'template_edit')
+            ->createBlock('Magento\Backend\Block\System\Email\Template\Edit', 'template_edit')
             ->setEditMode((bool)$this->getRequest()->getParam('id'))
         );
         $this->renderLayout();
@@ -171,7 +171,7 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_getSession()->addError($e->getMessage());
             } catch (\Exception $e) {
                 $this->_getSession()->addError(__('An error occurred while deleting email template data. Please review log and try again.'));
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
                 // save data in session
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')
                     ->setFormData($this->getRequest()->getParams());
@@ -189,7 +189,7 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action
 
     public function previewAction()
     {
-        $this->loadLayout('systemPreview');
+        $this->loadLayout('adminhtml_system_preview');
         $this->renderLayout();
     }
 
@@ -206,14 +206,14 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action
             $template->setData('orig_template_code', $templateCode);
             $template->setData('template_variables', \Zend_Json::encode($template->getVariablesOptionArray(true)));
 
-            $templateBlock = $this->getLayout()->createBlock('Magento\Adminhtml\Block\System\Email\Template\Edit');
+            $templateBlock = $this->getLayout()->createBlock('Magento\Backend\Block\System\Email\Template\Edit');
             $template->setData('orig_template_used_default_for', $templateBlock->getUsedDefaultForPaths(false));
 
             $this->getResponse()->setBody(
                 $this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($template->getData())
             );
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
     }
 
@@ -221,14 +221,14 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action
      * Load email template from request
      *
      * @param string $idFieldName
-     * @return \Magento\Adminhtml\Model\Email\Template $model
+     * @return \Magento\Backend\Model\Email\Template $model
      */
     protected function _initTemplate($idFieldName = 'template_id')
     {
         $this->_title(__('Email Templates'));
 
         $id = (int)$this->getRequest()->getParam($idFieldName);
-        $model = $this->_objectManager->create('Magento\Adminhtml\Model\Email\Template');
+        $model = $this->_objectManager->create('Magento\Backend\Model\Email\Template');
         if ($id) {
             $model->load($id);
         }
diff --git a/app/code/Magento/Adminhtml/Controller/System/Store.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Controller/System/Store.php
rename to app/code/Magento/Backend/Controller/Adminhtml/System/Store.php
index f65f38436ed..36fabb88e2e 100644
--- a/app/code/Magento/Adminhtml/Controller/System/Store.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,10 +28,10 @@
  * Store controller
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\System;
+namespace Magento\Backend\Controller\Adminhtml\System;
 
 class Store extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -40,24 +40,32 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action
      *
      * @var \Magento\Core\Model\Registry
      */
-    protected $_coreRegistry = null;
+    protected $_coreRegistry;
+
+    /**
+     * @var \Magento\Filter\FilterManager
+     */
+    protected $filterManager;
 
     /**
      * @param \Magento\Backend\Controller\Context $context
      * @param \Magento\Core\Model\Registry $coreRegistry
+     * @param \Magento\Filter\FilterManager $filterManager
      */
     public function __construct(
         \Magento\Backend\Controller\Context $context,
-        \Magento\Core\Model\Registry $coreRegistry
+        \Magento\Core\Model\Registry $coreRegistry,
+        \Magento\Filter\FilterManager $filterManager
     ) {
         $this->_coreRegistry = $coreRegistry;
+        $this->filterManager = $filterManager;
         parent::__construct($context);
     }
 
     /**
      * Init actions
      *
-     * @return \Magento\Adminhtml\Controller\Cms\Page
+     * @return \Magento\Cms\Controller\Adminhtml\Page
      */
     protected function _initAction()
     {
@@ -167,7 +175,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action
             }
 
             $this->_initAction()
-                ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\System\Store\Edit'))
+                ->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Store\Edit'))
                 ->renderLayout();
         } else {
             $session->addError($notExists);
@@ -187,7 +195,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action
             try {
                 switch ($postData['store_type']) {
                     case 'website':
-                        $postData['website']['name'] = $this->_getHelper()->removeTags($postData['website']['name']);
+                        $postData['website']['name'] = $this->filterManager->removeTags($postData['website']['name']);
                         $websiteModel = $this->_objectManager->create('Magento\Core\Model\Website');
                         if ($postData['website']['website_id']) {
                             $websiteModel->load($postData['website']['website_id']);
@@ -202,7 +210,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action
                         break;
 
                     case 'group':
-                        $postData['group']['name'] = $this->_getHelper()->removeTags($postData['group']['name']);
+                        $postData['group']['name'] = $this->filterManager->removeTags($postData['group']['name']);
                         $groupModel = $this->_objectManager->create('Magento\Core\Model\Store\Group');
                         if ($postData['group']['group_id']) {
                             $groupModel->load($postData['group']['group_id']);
@@ -222,7 +230,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action
                     case 'store':
                         $eventName = 'store_edit';
                         $storeModel = $this->_objectManager->create('Magento\Core\Model\Store');
-                        $postData['store']['name'] = $this->_getHelper()->removeTags($postData['store']['name']);
+                        $postData['store']['name'] = $this->filterManager->removeTags($postData['store']['name']);
                         if ($postData['store']['store_id']) {
                             $storeModel->load($postData['store']['store_id']);
                         }
@@ -282,7 +290,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action
 
         $this->_initAction()
             ->_addBreadcrumb(__('Delete Web Site'), __('Delete Web Site'))
-            ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\System\Store\Delete')
+            ->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Store\Delete')
                 ->setFormActionUrl($this->getUrl('adminhtml/*/deleteWebsitePost'))
                 ->setBackUrl($this->getUrl('adminhtml/*/editWebsite', array('website_id' => $itemId)))
                 ->setStoreTypeTitle(__('Web Site'))
@@ -312,7 +320,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action
 
         $this->_initAction()
             ->_addBreadcrumb(__('Delete Store'), __('Delete Store'))
-            ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\System\Store\Delete')
+            ->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Store\Delete')
                 ->setFormActionUrl($this->getUrl('adminhtml/*/deleteGroupPost'))
                 ->setBackUrl($this->getUrl('adminhtml/*/editGroup', array('group_id' => $itemId)))
                 ->setStoreTypeTitle(__('Store'))
@@ -342,7 +350,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action
 
         $this->_initAction()
             ->_addBreadcrumb(__('Delete Store View'), __('Delete Store View'))
-            ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\System\Store\Delete')
+            ->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Store\Delete')
                 ->setFormActionUrl($this->getUrl('adminhtml/*/deleteStorePost'))
                 ->setBackUrl($this->getUrl('adminhtml/*/editStore', array('store_id' => $itemId)))
                 ->setStoreTypeTitle(__('Store View'))
@@ -459,7 +467,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action
      *
      * @param string $failPath redirect path if backup failed
      * @param array $arguments
-     * @return \Magento\Adminhtml\Controller\System\Store
+     * @return \Magento\Backend\Controller\Adminhtml\System\Store
      */
     protected function _backupDatabase($failPath, $arguments=array())
     {
@@ -491,7 +499,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action
      * Add notification on deleting store / store view / website
      *
      * @param string $typeTitle
-     * @return \Magento\Adminhtml\Controller\System\Store
+     * @return \Magento\Backend\Controller\Adminhtml\System\Store
      */
     protected function _addDeletionNotice($typeTitle)
     {
diff --git a/app/code/Magento/Adminhtml/Controller/System/Variable.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Variable.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Controller/System/Variable.php
rename to app/code/Magento/Backend/Controller/Adminhtml/System/Variable.php
index c3cf3800f30..1ddee1bd032 100644
--- a/app/code/Magento/Adminhtml/Controller/System/Variable.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Variable.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,10 +28,10 @@
  * Custom Variables admin controller
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\System;
+namespace Magento\Backend\Controller\Adminhtml\System;
 
 class Variable extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -57,7 +57,7 @@ class Variable extends \Magento\Backend\Controller\Adminhtml\Action
     /**
      * Initialize Layout and set breadcrumbs
      *
-     * @return \Magento\Adminhtml\Controller\System\Variable
+     * @return \Magento\Backend\Controller\Adminhtml\System\Variable
      */
     protected function _initLayout()
     {
@@ -117,9 +117,9 @@ class Variable extends \Magento\Backend\Controller\Adminhtml\Action
         $this->_title($variable->getId() ? $variable->getCode() : __('New Custom Variable'));
 
         $this->_initLayout()
-            ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\System\Variable\Edit'))
+            ->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Variable\Edit'))
             ->_addJs($this->getLayout()->createBlock('Magento\Core\Block\Template', '', array(
-                'data' => array('template' => 'Magento_Adminhtml::system/variable/js.phtml')
+                'data' => array('template' => 'Magento_Backend::system/variable/js.phtml')
             )))
             ->renderLayout();
     }
diff --git a/app/code/Magento/Backend/Controller/Context.php b/app/code/Magento/Backend/Controller/Context.php
index d3218cad9d0..c575120a469 100644
--- a/app/code/Magento/Backend/Controller/Context.php
+++ b/app/code/Magento/Backend/Controller/Context.php
@@ -69,14 +69,20 @@ class Context extends \Magento\Core\Controller\Varien\Action\Context
     protected $_locale;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @var bool
+     */
+    protected $_canUseBaseUrl;
+
+    /**
+     * @param \Magento\Logger $logger
      * @param \Magento\App\RequestInterface $request
      * @param \Magento\App\ResponseInterface $response
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\App\FrontController $frontController
      * @param \Magento\View\LayoutInterface $layout
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param $isRenderInherited
+     * @param \Magento\HTTP\Authentication $authentication
+     * @param bool $isRenderInherited
      * @param \Magento\Backend\Model\Session $session
      * @param \Magento\Backend\Helper\Data $helper
      * @param \Magento\AuthorizationInterface $authorization
@@ -84,17 +90,19 @@ class Context extends \Magento\Core\Controller\Varien\Action\Context
      * @param \Magento\Backend\Model\Auth $auth
      * @param \Magento\Backend\Model\Url $backendUrl
      * @param \Magento\Core\Model\LocaleInterface $locale
+     * @param bool $canUseBaseUrl
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\App\RequestInterface $request,
         \Magento\App\ResponseInterface $response,
         \Magento\ObjectManager $objectManager,
         \Magento\App\FrontController $frontController,
         \Magento\View\LayoutInterface $layout,
         \Magento\Event\ManagerInterface $eventManager,
+        \Magento\HTTP\Authentication $authentication,
         $isRenderInherited,
         \Magento\Backend\Model\Session $session,
         \Magento\Backend\Helper\Data $helper,
@@ -102,11 +110,13 @@ class Context extends \Magento\Core\Controller\Varien\Action\Context
         \Magento\Core\Model\Translate $translator,
         \Magento\Backend\Model\Auth $auth,
         \Magento\Backend\Model\Url $backendUrl,
-        \Magento\Core\Model\LocaleInterface $locale
+        \Magento\Core\Model\LocaleInterface $locale,
+        $canUseBaseUrl = false
     ) {
         parent::__construct($logger, $request, $response, $objectManager, $frontController, $layout, $eventManager, 
-            $isRenderInherited
+            $authentication, $isRenderInherited
         );
+        $this->_canUseBaseUrl = $canUseBaseUrl;
         $this->_session = $session;
         $this->_helper = $helper;
         $this->_authorization = $authorization;
@@ -171,4 +181,12 @@ class Context extends \Magento\Core\Controller\Varien\Action\Context
     {
         return $this->_locale;
     }
+
+    /**
+     * @return boolean
+     */
+    public function getCanUseBaseUrl()
+    {
+        return $this->_canUseBaseUrl;
+    }
 }
diff --git a/app/code/Magento/Backend/Controller/Router/DefaultRouter.php b/app/code/Magento/Backend/Controller/Router/DefaultRouter.php
deleted file mode 100644
index a5a5a2ba2a4..00000000000
--- a/app/code/Magento/Backend/Controller/Router/DefaultRouter.php
+++ /dev/null
@@ -1,305 +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_Core
- * @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\Controller\Router;
-
-/**
- * Class \Magento\Backend\Controller\Router\DefaultRouter
- *
- * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
- * @SuppressWarnings(PHPMD.ExcessiveParameterList)
- */
-class DefaultRouter extends \Magento\Core\Controller\Varien\Router\Base
-{
-    /**
-     * List of required request parameters
-     * Order sensitive
-     * @var array
-     */
-    protected $_requiredParams = array(
-        'areaFrontName',
-        'moduleFrontName',
-        'controllerName',
-        'actionName',
-    );
-
-    /**
-     * Url key of area
-     *
-     * @var string
-     */
-    protected $_areaFrontName;
-
-    /**
-     * @var \Magento\Backend\Helper\Data
-     */
-    protected $_backendData;
-
-    /**
-     * @param \Magento\Backend\Helper\Data $backendData
-     * Default routeId for router
-     *
-     * @var string
-     */
-    protected $_defaultRouteId;
-
-    /**
-     * @var \Magento\App\State
-     */
-    protected $_appState;
-
-    /**
-     * @var \Magento\Core\Model\StoreManagerInterface
-     */
-    protected $_storeManager;
-
-    /**
-     * @var \Magento\Core\Model\Url
-     */
-    protected $_url;
-
-    /**
-     * @param \Magento\Backend\Helper\Data $backendData
-     * @param \Magento\App\ActionFactory $controllerFactory
-     * @param \Magento\Filesystem $filesystem
-     * @param \Magento\Core\Model\App $app
-     * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Core\Model\Route\Config $routeConfig
-     * @param \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo
-     * @param \Magento\Core\Model\Config $config
-     * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Model\Url $url
-     * @param \Magento\App\State $appState
-     * @param $areaCode
-     * @param $baseController
-     * @param $routerId
-     * @param $defaultRouteId
-     *
-     * @throws \InvalidArgumentException
-     *
-     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
-     */
-    public function __construct(
-        \Magento\Backend\Helper\Data $backendData,
-        \Magento\App\ActionFactory $controllerFactory,
-        \Magento\Filesystem $filesystem,
-        \Magento\Core\Model\App $app,
-        \Magento\App\State $appState,
-        \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Core\Model\Route\Config $routeConfig,
-        \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo,
-        \Magento\Core\Model\Config $config,
-        \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Model\Url $url,
-        \Magento\App\State $appState,
-        $areaCode,
-        $baseController,
-        $routerId,
-        $defaultRouteId
-    ) {
-        parent::__construct(
-            $controllerFactory,
-            $filesystem,
-            $app,
-            $coreStoreConfig,
-            $routeConfig,
-            $securityInfo,
-            $config,
-            $url,
-            $storeManager,
-            $appState,
-            $areaCode,
-            $baseController,
-            $routerId,
-            $defaultRouteId
-        );
-        $this->_backendData = $backendData;
-        $this->_appState = $appState;
-        $this->_storeManager = $storeManager;
-        $this->_url = $url;
-        $this->_areaFrontName = $this->_backendData->getAreaFrontName();
-        $this->_defaultRouteId = $defaultRouteId;
-    }
-
-    /**
-     * Fetch default path
-     */
-    public function fetchDefault()
-    {
-        // set defaults
-        $pathParts = explode('/', $this->_getDefaultPath());
-        $backendRoutes = $this->_getRoutes();
-        $moduleFrontName = $backendRoutes[$this->_defaultRouteId]['frontName'];
-
-        $this->getFront()->setDefault(array(
-            'area'       => $this->_getParamWithDefaultValue($pathParts, 0, ''),
-            'module'     => $this->_getParamWithDefaultValue($pathParts, 1, $moduleFrontName),
-            'controller' => $this->_getParamWithDefaultValue($pathParts, 2, 'index'),
-            'action'     => $this->_getParamWithDefaultValue($pathParts, 3, 'index'),
-        ));
-    }
-
-    /**
-     * Retrieve array param by key, or default value
-     *
-     * @param array $array
-     * @param string $key
-     * @param mixed $defaultValue
-     * @return mixed
-     */
-    protected function _getParamWithDefaultValue($array, $key, $defaultValue)
-    {
-        return !empty($array[$key]) ? $array[$key] : $defaultValue;
-    }
-
-    /**
-     * Get router default request path
-     * @return string
-     */
-    protected function _getDefaultPath()
-    {
-        return (string)$this->_config->getValue('web/default/admin', 'default');
-    }
-
-    /**
-     * Dummy call to pass through checking
-     *
-     * @return boolean
-     */
-    protected function _beforeModuleMatch()
-    {
-        return true;
-    }
-
-    /**
-     * checking if we installed or not and doing redirect
-     *
-     * @return bool
-     * @SuppressWarnings(PHPMD.ExitExpression)
-     */
-    protected function _afterModuleMatch()
-    {
-        if (!$this->_appState->isInstalled()) {
-            $this->_app->getFrontController()
-                ->getResponse()
-                ->setRedirect($this->_url->getUrl('install'))
-                ->sendResponse();
-            exit;
-        }
-        return true;
-    }
-
-    /**
-     * We need to have noroute action in this router
-     * not to pass dispatching to next routers
-     *
-     * @return bool
-     */
-    protected function _noRouteShouldBeApplied()
-    {
-        return true;
-    }
-
-    /**
-     * Check whether URL for corresponding path should use https protocol
-     *
-     * @param string $path
-     * @return bool
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    protected function _shouldBeSecure($path)
-    {
-        return substr((string)$this->_config->getValue('web/unsecure/base_url', 'default'), 0, 5) === 'https'
-            || $this->_coreStoreConfig->getConfigFlag(
-                'web/secure/use_in_adminhtml',
-                \Magento\Core\Model\AppInterface::ADMIN_STORE_ID
-            ) && substr((string)$this->_config->getValue('web/secure/base_url', 'default'), 0, 5) === 'https';
-    }
-
-    /**
-     * Retrieve current secure url
-     *
-     * @param \Magento\App\RequestInterface $request
-     * @return string
-     */
-    protected function _getCurrentSecureUrl($request)
-    {
-        return $this->_storeManager->getStore(\Magento\Core\Model\AppInterface::ADMIN_STORE_ID)
-            ->getBaseUrl('link', true) . ltrim($request->getPathInfo(), '/');
-    }
-
-    /**
-     * Check whether redirect should be used for secure routes
-     *
-     * @return bool
-     */
-    protected function _shouldRedirectToSecure()
-    {
-        return false;
-    }
-
-    /**
-     * Build controller class name based on moduleName and controllerName
-     *
-     * @param string $realModule
-     * @param string $controller
-     * @return string
-     */
-    public function getControllerClassName($realModule, $controller)
-    {
-        /**
-         * Start temporary block
-         * TODO: Sprint#27. Delete after adminhtml refactoring
-         */
-        if ($realModule == 'Magento_Adminhtml') {
-            return parent::getControllerClassName($realModule, $controller);
-        }
-        /**
-         * End temporary block
-         */
-
-        $parts = explode('_', $realModule);
-        $realModule = implode(\Magento\Autoload\IncludePath::NS_SEPARATOR, array_splice($parts, 0, 2));
-        return $realModule . \Magento\Autoload\IncludePath::NS_SEPARATOR . 'Controller' .
-            \Magento\Autoload\IncludePath::NS_SEPARATOR . ucfirst($this->_areaCode) .
-            \Magento\Autoload\IncludePath::NS_SEPARATOR .
-            str_replace('_', '\\', uc_words(str_replace('_', ' ', $controller)));
-
-    }
-
-    /**
-     * Check whether this router should process given request
-     *
-     * @param array $params
-     * @return bool
-     */
-    protected function _canProcess(array $params)
-    {
-        return $params['areaFrontName'] == $this->_areaFrontName;
-    }
-}
diff --git a/app/code/Magento/Backend/Helper/Dashboard/AbstractDashboard.php b/app/code/Magento/Backend/Helper/Dashboard/AbstractDashboard.php
index e8bc4628fbb..90f13092166 100644
--- a/app/code/Magento/Backend/Helper/Dashboard/AbstractDashboard.php
+++ b/app/code/Magento/Backend/Helper/Dashboard/AbstractDashboard.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/Helper/Dashboard/Data.php b/app/code/Magento/Backend/Helper/Dashboard/Data.php
index 80f601e2033..f8d1c270e45 100644
--- a/app/code/Magento/Backend/Helper/Dashboard/Data.php
+++ b/app/code/Magento/Backend/Helper/Dashboard/Data.php
@@ -19,20 +19,21 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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\Helper\Dashboard;
 
 /**
  * Data helper for dashboard
  */
-namespace Magento\Backend\Helper\Dashboard;
-
 class Data extends \Magento\Core\Helper\Data
 {
-    protected $_locale = null;
-    protected $_stores = null;
+    /**
+     * @var \Magento\Data\Collection\Db
+     */
+    protected $_stores;
 
     /**
      * @var string
@@ -42,34 +43,34 @@ class Data extends \Magento\Core\Helper\Data
     /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Encryption $encryptor
-     * @param \Magento\Core\Model\StoreManager $storeManager
-     * @param string $installDate
+     * @param $installDate
      * @param bool $dbCompatibleMode
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\Core\Model\Date $dateModel,
         \Magento\App\State $appState,
-        \Magento\Core\Model\Encryption $encryptor,
         $installDate,
         $dbCompatibleMode = true
     ) {
-        parent::__construct($context, $eventManager, $coreHttp, $config, $coreStoreConfig, $storeManager,
-            $locale, $dateModel, $appState, $encryptor, $dbCompatibleMode
+        parent::__construct(
+            $context,
+            $eventManager,
+            $coreStoreConfig,
+            $storeManager,
+            $locale,
+            $dateModel,
+            $appState,
+            $dbCompatibleMode
         );
         $this->_installDate = $installDate;
     }
@@ -81,10 +82,9 @@ class Data extends \Magento\Core\Helper\Data
      */
     public function getStores()
     {
-        if(!$this->_stores) {
+        if (!$this->_stores) {
             $this->_stores = $this->_storeManager->getStore()->getResourceCollection()->load();
         }
-
         return $this->_stores;
     }
 
diff --git a/app/code/Magento/Backend/Helper/Dashboard/Order.php b/app/code/Magento/Backend/Helper/Dashboard/Order.php
index 0e4f7e93095..391689ae5fc 100644
--- a/app/code/Magento/Backend/Helper/Dashboard/Order.php
+++ b/app/code/Magento/Backend/Helper/Dashboard/Order.php
@@ -19,16 +19,15 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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\Helper\Dashboard;
 
 /**
  * Adminhtml dashboard helper for orders
  */
-namespace Magento\Backend\Helper\Dashboard;
-
 class Order extends \Magento\Backend\Helper\Dashboard\AbstractDashboard
 {
     /**
@@ -39,35 +38,35 @@ class Order extends \Magento\Backend\Helper\Dashboard\AbstractDashboard
     /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Encryption $encryptor
      * @param \Magento\Reports\Model\Resource\Order\Collection $orderCollection
      * @param bool $dbCompatibleMode
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\Core\Model\Date $dateModel,
         \Magento\App\State $appState,
-        \Magento\Core\Model\Encryption $encryptor,
         \Magento\Reports\Model\Resource\Order\Collection $orderCollection,
         $dbCompatibleMode = true
-    )
-    {
+    ) {
         $this->_orderCollection = $orderCollection;
-        parent::__construct($context, $eventManager, $coreHttp, $config, $coreStoreConfig, $storeManager,
-            $locale, $dateModel, $appState, $encryptor, $dbCompatibleMode
+        parent::__construct(
+            $context,
+            $eventManager,
+            $coreStoreConfig,
+            $storeManager,
+            $locale,
+            $dateModel,
+            $appState,
+            $dbCompatibleMode
         );
     }
 
diff --git a/app/code/Magento/Backend/Helper/Data.php b/app/code/Magento/Backend/Helper/Data.php
index 58c66c98540..5f0eaed22c8 100644
--- a/app/code/Magento/Backend/Helper/Data.php
+++ b/app/code/Magento/Backend/Helper/Data.php
@@ -32,26 +32,13 @@ namespace Magento\Backend\Helper;
 class Data extends \Magento\Core\Helper\AbstractHelper
 {
     const XML_PATH_USE_CUSTOM_ADMIN_URL         = 'admin/url/use_custom';
-    const BACKEND_AREA_CODE                     = 'adminhtml';
 
     protected $_pageHelpUrl;
 
     /**
-     * @var \Magento\Core\Model\Config\Primary
+     * @var \Magento\App\Route\Config
      */
-    protected $_primaryConfig;
-
-    /**
-     * @var \Magento\App\RouterList
-     */
-    protected $_routerList;
-
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
+    protected $_routeConfig;
 
     /**
      * @var \Magento\Core\Model\App
@@ -73,34 +60,36 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     protected $_frontNameResolver;
 
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
     /**
      * @param \Magento\Core\Helper\Context $context
-     * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Model\Config\Primary $primaryConfig
-     * @param \Magento\App\RouterList $routerList
-     * @param \Magento\Core\Model\App $app
+     * @param \Magento\App\Route\Config $routeConfig
+     * @param \Magento\Core\Model\AppInterface $app
      * @param \Magento\Backend\Model\Url $backendUrl
      * @param \Magento\Backend\Model\Auth $auth
      * @param \Magento\Backend\App\Area\FrontNameResolver $frontNameResolver
+     * @param \Magento\Math\Random $mathRandom
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
-        \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Model\Config\Primary $primaryConfig,
-        \Magento\App\RouterList $routerList,
-        \Magento\Core\Model\App $app,
+        \Magento\App\Route\Config $routeConfig,
+        \Magento\Core\Model\AppInterface $app,
         \Magento\Backend\Model\Url $backendUrl,
         \Magento\Backend\Model\Auth $auth,
-        \Magento\Backend\App\Area\FrontNameResolver $frontNameResolver
+        \Magento\Backend\App\Area\FrontNameResolver $frontNameResolver,
+        \Magento\Math\Random $mathRandom
     ) {
         parent::__construct($context);
-        $this->_coreData = $coreData;
-        $this->_primaryConfig = $primaryConfig;
-        $this->_routerList = $routerList;
+        $this->_routeConfig = $routeConfig;
         $this->_app = $app;
         $this->_backendUrl = $backendUrl;
         $this->_auth = $auth;
         $this->_frontNameResolver = $frontNameResolver;
+        $this->mathRandom = $mathRandom;
     }
 
     public function getPageHelpUrl()
@@ -117,10 +106,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
             $request = $this->_app->getRequest();
             $frontModule = $request->getControllerModule();
             if (!$frontModule) {
-                $frontName = $request->getModuleName();
-                $router = $this->_routerList->getRouterByFrontName($frontName);
-
-                $frontModule = $router->getModulesByFrontName($frontName);
+                $frontModule = $this->_routeConfig->getModulesByFrontName($request->getModuleName());
                 if (empty($frontModule) === false) {
                     $frontModule = $frontModule[0];
                 } else {
@@ -191,7 +177,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function generateResetPasswordLinkToken()
     {
-        return $this->_coreData->uniqHash();
+        return $this->mathRandom->getUniqueHash();
     }
 
     /**
@@ -204,16 +190,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         return $this->_backendUrl->getRouteUrl('adminhtml');
     }
 
-    /**
-     * Return Backend area code
-     *
-     * @return string
-     */
-    public function getAreaCode()
-    {
-        return self::BACKEND_AREA_CODE;
-    }
-
     /**
      * Return Backend area front name
      *
diff --git a/app/code/Magento/Backend/Model/Auth/Session.php b/app/code/Magento/Backend/Model/Auth/Session.php
index 2c977a61c38..0965978eb67 100644
--- a/app/code/Magento/Backend/Model/Auth/Session.php
+++ b/app/code/Magento/Backend/Model/Auth/Session.php
@@ -52,20 +52,20 @@ class Session
     protected $_aclBuilder;
 
     /**
-     * @var \Magento\Backend\Model\Url\Proxy
+     * @var \Magento\Backend\Model\Url
      */
     protected $_backendUrl;
 
     /**
      * @param \Magento\Core\Model\Session\Context $context
      * @param \Magento\Acl\Builder $aclBuilder
-     * @param \Magento\Backend\Model\Url\Proxy $backendUrl
+     * @param \Magento\Backend\Model\Url $backendUrl
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Model\Session\Context $context,
         \Magento\Acl\Builder $aclBuilder,
-        \Magento\Backend\Model\Url\Proxy $backendUrl,
+        \Magento\Backend\Model\Url $backendUrl,
         array $data = array()
     ) {
         $this->_aclBuilder = $aclBuilder;
diff --git a/app/code/Magento/Backend/Model/Config/Backend/Currency/AbstractCurrency.php b/app/code/Magento/Backend/Model/Config/Backend/Currency/AbstractCurrency.php
index f6e46f13921..f446a33e46d 100644
--- a/app/code/Magento/Backend/Model/Config/Backend/Currency/AbstractCurrency.php
+++ b/app/code/Magento/Backend/Model/Config/Backend/Currency/AbstractCurrency.php
@@ -88,7 +88,7 @@ abstract class AbstractCurrency extends \Magento\Core\Model\Config\Value
     {
         if ($this->getData('groups/options/fields/allow/inherit')) {
             return explode(
-                ',', $this->_config->getNode('currency/options/allow', $this->getScope(), $this->getScopeId())
+                ',', (string) $this->_config->getValue('currency/options/allow', $this->getScope(), $this->getScopeId())
             );
         }
         return $this->getData('groups/options/fields/allow/value');
diff --git a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php
index 0b3ff65473d..d2a2f9ad9f8 100644
--- a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php
+++ b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php
@@ -32,46 +32,53 @@ class Encrypted
     implements \Magento\Core\Model\Config\Data\BackendModelInterface
 {
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Encryption\EncryptorInterface
      */
-    protected $_coreData = null;
+    protected $_encryptor;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Config $config
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Config $config,
+        \Magento\Encryption\EncryptorInterface $encryptor,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
+        $this->_encryptor = $encryptor;
         parent::__construct($context, $registry, $storeManager, $config, $resource, $resourceCollection, $data);
     }
 
+    /**
+     * Magic method called during class serialization
+     *
+     * @return array
+     */
     public function __sleep()
     {
         $properties = parent::__sleep();
-        return array_diff($properties, array('_coreData'));
+        return array_diff($properties, array('_encryptor'));
     }
 
+    /**
+     * Magic method called during class un-serialization
+     */
     public function __wakeup()
     {
         parent::__wakeup();
-        $this->_coreData = \Magento\Core\Model\ObjectManager::getInstance()->get('Magento\Core\Helper\Data');
+        $this->_encryptor = \Magento\App\ObjectManager::getInstance()
+            ->get('Magento\Encryption\EncryptorInterface');
     }
 
     /**
@@ -81,7 +88,7 @@ class Encrypted
     protected function _afterLoad()
     {
         $value = (string)$this->getValue();
-        if (!empty($value) && ($decrypted = $this->_coreData->decrypt($value))) {
+        if (!empty($value) && ($decrypted = $this->_encryptor->decrypt($value))) {
             $this->setValue($decrypted);
         }
     }
@@ -97,8 +104,11 @@ class Encrypted
         if (preg_match('/^\*+$/', $this->getValue())) {
             $value = $this->getOldValue();
         }
-        if (!empty($value) && ($encrypted = $this->_coreData->encrypt($value))) {
-            $this->setValue($encrypted);
+        if (!empty($value)) {
+            $encrypted = $this->_encryptor->encrypt($value);
+            if ($encrypted) {
+                $this->setValue($encrypted);
+            }
         }
     }
 
@@ -110,6 +120,6 @@ class Encrypted
      */
     public function processValue($value)
     {
-        return $this->_coreData->decrypt($value);
+        return $this->_encryptor->decrypt($value);
     }
 }
diff --git a/app/code/Magento/Backend/Model/Config/Backend/Log/Cron.php b/app/code/Magento/Backend/Model/Config/Backend/Log/Cron.php
index b580ad9d6bc..17d86acf504 100644
--- a/app/code/Magento/Backend/Model/Config/Backend/Log/Cron.php
+++ b/app/code/Magento/Backend/Model/Config/Backend/Log/Cron.php
@@ -39,6 +39,11 @@ class Cron extends \Magento\Core\Model\Config\Value
      */
     protected $_configValueFactory;
 
+    /**
+     * @var string
+     */
+    protected $_runModelPath = '';
+
     /**
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -47,6 +52,7 @@ class Cron extends \Magento\Core\Model\Config\Value
      * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
+     * @param string $runModelPath
      * @param array $data
      */
     public function __construct(
@@ -57,9 +63,11 @@ class Cron extends \Magento\Core\Model\Config\Value
         \Magento\Core\Model\Config\ValueFactory $configValueFactory,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
+        $runModelPath = '',
         array $data = array()
     ) {
         $this->_configValueFactory = $configValueFactory;
+        $this->_runModelPath = $runModelPath;
         parent::__construct($context, $registry, $storeManager, $config, $resource, $resourceCollection, $data);
     }
 
@@ -73,7 +81,7 @@ class Cron extends \Magento\Core\Model\Config\Value
     {
         $enabled    = $this->getData('groups/log/fields/enabled/value');
         $time       = $this->getData('groups/log/fields/time/value');
-        $frequncy   = $this->getData('groups/log/fields/frequency/value');
+        $frequency   = $this->getData('groups/log/fields/frequency/value');
 
         $frequencyWeekly    = \Magento\Cron\Model\Config\Source\Frequency::CRON_WEEKLY;
         $frequencyMonthly   = \Magento\Cron\Model\Config\Source\Frequency::CRON_MONTHLY;
@@ -82,9 +90,9 @@ class Cron extends \Magento\Core\Model\Config\Value
             $cronExprArray = array(
                 intval($time[1]),                                   # Minute
                 intval($time[0]),                                   # Hour
-                ($frequncy == $frequencyMonthly) ? '1' : '*',       # Day of the Month
+                ($frequency == $frequencyMonthly) ? '1' : '*',       # Day of the Month
                 '*',                                                # Month of the Year
-                ($frequncy == $frequencyWeekly) ? '1' : '*',        # Day of the Week
+                ($frequency == $frequencyWeekly) ? '1' : '*',        # Day of the Week
             );
             $cronExprString = join(' ', $cronExprArray);
         } else {
@@ -102,7 +110,7 @@ class Cron extends \Magento\Core\Model\Config\Value
             /** @var $configValue \Magento\Core\Model\Config\Value */
             $configValue = $this->_configValueFactory->create();
             $configValue->load(self::CRON_MODEL_PATH, 'path');
-            $configValue->setValue((string) $this->_config->getNode(self::CRON_MODEL_PATH))
+            $configValue->setValue($this->_runModelPath)
                 ->setPath(self::CRON_MODEL_PATH)
                 ->save();
         } catch (\Exception $e) {
diff --git a/app/code/Magento/Backend/Model/Config/SchemaLocator.php b/app/code/Magento/Backend/Model/Config/SchemaLocator.php
index 8ebf4a046d6..c5b8ef2a80a 100644
--- a/app/code/Magento/Backend/Model/Config/SchemaLocator.php
+++ b/app/code/Magento/Backend/Model/Config/SchemaLocator.php
@@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Backend')
             . DIRECTORY_SEPARATOR . 'system.xsd';
diff --git a/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php b/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php
index d9bf5431f30..27c7850d7e2 100644
--- a/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php
+++ b/app/code/Magento/Backend/Model/Config/Source/Dev/Dbautoup.php
@@ -31,15 +31,15 @@ class Dbautoup implements \Magento\Core\Model\Option\ArrayInterface
     {
         return array(
             array(
-                'value'=>\Magento\Core\Model\Resource::AUTO_UPDATE_ALWAYS,
+                'value'=> \Magento\App\Resource::AUTO_UPDATE_ALWAYS,
                 'label' => __('Always (during development)')
             ),
             array(
-                'value'=>\Magento\Core\Model\Resource::AUTO_UPDATE_ONCE,
+                'value'=> \Magento\App\Resource::AUTO_UPDATE_ONCE,
                 'label' => __('Only Once (version upgrade)')
             ),
             array(
-                'value'=>\Magento\Core\Model\Resource::AUTO_UPDATE_NEVER,
+                'value'=> \Magento\App\Resource::AUTO_UPDATE_NEVER,
                 'label' => __('Never (production)')
             ),
         );
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 811b888c7c2..e4caafea2c7 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,14 +32,14 @@ namespace Magento\Backend\Model\Config\Source\Storage\Media;
 class Database implements \Magento\Core\Model\Option\ArrayInterface
 {
     /**
-     * @var \Magento\Core\Model\Config\Local
+     * @var \Magento\App\Config
      */
     protected $_config;
 
     /**
-     * @param \Magento\Core\Model\Config\Local
+     * @param \Magento\App\Config
      */
-    public function __construct(\Magento\Core\Model\Config\Local $config)
+    public function __construct(\Magento\App\Config $config)
     {
         $this->_config = $config;
     }
diff --git a/app/code/Magento/Backend/Model/Config/Structure.php b/app/code/Magento/Backend/Model/Config/Structure.php
index a3ccd63d1b0..84754115991 100644
--- a/app/code/Magento/Backend/Model/Config/Structure.php
+++ b/app/code/Magento/Backend/Model/Config/Structure.php
@@ -96,12 +96,14 @@ class Structure implements \Magento\Backend\Model\Config\Structure\SearchInterfa
      */
     public function getTabs()
     {
-        foreach ($this->_data['sections'] as $sectionId => $section) {
-            if (isset($section['tab']) && $section['tab']) {
-                $this->_data['tabs'][$section['tab']]['children'][$sectionId] = $section;
+        if (isset($this->_data['sections'])) {
+            foreach ($this->_data['sections'] as $sectionId => $section) {
+                if (isset($section['tab']) && $section['tab']) {
+                    $this->_data['tabs'][$section['tab']]['children'][$sectionId] = $section;
+                }
             }
+            $this->_tabIterator->setElements($this->_data['tabs'], $this->_scopeDefiner->getScope());
         }
-        $this->_tabIterator->setElements($this->_data['tabs'], $this->_scopeDefiner->getScope());
         return $this->_tabIterator;
     }
 
diff --git a/app/code/Magento/Adminhtml/Model/Email/Template.php b/app/code/Magento/Backend/Model/Email/Template.php
similarity index 98%
rename from app/code/Magento/Adminhtml/Model/Email/Template.php
rename to app/code/Magento/Backend/Model/Email/Template.php
index f192355359c..43b284bf4ac 100644
--- a/app/code/Magento/Adminhtml/Model/Email/Template.php
+++ b/app/code/Magento/Backend/Model/Email/Template.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml email template model
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Backend
  * @author     Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Model\Email;
+namespace Magento\Backend\Model\Email;
 
 class Template extends \Magento\Core\Model\Email\Template
 {
diff --git a/app/code/Magento/Backend/Model/Locale.php b/app/code/Magento/Backend/Model/Locale.php
index c96f676f0d4..d7c4bebf953 100644
--- a/app/code/Magento/Backend/Model/Locale.php
+++ b/app/code/Magento/Backend/Model/Locale.php
@@ -65,6 +65,7 @@ class Locale extends \Magento\Core\Model\Locale
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale\Config $config
      * @param \Magento\Core\Model\App $app
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param string $locale
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -81,6 +82,7 @@ class Locale extends \Magento\Core\Model\Locale
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale\Config $config,
         \Magento\Core\Model\App $app,
+        \Magento\Stdlib\DateTime $dateTime,
         $locale = null
     ) {
         $this->_session = $session;
@@ -88,7 +90,15 @@ class Locale extends \Magento\Core\Model\Locale
         $this->_request = $request;
         $this->_localeValidator = $localeValidator;
         parent::__construct(
-            $eventManager, $translate, $coreStoreConfig, $appState, $storeManager, $config, $app, $locale
+            $eventManager,
+            $translate,
+            $coreStoreConfig,
+            $appState,
+            $storeManager,
+            $config,
+            $app,
+            $dateTime,
+            $locale
         );
     }
 
diff --git a/app/code/Magento/Backend/Model/Locale/Manager.php b/app/code/Magento/Backend/Model/Locale/Manager.php
index d6e5046604d..f480384d9bb 100644
--- a/app/code/Magento/Backend/Model/Locale/Manager.php
+++ b/app/code/Magento/Backend/Model/Locale/Manager.php
@@ -81,7 +81,7 @@ class Manager
             ->setInterfaceLocale($localeCode);
 
         $this->_translator->setLocale($localeCode)
-            ->init(\Magento\Backend\Helper\Data::BACKEND_AREA_CODE, true);
+            ->init(null, true);
 
         return $this;
     }
diff --git a/app/code/Magento/Backend/Model/Menu.php b/app/code/Magento/Backend/Model/Menu.php
index 26b814ef39e..318cad6176f 100644
--- a/app/code/Magento/Backend/Model/Menu.php
+++ b/app/code/Magento/Backend/Model/Menu.php
@@ -44,15 +44,15 @@ class Menu extends \ArrayObject
     protected $_path = '';
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param string $pathInMenuStructure
      */
-    public function __construct(\Magento\Core\Model\Logger $logger, $pathInMenuStructure = '')
+    public function __construct(\Magento\Logger $logger, $pathInMenuStructure = '')
     {
         if ($pathInMenuStructure) {
             $this->_path = $pathInMenuStructure . '/';
diff --git a/app/code/Magento/Backend/Model/Menu/AbstractDirector.php b/app/code/Magento/Backend/Model/Menu/AbstractDirector.php
index 211037baac0..d7d5412ef74 100644
--- a/app/code/Magento/Backend/Model/Menu/AbstractDirector.php
+++ b/app/code/Magento/Backend/Model/Menu/AbstractDirector.php
@@ -46,9 +46,9 @@ abstract class AbstractDirector
      *
      * @param array $config
      * @param \Magento\Backend\Model\Menu\Builder $builder
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */
     abstract public function direct(
-        array $config, \Magento\Backend\Model\Menu\Builder $builder, \Magento\Core\Model\Logger $logger
+        array $config, \Magento\Backend\Model\Menu\Builder $builder, \Magento\Logger $logger
     );
 }
diff --git a/app/code/Magento/Backend/Model/Menu/Config.php b/app/code/Magento/Backend/Model/Menu/Config.php
index 84afc92fa39..1effb7cfc2c 100644
--- a/app/code/Magento/Backend/Model/Menu/Config.php
+++ b/app/code/Magento/Backend/Model/Menu/Config.php
@@ -52,7 +52,7 @@ class Config
     protected $_menu;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -71,6 +71,11 @@ class Config
      */
     protected $_director;
 
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
     /**
      * @param \Magento\Backend\Model\Menu\Builder $menuBuilder
      * @param \Magento\Backend\Model\Menu\AbstractDirector $menuDirector
@@ -78,8 +83,9 @@ class Config
      * @param \Magento\Backend\Model\Menu\Config\Reader $configReader
      * @param \Magento\Core\Model\Cache\Type\Config $configCacheType
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\App\State $appState
      */
     public function __construct(
         \Magento\Backend\Model\Menu\Builder $menuBuilder,
@@ -88,8 +94,9 @@ class Config
         \Magento\Backend\Model\Menu\Config\Reader $configReader,
         \Magento\Core\Model\Cache\Type\Config $configCacheType,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\StoreManagerInterface $storeManager
+        \Magento\Logger $logger,
+        \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\App\State $appState
     ) {
         $this->_menuBuilder = $menuBuilder;
         $this->_director = $menuDirector;
@@ -99,18 +106,24 @@ class Config
         $this->_menuFactory = $menuFactory;
         $this->_configReader = $configReader;
         $this->_storeManager = $storeManager;
+        $this->_appState = $appState;
     }
 
     /**
      * Build menu model from config
      *
      * @return \Magento\Backend\Model\Menu
-     * @throws \InvalidArgumentException|BadMethodCallException|OutOfRangeException|Exception
+     * @throws \Exception|\InvalidArgumentException
+     * @throws \Exception
+     * @throws \BadMethodCallException|\Exception
+     * @throws \Exception|\OutOfRangeException
      */
     public function getMenu()
     {
-        $store = $this->_storeManager->getStore();
-        $this->_logger->addStoreLog(\Magento\Backend\Model\Menu::LOGGER_KEY, $store);
+        if ($this->_storeManager->getStore()->getConfig('dev/log/active')) {
+            $this->_logger->addStreamLog(\Magento\Backend\Model\Menu::LOGGER_KEY);
+        }
+
         try {
             $this->_initMenu();
             return $this->_menu;
@@ -145,7 +158,7 @@ class Config
             }
 
             $this->_director->direct(
-                $this->_configReader->read(\Magento\Core\Model\App\Area::AREA_ADMINHTML),
+                $this->_configReader->read($this->_appState->getAreaCode()),
                 $this->_menuBuilder,
                 $this->_logger
             );
diff --git a/app/code/Magento/Backend/Model/Menu/Config/SchemaLocator.php b/app/code/Magento/Backend/Model/Menu/Config/SchemaLocator.php
index 6124ed2109b..11236d78ae4 100644
--- a/app/code/Magento/Backend/Model/Menu/Config/SchemaLocator.php
+++ b/app/code/Magento/Backend/Model/Menu/Config/SchemaLocator.php
@@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Backend') . DIRECTORY_SEPARATOR . 'menu.xsd';
     }
diff --git a/app/code/Magento/Backend/Model/Menu/Director/Director.php b/app/code/Magento/Backend/Model/Menu/Director/Director.php
index 5cb56deee25..17a84f36d33 100644
--- a/app/code/Magento/Backend/Model/Menu/Director/Director.php
+++ b/app/code/Magento/Backend/Model/Menu/Director/Director.php
@@ -39,7 +39,7 @@ class Director extends \Magento\Backend\Model\Menu\AbstractDirector
      * Get command object
      *
      * @param array $data command params
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @return \Magento\Backend\Model\Menu\Builder\AbstractCommand
      */
     protected function _getCommand($data, $logger)
@@ -58,12 +58,12 @@ class Director extends \Magento\Backend\Model\Menu\AbstractDirector
      *
      * @param array $config
      * @param \Magento\Backend\Model\Menu\Builder $builder
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */
     public function direct(
         array $config,
         \Magento\Backend\Model\Menu\Builder $builder,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger
     ) {
         foreach ($config as $data) {
             $builder->processCommand($this->_getCommand($data, $logger));
diff --git a/app/code/Magento/Backend/Model/Menu/Item.php b/app/code/Magento/Backend/Model/Menu/Item.php
index 17a3dcbf226..bade2870d2e 100644
--- a/app/code/Magento/Backend/Model/Menu/Item.php
+++ b/app/code/Magento/Backend/Model/Menu/Item.php
@@ -161,7 +161,7 @@ class Item
     /**
      * Module list
      *
-     * @var \Magento\App\ModuleListInterface
+     * @var \Magento\Module\ModuleListInterface
      */
     protected $_moduleList;
 
@@ -172,7 +172,7 @@ class Item
      * @param \Magento\Backend\Model\MenuFactory $menuFactory
      * @param \Magento\Backend\Model\Url $urlModel
      * @param \Magento\Core\Helper\AbstractHelper $helper
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\Module\ModuleListInterface $moduleList
      * @param array $data
      */
     public function __construct(
@@ -182,7 +182,7 @@ class Item
         \Magento\Backend\Model\MenuFactory $menuFactory,
         \Magento\Backend\Model\Url $urlModel,
         \Magento\Core\Helper\AbstractHelper $helper,
-        \Magento\App\ModuleListInterface $moduleList,
+        \Magento\Module\ModuleListInterface $moduleList,
         array $data = array()
     ) {
         $this->_validator = $validator;
@@ -492,14 +492,14 @@ class Item
 
     public function __wakeup()
     {
-        $objectManager = \Magento\Core\Model\ObjectManager::getInstance();
+        $objectManager = \Magento\App\ObjectManager::getInstance();
         $this->_moduleHelper = $objectManager->get($this->_moduleHelperName);
         $this->_validator = $objectManager->get('Magento\Backend\Model\Menu\Item\Validator');
         $this->_acl = $objectManager->get('Magento\AuthorizationInterface');
         $this->_storeConfig = $objectManager->get('Magento\Core\Model\Store\Config');
         $this->_menuFactory = $objectManager->get('Magento\Backend\Model\MenuFactory');
         $this->_urlModel = $objectManager->get('Magento\Backend\Model\Url');
-        $this->_moduleList = $objectManager->get('Magento\App\ModuleListInterface');
+        $this->_moduleList = $objectManager->get('Magento\Module\ModuleListInterface');
         if ($this->_serializedSubmenu) {
             $this->_submenu = $this->_menuFactory->create();
             $this->_submenu->unserialize($this->_serializedSubmenu);
diff --git a/app/code/Magento/Backend/Model/Url.php b/app/code/Magento/Backend/Model/Url.php
index 20242b6159f..f55622f52b0 100644
--- a/app/code/Magento/Backend/Model/Url.php
+++ b/app/code/Magento/Backend/Model/Url.php
@@ -23,7 +23,6 @@
  * @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\Model;
 
 use Magento\Backend\Model\Auth;
@@ -60,6 +59,7 @@ class Url extends \Magento\Core\Model\Url
 
     /**
      * Startup page url from config
+     *
      * @var string
      */
     protected $_startupMenuItemId;
@@ -69,11 +69,6 @@ class Url extends \Magento\Core\Model\Url
      */
     protected $_backendHelper;
 
-    /**
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreHelper;
-
     /**
      * @var \Magento\Core\Model\Session
      */
@@ -87,42 +82,52 @@ class Url extends \Magento\Core\Model\Url
     protected $_menuConfig;
 
     /**
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cache;
 
     /**
-     * @param \Magento\App\RouterListInterface $routerList
+     * @var \Magento\Encryption\EncryptorInterface
+     */
+    protected $_encryptor;
+
+    /**
+     * @param \Magento\App\Route\ConfigInterface $routeConfig
      * @param \Magento\App\RequestInterface $request
      * @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 $session
      * @param Menu\Config $menuConfig
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\App $app
      * @param \Magento\Core\Model\StoreManager $storeManager
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param Auth\Session $authSession
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
+     * @param null $areaCode
      * @param array $data
      */
     public function __construct(
-        \Magento\App\RouterListInterface $routerList,
+        \Magento\App\Route\ConfigInterface $routeConfig,
         \Magento\App\RequestInterface $request,
         \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Backend\Helper\Data $backendHelper,
         \Magento\Core\Model\Session $session,
         \Magento\Backend\Model\Menu\Config $menuConfig,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\App $app,
         \Magento\Core\Model\StoreManager $storeManager,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Backend\Model\Auth\Session $authSession,
+        \Magento\Encryption\EncryptorInterface $encryptor,
+        $areaCode = null,
         array $data = array()
     ) {
+        $this->_encryptor = $encryptor;
         parent::__construct(
-            $routerList, $request, $securityInfo, $coreStoreConfig, $coreData, $app, $storeManager, $session, $data);
+            $routeConfig, $request, $securityInfo, $coreStoreConfig,
+            $app, $storeManager, $session, $areaCode, $data
+        );
         $this->_startupMenuItemId = $coreStoreConfig->getConfig(self::XML_PATH_STARTUP_MENU_ITEM);
         $this->_backendHelper = $backendHelper;
         $this->_coreSession = $session;
@@ -151,7 +156,7 @@ class Url extends \Magento\Core\Model\Url
      * @param bool $unsetOldParams
      * @return \Magento\Backend\Model\Url
      */
-    public function setRouteParams(array $data, $unsetOldParams=true)
+    public function setRouteParams(array $data, $unsetOldParams = true)
     {
         if (isset($data['_nosecret'])) {
             $this->setNoSecret(true);
@@ -159,7 +164,6 @@ class Url extends \Magento\Core\Model\Url
         } else {
             $this->setNoSecret(false);
         }
-
         return parent::setRouteParams($data, $unsetOldParams);
     }
 
@@ -170,23 +174,20 @@ class Url extends \Magento\Core\Model\Url
      * @param array $routeParams
      * @return string
      */
-    public function getUrl($routePath=null, $routeParams=null)
+    public function getUrl($routePath = null, $routeParams = null)
     {
         $cacheSecretKey = false;
         if (is_array($routeParams) && isset($routeParams['_cache_secret_key'])) {
             unset($routeParams['_cache_secret_key']);
             $cacheSecretKey = true;
         }
-
         $result = parent::getUrl($routePath, $routeParams);
         if (!$this->useSecretKey()) {
             return $result;
         }
-
         $routeName = $this->getRouteName('*');
         $controllerName = $this->getControllerName($this->getDefaultControllerName());
         $actionName = $this->getActionName($this->getDefaultActionName());
-
         if ($cacheSecretKey) {
             $secret = array(self::SECRET_KEY_PARAM_NAME => "\${$routeName}/{$controllerName}/{$actionName}\$");
         } else {
@@ -202,7 +203,6 @@ class Url extends \Magento\Core\Model\Url
         if (is_array($this->getRouteParams())) {
             $routeParams = array_merge($this->getRouteParams(), $routeParams);
         }
-
         return parent::getUrl("{$routeName}/{$controllerName}/{$actionName}", $routeParams);
     }
 
@@ -218,7 +218,6 @@ class Url extends \Magento\Core\Model\Url
     {
         $salt = $this->_coreSession->getFormKey();
         $request = $this->getRequest();
-
         if (!$routeName) {
             if ($request->getBeforeForwardInfo('route_name') !== null) {
                 $routeName = $request->getBeforeForwardInfo('route_name');
@@ -226,7 +225,6 @@ class Url extends \Magento\Core\Model\Url
                 $routeName = $request->getRouteName();
             }
         }
-
         if (!$controller) {
             if ($request->getBeforeForwardInfo('controller_name') !== null) {
                 $controller = $request->getBeforeForwardInfo('controller_name');
@@ -234,7 +232,6 @@ class Url extends \Magento\Core\Model\Url
                 $controller = $request->getControllerName();
             }
         }
-
         if (!$action) {
             if ($request->getBeforeForwardInfo('action_name') !== null) {
                 $action = $request->getBeforeForwardInfo('action_name');
@@ -242,9 +239,8 @@ class Url extends \Magento\Core\Model\Url
                 $action = $request->getActionName();
             }
         }
-
         $secret = $routeName . $controller . $action . $salt;
-        return $this->_coreData->getHash($secret);
+        return $this->_encryptor->getHash($secret);
     }
 
     /**
@@ -324,7 +320,6 @@ class Url extends \Magento\Core\Model\Url
             $action = '*/*/denied';
         }
         return $action;
-
     }
 
     /**
@@ -362,7 +357,6 @@ class Url extends \Magento\Core\Model\Url
         return $this->_session;
     }
 
-
     /**
      * Return backend area front name, defined in configuration
      *
@@ -373,7 +367,6 @@ class Url extends \Magento\Core\Model\Url
         if (!$this->_getData('area_front_name')) {
             $this->setData('area_front_name', $this->_backendHelper->getAreaFrontName());
         }
-
         return $this->_getData('area_front_name');
     }
 
@@ -391,7 +384,6 @@ class Url extends \Magento\Core\Model\Url
                 $path = $this->getAreaFrontName() . '/' . $path;
             }
         }
-
         return $path;
     }
 }
diff --git a/app/code/Magento/Backend/Model/Url/Proxy.php b/app/code/Magento/Backend/Model/Url/Proxy.php
deleted file mode 100644
index a12360168c3..00000000000
--- a/app/code/Magento/Backend/Model/Url/Proxy.php
+++ /dev/null
@@ -1,826 +0,0 @@
-<?php
-/**
- * Proxy class for \Magento\Backend\Model\Url
- *
- * 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_Backend
- * @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\Model\Url;
-
-/**
-* @SuppressWarnings(PHPMD.ExcessivePublicCount)
-*/
-class Proxy extends \Magento\Backend\Model\Url
-{
-    /**
-     * Object Manager instance
-     *
-     * @var \Magento\ObjectManager
-     */
-    protected $_objectManager = null;
-
-    /**
-     * @var \Magento\Backend\Model\Url
-     */
-    protected $_object;
-
-    /**
-     * Proxy constructor
-     *
-     * @param \Magento\ObjectManager $objectManager
-     */
-    public function __construct(\Magento\ObjectManager $objectManager)
-    {
-        $this->_objectManager = $objectManager;
-    }
-
-    /**
-     * Get instance
-     *
-     * @return \Magento\Backend\Model\Url
-     */
-    protected function _getObject()
-    {
-        if (null === $this->_object) {
-            $this->_object = $this->_objectManager->get('Magento\Backend\Model\Url');
-        }
-        return $this->_object;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function isSecure()
-    {
-        return $this->_getObject()->isSecure();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setRouteParams(array $data, $unsetOldParams = true)
-    {
-        return $this->_getObject()->setRouteParams($data, $unsetOldParams);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getUrl($routePath = null, $routeParams = null)
-    {
-        return $this->_getObject()->getUrl($routePath, $routeParams);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getSecretKey($routeName = null, $controller = null, $action = null)
-    {
-        return $this->_getObject()->getSecretKey($routeName, $controller, $action);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function useSecretKey()
-    {
-        return $this->_getObject()->useSecretKey();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function turnOnSecretKey()
-    {
-        return $this->_getObject()->turnOnSecretKey();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function turnOffSecretKey()
-    {
-        return $this->_getObject()->turnOffSecretKey();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function renewSecretUrls()
-    {
-        return $this->_getObject()->renewSecretUrls();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getStartupPageUrl()
-    {
-        return $this->_getObject()->getStartupPageUrl();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function findFirstAvailableMenu()
-    {
-        return $this->_getObject()->findFirstAvailableMenu();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setSession(\Magento\Backend\Model\Auth\Session $session)
-    {
-        return $this->_getObject()->setSession($session);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getAreaFrontName()
-    {
-        return $this->_getObject()->getAreaFrontName();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getActionPath()
-    {
-        return $this->_getObject()->getActionPath();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function parseUrl($url)
-    {
-        return $this->_getObject()->parseUrl($url);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getDefaultControllerName()
-    {
-        return $this->_getObject()->getDefaultControllerName();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setUseUrlCache($flag)
-    {
-        return $this->_getObject()->setUseUrlCache($flag);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setUseSession($useSession)
-    {
-        return $this->_getObject()->setUseSession($useSession);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setRouteFrontName($name)
-    {
-        return $this->_getObject()->setRouteFrontName($name);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getUseSession()
-    {
-        return $this->_getObject()->getUseSession();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getDefaultActionName()
-    {
-        return $this->_getObject()->getDefaultActionName();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getConfigData($key, $prefix = null)
-    {
-        return $this->_getObject()->getConfigData($key, $prefix);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setRequest(\Magento\App\RequestInterface $request)
-    {
-        return $this->_getObject()->setRequest($request);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getRequest()
-    {
-        return $this->_getObject()->getRequest();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getType()
-    {
-        return $this->_getObject()->getType();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setStore($params)
-    {
-        return $this->_getObject()->setStore($params);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getStore()
-    {
-        return $this->_getObject()->getStore();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getBaseUrl($params = array())
-    {
-        return $this->_getObject()->getBaseUrl($params);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setRoutePath($data)
-    {
-        return $this->_getObject()->setRoutePath($data);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getRoutePath($routeParams = array())
-    {
-        return $this->_getObject()->getRoutePath($routeParams);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setRouteName($data)
-    {
-        return $this->_getObject()->setRouteName($data);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getRouteFrontName()
-    {
-        return $this->_getObject()->getRouteFrontName();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getRouteName($default = null)
-    {
-        return $this->_getObject()->getRouteName($default);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setControllerName($data)
-    {
-        return $this->_getObject()->setControllerName($data);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getControllerName($default = null)
-    {
-        return $this->_getObject()->getControllerName($default);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setActionName($data)
-    {
-        return $this->_getObject()->setActionName($data);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getActionName($default = null)
-    {
-        return $this->_getObject()->getActionName($default);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getRouteParams()
-    {
-        return $this->_getObject()->getRouteParams();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setRouteParam($key, $data)
-    {
-        return $this->_getObject()->setRouteParam($key, $data);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getRouteParam($key)
-    {
-        return $this->_getObject()->getRouteParam($key);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getRouteUrl($routePath = null, $routeParams = null)
-    {
-        return $this->_getObject()->getRouteUrl($routePath, $routeParams);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function checkCookieDomains()
-    {
-        return $this->_getObject()->checkCookieDomains();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function addSessionParam()
-    {
-        return $this->_getObject()->addSessionParam();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setQuery($data)
-    {
-        return $this->_getObject()->setQuery($data);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getQuery($escape = false)
-    {
-        return $this->_getObject()->getQuery($escape);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setQueryParams(array $data)
-    {
-        return $this->_getObject()->setQueryParams($data);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function purgeQueryParams()
-    {
-        return $this->_getObject()->purgeQueryParams();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getQueryParams()
-    {
-        return $this->_getObject()->getQueryParams();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setQueryParam($key, $data)
-    {
-        return $this->_getObject()->setQueryParam($key, $data);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getQueryParam($key)
-    {
-        return $this->_getObject()->getQueryParam($key);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setFragment($data)
-    {
-        return $this->_getObject()->setFragment($data);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getFragment()
-    {
-        return $this->_getObject()->getFragment();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getRebuiltUrl($url)
-    {
-        return $this->_getObject()->getRebuiltUrl($url);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function escape($value)
-    {
-        return $this->_getObject()->escape($value);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getDirectUrl($url, $params = array())
-    {
-        return $this->_getObject()->getDirectUrl($url, $params);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function sessionUrlVar($html)
-    {
-        return $this->_getObject()->sessionUrlVar($html);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function useSessionIdForUrl($secure = false)
-    {
-        return $this->_getObject()->useSessionIdForUrl($secure);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function sessionVarCallback($match)
-    {
-        return $this->_getObject()->sessionVarCallback($match);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function isOwnOriginUrl()
-    {
-        return $this->_getObject()->isOwnOriginUrl();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getRedirectUrl($url)
-    {
-        return $this->_getObject()->getRedirectUrl($url);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function isDeleted($isDeleted = null)
-    {
-        return $this->_getObject()->isDeleted($isDeleted);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function hasDataChanges()
-    {
-        return $this->_getObject()->hasDataChanges();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setIdFieldName($name)
-    {
-        return $this->_getObject()->setIdFieldName($name);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getIdFieldName()
-    {
-        return $this->_getObject()->getIdFieldName();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getId()
-    {
-        return $this->_getObject()->getId();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setId($value)
-    {
-        return $this->_getObject()->setId($value);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function addData(array $arr)
-    {
-        return $this->_getObject()->addData($arr);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setData($key, $value = null)
-    {
-        return $this->_getObject()->setData($key, $value);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function unsetData($key = null)
-    {
-        return $this->_getObject()->unsetData($key);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getData($key = '', $index = null)
-    {
-        return $this->_getObject()->getData($key, $index);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getDataByPath($path)
-    {
-        return $this->_getObject()->getDataByPath($path);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getDataByKey($key)
-    {
-        return $this->_getObject()->getDataByKey($key);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setDataUsingMethod($key, $args = array())
-    {
-        return $this->_getObject()->setDataUsingMethod($key, $args);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getDataUsingMethod($key, $args = null)
-    {
-        return $this->_getObject()->getDataUsingMethod($key, $args);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getDataSetDefault($key, $default)
-    {
-        return $this->_getObject()->getDataSetDefault($key, $default);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function hasData($key = '')
-    {
-        return $this->_getObject()->hasData($key);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function toArray(array $keys = array())
-    {
-        return $this->_getObject()->toArray($keys);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function convertToArray(array $keys = array())
-    {
-        return $this->_getObject()->convertToArray($keys);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function toXml(array $keys = array(), $rootName = 'item', $addOpenTag = false, $addCdata = true)
-    {
-        return $this->_getObject()->toXml($keys, $rootName, $addOpenTag, $addCdata);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function convertToXml(
-        array $arrAttributes = array(),
-        $rootName = 'item',
-        $addOpenTag = false,
-        $addCdata = true
-    ) {
-        return $this->_getObject()->convertToXml($arrAttributes, $rootName, $addOpenTag, $addCdata);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function toJson(array $keys = array())
-    {
-        return $this->_getObject()->toJson($keys);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function convertToJson(array $keys = array())
-    {
-        return $this->_getObject()->convertToJson($keys);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function toString($format = '')
-    {
-        return $this->_getObject()->toString($format);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function __call($method, $args)
-    {
-        return $this->_getObject()->__call($method, $args);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function isEmpty()
-    {
-        return $this->_getObject()->isEmpty();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function serialize($keys = array(), $valueSeparator = '=', $fieldSeparator = ' ', $quote = '"')
-    {
-        return $this->_getObject()->serialize($keys, $valueSeparator, $fieldSeparator, $quote);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setOrigData($key = null, $data = null)
-    {
-        return $this->_getObject()->setOrigData($key, $data);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getOrigData($key = null)
-    {
-        return $this->_getObject()->getOrigData($key);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function dataHasChangedFor($field)
-    {
-        return $this->_getObject()->dataHasChangedFor($field);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function setDataChanges($value)
-    {
-        return $this->_getObject()->setDataChanges($value);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function debug($data = null, &$objects = array())
-    {
-        return $this->_getObject()->debug($data, $objects);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function offsetSet($offset, $value)
-    {
-        $this->_getObject()->offsetSet($offset, $value);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function offsetExists($offset)
-    {
-        return $this->_getObject()->offsetExists($offset);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function offsetUnset($offset)
-    {
-        $this->_getObject()->offsetUnset($offset);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function offsetGet($offset)
-    {
-        return $this->_getObject()->offsetGet($offset);
-    }
-}
diff --git a/app/code/Magento/Backend/etc/adminhtml/di.xml b/app/code/Magento/Backend/etc/adminhtml/di.xml
index 714ade4dfff..ab4b298d5a8 100644
--- a/app/code/Magento/Backend/etc/adminhtml/di.xml
+++ b/app/code/Magento/Backend/etc/adminhtml/di.xml
@@ -27,11 +27,18 @@
     <preference for="Magento\Authorization\Policy" type="Magento\Authorization\Policy\Acl" />
     <preference for="Magento\Authorization\RoleLocator" type="Magento\Backend\Model\Authorization\RoleLocator" />
     <preference for="Magento\Core\Model\LocaleInterface" type="Magento\Backend\Model\Locale" />
+    <preference for="Magento\Core\Controller\Varien\Action\Context" type="Magento\Backend\Controller\Context" />
     <preference for="Magento\UrlInterface" type="Magento\Backend\Model\Url" />
     <preference for="Magento\Backend\Model\Auth\StorageInterface" type="Magento\Backend\Model\Auth\Session" />
     <preference for="Magento\Backend\Model\Config\Structure\SearchInterface" type="Magento\Backend\Model\Config\Structure" />
     <preference for="Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface" type="Magento\Backend\Model\Config\Backend\File\RequestData" />
-    <preference for="Magento\Acl\Resource\ProviderInterface" type="Magento\Acl\Resource\Provider"/>
+    <preference for="Magento\Acl\Resource\ProviderInterface" type="Magento\Acl\Resource\Provider" />
+    <preference for="Magento\App\DefaultPathInterface" type="Magento\Backend\App\DefaultPath" />
+    <type name="Magento\Backend\Model\Auth\Session">
+        <param name="backendUrl">
+            <instance type="Magento\Backend\Model\Url\Proxy" />
+        </param>
+    </type>
     <type name="Magento\Acl\Resource\Config\Reader\Filesystem">
         <param name="converter">
             <instance type="Magento\Acl\Resource\Config\Converter\Dom"/>
@@ -101,4 +108,20 @@
             <value>adminhtml</value>
         </param>
     </type>
+    <type name="Magento\App\RouterList">
+        <param name="routerList">
+            <value>
+                <admin>
+                    <instance>Magento\Backend\App\Router\DefaultRouter</instance>
+                    <disable type="bool">false</disable>
+                    <sortOrder>10</sortOrder>
+                </admin>
+                <default>
+                    <instance>Magento\App\Router\DefaultRouter</instance>
+                    <disable type="bool">false</disable>
+                    <sortOrder>100</sortOrder>
+                </default>
+            </value>
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Backend/etc/adminhtml/menu.xml b/app/code/Magento/Backend/etc/adminhtml/menu.xml
new file mode 100644
index 00000000000..126f3323af4
--- /dev/null
+++ b/app/code/Magento/Backend/etc/adminhtml/menu.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Magento
+ * @package     Magento_Backend
+ * @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>
+    <menu>
+        <add id="Magento_Adminhtml::system_design_schedule" title="Schedule" module="Magento_Adminhtml" sortOrder="30" parent="Magento_Adminhtml::system_design" action="adminhtml/system_design" resource="Magento_Adminhtml::schedule"/>
+        <add id="Magento_Adminhtml::system_currency" title="Currency" module="Magento_Adminhtml" sortOrder="30" parent="Magento_Adminhtml::stores" action="adminhtml/system_currency" resource="Magento_CurrencySymbol::system_currency"/>
+        <add id="Magento_Adminhtml::system_email_template" title="Email Templates" module="Magento_Adminhtml" sortOrder="10" parent="Magento_Adminhtml::marketing_communications" action="adminhtml/system_email_template" resource="Magento_Adminhtml::email_template"/>
+        <add id="Magento_Adminhtml::system_variable" title="Custom Variables" module="Magento_Adminhtml" sortOrder="20" parent="Magento_Adminhtml::system_other_settings" action="adminhtml/system_variable" resource="Magento_Adminhtml::variable"/>
+        <add id="Magento_Adminhtml::system_store" title="All Stores" module="Magento_Core" sortOrder="10" parent="Magento_Adminhtml::stores_settings" action="adminhtml/system_store/" resource="Magento_Adminhtml::store"/>
+        <add id="Magento_Adminhtml::system_config" title="Configuration" module="Magento_Adminhtml" sortOrder="20" parent="Magento_Adminhtml::stores_settings" action="adminhtml/system_config" resource="Magento_Adminhtml::config"/>
+    </menu>
+</config>
diff --git a/app/code/Magento/Backend/etc/adminhtml/system.xml b/app/code/Magento/Backend/etc/adminhtml/system.xml
index a0a9149973e..ad993575d84 100644
--- a/app/code/Magento/Backend/etc/adminhtml/system.xml
+++ b/app/code/Magento/Backend/etc/adminhtml/system.xml
@@ -223,12 +223,12 @@
                 <field id="file" translate="label comment" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>System Log File Name</label>
                     <backend_model>Magento\Backend\Model\Config\Backend\Filename</backend_model>
-                    <comment>Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log</comment>
+                    <comment>Logging from \Magento\Logger. File is located in {{base_dir}}/var/log</comment>
                 </field>
                 <field id="exception_file" translate="label comment" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Exceptions Log File Name</label>
                     <backend_model>Magento\Backend\Model\Config\Backend\Filename</backend_model>
-                    <comment>Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log</comment>
+                    <comment>Logging from \Magento\Logger. File is located in {{base_dir}}/var/log</comment>
                 </field>
             </group>
             <group id="js" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
diff --git a/app/code/Magento/Backend/etc/di.xml b/app/code/Magento/Backend/etc/di.xml
index dc0a768235b..d29d52fcbcd 100644
--- a/app/code/Magento/Backend/etc/di.xml
+++ b/app/code/Magento/Backend/etc/di.xml
@@ -31,6 +31,7 @@
             <value>
                 <adminhtml>
                     <frontNameResolver>Magento\Backend\App\Area\FrontNameResolver</frontNameResolver>
+                    <router>admin</router>
                 </adminhtml>
             </value>
         </param>
@@ -40,22 +41,10 @@
             <instance type="Magento\Core\Model\Translate\Proxy" />
         </param>
     </type>
-    <type name="Magento\Backend\Controller\Router\DefaultRouter">
-        <param name="controllerFactory">
-            <instance type="Magento\Backend\Controller\Factory" />
-        </param>
-        <param name="areaCode">
-            <value>adminhtml</value>
-        </param>
-        <param name="baseController">
-            <value>Magento\Backend\Controller\AbstractAction</value>
-        </param>
+    <type name="Magento\Backend\App\Router\DefaultRouter">
         <param name="routerId">
             <value>admin</value>
         </param>
-        <param name="defaultRouteId">
-            <value>adminhtml</value>
-        </param>
     </type>
     <type name="Magento\Backend\Controller\Adminhtml\System\Config\Save">
         <param name="cache">
@@ -65,26 +54,12 @@
     <type name="Magento\Backend\Model\Menu\Config">
         <param name="menuDirector"><instance type="Magento\Backend\Model\Menu\Director\Director"/></param>
     </type>
-    <type name="Magento\App\RouterList">
-        <param name="routerList">
-            <value>
-                <admin>
-                    <instance>Magento\Backend\Controller\Router\DefaultRouter</instance>
-                    <disable type="bool">false</disable>
-                    <sortOrder>10</sortOrder>
-                </admin>
-            </value>
-        </param>
-    </type>
     <type name="Magento\Backend\App\Area\FrontNameResolver">
         <param name="defaultFrontName">
             <value type="argument">Magento\Backend\App\Area\FrontNameResolver::PARAM_BACKEND_FRONT_NAME</value>
         </param>
     </type>
     <type name="Magento\Backend\Helper\Data">
-        <param name="app">
-            <instance type="Magento\Core\Model\AppInterface" />
-        </param>
         <param name="backendUrl">
             <instance type="Magento\Backend\Model\Url\Proxy" />
         </param>
@@ -111,10 +86,36 @@
         <param name="authSession">
             <instance type="Magento\Backend\Model\Auth\Session\Proxy" />
         </param>
+        <param name="areaCode">
+            <value>adminhtml</value>
+        </param>
+    </type>
+    <type name="Magento\Core\Model\Url">
+        <param name="areaCode">
+            <value>frontend</value>
+        </param>
     </type>
     <type name="Magento\Backend\Helper\Dashboard\Data">
         <param name="installDate">
             <value type="argument">Magento\App\State::PARAM_INSTALL_DATE</value>
         </param>
     </type>
+    <type name="Magento\Backend\Controller\Adminhtml\Index">
+        <param name="searchModules">
+            <value>
+                <products>
+                    <class>Magento\Adminhtml\Model\Search\Catalog</class>
+                    <acl>Magento_Catalog::catalog</acl>
+                </products>
+                <customers>
+                    <class>Magento\Adminhtml\Model\Search\Customer</class>
+                    <acl>Magento_Customer::customer</acl>
+                </customers>
+                <sales>
+                    <class>Magento\Adminhtml\Model\Search\Order</class>
+                    <acl>Magento_Sales::sales</acl>
+                </sales>
+            </value>
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Backend/view/adminhtml/admin/login.phtml b/app/code/Magento/Backend/view/adminhtml/admin/login.phtml
index 1ff8ecd7fc5..1c295f207b9 100644
--- a/app/code/Magento/Backend/view/adminhtml/admin/login.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/admin/login.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/admin/login_buttons.phtml b/app/code/Magento/Backend/view/adminhtml/admin/login_buttons.phtml
index c6586d097f3..963349ca5c3 100644
--- a/app/code/Magento/Backend/view/adminhtml/admin/login_buttons.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/admin/login_buttons.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/graph.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/graph.phtml
index 61439c7256d..bf2b87365a2 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/graph.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/graph.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/graph/disabled.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/graph/disabled.phtml
index b8650bb083b..76e644395d4 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/graph/disabled.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/graph/disabled.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/grid.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/grid.phtml
index d96f5489a36..be72203356e 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/grid.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/grid.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/index.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/index.phtml
index c6f41fc3817..cd89eac74d1 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/index.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/index.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/salebar.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/salebar.phtml
index 76ada03d5af..2ec69fc81f5 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/salebar.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/salebar.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/searches.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/searches.phtml
index 1eb3405169f..03a7ea8c38c 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/searches.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/searches.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/store/switcher.phtml
index 578893f6c34..9585f0d28e7 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/store/switcher.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/store/switcher.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/totalbar.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/totalbar.phtml
index 647a23c79f9..fc3f2b27293 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/totalbar.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/totalbar.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_cache_index.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_cache_index.xml
index 723228f23f8..eaa1fda5499 100644
--- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_cache_index.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_cache_index.xml
@@ -28,6 +28,6 @@
     <update handle="adminhtml_cache_block"/>
     <referenceContainer name="content">
         <block class="Magento\Adminhtml\Block\Cache" name="adminhtml.cache.container"/>
-        <block class="Magento\Adminhtml\Block\Cache\Additional" name="cache.additional" template="system/cache/additional.phtml"/>
+        <block class="Magento\Adminhtml\Block\Cache\Additional" name="cache.additional" template="Magento_Backend::system/cache/additional.phtml"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_account_index.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_account_index.xml
similarity index 91%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_account_index.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_account_index.xml
index bf2e43f899c..6cd7c77ef01 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_account_index.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_account_index.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\System\Account\Edit" name="adminhtml.system.account.edit"/>
+        <block class="Magento\Backend\Block\System\Account\Edit" name="adminhtml.system.account.edit"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_backup_block.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_backup_block.xml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_backup_block.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_backup_block.xml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_backup_grid.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_backup_grid.xml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_backup_grid.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_backup_grid.xml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_backup_index.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_backup_index.xml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_backup_index.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_backup_index.xml
diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml
index 180d7d7390e..0c1c259cc62 100644
--- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml
@@ -32,9 +32,9 @@
         </block>
     </referenceBlock>
     <referenceContainer name="js">
-        <block class="Magento\Adminhtml\Block\System\Shipping\Ups" template="Magento_Adminhtml::system/shipping/ups.phtml"/>
-        <block class="Magento\Backend\Block\Template" template="system/config/js.phtml"/>
-        <block class="Magento\Backend\Block\Template" template="Magento_Adminhtml::system/shipping/applicable_country.phtml"/>
+        <block class="Magento\Backend\Block\System\Shipping\Ups" template="Magento_Backend::system/shipping/ups.phtml"/>
+        <block class="Magento\Backend\Block\Template" template="Magento_Backend::system/config/js.phtml"/>
+        <block class="Magento\Backend\Block\Template" template="Magento_Backend::system/shipping/applicable_country.phtml"/>
     </referenceContainer>
     <referenceContainer name="left">
         <block class="Magento\Backend\Block\System\Config\Tabs" name="adminhtml.system.config.tabs" before="-"/>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_design_grid.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_design_grid.xml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_design_grid.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_design_grid.xml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_design_grid_block.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_design_grid_block.xml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_design_grid_block.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_design_grid_block.xml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_design_index.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_design_index.xml
similarity index 91%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_design_index.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_design_index.xml
index fa12086f758..cc04ea783bf 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_design_index.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_design_index.xml
@@ -27,6 +27,6 @@
     <update handle="formkey"/>
     <update handle="adminhtml_system_design_grid_block"/>
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\System\Design" name="adminhtml.system.design.container"/>
+        <block class="Magento\Backend\Block\System\Design" name="adminhtml.system.design.container"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_email_template_grid.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_grid.xml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_email_template_grid.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_grid.xml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_email_template_grid_block.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_grid_block.xml
similarity index 96%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_email_template_grid_block.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_grid_block.xml
index b7d0ddb3322..66fe5a010da 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_email_template_grid_block.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_grid_block.xml
@@ -83,8 +83,8 @@
                     <arguments>
                         <argument name="header" xsi:type="string" translate="true">Template Type</argument>
                         <argument name="index" xsi:type="string">template_type</argument>
-                        <argument name="filter" xsi:type="string">Magento\Adminhtml\Block\System\Email\Template\Grid\Filter\Type</argument>
-                        <argument name="renderer" xsi:type="string">Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer\Type</argument>
+                        <argument name="filter" xsi:type="string">Magento\Backend\Block\System\Email\Template\Grid\Filter\Type</argument>
+                        <argument name="renderer" xsi:type="string">Magento\Backend\Block\System\Email\Template\Grid\Renderer\Type</argument>
                     </arguments>
                 </block>
                 <block class="Magento\Backend\Block\Widget\Grid\Column" as="action">
@@ -94,7 +94,7 @@
                         <argument name="sortable" xsi:type="string">0</argument>
                         <argument name="filter" xsi:type="string">0</argument>
                         <argument name="width" xsi:type="string">100px</argument>
-                        <argument name="renderer" xsi:type="string">Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer\Action</argument>
+                        <argument name="renderer" xsi:type="string">Magento\Backend\Block\System\Email\Template\Grid\Renderer\Action</argument>
                     </arguments>
                 </block>
             </block>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_email_template_index.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_index.xml
similarity index 90%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_email_template_index.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_index.xml
index 8535c616836..9fc97306f6a 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_email_template_index.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_index.xml
@@ -26,6 +26,6 @@
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <update handle="adminhtml_system_email_template_grid_block"/>
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\System\Email\Template" name="adminhtml.system.email.template.container"/>
+        <block class="Magento\Backend\Block\System\Email\Template" name="adminhtml.system.email.template.container"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/systemPreview.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_preview.xml
similarity index 85%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/systemPreview.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_preview.xml
index a41326033d5..3e8595af2df 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/systemPreview.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_preview.xml
@@ -24,7 +24,7 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Core\Block\Template" name="root" output="1" template="Magento_Adminhtml::system/email/template/preview.phtml">
-        <block class="Magento\Adminhtml\Block\System\Email\Template\Preview" name="content" as="content"/>
+    <block class="Magento\Core\Block\Template" name="root" output="1" template="Magento_Backend::system/email/template/preview.phtml">
+        <block class="Magento\Backend\Block\System\Email\Template\Preview" name="content" as="content"/>
     </block>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_store_grid_block.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_grid_block.xml
similarity index 94%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_store_grid_block.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_grid_block.xml
index b6b9e7d3686..29230801435 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_store_grid_block.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_grid_block.xml
@@ -41,7 +41,7 @@
                         <argument name="align" xsi:type="string">left</argument>
                         <argument name="index" xsi:type="string">name</argument>
                         <argument name="filter_index" xsi:type="string">main_table.name</argument>
-                        <argument name="renderer" xsi:type="string">Magento\Adminhtml\Block\System\Store\Grid\Render\Website</argument>
+                        <argument name="renderer" xsi:type="string">Magento\Backend\Block\System\Store\Grid\Render\Website</argument>
                     </arguments>
                 </block>
                 <block class="Magento\Backend\Block\Widget\Grid\Column" as="group_title">
@@ -50,7 +50,7 @@
                         <argument name="align" xsi:type="string">left</argument>
                         <argument name="index" xsi:type="string">group_title</argument>
                         <argument name="filter_index" xsi:type="string">group_table.name</argument>
-                        <argument name="renderer" xsi:type="string">Magento\Adminhtml\Block\System\Store\Grid\Render\Group</argument>
+                        <argument name="renderer" xsi:type="string">Magento\Backend\Block\System\Store\Grid\Render\Group</argument>
                     </arguments>
                 </block>
                 <block class="Magento\Backend\Block\Widget\Grid\Column" as="store_title">
@@ -59,7 +59,7 @@
                         <argument name="align" xsi:type="string">left</argument>
                         <argument name="index" xsi:type="string">store_title</argument>
                         <argument name="filter_index" xsi:type="string">store_table.name</argument>
-                        <argument name="renderer" xsi:type="string">Magento\Adminhtml\Block\System\Store\Grid\Render\Store</argument>
+                        <argument name="renderer" xsi:type="string">Magento\Backend\Block\System\Store\Grid\Render\Store</argument>
                     </arguments>
                 </block>
             </block>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_store_index.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_index.xml
similarity index 91%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_store_index.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_index.xml
index 2fcbcc237b2..5ac0e0da916 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_store_index.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_index.xml
@@ -27,6 +27,6 @@
     <update handle="formkey"/>
     <update handle="adminhtml_system_store_grid_block"/>
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\System\Store\Store" name="adminhtml.system.store.container"/>
+        <block class="Magento\Backend\Block\System\Store\Store" name="adminhtml.system.store.container"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_variable_grid_block.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_variable_grid_block.xml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_variable_grid_block.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_variable_grid_block.xml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_variable_index.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_variable_index.xml
similarity index 91%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_variable_index.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_variable_index.xml
index 53ffa9dce3c..35d0345082a 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_system_variable_index.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_variable_index.xml
@@ -26,6 +26,6 @@
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <update handle="adminhtml_system_variable_grid_block"/>
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\System\Variable" name="adminhtml.system.variable.grid.container"/>
+        <block class="Magento\Backend\Block\System\Variable" name="adminhtml.system.variable.grid.container"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Backend/view/adminhtml/menu.phtml b/app/code/Magento/Backend/view/adminhtml/menu.phtml
index 8c86cb11f07..999f15e016a 100644
--- a/app/code/Magento/Backend/view/adminhtml/menu.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/menu.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/store/switcher.phtml
index 3b078170323..8cf7b587444 100644
--- a/app/code/Magento/Backend/view/adminhtml/store/switcher.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/store/switcher.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset.phtml b/app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset.phtml
index a894c993279..d3f0cf7ca11 100644
--- a/app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset/element.phtml b/app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset/element.phtml
index fa3a8450005..de056cb824e 100644
--- a/app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset/element.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset/element.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/autocomplete.phtml b/app/code/Magento/Backend/view/adminhtml/system/autocomplete.phtml
similarity index 97%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/autocomplete.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/autocomplete.phtml
index c8812b8ddbc..45088e85dc0 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/autocomplete.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/autocomplete.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/cache/additional.phtml b/app/code/Magento/Backend/view/adminhtml/system/cache/additional.phtml
similarity index 98%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/cache/additional.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/cache/additional.phtml
index c96ac544f3a..f4ebb44d992 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/cache/additional.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/cache/additional.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/cache/edit.phtml b/app/code/Magento/Backend/view/adminhtml/system/cache/edit.phtml
similarity index 99%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/cache/edit.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/cache/edit.phtml
index 3cfe5d47586..e29662420de 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/cache/edit.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/cache/edit.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/edit.phtml b/app/code/Magento/Backend/view/adminhtml/system/config/edit.phtml
index eda5ad2b33d..7a86604835f 100644
--- a/app/code/Magento/Backend/view/adminhtml/system/config/edit.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/config/edit.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/form/field/array.phtml b/app/code/Magento/Backend/view/adminhtml/system/config/form/field/array.phtml
index f6c19c2ae8a..7be4103d396 100644
--- a/app/code/Magento/Backend/view/adminhtml/system/config/form/field/array.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/config/form/field/array.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/js.phtml b/app/code/Magento/Backend/view/adminhtml/system/config/js.phtml
index 85234baccff..32bd506bc59 100644
--- a/app/code/Magento/Backend/view/adminhtml/system/config/js.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/config/js.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/system/config/switcher.phtml
index 0f8670887ad..6d93a8c0deb 100644
--- a/app/code/Magento/Backend/view/adminhtml/system/config/switcher.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/config/switcher.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/system/storage/media/synchronize.phtml b/app/code/Magento/Backend/view/adminhtml/system/config/system/storage/media/synchronize.phtml
index cfc087aa50f..f450da745e7 100644
--- a/app/code/Magento/Backend/view/adminhtml/system/config/system/storage/media/synchronize.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/config/system/storage/media/synchronize.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/tabs.phtml b/app/code/Magento/Backend/view/adminhtml/system/config/tabs.phtml
index a4e193cbfb7..0df4889ee25 100644
--- a/app/code/Magento/Backend/view/adminhtml/system/config/tabs.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/config/tabs.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/design/edit.phtml b/app/code/Magento/Backend/view/adminhtml/system/design/edit.phtml
similarity index 97%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/design/edit.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/design/edit.phtml
index a1fe5885e83..b6a98334bcf 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/design/edit.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/design/edit.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/design/index.phtml b/app/code/Magento/Backend/view/adminhtml/system/design/index.phtml
similarity index 97%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/design/index.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/design/index.phtml
index 20b3ab283ff..609b0428e54 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/design/index.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/design/index.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/email/template/edit.phtml b/app/code/Magento/Backend/view/adminhtml/system/email/template/edit.phtml
similarity index 99%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/email/template/edit.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/email/template/edit.phtml
index 29aa9f74669..bb574a02623 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/email/template/edit.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/email/template/edit.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/email/template/list.phtml b/app/code/Magento/Backend/view/adminhtml/system/email/template/list.phtml
similarity index 97%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/email/template/list.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/email/template/list.phtml
index 13b521b7a0e..cddb9e6a45b 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/email/template/list.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/email/template/list.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/email/template/preview.phtml b/app/code/Magento/Backend/view/adminhtml/system/email/template/preview.phtml
similarity index 97%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/email/template/preview.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/email/template/preview.phtml
index e5cf6f527cf..4d76822f61c 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/email/template/preview.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/email/template/preview.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/info.phtml b/app/code/Magento/Backend/view/adminhtml/system/info.phtml
similarity index 99%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/info.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/info.phtml
index 9effc802f30..755bfc65c01 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/info.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/info.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/search.phtml b/app/code/Magento/Backend/view/adminhtml/system/search.phtml
similarity index 98%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/search.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/search.phtml
index 146aaf1568b..ab6b55b8206 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/search.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/search.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/shipping/applicable_country.phtml b/app/code/Magento/Backend/view/adminhtml/system/shipping/applicable_country.phtml
similarity index 99%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/shipping/applicable_country.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/shipping/applicable_country.phtml
index d64fcebf5a4..e39627a8531 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/shipping/applicable_country.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/shipping/applicable_country.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/shipping/ups.phtml b/app/code/Magento/Backend/view/adminhtml/system/shipping/ups.phtml
similarity index 98%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/shipping/ups.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/shipping/ups.phtml
index 9f126621f94..f1137d7749e 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/shipping/ups.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/shipping/ups.phtml
@@ -19,13 +19,13 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
 
 /** @var $upsModel \Magento\Usa\Model\Shipping\Carrier\Ups */
-/** @var $this \Magento\Adminhtml\Block\System\Shipping\Ups */
+/** @var $this \Magento\Backend\Block\System\Shipping\Ups */
 $upsModel = $this->getShippingModel();
 $orShipArr = $upsModel->getCode('originShipment');
 $defShipArr = $upsModel->getCode('method');
@@ -125,7 +125,7 @@ if (!$storeCode && $websiteCode) {
             while (freeMethod.length > 0) {
                 freeMethod.remove(0);
             }
-            freeMethod.insert(new Element('option', {value:''}).update('<?php echo $_coreHelper->escapeHtml(__('None')); ?>'));
+            freeMethod.insert(new Element('option', {value:''}).update('<?php echo $this->escapeHtml(__('None')); ?>'));
 
             var code, option;
             for (code in originShipment) {
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/system/variable/js.phtml b/app/code/Magento/Backend/view/adminhtml/system/variable/js.phtml
similarity index 97%
rename from app/code/Magento/Adminhtml/view/adminhtml/system/variable/js.phtml
rename to app/code/Magento/Backend/view/adminhtml/system/variable/js.phtml
index 1a62371a4e8..a79768440c2 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/system/variable/js.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/system/variable/js.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/variables.js b/app/code/Magento/Backend/view/adminhtml/variables.js
similarity index 99%
rename from app/code/Magento/Adminhtml/view/adminhtml/variables.js
rename to app/code/Magento/Backend/view/adminhtml/variables.js
index ec3910f6a4a..9c3510969e8 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/variables.js
+++ b/app/code/Magento/Backend/view/adminhtml/variables.js
@@ -18,7 +18,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/accordion.phtml b/app/code/Magento/Backend/view/adminhtml/widget/accordion.phtml
index 18b3f319a3c..4c68414e32d 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/accordion.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/accordion.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/breadcrumbs.phtml b/app/code/Magento/Backend/view/adminhtml/widget/breadcrumbs.phtml
index 15358a51f5c..5b8fc46ff80 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/breadcrumbs.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/breadcrumbs.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/button.phtml b/app/code/Magento/Backend/view/adminhtml/widget/button.phtml
index 1461c40ae28..0e0bf1a0479 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/button.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/button.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/button/split.phtml b/app/code/Magento/Backend/view/adminhtml/widget/button/split.phtml
index 3a67b3d3476..8b43ca43588 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/button/split.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/button/split.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form.phtml b/app/code/Magento/Backend/view/adminhtml/widget/form.phtml
index f1802e5b679..73bb4614228 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/form.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/form.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/container.phtml b/app/code/Magento/Backend/view/adminhtml/widget/form/container.phtml
index 0bb7288fa66..06dea809bbf 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/form/container.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/form/container.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/element.phtml b/app/code/Magento/Backend/view/adminhtml/widget/form/element.phtml
index a3f8b42ab2f..84c8320fa4a 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/form/element.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/form/element.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/element/gallery.phtml b/app/code/Magento/Backend/view/adminhtml/widget/form/element/gallery.phtml
index 0a0bdc5a52b..96fc328dc42 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/form/element/gallery.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/form/element/gallery.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/element.phtml b/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/element.phtml
index 08dc7bbc6c6..340d274205d 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/element.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/element.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset.phtml b/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset.phtml
index 89784770557..be8867d54b8 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset/element.phtml b/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset/element.phtml
index 0d492de8bae..c4291154930 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset/element.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset/element.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/widget/grid.phtml
index 727a39dce18..91e7ae02746 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/grid.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/grid.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/column_set.phtml b/app/code/Magento/Backend/view/adminhtml/widget/grid/column_set.phtml
index c260dc7fe75..e4beb76cdc8 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/grid/column_set.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/grid/column_set.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/container.phtml b/app/code/Magento/Backend/view/adminhtml/widget/grid/container.phtml
index f0dc11cb275..8dadffa0493 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/grid/container.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/grid/container.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/container/empty.phtml b/app/code/Magento/Backend/view/adminhtml/widget/grid/container/empty.phtml
index 6ddced0e905..355df9e3c46 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/grid/container/empty.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/grid/container/empty.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/export.phtml b/app/code/Magento/Backend/view/adminhtml/widget/grid/export.phtml
index d2059761f16..c6b92415be5 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/grid/export.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/grid/export.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/widget/grid/extended.phtml
index 4d227bb14f0..2f8e7658414 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/grid/extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/grid/extended.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/massaction.phtml b/app/code/Magento/Backend/view/adminhtml/widget/grid/massaction.phtml
index 23dbbbe4172..58df14a4cb4 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/grid/massaction.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/grid/massaction.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/massaction_extended.phtml b/app/code/Magento/Backend/view/adminhtml/widget/grid/massaction_extended.phtml
index e620961e150..19c4e9ed10c 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/grid/massaction_extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/grid/massaction_extended.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/serializer.phtml b/app/code/Magento/Backend/view/adminhtml/widget/grid/serializer.phtml
index 011d651c4d6..b539315a1f2 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/grid/serializer.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/grid/serializer.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/tabs.phtml b/app/code/Magento/Backend/view/adminhtml/widget/tabs.phtml
index cdac584d419..7e1a8fc447d 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/tabs.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/tabs.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backend/view/adminhtml/widget/view/container.phtml b/app/code/Magento/Backend/view/adminhtml/widget/view/container.phtml
index e429e86ce92..55ea032b1eb 100644
--- a/app/code/Magento/Backend/view/adminhtml/widget/view/container.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/widget/view/container.phtml
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    design
- * @package     default_default
+ * @package     Magento_Backend
  * @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)
  */
diff --git a/app/code/Magento/Backup/Model/Backup.php b/app/code/Magento/Backup/Model/Backup.php
index cb54b420254..5f18b3b5aa0 100644
--- a/app/code/Magento/Backup/Model/Backup.php
+++ b/app/code/Magento/Backup/Model/Backup.php
@@ -63,13 +63,6 @@ class Backup extends \Magento\Object implements \Magento\Backup\Db\BackupInterfa
      */
     protected $_helper;
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
-
     /**
      * Locale model
      *
@@ -85,24 +78,27 @@ class Backup extends \Magento\Object implements \Magento\Backup\Db\BackupInterfa
     protected $_backendAuthSession;
 
     /**
-     * Construct
-     *
-     * @param \Magento\Core\Helper\Data $coreData
+     * @var \Magento\Encryption\EncryptorInterface
+     */
+    protected $_encryptor;
+
+    /**
      * @param \Magento\Backup\Helper\Data $helper
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Backend\Model\Auth\Session $authSession
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Backup\Helper\Data $helper,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Backend\Model\Auth\Session $authSession,
+        \Magento\Encryption\EncryptorInterface $encryptor,
         $data = array()
     ) {
+        $this->_encryptor = $encryptor;
         parent::__construct($data);
 
-        $this->_coreData = $coreData;
         $adapter = new \Magento\Filesystem\Adapter\Zlib(self::COMPRESS_RATE);
         $this->_filesystem = new \Magento\Filesystem($adapter);
         $this->_filesystem->setIsAllowCreateDirectories(true);
@@ -427,7 +423,7 @@ class Backup extends \Magento\Object implements \Magento\Backup\Db\BackupInterfa
     public function validateUserPassword($password)
     {
         $userPasswordHash = $this->_backendAuthSession->getUser()->getPassword();
-        return $this->_coreData->validateHash($password, $userPasswordHash);
+        return $this->_encryptor->validateHash($password, $userPasswordHash);
     }
 
     /**
diff --git a/app/code/Magento/Backup/Model/Config/Backend/Cron.php b/app/code/Magento/Backup/Model/Config/Backend/Cron.php
index 401ee8e5988..783b49ebb6e 100644
--- a/app/code/Magento/Backup/Model/Config/Backend/Cron.php
+++ b/app/code/Magento/Backup/Model/Config/Backend/Cron.php
@@ -44,8 +44,11 @@ class Cron extends \Magento\Core\Model\Config\Value
     protected $_configValueFactory;
 
     /**
-     * Construct
-     *
+     * @var string
+     */
+    protected $_runModelPath = '';
+
+    /**
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\StoreManager $storeManager
@@ -53,6 +56,7 @@ class Cron extends \Magento\Core\Model\Config\Value
      * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
+     * @param string $runModelPath
      * @param array $data
      */
     public function __construct(
@@ -63,11 +67,12 @@ class Cron extends \Magento\Core\Model\Config\Value
         \Magento\Core\Model\Config\ValueFactory $configValueFactory,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
+        $runModelPath = '',
         array $data = array()
     ) {
-        parent::__construct($context, $registry, $storeManager, $config, $resource, $resourceCollection, $data);
-
+        $this->_runModelPath = $runModelPath;
         $this->_configValueFactory = $configValueFactory;
+        parent::__construct($context, $registry, $storeManager, $config, $resource, $resourceCollection, $data);
     }
 
     /**
@@ -107,7 +112,7 @@ class Cron extends \Magento\Core\Model\Config\Value
 
             $this->_configValueFactory->create()
                 ->load(self::CRON_MODEL_PATH, 'path')
-                ->setValue((string) $this->_config->getNode(self::CRON_MODEL_PATH))
+                ->setValue($this->_runModelPath)
                 ->setPath(self::CRON_MODEL_PATH)
                 ->save();
         } catch (\Exception $e) {
diff --git a/app/code/Magento/Backup/Model/Db.php b/app/code/Magento/Backup/Model/Db.php
index 1c5a9ac85f7..202f77918d9 100644
--- a/app/code/Magento/Backup/Model/Db.php
+++ b/app/code/Magento/Backup/Model/Db.php
@@ -54,15 +54,15 @@ class Db implements \Magento\Backup\Db\BackupDbInterface
     /**
      * Core resource model
      *
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource = null;
 
     /**
      * @param \Magento\Backup\Model\Resource\Db $resourceDb
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
-    public function __construct(\Magento\Backup\Model\Resource\Db $resourceDb, \Magento\Core\Model\Resource $resource)
+    public function __construct(\Magento\Backup\Model\Resource\Db $resourceDb, \Magento\App\Resource $resource)
     {
         $this->_resourceDb = $resourceDb;
         $this->_resource = $resource;
diff --git a/app/code/Magento/Backup/Model/Observer.php b/app/code/Magento/Backup/Model/Observer.php
index 91a4524a468..7f3fdd2ba17 100644
--- a/app/code/Magento/Backup/Model/Observer.php
+++ b/app/code/Magento/Backup/Model/Observer.php
@@ -61,7 +61,7 @@ class Observer
     protected $_coreRegistry = null;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -87,7 +87,7 @@ class Observer
     /**
      * @param \Magento\Backup\Helper\Data $backupData
      * @param \Magento\Core\Model\Registry $coreRegistry
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\App\Dir $dir
      * @param \Magento\Backup\Factory $backupFactory
@@ -95,7 +95,7 @@ class Observer
     public function __construct(
         \Magento\Backup\Helper\Data $backupData,
         \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\App\Dir $dir,
         \Magento\Backup\Factory $backupFactory
diff --git a/app/code/Magento/Backup/Model/Resource/Db.php b/app/code/Magento/Backup/Model/Resource/Db.php
index 86129fda318..c00debc37dd 100644
--- a/app/code/Magento/Backup/Model/Resource/Db.php
+++ b/app/code/Magento/Backup/Model/Resource/Db.php
@@ -55,11 +55,11 @@ class Db
      * Initialize Backup DB resource model
      *
      * @param \Magento\Backup\Model\Resource\HelperFactory $resHelperFactory
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Backup\Model\Resource\HelperFactory $resHelperFactory,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_resourceHelper = $resHelperFactory->create();
         $this->_write = $resource->getConnection('backup_write');
diff --git a/app/code/Magento/Backup/Model/Resource/Helper.php b/app/code/Magento/Backup/Model/Resource/Helper.php
index edf243edd90..0a4f396e08d 100644
--- a/app/code/Magento/Backup/Model/Resource/Helper.php
+++ b/app/code/Magento/Backup/Model/Resource/Helper.php
@@ -44,12 +44,12 @@ class Helper extends \Magento\Core\Model\Resource\Helper
     protected $_coreDate;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Date $coreDate
      * @param $modulePrefix
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\Date $coreDate,
         $modulePrefix
     ) {
diff --git a/app/code/Magento/Backup/etc/di.xml b/app/code/Magento/Backup/etc/di.xml
index 559ece9be75..7f96cb3ea3a 100644
--- a/app/code/Magento/Backup/etc/di.xml
+++ b/app/code/Magento/Backup/etc/di.xml
@@ -26,10 +26,10 @@
 <config>
     <type name="Magento\Backup\Db\BackupFactory">
         <param name="backupInstanceName">
-            <value>\Magento\Backup\Model\Backup</value>
+            <value>Magento\Backup\Model\Backup</value>
         </param>
         <param name="backupDbInstanceName">
-            <value>\Magento\Backup\Model\Db</value>
+            <value>Magento\Backup\Model\Db</value>
         </param>
     </type>
 </config>
\ No newline at end of file
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
index a76795eea79..df74c4341ae 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
@@ -24,18 +24,60 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Bundle\Block\Adminhtml\Sales\Order\Items;
 
 /**
  * Adminhtml sales order item renderer
- *
- * @category    Magento
- * @package     Magento_Bundle
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Bundle\Block\Adminhtml\Sales\Order\Items;
-
 class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer
 {
+    /**
+     * Filter manager
+     *
+     * @var \Magento\Filter\FilterManager
+     */
+    protected $filter;
+
+    /**
+     * @param \Magento\Catalog\Model\ProductFactory $productFactory
+     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Backend\Block\Template\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Filter\FilterManager $filter
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Catalog\Model\ProductFactory $productFactory,
+        \Magento\Core\Helper\Data $coreData,
+        \Magento\Backend\Block\Template\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Filter\FilterManager $filter,
+        array $data = array()
+    ) {
+        $this->filter = $filter;
+        parent::__construct($productFactory, $coreData, $context, $registry, $data);
+    }
+
+    /**
+     * Truncate string
+     *
+     * @param string $value
+     * @param int $length
+     * @param string $etc
+     * @param string &$remainder
+     * @param bool $breakWords
+     * @return string
+     */
+    public function truncateString($value, $length = 80, $etc = '...', &$remainder = '', $breakWords = true)
+    {
+        return $this->filter->truncate($value, array(
+            'length' => $length,
+            'etc' => $etc,
+            'remainder' => $remainder,
+            'breakWords' => $breakWords
+        ));
+    }
+
     /**
      * Getting all available childs for Invoice, Shipmen or Creditmemo item
      *
@@ -44,41 +86,48 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend
      */
     public function getChilds($item)
     {
-        $_itemsArray = array();
+        $itemsArray = array();
 
         if ($item instanceof \Magento\Sales\Model\Order\Invoice\Item) {
-            $_items = $item->getInvoice()->getAllItems();
+            $items = $item->getInvoice()->getAllItems();
         } else if ($item instanceof \Magento\Sales\Model\Order\Shipment\Item) {
-            $_items = $item->getShipment()->getAllItems();
+            $items = $item->getShipment()->getAllItems();
         } else if ($item instanceof \Magento\Sales\Model\Order\Creditmemo\Item) {
-            $_items = $item->getCreditmemo()->getAllItems();
+            $items = $item->getCreditmemo()->getAllItems();
         }
 
-        if ($_items) {
-            foreach ($_items as $_item) {
-                if ($parentItem = $_item->getOrderItem()->getParentItem()) {
-                    $_itemsArray[$parentItem->getId()][$_item->getOrderItemId()] = $_item;
+        if ($items) {
+            foreach ($items as $value) {
+                $parentItem = $value->getOrderItem()->getParentItem();
+                if ($parentItem) {
+                    $itemsArray[$parentItem->getId()][$value->getOrderItemId()] = $value;
                 } else {
-                    $_itemsArray[$_item->getOrderItem()->getId()][$_item->getOrderItemId()] = $_item;
+                    $itemsArray[$value->getOrderItem()->getId()][$value->getOrderItemId()] = $value;
                 }
             }
         }
 
-        if (isset($_itemsArray[$item->getOrderItem()->getId()])) {
-            return $_itemsArray[$item->getOrderItem()->getId()];
+        if (isset($itemsArray[$item->getOrderItem()->getId()])) {
+            return $itemsArray[$item->getOrderItem()->getId()];
         } else {
             return null;
         }
     }
 
+    /**
+     * @param null $item
+     * @return bool
+     */
     public function isShipmentSeparately($item = null)
     {
         if ($item) {
             if ($item->getOrderItem()) {
                 $item = $item->getOrderItem();
             }
-            if ($parentItem = $item->getParentItem()) {
-                if ($options = $parentItem->getProductOptions()) {
+            $parentItem = $item->getParentItem();
+            if ($parentItem) {
+                $options = $parentItem->getProductOptions();
+                if ($options) {
                     if (isset($options['shipment_type'])
                         && $options['shipment_type'] == \Magento\Catalog\Model\Product\Type\AbstractType::SHIPMENT_SEPARATELY
                     ) {
@@ -88,7 +137,8 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend
                     }
                 }
             } else {
-                if ($options = $item->getProductOptions()) {
+                $options = $item->getProductOptions();
+                if ($options) {
                     if (isset($options['shipment_type'])
                         && $options['shipment_type'] == \Magento\Catalog\Model\Product\Type\AbstractType::SHIPMENT_SEPARATELY
                     ) {
@@ -100,7 +150,8 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend
             }
         }
 
-        if ($options = $this->getOrderItem()->getProductOptions()) {
+        $options = $this->getOrderItem()->getProductOptions();
+        if ($options) {
             if (isset($options['shipment_type'])
                 && $options['shipment_type'] == \Magento\Catalog\Model\Product\Type\AbstractType::SHIPMENT_SEPARATELY
             ) {
@@ -110,14 +161,20 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend
         return false;
     }
 
+    /**
+     * @param null $item
+     * @return bool
+     */
     public function isChildCalculated($item = null)
     {
         if ($item) {
             if ($item->getOrderItem()) {
                 $item = $item->getOrderItem();
             }
-            if ($parentItem = $item->getParentItem()) {
-                if ($options = $parentItem->getProductOptions()) {
+            $parentItem = $item->getParentItem();
+            if ($parentItem) {
+                $options = $parentItem->getProductOptions();
+                if ($options) {
                     if (isset($options['product_calculations'])
                         && $options['product_calculations'] == \Magento\Catalog\Model\Product\Type\AbstractType::CALCULATE_CHILD
                     ) {
@@ -127,7 +184,8 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend
                     }
                 }
             } else {
-                if ($options = $item->getProductOptions()) {
+                $options = $item->getProductOptions();
+                if ($options) {
                     if (isset($options['product_calculations'])
                         && $options['product_calculations'] == \Magento\Catalog\Model\Product\Type\AbstractType::CALCULATE_CHILD
                     ) {
@@ -139,7 +197,8 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend
             }
         }
 
-        if ($options = $this->getOrderItem()->getProductOptions()) {
+        $options = $this->getOrderItem()->getProductOptions();
+        if ($options) {
             if (isset($options['product_calculations'])
                 && $options['product_calculations'] == \Magento\Catalog\Model\Product\Type\AbstractType::CALCULATE_CHILD
             ) {
@@ -149,7 +208,8 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend
         return false;
     }
 
-    public function getSelectionAttributes($item) {
+    public function getSelectionAttributes($item)
+    {
         if ($item instanceof \Magento\Sales\Model\Order\Item) {
             $options = $item->getProductOptions();
         } else {
@@ -164,8 +224,8 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend
     public function getOrderOptions($item = null)
     {
         $result = array();
-
-        if ($options = $this->getOrderItem()->getProductOptions()) {
+        $options = $this->getOrderItem()->getProductOptions();
+        if ($options) {
             if (isset($options['options'])) {
                 $result = array_merge($result, $options['options']);
             }
@@ -192,22 +252,29 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend
     {
         $result = $this->escapeHtml($item->getName());
         if (!$this->isShipmentSeparately($item)) {
-            if ($attributes = $this->getSelectionAttributes($item)) {
+            $attributes = $this->getSelectionAttributes($item);
+            if ($attributes) {
                 $result =  sprintf('%d', $attributes['qty']) . ' x ' . $result;
             }
         }
         if (!$this->isChildCalculated($item)) {
-            if ($attributes = $this->getSelectionAttributes($item)) {
+            $attributes = $this->getSelectionAttributes($item);
+            if ($attributes) {
                 $result .= " " . $this->getOrderItem()->getOrder()->formatPrice($attributes['price']);
             }
         }
         return $result;
     }
 
+    /**
+     * @param object $item
+     * @return bool
+     */
     public function canShowPriceInfo($item)
     {
         if (($item->getOrderItem()->getParentItem() && $this->isChildCalculated())
-                || (!$item->getOrderItem()->getParentItem() && !$this->isChildCalculated())) {
+            || (!$item->getOrderItem()->getParentItem() && !$this->isChildCalculated())
+        ) {
             return true;
         }
         return false;
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php
index 37fb5143aaa..8a232551c3d 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php
@@ -24,24 +24,71 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Bundle\Block\Adminhtml\Sales\Order\View\Items;
 
 /**
  * Adminhtml sales order item renderer
- *
- * @category    Magento
- * @package     Magento_Bundle
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Bundle\Block\Adminhtml\Sales\Order\View\Items;
-
-class Renderer
-    extends \Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer
+class Renderer extends \Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer
 {
+    /**
+     * Core string
+     *
+     * @var \Magento\Filter\FilterManager
+     */
+    protected $filter;
+
+    /**
+     * @param \Magento\Catalog\Model\ProductFactory $productFactory
+     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Backend\Block\Template\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Filter\FilterManager $filter
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Catalog\Model\ProductFactory $productFactory,
+        \Magento\Core\Helper\Data $coreData,
+        \Magento\Backend\Block\Template\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Filter\FilterManager $filter,
+        array $data = array()
+    ) {
+        $this->filter = $filter;
+        parent::__construct($productFactory, $coreData, $context, $registry, $data);
+    }
+
+    /**
+     * Truncate string
+     *
+     * @param string $value
+     * @param int $length
+     * @param string $etc
+     * @param string &$remainder
+     * @param bool $breakWords
+     * @return string
+     */
+    public function truncateString($value, $length = 80, $etc = '...', &$remainder = '', $breakWords = true)
+    {
+        return $this->filter->truncate($value, array(
+            'length' => $length,
+            'etc' => $etc,
+            'remainder' => $remainder,
+            'breakWords' => $breakWords
+        ));
+    }
+
+    /**
+     * @param null|object $item
+     * @return bool
+     */
     public function isShipmentSeparately($item = null)
     {
         if ($item) {
-            if ($parentItem = $item->getParentItem()) {
-                if ($options = $parentItem->getProductOptions()) {
+            $parentItem = $item->getParentItem();
+            if ($parentItem) {
+                $options = $parentItem->getProductOptions();
+                if ($options) {
                     if (isset($options['shipment_type'])
                         && $options['shipment_type'] == \Magento\Catalog\Model\Product\Type\AbstractType::SHIPMENT_SEPARATELY
                     ) {
@@ -51,7 +98,8 @@ class Renderer
                     }
                 }
             } else {
-                if ($options = $item->getProductOptions()) {
+                $options = $item->getProductOptions();
+                if ($options) {
                     if (isset($options['shipment_type'])
                         && $options['shipment_type'] == \Magento\Catalog\Model\Product\Type\AbstractType::SHIPMENT_SEPARATELY
                     ) {
@@ -63,7 +111,8 @@ class Renderer
             }
         }
 
-        if ($options = $this->getOrderItem()->getProductOptions()) {
+        $options = $this->getOrderItem()->getProductOptions();
+        if ($options) {
             if (isset($options['shipment_type'])
                 && $options['shipment_type'] == \Magento\Catalog\Model\Product\Type\AbstractType::SHIPMENT_SEPARATELY
             ) {
@@ -73,11 +122,17 @@ class Renderer
         return false;
     }
 
+    /**
+     * @param null|object $item
+     * @return bool
+     */
     public function isChildCalculated($item = null)
     {
         if ($item) {
-            if ($parentItem = $item->getParentItem()) {
-                if ($options = $parentItem->getProductOptions()) {
+            $parentItem = $item->getParentItem();
+            if ($parentItem) {
+                $options = $parentItem->getProductOptions();
+                if ($options) {
                     if (isset($options['product_calculations'])
                         && $options['product_calculations'] == \Magento\Catalog\Model\Product\Type\AbstractType::CALCULATE_CHILD
                     ) {
@@ -87,7 +142,8 @@ class Renderer
                     }
                 }
             } else {
-                if ($options = $item->getProductOptions()) {
+                $options = $item->getProductOptions();
+                if ($options) {
                     if (isset($options['product_calculations'])
                         && $options['product_calculations'] == \Magento\Catalog\Model\Product\Type\AbstractType::CALCULATE_CHILD
                     ) {
@@ -99,7 +155,8 @@ class Renderer
             }
         }
 
-        if ($options = $this->getItem()->getProductOptions()) {
+        $options = $this->getItem()->getProductOptions();
+        if ($options) {
             if (isset($options['product_calculations'])
                 && $options['product_calculations'] == \Magento\Catalog\Model\Product\Type\AbstractType::CALCULATE_CHILD
             ) {
@@ -109,7 +166,8 @@ class Renderer
         return false;
     }
 
-    public function getSelectionAttributes($item) {
+    public function getSelectionAttributes($item)
+    {
         if ($item instanceof \Magento\Sales\Model\Order\Item) {
             $options = $item->getProductOptions();
         } else {
@@ -121,10 +179,14 @@ class Renderer
         return null;
     }
 
+    /**
+     * @return array
+     */
     public function getOrderOptions()
     {
         $result = array();
-        if ($options = $this->getItem()->getProductOptions()) {
+        $options = $this->getItem()->getProductOptions();
+        if ($options) {
             if (isset($options['options'])) {
                 $result = array_merge($result, $options['options']);
             }
@@ -138,26 +200,37 @@ class Renderer
         return $result;
     }
 
+    /**
+     * @param object $item
+     * @return string
+     */
     public function getValueHtml($item)
     {
         $result = $this->escapeHtml($item->getName());
         if (!$this->isShipmentSeparately($item)) {
-            if ($attributes = $this->getSelectionAttributes($item)) {
+            $attributes = $this->getSelectionAttributes($item);
+            if ($attributes) {
                 $result =  sprintf('%d', $attributes['qty']) . ' x ' . $result;
             }
         }
         if (!$this->isChildCalculated($item)) {
-            if ($attributes = $this->getSelectionAttributes($item)) {
+            $attributes = $this->getSelectionAttributes($item);
+            if ($attributes) {
                 $result .= " " . $this->getItem()->getOrder()->formatPrice($attributes['price']);
             }
         }
         return $result;
     }
 
+    /**
+     * @param object $item
+     * @return bool
+     */
     public function canShowPriceInfo($item)
     {
         if (($item->getParentItem() && $this->isChildCalculated())
-                || (!$item->getParentItem() && !$this->isChildCalculated())) {
+            || (!$item->getParentItem() && !$this->isChildCalculated())
+        ) {
             return true;
         }
         return false;
diff --git a/app/code/Magento/Bundle/Block/Catalog/Product/Price.php b/app/code/Magento/Bundle/Block/Catalog/Product/Price.php
index 552f2f40f8d..e1a517d51e4 100644
--- a/app/code/Magento/Bundle/Block/Catalog/Product/Price.php
+++ b/app/code/Magento/Bundle/Block/Catalog/Product/Price.php
@@ -41,26 +41,40 @@ class Price extends \Magento\Catalog\Block\Product\Price
     protected $_taxCalc;
 
     /**
-     * @param \Magento\Tax\Model\Calculation $taxCalc
+     * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Block\Template\Context $context
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Core\Model\StoreManager $storeManager
+     * @param \Magento\Stdlib\String $string
+     * @param \Magento\Math\Random $mathRandom
+     * @param \Magento\Tax\Model\Calculation $taxCalc
      * @param array $data
      */
     public function __construct(
-        \Magento\Tax\Model\Calculation $taxCalc,
+        \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Helper\Data $catalogData,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Block\Template\Context $context,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Core\Model\StoreManager $storeManager,
+        \Magento\Stdlib\String $string,
+        \Magento\Math\Random $mathRandom,
+        \Magento\Tax\Model\Calculation $taxCalc,
         array $data = array()
     ) {
-        parent::__construct($storeManager, $catalogData, $taxData, $coreData, $context, $registry, $data);
+        parent::__construct(
+            $storeManager,
+            $catalogData,
+            $taxData,
+            $coreData,
+            $context,
+            $registry,
+            $string,
+            $mathRandom,
+            $data
+        );
         $this->_taxCalc = $taxCalc;
     }
 
diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php
index 519e44c7ab0..8cdd59bb709 100644
--- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php
+++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php
@@ -50,18 +50,26 @@ class Configuration extends \Magento\Core\Helper\AbstractHelper
      */
     protected $_ctlgProdConfigur = null;
 
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
     /**
      * @param \Magento\Catalog\Helper\Product\Configuration $ctlgProdConfigur
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\Context $context
+     * @param \Magento\Escaper $escaper
      */
     public function __construct(
         \Magento\Catalog\Helper\Product\Configuration $ctlgProdConfigur,
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\Context $context
+        \Magento\Core\Helper\Context $context,
+        \Magento\Escaper $escaper
     ) {
         $this->_ctlgProdConfigur = $ctlgProdConfigur;
         $this->_coreData = $coreData;
+        $this->_escaper = $escaper;
         parent::__construct($context);
     }
 
@@ -155,7 +163,7 @@ class Configuration extends \Magento\Core\Helper\AbstractHelper
                         foreach ($bundleSelections as $bundleSelection) {
                             $qty = $this->getSelectionQty($product, $bundleSelection->getSelectionId()) * 1;
                             if ($qty) {
-                                $option['value'][] = $qty . ' x ' . $this->escapeHtml($bundleSelection->getName())
+                                $option['value'][] = $qty . ' x ' . $this->_escaper->escapeHtml($bundleSelection->getName())
                                     . ' ' . $this->_coreData->currency(
                                         $this->getSelectionFinalPrice($item, $bundleSelection)
                                     );
diff --git a/app/code/Magento/Bundle/Model/Product/Type.php b/app/code/Magento/Bundle/Model/Product/Type.php
index 9ff53ebcd00..8cb10c5d352 100644
--- a/app/code/Magento/Bundle/Model/Product/Type.php
+++ b/app/code/Magento/Bundle/Model/Product/Type.php
@@ -152,7 +152,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Model\Registry $coreRegistry
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Catalog\Helper\Product $catalogProduct
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param \Magento\Bundle\Model\SelectionFactory $bundleModelSelection
@@ -176,7 +176,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
         \Magento\Filesystem $filesystem,
         \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Catalog\Helper\Product $catalogProduct,
         \Magento\Catalog\Helper\Data $catalogData,
         \Magento\Bundle\Model\SelectionFactory $bundleModelSelection,
diff --git a/app/code/Magento/Bundle/Model/Resource/Bundle.php b/app/code/Magento/Bundle/Model/Resource/Bundle.php
index e7398833f4c..6831f8ca5f6 100644
--- a/app/code/Magento/Bundle/Model/Resource/Bundle.php
+++ b/app/code/Magento/Bundle/Model/Resource/Bundle.php
@@ -45,11 +45,11 @@ class Bundle extends \Magento\Core\Model\Resource\Db\AbstractDb
      * Class constructor
      *
      * @param \Magento\Catalog\Model\Resource\Product\Relation $productRelation
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Catalog\Model\Resource\Product\Relation $productRelation,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         parent::__construct($resource);
         $this->_productRelation = $productRelation;
diff --git a/app/code/Magento/Bundle/Model/Resource/Price/Index.php b/app/code/Magento/Bundle/Model/Resource/Price/Index.php
index 4c3e2c27c32..bb7665791fa 100644
--- a/app/code/Magento/Bundle/Model/Resource/Price/Index.php
+++ b/app/code/Magento/Bundle/Model/Resource/Price/Index.php
@@ -98,7 +98,7 @@ class Index extends \Magento\Core\Model\Resource\Db\AbstractDb
      * @param \Magento\Customer\Model\GroupFactory $customerGroup
      * @param \Magento\Catalog\Model\Config $config
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -107,7 +107,7 @@ class Index extends \Magento\Core\Model\Resource\Db\AbstractDb
         \Magento\Customer\Model\GroupFactory $customerGroup,
         \Magento\Catalog\Model\Config $config,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_eventManager = $eventManager;
         parent::__construct($resource);
diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php
index e08d8e0e98d..21d611a3e53 100644
--- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php
+++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php
@@ -38,12 +38,12 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte
     /**
      * Core string
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -53,7 +53,7 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
@@ -62,7 +62,7 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct($taxData, $context, $registry, $coreDir, $resource, $resourceCollection, $data);
     }
 
@@ -83,7 +83,6 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte
         $leftBound  = 35;
         $rightBound = 565;
 
-        $stringHelper = $this->_coreString;
         foreach ($items as $_item) {
             $x      = $leftBound;
             $line   = array();
@@ -108,7 +107,7 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte
                 if ($_prevOptionId != $attributes['option_id']) {
                     $line[0] = array(
                         'font'  => 'italic',
-                        'text'  => $this->_coreString->strSplit($attributes['option_label'], 38, true, true),
+                        'text'  => $this->string->split($attributes['option_label'], 38, true, true),
                         'feed'  => $x
                     );
 
@@ -132,7 +131,7 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte
             }
 
             $line[] = array(
-                'text'  => $this->_coreString->strSplit($name, 35, true, true),
+                'text'  => $this->string->split($name, 35, true, true),
                 'feed'  => $feed
             );
 
@@ -141,7 +140,7 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte
             // draw SKUs
             if (!$_item->getOrderItem()->getParentItem()) {
                 $text = array();
-                foreach ($this->_coreString->strSplit($item->getSku(), 17) as $part) {
+                foreach ($this->string->split($item->getSku(), 17) as $part) {
                     $text[] = $part;
                 }
                 $line[] = array(
@@ -221,7 +220,7 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte
                 foreach ($options['options'] as $option) {
                     $lines = array();
                     $lines[][] = array(
-                        'text'  => $this->_coreString->strSplit(strip_tags($option['label']), 40, true, true),
+                        'text'  => $this->string->split(strip_tags($option['label']), 40, true, true),
                         'font'  => 'italic',
                         'feed'  => $leftBound
                     );
@@ -233,7 +232,7 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte
                             : strip_tags($option['value']);
                         $values = explode(', ', $_printValue);
                         foreach ($values as $value) {
-                            foreach ($this->_coreString->strSplit($value, 30, true, true) as $_value) {
+                            foreach ($this->string->split($value, 30, true, true) as $_value) {
                                 $text[] = $_value;
                             }
                         }
diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php
index 929957b8ff8..1bacf99654c 100644
--- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php
+++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php
@@ -36,14 +36,12 @@ namespace Magento\Bundle\Model\Sales\Order\Pdf\Items;
 class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
 {
     /**
-     * Core string
-     *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $coreString
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -53,7 +51,7 @@ class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $coreString,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
@@ -62,7 +60,7 @@ class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $coreString;
         parent::__construct($taxData, $context, $registry, $coreDir, $resource, $resourceCollection, $data);
     }
 
@@ -83,7 +81,6 @@ class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
         $_prevOptionId = '';
         $drawItems = array();
 
-        $stringHelper = $this->_coreString;
         foreach ($items as $_item) {
             $line   = array();
 
@@ -106,7 +103,7 @@ class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
                 if ($_prevOptionId != $attributes['option_id']) {
                     $line[0] = array(
                         'font'  => 'italic',
-                        'text'  => $this->_coreString->strSplit($attributes['option_label'], 45, true, true),
+                        'text'  => $this->string->split($attributes['option_label'], 45, true, true),
                         'feed'  => 35
                     );
 
@@ -130,14 +127,14 @@ class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
                 $name = $_item->getName();
             }
             $line[] = array(
-                'text'  => $this->_coreString->strSplit($name, 35, true, true),
+                'text'  => $this->string->split($name, 35, true, true),
                 'feed'  => $feed
             );
 
             // draw SKUs
             if (!$_item->getOrderItem()->getParentItem()) {
                 $text = array();
-                foreach ($this->_coreString->strSplit($item->getSku(), 17) as $part) {
+                foreach ($this->string->split($item->getSku(), 17) as $part) {
                     $text[] = $part;
                 }
                 $line[] = array(
@@ -188,7 +185,7 @@ class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
                 foreach ($options['options'] as $option) {
                     $lines = array();
                     $lines[][] = array(
-                        'text'  => $this->_coreString->strSplit(strip_tags($option['label']), 40, true, true),
+                        'text'  => $this->string->split(strip_tags($option['label']), 40, true, true),
                         'font'  => 'italic',
                         'feed'  => 35
                     );
@@ -200,7 +197,7 @@ class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
                             : strip_tags($option['value']);
                         $values = explode(', ', $_printValue);
                         foreach ($values as $value) {
-                            foreach ($this->_coreString->strSplit($value, 30, true, true) as $_value) {
+                            foreach ($this->string->split($value, 30, true, true) as $_value) {
                                 $text[] = $_value;
                             }
                         }
diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php
index 4a0a376c34a..b03adadf349 100644
--- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php
+++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php
@@ -36,14 +36,12 @@ namespace Magento\Bundle\Model\Sales\Order\Pdf\Items;
 class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
 {
     /**
-     * Core string
-     *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -53,7 +51,7 @@ class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
@@ -62,7 +60,7 @@ class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct($taxData, $context, $registry, $coreDir, $resource, $resourceCollection, $data);
     }
 
@@ -84,7 +82,6 @@ class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
         $_prevOptionId = '';
         $drawItems = array();
 
-        $stringHelper = $this->_coreString;
         foreach ($items as $_item) {
             $line   = array();
 
@@ -107,7 +104,7 @@ class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
                 if ($_prevOptionId != $attributes['option_id']) {
                     $line[0] = array(
                         'font'  => 'italic',
-                        'text'  => $this->_coreString->strSplit($attributes['option_label'], 60, true, true),
+                        'text'  => $this->string->split($attributes['option_label'], 60, true, true),
                         'feed'  => 60
                     );
 
@@ -150,7 +147,7 @@ class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
                 $name = $_item->getName();
             }
             $text = array();
-            foreach ($stringHelper->strSplit($name, 60, true, true) as $part) {
+            foreach ($this->string->split($name, 60, true, true) as $part) {
                 $text[] = $part;
             }
             $line[] = array(
@@ -160,7 +157,7 @@ class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
 
             // draw SKUs
             $text = array();
-            foreach ($this->_coreString->strSplit($_item->getSku(), 25) as $part) {
+            foreach ($this->string->split($_item->getSku(), 25) as $part) {
                 $text[] = $part;
             }
             $line[] = array(
@@ -178,7 +175,7 @@ class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
                 foreach ($options['options'] as $option) {
                     $lines = array();
                     $lines[][] = array(
-                        'text'  => $stringHelper->strSplit(strip_tags($option['label']), 70, true, true),
+                        'text'  => $this->string->split(strip_tags($option['label']), 70, true, true),
                         'font'  => 'italic',
                         'feed'  => 60
                     );
@@ -190,7 +187,7 @@ class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
                             : strip_tags($option['value']);
                         $values = explode(', ', $_printValue);
                         foreach ($values as $value) {
-                            foreach ($stringHelper->strSplit($value, 50, true, true) as $_value) {
+                            foreach ($this->string->split($value, 50, true, true) as $_value) {
                                 $text[] = $_value;
                             }
                         }
diff --git a/app/code/Magento/Bundle/etc/di.xml b/app/code/Magento/Bundle/etc/di.xml
index c98e3d4a334..6dd47bd6dd7 100644
--- a/app/code/Magento/Bundle/etc/di.xml
+++ b/app/code/Magento/Bundle/etc/di.xml
@@ -34,7 +34,7 @@
             </value>
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <bundle_setup>Magento\Catalog\Model\Resource\Setup</bundle_setup>
diff --git a/app/code/Magento/Bundle/view/adminhtml/layout/adminhtml_customer_wishlist.xml b/app/code/Magento/Bundle/view/adminhtml/layout/customer_index_wishlist.xml
similarity index 100%
rename from app/code/Magento/Bundle/view/adminhtml/layout/adminhtml_customer_wishlist.xml
rename to app/code/Magento/Bundle/view/adminhtml/layout/customer_index_wishlist.xml
diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/create/items/renderer.phtml
index 6387e62d3e6..228f2eece75 100644
--- a/app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/create/items/renderer.phtml
@@ -382,7 +382,7 @@
                     <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?php echo $option['value'];?>
                     <?php else: ?>
-                        <?php echo $this->helper('Magento\Core\Helper\String')->truncate($option['value'], 55, '', $_remainder);?>
+                        <?php echo $this->truncateString($option['value'], 55, '', $_remainder);?>
                         <?php if ($_remainder):?>
                             ... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
                             <script type="text/javascript">
diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/view/items/renderer.phtml
index 6330ddf82e3..c12a3a1358b 100644
--- a/app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/view/items/renderer.phtml
@@ -313,7 +313,7 @@
                     <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?php echo $option['value'];?>
                     <?php else: ?>
-                        <?php echo $this->helper('Magento\Core\Helper\String')->truncate($option['value'], 55, '', $_remainder);?>
+                        <?php echo $this->truncateString($option['value'], 55, '', $_remainder);?>
                         <?php if ($_remainder):?>
                             ... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
                             <script type="text/javascript">
diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/invoice/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/sales/invoice/create/items/renderer.phtml
index 1daffcefc4b..21a7d32c3b4 100644
--- a/app/code/Magento/Bundle/view/adminhtml/sales/invoice/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/sales/invoice/create/items/renderer.phtml
@@ -372,7 +372,7 @@
                     <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?php echo $option['value'];?>
                     <?php else: ?>
-                        <?php echo $this->helper('Magento\Core\Helper\String')->truncate($option['value'], 55, '', $_remainder);?>
+                        <?php echo $this->truncateString($option['value'], 55, '', $_remainder);?>
                         <?php if ($_remainder):?>
                             ... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
                             <script type="text/javascript">
diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/invoice/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/sales/invoice/view/items/renderer.phtml
index e21f4ba65e4..235b1857b4b 100644
--- a/app/code/Magento/Bundle/view/adminhtml/sales/invoice/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/sales/invoice/view/items/renderer.phtml
@@ -317,7 +317,7 @@
                     <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?php echo $option['value'];?>
                     <?php else: ?>
-                        <?php echo $this->helper('Magento\Core\Helper\String')->truncate($option['value'], 55, '', $_remainder);?>
+                        <?php echo $this->truncateString($option['value'], 55, '', $_remainder);?>
                         <?php if ($_remainder):?>
                             ... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
                             <script type="text/javascript">
diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/order/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/sales/order/view/items/renderer.phtml
index 1380cab66e3..406b6d2ea05 100644
--- a/app/code/Magento/Bundle/view/adminhtml/sales/order/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/sales/order/view/items/renderer.phtml
@@ -385,7 +385,7 @@
                     <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?php echo $option['value'];?>
                     <?php else: ?>
-                        <?php echo $this->helper('Magento\Core\Helper\String')->truncate($option['value'], 55, '', $_remainder);?>
+                        <?php echo $this->truncateString($option['value'], 55, '', $_remainder);?>
                         <?php if ($_remainder):?>
                             ... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
                             <script type="text/javascript">
diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/shipment/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/sales/shipment/create/items/renderer.phtml
index 3e1702bd78d..16896c91b38 100644
--- a/app/code/Magento/Bundle/view/adminhtml/sales/shipment/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/sales/shipment/create/items/renderer.phtml
@@ -95,7 +95,7 @@
                     <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?php echo $option['value'];?>
                     <?php else: ?>
-                        <?php echo $this->helper('Magento\Core\Helper\String')->truncate($option['value'], 55, '', $_remainder);?>
+                        <?php echo $this->truncateString($option['value'], 55, '', $_remainder);?>
                         <?php if ($_remainder):?>
                             ... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
                             <script type="text/javascript">
diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/shipment/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/sales/shipment/view/items/renderer.phtml
index 50410448994..822eff8d7a4 100644
--- a/app/code/Magento/Bundle/view/adminhtml/sales/shipment/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/sales/shipment/view/items/renderer.phtml
@@ -94,7 +94,7 @@
                     <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?php echo $option['value'];?>
                     <?php else: ?>
-                        <?php echo $this->helper('Magento\Core\Helper\String')->truncate($option['value'], 55, '', $_remainder);?>
+                        <?php echo $this->truncateString($option['value'], 55, '', $_remainder);?>
                         <?php if ($_remainder):?>
                             ... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
                             <script type="text/javascript">
diff --git a/app/code/Magento/Bundle/view/frontend/sales/order/items/renderer.phtml b/app/code/Magento/Bundle/view/frontend/sales/order/items/renderer.phtml
index 43411a9b28b..f474b7a616d 100644
--- a/app/code/Magento/Bundle/view/frontend/sales/order/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/frontend/sales/order/items/renderer.phtml
@@ -23,6 +23,8 @@
  * @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)
  */
+
+/** @var $this \Magento\Bundle\Block\Sales\Order\Items\Renderer */
 ?>
 <?php $parentItem = $this->getItem() ?>
 <?php $items = array_merge(array($parentItem), $parentItem->getChildrenItems()); ?>
@@ -59,7 +61,7 @@
     <?php else: ?>
     <td><div class="option-value"><?php echo $this->getValueHtml($_item)?></div></td>
     <?php endif; ?>
-    <td><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($_item->getSku())) ?></td>
+    <td><?php echo $this->prepareSku($_item->getSku()) ?></td>
     <td class="a-right">
         <?php if (!$_item->getParentItem()): ?>
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
diff --git a/app/code/Magento/Captcha/Helper/Data.php b/app/code/Magento/Captcha/Helper/Data.php
index 8661550acab..e045e0d151a 100644
--- a/app/code/Magento/Captcha/Helper/Data.php
+++ b/app/code/Magento/Captcha/Helper/Data.php
@@ -124,7 +124,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     public function getCaptcha($formId)
     {
         if (!array_key_exists($formId, $this->_captcha)) {
-            $captchaType = ucfirst($this->getConfigNode('type'));
+            $captchaType = ucfirst($this->getConfig('type'));
             if (!$captchaType) {
                 $captchaType = self::DEFAULT_CAPTCHA_TYPE;
             }
@@ -138,13 +138,13 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     }
 
     /**
-     * Returns value of the node with respect to current area (frontend or backend)
+     * Returns config value
      *
      * @param string $key The last part of XML_PATH_$area_CAPTCHA_ constant (case insensitive)
      * @param \Magento\Core\Model\Store $store
      * @return \Magento\Core\Model\Config\Element
      */
-    public function getConfigNode($key, $store = null)
+    public function getConfig($key, $store = null)
     {
         $store = $this->_storeManager->getStore($store);
         $areaCode = $store->isAdmin() ? 'admin' : 'customer';
diff --git a/app/code/Magento/Captcha/Model/DefaultModel.php b/app/code/Magento/Captcha/Model/DefaultModel.php
index 41dd3076133..5768f5ce64c 100644
--- a/app/code/Magento/Captcha/Model/DefaultModel.php
+++ b/app/code/Magento/Captcha/Model/DefaultModel.php
@@ -158,7 +158,7 @@ class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model
      */
     public function isShownToLoggedInUser()
     {
-        $forms = (array)$this->_captchaData->getConfigNode('shown_to_logged_in_user');
+        $forms = (array)$this->_captchaData->getConfig('shown_to_logged_in_user');
         foreach ($forms as $formId => $isShownToLoggedIn) {
             if ($isShownToLoggedIn && $this->_formId == $formId) {
                 return true;
@@ -185,7 +185,7 @@ class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model
      */
     protected function _getAllowedAttemptsForSameLogin()
     {
-        return (int)$this->_captchaData->getConfigNode('failed_attempts_login');
+        return (int)$this->_captchaData->getConfig('failed_attempts_login');
     }
 
     /**
@@ -195,7 +195,7 @@ class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model
      */
     protected function _getAllowedAttemptsFromSameIp()
     {
-        return (int)$this->_captchaData->getConfigNode('failed_attempts_ip');
+        return (int)$this->_captchaData->getConfig('failed_attempts_ip');
     }
 
     /**
@@ -241,7 +241,7 @@ class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model
      */
     public function isCaseSensitive()
     {
-        return (string)$this->_captchaData->getConfigNode('case_sensitive');
+        return (string)$this->_captchaData->getConfig('case_sensitive');
     }
 
     /**
@@ -251,7 +251,7 @@ class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model
      */
     public function getFont()
     {
-        $font = (string)$this->_captchaData->getConfigNode('font');
+        $font = (string)$this->_captchaData->getConfig('font');
         $fonts = $this->_captchaData->getFonts();
 
         if (isset($fonts[$font])) {
@@ -276,7 +276,7 @@ class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model
              * as "timeout" configuration parameter specifies timeout in minutes - we multiply it on 60 to set
              * expiration in seconds
              */
-            $this->_expiration = (int)$this->_captchaData->getConfigNode('timeout') * 60;
+            $this->_expiration = (int)$this->_captchaData->getConfig('timeout') * 60;
         }
         return $this->_expiration;
     }
@@ -383,7 +383,7 @@ class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model
      */
     protected function _getSymbols()
     {
-        return str_split((string)$this->_captchaData->getConfigNode('symbols'));
+        return str_split((string)$this->_captchaData->getConfig('symbols'));
     }
 
     /**
@@ -395,7 +395,7 @@ class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model
     {
         $from = 0;
         $to = 0;
-        $length = (string)$this->_captchaData->getConfigNode('length');
+        $length = (string)$this->_captchaData->getConfig('length');
         if (!is_numeric($length)) {
             if (preg_match('/(\d+)-(\d+)/', $length, $matches)) {
                 $from = (int)$matches[1];
@@ -421,17 +421,17 @@ class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model
      */
     protected function _isShowAlways()
     {
-        if ((string)$this->_captchaData->getConfigNode('mode') == \Magento\Captcha\Helper\Data::MODE_ALWAYS) {
+        if ((string)$this->_captchaData->getConfig('mode') == \Magento\Captcha\Helper\Data::MODE_ALWAYS) {
             return true;
         }
 
-        if ((string)$this->_captchaData->getConfigNode('mode') == \Magento\Captcha\Helper\Data::MODE_AFTER_FAIL
+        if ((string)$this->_captchaData->getConfig('mode') == \Magento\Captcha\Helper\Data::MODE_AFTER_FAIL
             && $this->_getAllowedAttemptsForSameLogin() == 0
         ) {
             return true;
         }
 
-        $alwaysFor = $this->_captchaData->getConfigNode('always_for');
+        $alwaysFor = $this->_captchaData->getConfig('always_for');
         foreach ($alwaysFor as $nodeFormId => $isAlwaysFor) {
             if ($isAlwaysFor && $this->_formId == $nodeFormId) {
                 return true;
@@ -448,7 +448,7 @@ class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model
      */
     protected function _isEnabled()
     {
-        return (string)$this->_captchaData->getConfigNode('enable');
+        return (string)$this->_captchaData->getConfig('enable');
     }
 
     /**
@@ -460,7 +460,7 @@ class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model
      */
     protected function _getTargetForms()
     {
-        $formsString = (string)$this->_captchaData->getConfigNode('forms');
+        $formsString = (string)$this->_captchaData->getConfig('forms');
         return explode(',', $formsString);
     }
 
diff --git a/app/code/Magento/Captcha/Model/Observer.php b/app/code/Magento/Captcha/Model/Observer.php
index 48f51807633..225083f4a26 100644
--- a/app/code/Magento/Captcha/Model/Observer.php
+++ b/app/code/Magento/Captcha/Model/Observer.php
@@ -364,7 +364,7 @@ class Observer
     public function deleteExpiredImages()
     {
         foreach ($this->_storeManager->getWebsites(true) as $website) {
-            $expire = time() - $this->_helper->getConfigNode('timeout', $website->getDefaultStore()) * 60;
+            $expire = time() - $this->_helper->getConfig('timeout', $website->getDefaultStore()) * 60;
             $imageDirectory = $this->_helper->getImgDir($website);
             foreach ($this->_filesystem->getNestedKeys($imageDirectory) as $filePath) {
                 if ($this->_filesystem->isFile($filePath)
diff --git a/app/code/Magento/Captcha/Model/Resource/Log.php b/app/code/Magento/Captcha/Model/Resource/Log.php
index d5587c12a13..48e6017e8f5 100644
--- a/app/code/Magento/Captcha/Model/Resource/Log.php
+++ b/app/code/Magento/Captcha/Model/Resource/Log.php
@@ -53,24 +53,22 @@ class Log extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_coreDate;
 
     /**
-     * Core http
-     *
-     * @var \Magento\Core\Helper\Http
+     * @var \Magento\HTTP\PhpEnvironment\RemoteAddress
      */
-    protected $_coreHttp = null;
+    protected $_remoteAddress;
 
     /**
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Date $coreDate
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress
      */
     public function __construct(
-        \Magento\Core\Model\Date $coreDate,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource,
+        \Magento\Core\Model\Date $coreDate,        
+        \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress
     ) {
         $this->_coreDate = $coreDate;
-        $this->_coreHttp = $coreHttp;
+        $this->_remoteAddress = $remoteAddress;
         parent::__construct($resource);
     }
 
@@ -101,7 +99,7 @@ class Log extends \Magento\Core\Model\Resource\Db\AbstractDb
                 array('count' => new \Zend_Db_Expr('count+1'), 'updated_at')
             );
         }
-        $ip = $this->_coreHttp->getRemoteAddr();
+        $ip = $this->_remoteAddress->getRemoteAddress();
         if ($ip != null) {
             $this->_getWriteAdapter()->insertOnDuplicate(
                 $this->getMainTable(),
@@ -129,7 +127,7 @@ class Log extends \Magento\Core\Model\Resource\Db\AbstractDb
                 array('type = ?' => self::TYPE_LOGIN, 'value = ?' => $login)
             );
         }
-        $ip = $this->_coreHttp->getRemoteAddr();
+        $ip = $this->_remoteAddress->getRemoteAddress();
         if ($ip != null) {
             $this->_getWriteAdapter()->delete(
                 $this->getMainTable(), array('type = ?' => self::TYPE_REMOTE_ADDRESS, 'value = ?' => $ip)
@@ -146,7 +144,7 @@ class Log extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     public function countAttemptsByRemoteAddress()
     {
-        $ip = $this->_coreHttp->getRemoteAddr();
+        $ip = $this->_remoteAddress->getRemoteAddress();
         if (!$ip) {
             return 0;
         }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Image.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Image.php
index c71a6c30662..cc5e2ffd7fa 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Image.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Image.php
@@ -42,7 +42,7 @@ class Image extends \Magento\Data\Form\Element\Image
 
     /**
      * @param \Magento\Core\Model\StoreManager $storeManager
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\UrlInterface $urlBuilder
@@ -50,14 +50,14 @@ class Image extends \Magento\Data\Form\Element\Image
      */
     public function __construct(
         \Magento\Core\Model\StoreManager $storeManager,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\UrlInterface $urlBuilder,
         $attributes = array()
     ) {
         $this->_storeManager = $storeManager;
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $urlBuilder, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $urlBuilder, $attributes);
     }
 
     protected function _getUrl()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php
index e20d2c53550..4b5167e61b5 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php
@@ -44,7 +44,7 @@ class Attributes extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -52,7 +52,7 @@ class Attributes extends \Magento\Backend\Block\Widget\Form\Generic
     public function __construct(
         \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php
index b32ebd400dc..4883895df1c 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php
@@ -80,7 +80,7 @@ class Chooser extends \Magento\Catalog\Block\Adminhtml\Category\Tree
      */
     public function prepareElementHtml(\Magento\Data\Form\Element\AbstractElement $element)
     {
-        $uniqId = $this->_coreData->uniqHash($element->getId());
+        $uniqId = $this->mathRandom->getUniqueHash($element->getId());
         $sourceUrl = $this->getUrl('catalog/category_widget/chooser', array('uniq_id' => $uniqId, 'use_massaction' => false));
 
         $chooser = $this->getLayout()->createBlock('Magento\Widget\Block\Adminhtml\Widget\Chooser')
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php
index 4feec79d6c2..eeac9b35bfc 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php
@@ -62,7 +62,7 @@ class Wysiwyg extends \Magento\Data\Form\Element\Textarea
     /**
      * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
      * @param \Magento\View\LayoutInterface $layout
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\Core\Model\ModuleManager $moduleManager
@@ -72,7 +72,7 @@ class Wysiwyg extends \Magento\Data\Form\Element\Textarea
     public function __construct(
         \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
         \Magento\View\LayoutInterface $layout,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\Core\Model\ModuleManager $moduleManager,
@@ -83,7 +83,7 @@ class Wysiwyg extends \Magento\Data\Form\Element\Textarea
         $this->_layout = $layout;
         $this->_moduleManager = $moduleManager;
         $this->_backendData = $backendData;
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg/Content.php
index 86ef938b6ed..1f7482f935b 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg/Content.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg/Content.php
@@ -44,7 +44,7 @@ class Content
     /**
      * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -52,7 +52,7 @@ class Content
     public function __construct(
         \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php
index cbf29a0c266..2201dece316 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php
@@ -53,7 +53,7 @@ class Advanced
      * @param \Magento\Backend\Model\Config\Source\Yesno $yesNo
      * @param \Magento\Eav\Helper\Data $eavData
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -62,7 +62,7 @@ class Advanced
         \Magento\Backend\Model\Config\Source\Yesno $yesNo,
         \Magento\Eav\Helper\Data $eavData,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php
index a15da363cd4..c9cf6f1571e 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php
@@ -45,7 +45,7 @@ class Front
     /**
      * @param \Magento\Backend\Model\Config\Source\Yesno $yesNo
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -53,7 +53,7 @@ class Front
     public function __construct(
         \Magento\Backend\Model\Config\Source\Yesno $yesNo,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php
index 2c039061c8c..97c20a3d2b5 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php
@@ -146,7 +146,7 @@ class Main extends \Magento\Backend\Block\Template
 
         $this->addChild('delete_button', 'Magento\Adminhtml\Block\Widget\Button', array(
             'label'     => __('Delete Attribute Set'),
-            'onclick'   => 'deleteConfirm(\''. $this->jsQuoteEscape(__('You are about to delete all products in this set. Are you sure you want to delete this attribute set?')) . '\', \'' . $this->getUrl('catalog/*/delete', array('id' => $setId)) . '\')',
+            'onclick'   => 'deleteConfirm(\''. $this->escapeJsQuote(__('You are about to delete all products in this set. Are you sure you want to delete this attribute set?')) . '\', \'' . $this->getUrl('catalog/*/delete', array('id' => $setId)) . '\')',
             'class'     => 'delete'
         ));
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formgroup.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formgroup.php
index 12ad387b0f2..e283eb0ff09 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formgroup.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formgroup.php
@@ -43,7 +43,7 @@ class Formgroup
     /**
      * @param \Magento\Eav\Model\Entity\TypeFactory $typeFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -51,7 +51,7 @@ class Formgroup
     public function __construct(
         \Magento\Eav\Model\Entity\TypeFactory $typeFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php
index 69d2bf4b5f6..b7d1f94d04d 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php
@@ -37,7 +37,7 @@ class Formset
     /**
      * @param \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -45,7 +45,7 @@ class Formset
     public function __construct(
         \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main/Filter.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main/Filter.php
index ce9e145ef50..31f542e8be6 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main/Filter.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main/Filter.php
@@ -43,7 +43,7 @@ class Filter
     /**
      * @param \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -51,7 +51,7 @@ class Filter
     public function __construct(
         \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php
index ae66f85c5af..63a3b96a442 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php
@@ -46,7 +46,7 @@ class Attributes
     /**
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -54,7 +54,7 @@ class Attributes
     public function __construct(
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php
index 5ac86bb6807..4045d0db1f7 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php
@@ -40,7 +40,7 @@ class NewCategory extends \Magento\Backend\Block\Widget\Form\Generic
 {
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
@@ -48,7 +48,7 @@ class NewCategory extends \Magento\Backend\Block\Widget\Form\Generic
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php
index 2ac94ea56cd..d00d21075d6 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php
@@ -49,7 +49,7 @@ class Attributes extends \Magento\Catalog\Block\Adminhtml\Form
 
     /**
      * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
@@ -58,7 +58,7 @@ class Attributes extends \Magento\Catalog\Block\Adminhtml\Form
      */
     public function __construct(
         \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Catalog\Helper\Data $catalogData,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Simple.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Simple.php
index 23e124308d3..0f7993bcc1f 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Simple.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Simple.php
@@ -51,7 +51,7 @@ class Simple
     /**
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
@@ -61,7 +61,7 @@ class Simple
     public function __construct(
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Catalog\Helper\Data $catalogData,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Settings.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Settings.php
index e4be2cfc6cb..192a12d363f 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Settings.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Settings.php
@@ -43,7 +43,7 @@ class Settings extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * @param \Magento\Catalog\Model\Product\Type\Configurable $configurableType
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -51,7 +51,7 @@ class Settings extends \Magento\Backend\Block\Widget\Form\Generic
     public function __construct(
         \Magento\Catalog\Model\Product\Type\Configurable $configurableType,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php
index b7d9166ed12..e0fe599ae81 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php
@@ -37,18 +37,11 @@ class Watermark
     extends \Magento\Backend\Block\AbstractBlock
     implements \Magento\Data\Form\Element\Renderer\RendererInterface
 {
-    const XML_PATH_IMAGE_TYPES = 'global/catalog/product/media/image_types';
-
     /**
      * @var \Magento\Data\Form\Element\Factory
      */
     protected $_elementFactory;
 
-    /**
-     * @var \Magento\Core\Model\Config
-     */
-    protected $_coreConfig;
-
     /**
      * @var \Magento\Backend\Block\System\Config\Form\Field
      */
@@ -59,12 +52,17 @@ class Watermark
      */
     protected $_watermarkPosition;
 
+    /**
+     * @var array
+     */
+    protected $_imageTypes;
+
     /**
      * @param \Magento\Catalog\Model\Config\Source\Watermark\Position $watermarkPosition
      * @param \Magento\Backend\Block\System\Config\Form\Field $formField
      * @param \Magento\Data\Form\Element\Factory $elementFactory
      * @param \Magento\Backend\Block\Context $context
-     * @param \Magento\Core\Model\Config $coreConfig
+     * @param array $imageTypes
      * @param array $data
      */
     public function __construct(
@@ -72,22 +70,20 @@ class Watermark
         \Magento\Backend\Block\System\Config\Form\Field $formField,
         \Magento\Data\Form\Element\Factory $elementFactory,
         \Magento\Backend\Block\Context $context,
-        \Magento\Core\Model\Config $coreConfig,
+        array $imageTypes = array(),
         array $data = array()
     ) {
         $this->_watermarkPosition = $watermarkPosition;
         $this->_formField = $formField;
         $this->_elementFactory = $elementFactory;
-        $this->_coreConfig = $coreConfig;
+        $this->_imageTypes = $imageTypes;
         parent::__construct($context, $data);
     }
 
     public function render(\Magento\Data\Form\Element\AbstractElement $element)
     {
         $html = $this->_getHeaderHtml($element);
-        $attributes = $this->_coreConfig->getNode(self::XML_PATH_IMAGE_TYPES)->asArray();
-
-        foreach ($attributes as $key => $attribute) {
+        foreach ($this->_imageTypes as $key => $attribute) {
             /**
              * Watermark size field
              */
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php
index d260a037828..0f2efca739d 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php
@@ -63,7 +63,7 @@ class BaseImage extends \Magento\Data\Form\Element\AbstractElement
     protected $_viewUrl;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\Core\Model\View\UrlFactory $coreViewUrlFactory
@@ -73,7 +73,7 @@ class BaseImage extends \Magento\Data\Form\Element\AbstractElement
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\Core\Model\View\UrlFactory $coreViewUrlFactory,
@@ -82,7 +82,7 @@ class BaseImage extends \Magento\Data\Form\Element\AbstractElement
         \Magento\File\Size $fileConfig,
         array $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
 
         $this->_viewUrl = $coreViewUrlFactory->create();
         $this->_url = $backendUrlFactory->create();
@@ -108,8 +108,8 @@ class BaseImage extends \Magento\Data\Form\Element\AbstractElement
      */
     public function getElementHtml()
     {
-        $htmlId = $this->_coreData->escapeHtml($this->getHtmlId());
-        $uploadUrl = $this->_coreData->escapeHtml($this->_getUploadUrl());
+        $htmlId = $this->_escaper->escapeHtml($this->getHtmlId());
+        $uploadUrl = $this->_escaper->escapeHtml($this->_getUploadUrl());
         $spacerImage = $this->_viewUrl->getViewFileUrl('images/spacer.gif');
         $imagePlaceholderText = __('Click here or drag and drop to add images');
         $deleteImageText = __('Delete image');
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
index ecb2feb2f32..aa83f6051fe 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
@@ -24,15 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form;
+
 /**
  * Product form category field helper
- *
- * @category   Magento
- * @package    Magento_Catalog
- * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form;
-
 class Category extends \Magento\Data\Form\Element\Multiselect
 {
     /**
@@ -45,34 +41,42 @@ class Category extends \Magento\Data\Form\Element\Multiselect
      *
      * @var \Magento\Backend\Helper\Data
      */
-    protected $_backendData = null;
+    protected $_backendData;
 
     /**
      * @var \Magento\Catalog\Model\Resource\Category\CollectionFactory
      */
     protected $_collectionFactory;
 
+    /**
+     * @var \Magento\Core\Helper\Data
+     */
+    protected $_coreData;
+
     /**
      * @param \Magento\Catalog\Model\Resource\Category\CollectionFactory $collectionFactory
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\Backend\Helper\Data $backendData
      * @param \Magento\View\LayoutInterface $layout
+     * @param \Magento\Core\Helper\Data $coreData
      * @param array $attributes
      */
     public function __construct(
         \Magento\Catalog\Model\Resource\Category\CollectionFactory $collectionFactory,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\Backend\Helper\Data $backendData,
         \Magento\View\LayoutInterface $layout,
+        \Magento\Core\Helper\Data $coreData,
         array $attributes = array()
     ) {
         $this->_collectionFactory = $collectionFactory;
         $this->_backendData = $backendData;
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        $this->_coreData = $coreData;
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->_layout = $layout;
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php
index a36f42c88c3..45bb07ea552 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php
@@ -49,7 +49,7 @@ class Gallery extends \Magento\Data\Form\Element\AbstractElement
     /**
      * @param \Magento\View\LayoutInterface $layout
      * @param \Magento\Core\Model\StoreManager $storeManager
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
@@ -57,14 +57,14 @@ class Gallery extends \Magento\Data\Form\Element\AbstractElement
     public function __construct(
         \Magento\View\LayoutInterface $layout,
         \Magento\Core\Model\StoreManager $storeManager,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
         $this->_layout = $layout;
         $this->_storeManager = $storeManager;
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
     }
 
     public function getElementHtml()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Price.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Price.php
index afc3be7f618..d3c52d75425 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Price.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Price.php
@@ -55,7 +55,7 @@ class Price extends \Magento\Data\Form\Element\Text
     /**
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\Tax\Helper\Data $taxData
@@ -64,7 +64,7 @@ class Price extends \Magento\Data\Form\Element\Text
     public function __construct(
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\Tax\Helper\Data $taxData,
@@ -73,7 +73,7 @@ class Price extends \Magento\Data\Form\Element\Text
         $this->_locale = $locale;
         $this->_storeManager = $storeManager;
         $this->_taxData = $taxData;
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
     }
 
     protected function _construct()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php
index 4aa16d4d3ed..75cab01e27d 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php
@@ -52,14 +52,14 @@ class Weight extends \Magento\Data\Form\Element\Text
     protected $_helper;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\Catalog\Helper\Product $helper
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\Catalog\Helper\Product $helper,
@@ -71,7 +71,7 @@ class Weight extends \Magento\Data\Form\Element\Text
             ->setLabel($this->_helper->getTypeSwitcherControlLabel());
         $attributes['class'] =
             'validate-number validate-zero-or-greater validate-number-range number-range-0-99999999.9999';
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Price.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Price.php
index 221bf94db68..4d772208382 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Price.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Price.php
@@ -35,27 +35,6 @@ namespace Magento\Catalog\Block\Adminhtml\Product;
 
 class Price extends \Magento\Catalog\Block\Product\Price
 {
-    /**
-     * @param \Magento\Core\Model\StoreManager $storeManager
-     * @param \Magento\Catalog\Helper\Data $catalogData
-     * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Block\Template\Context $context
-     * @param \Magento\Core\Model\Registry $registry
-     * @param array $data
-     */
-    public function __construct(
-        \Magento\Core\Model\StoreManager $storeManager,
-        \Magento\Catalog\Helper\Data $catalogData,
-        \Magento\Tax\Helper\Data $taxData,
-        \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Block\Template\Context $context,
-        \Magento\Core\Model\Registry $registry,
-        array $data = array()
-    ) {
-        parent::__construct($storeManager, $catalogData, $taxData, $coreData, $context, $registry, $data);
-    }
-
     /**
      * @param null|string|bool|int|\Magento\Core\Model\Store $storeId
      * @return bool|\Magento\Core\Model\Website
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php
index 2cd46b3c388..72fee202370 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php
@@ -104,7 +104,7 @@ class Chooser extends \Magento\Adminhtml\Block\Widget\Grid
      */
     public function prepareElementHtml(\Magento\Data\Form\Element\AbstractElement $element)
     {
-        $uniqId = $this->_coreData->uniqHash($element->getId());
+        $uniqId = $this->mathRandom->getUniqueHash($element->getId());
         $sourceUrl = $this->getUrl('catalog/product_widget/chooser', array(
             'uniq_id' => $uniqId,
             'use_massaction' => false,
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit/Form.php b/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit/Form.php
index a78b72bbfff..739307f6723 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit/Form.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit/Form.php
@@ -44,7 +44,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -52,7 +52,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     public function __construct(
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Catalog/Block/Product/NewProduct.php b/app/code/Magento/Catalog/Block/Product/NewProduct.php
index 80a84054e07..2c969295854 100644
--- a/app/code/Magento/Catalog/Block/Product/NewProduct.php
+++ b/app/code/Magento/Catalog/Block/Product/NewProduct.php
@@ -156,11 +156,11 @@ class NewProduct extends \Magento\Catalog\Block\Product\AbstractProduct
     {
         $todayStartOfDayDate  = $this->_locale->date()
             ->setTime('00:00:00')
-            ->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT);
+            ->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
 
         $todayEndOfDayDate  = $this->_locale->date()
             ->setTime('23:59:59')
-            ->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT);
+            ->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
 
         /** @var $collection \Magento\Catalog\Model\Resource\Product\Collection */
         $collection = $this->_productCollectionFactory->create();
diff --git a/app/code/Magento/Catalog/Block/Product/Price.php b/app/code/Magento/Catalog/Block/Product/Price.php
index 6af76f675fb..dd7f339d969 100644
--- a/app/code/Magento/Catalog/Block/Product/Price.php
+++ b/app/code/Magento/Catalog/Block/Product/Price.php
@@ -66,6 +66,16 @@ class Price extends \Magento\Core\Block\Template
      */
     protected $_storeManager;
 
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
     /**
      * Construct
      *
@@ -75,6 +85,8 @@ class Price extends \Magento\Core\Block\Template
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Block\Template\Context $context
      * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Stdlib\String $string
+     * @param \Magento\Math\Random $mathRandom
      * @param array $data
      */
     public function __construct(
@@ -84,12 +96,16 @@ class Price extends \Magento\Core\Block\Template
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Block\Template\Context $context,
         \Magento\Core\Model\Registry $registry,
+        \Magento\Stdlib\String $string,
+        \Magento\Math\Random $mathRandom,
         array $data = array()
     ) {
         $this->_storeManager = $storeManager;
         $this->_coreRegistry = $registry;
         $this->_catalogData = $catalogData;
         $this->_taxData = $taxData;
+        $this->string = $string;
+        $this->mathRandom = $mathRandom;
         parent::__construct($coreData, $context, $data);
     }
 
@@ -222,4 +238,27 @@ class Price extends \Magento\Core\Block\Template
         $html = $this->hasRealPriceHtml() ? $this->getRealPriceHtml() : $product->getRealPriceHtml();
         return $this->_coreData->jsonEncode($html);
     }
+
+    /**
+     * Prepare SKU
+     *
+     * @param string $sku
+     * @return string
+     */
+    public function prepareSku($sku)
+    {
+        return $this->escapeHtml($this->string->splitInjection($sku));
+    }
+
+    /**
+     * Get random string
+     *
+     * @param int $length
+     * @param string|null $chars
+     * @return string
+     */
+    public function getRandomString($length, $chars = null)
+    {
+        return $this->mathRandom->getRandomString($length, $chars);
+    }
 }
diff --git a/app/code/Magento/Catalog/Block/Product/View.php b/app/code/Magento/Catalog/Block/Product/View.php
index f04170d4588..1f3cbbde28f 100644
--- a/app/code/Magento/Catalog/Block/Product/View.php
+++ b/app/code/Magento/Catalog/Block/Product/View.php
@@ -24,17 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Catalog\Block\Product;
 
 /**
  * Product View block
- *
- * @category Magento
- * @package  Magento_Catalog
- * @module   Catalog
- * @author   Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Catalog\Block\Product;
-
 class View extends \Magento\Catalog\Block\Product\AbstractProduct
 {
     /**
@@ -45,11 +39,11 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
     protected $_mapRenderer = 'msrp_item';
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
      * Tax calculation
@@ -81,7 +75,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Tax\Model\Calculation $taxCalculation
      * @param \Magento\Core\Model\Registry $coreRegistry
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param \Magento\Core\Helper\Data $coreData
@@ -95,7 +89,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Tax\Model\Calculation $taxCalculation,
         \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Catalog\Helper\Data $catalogData,
         \Magento\Core\Helper\Data $coreData,
@@ -105,7 +99,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
         $this->_productFactory = $productFactory;
         $this->_locale = $locale;
         $this->_taxCalculation = $taxCalculation;
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct($storeManager, $catalogConfig, $coreRegistry, $taxData, $catalogData, $coreData,
             $context, $data);
     }
@@ -136,7 +130,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
             if ($description) {
                 $headBlock->setDescription( ($description) );
             } else {
-                $headBlock->setDescription($this->_coreString->substr($product->getDescription(), 0, 255));
+                $headBlock->setDescription($this->string->substr($product->getDescription(), 0, 255));
             }
             //@todo: move canonical link to separate block
             if ($this->helper('Magento\Catalog\Helper\Product')->canUseCanonicalTag()
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Category.php b/app/code/Magento/Catalog/Controller/Adminhtml/Category.php
index 064a24529f8..61a0934b965 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Category.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category.php
@@ -423,7 +423,7 @@ class Category extends \Magento\Backend\Controller\Adminhtml\Action
             $this->getResponse()->setBody($e->getMessage());
         } catch (\Exception $e){
             $this->getResponse()->setBody(__('There was a category move error %1', $e));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
 
     }
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php
index 8af183bf159..9a7d1518d3f 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php
@@ -91,7 +91,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action
                 $product->load($productId);
             } catch (\Exception $e) {
                 $product->setTypeId(\Magento\Catalog\Model\Product\Type::DEFAULT_TYPE);
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
             }
         }
 
@@ -885,8 +885,8 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_getSession()->addSuccess(__('You saved the product.'));
                 if ($product->getSku() != $originalSku) {
                     $this->_getSession()->addNotice(__('SKU for product %1 has been changed to %2.',
-                            $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($product->getName()),
-                            $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($product->getSku()))
+                            $this->_objectManager->get('Magento\Escaper')->escapeHtml($product->getName()),
+                            $this->_objectManager->get('Magento\Escaper')->escapeHtml($product->getSku()))
                     );
                 }
 
@@ -905,7 +905,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action
                     ->setProductData($data);
                 $redirectBack = true;
             } catch (\Exception $e) {
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
                 $this->_getSession()->addError($e->getMessage());
                 $redirectBack = true;
             }
@@ -952,7 +952,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action
             $this->_getSession()->addSuccess(__('You duplicated the product.'));
             $this->_redirect('catalog/*/edit', array('_current'=>true, 'id'=>$newProduct->getId()));
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_getSession()->addError($e->getMessage());
             $this->_redirect('catalog/*/edit', array('_current'=>true));
         }
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php
index d9eebd7f87e..b52ae646b1f 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php
@@ -88,7 +88,7 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action
                                 'date_format' => $dateFormat
                             ));
                             $filterInternal = new \Zend_Filter_NormalizedToLocalized(array(
-                                'date_format' => \Magento\Date::DATE_INTERNAL_FORMAT
+                                'date_format' => \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT
                             ));
                             $value = $filterInternal->filter($filterInput->filter($value));
                         } else {
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute.php
index 9ea11f33d76..30bfb070fba 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute.php
@@ -193,7 +193,7 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action
             $attributeSet = $this->_objectManager->create('Magento\Eav\Model\Entity\Attribute\Set');
             $attributeSet->setEntityTypeId($this->_entityTypeId)->load($setName, 'attribute_set_name');
             if ($attributeSet->getId()) {
-                $setName = $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($setName);
+                $setName = $this->_objectManager->get('Magento\Escaper')->escapeHtml($setName);
                 $this->_getSession()->addError(
                     __('Attribute Set with name \'%1\' already exists.', $setName)
                 );
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set.php
index b40a8ccbb1e..50498461356 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set.php
@@ -41,7 +41,7 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action
      *
      * @var \Magento\Core\Model\Registry
      */
-    protected $_coreRegistry = null;
+    protected $_coreRegistry;
 
     /**
      * @param \Magento\Backend\Controller\Context $context
@@ -130,13 +130,13 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action
         $model  = $this->_objectManager->create('Magento\Eav\Model\Entity\Attribute\Set')
             ->setEntityTypeId($entityTypeId);
 
-        /** @var $helper \Magento\Adminhtml\Helper\Data */
-        $helper = $this->_objectManager->get('Magento\Adminhtml\Helper\Data');
+        /** @var $filterManager \Magento\Filter\FilterManager */
+        $filterManager = $this->_objectManager->get('Magento\Filter\FilterManager');
 
         try {
             if ($isNewSet) {
                 //filter html tags
-                $name = $helper->stripTags($this->getRequest()->getParam('attribute_set_name'));
+                $name = $filterManager->stripTags($this->getRequest()->getParam('attribute_set_name'));
                 $model->setAttributeSetName(trim($name));
             } else {
                 if ($attributeSetId) {
@@ -149,7 +149,7 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action
                     ->jsonDecode($this->getRequest()->getPost('data'));
 
                 //filter html tags
-                $data['attribute_set_name'] = $helper->stripTags($data['attribute_set_name']);
+                $data['attribute_set_name'] = $filterManager->stripTags($data['attribute_set_name']);
 
                 $model->organizeData($data);
             }
diff --git a/app/code/Magento/Catalog/Controller/Category.php b/app/code/Magento/Catalog/Controller/Category.php
index 6a8c95c82a7..5666b5a7879 100644
--- a/app/code/Magento/Catalog/Controller/Category.php
+++ b/app/code/Magento/Catalog/Controller/Category.php
@@ -127,7 +127,7 @@ class Category extends \Magento\Core\Controller\Front\Action
                 )
             );
         } catch (\Magento\Core\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             return false;
         }
 
diff --git a/app/code/Magento/Catalog/Controller/Product.php b/app/code/Magento/Catalog/Controller/Product.php
index 44346a3df0e..b28bf4a5513 100644
--- a/app/code/Magento/Catalog/Controller/Product.php
+++ b/app/code/Magento/Catalog/Controller/Product.php
@@ -87,7 +87,7 @@ class Product
                     $this->_forward('noRoute');
                 }
             } else {
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
                 $this->_forward('noRoute');
             }
         }
diff --git a/app/code/Magento/Catalog/Controller/Product/Compare.php b/app/code/Magento/Catalog/Controller/Product/Compare.php
index 774cc36cd9a..5350c991094 100644
--- a/app/code/Magento/Catalog/Controller/Product/Compare.php
+++ b/app/code/Magento/Catalog/Controller/Product/Compare.php
@@ -191,7 +191,7 @@ class Compare extends \Magento\Core\Controller\Front\Action
 
             if ($product->getId()/* && !$product->isSuper()*/) {
                 $this->_catalogProductCompareList->addProduct($product);
-                $productName = $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($product->getName());
+                $productName = $this->_objectManager->get('Magento\Escaper')->escapeHtml($product->getName());
                 $this->_catalogSession->addSuccess(
                     __('You added product %1 to the comparison list.', $productName)
                 );
@@ -234,7 +234,7 @@ class Compare extends \Magento\Core\Controller\Front\Action
                 $helper = $this->_objectManager->get('Magento\Catalog\Helper\Product\Compare');
                 if ($item->getId()) {
                     $item->delete();
-                    $productName = $helper->escapeHtml($product->getName());
+                    $productName = $this->_objectManager->get('Magento\Escaper')->escapeHtml($product->getName());
                     $this->_catalogSession->addSuccess(
                         __('You removed product %1 from the comparison list.', $productName)
                     );
diff --git a/app/code/Magento/Catalog/Helper/Catalog.php b/app/code/Magento/Catalog/Helper/Catalog.php
index 4a47c744013..81ff721c7f9 100644
--- a/app/code/Magento/Catalog/Helper/Catalog.php
+++ b/app/code/Magento/Catalog/Helper/Catalog.php
@@ -35,6 +35,14 @@ namespace Magento\Catalog\Helper;
 
 class Catalog extends \Magento\Core\Helper\AbstractHelper
 {
+    /**
+     * Config path to valid file paths
+     */
+    const XML_PATH_PUBLIC_FILES_VALID_PATHS     = 'general/file/public_files_valid_paths';
+
+    /**
+     * Config path to sitemap valid paths
+     */
     const XML_PATH_SITEMAP_VALID_PATHS = 'general/file/sitemap_generate_valid_paths';
 
     /**
@@ -57,13 +65,6 @@ class Catalog extends \Magento\Core\Helper\AbstractHelper
      * @var \Magento\Core\Model\Store\Config
      */
     protected $_coreStoreConfig;
-    
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
@@ -75,7 +76,6 @@ class Catalog extends \Magento\Core\Helper\AbstractHelper
         \Magento\Core\Helper\Context $context,
         \Magento\Core\Model\Store\Config $coreStoreConfig
     ) {
-        $this->_coreData = $coreData;
         $this->_coreStoreConfig = $coreStoreConfig;
         parent::__construct($context);
     }
@@ -133,7 +133,7 @@ class Catalog extends \Magento\Core\Helper\AbstractHelper
     {
         return array_merge(
             $this->_coreStoreConfig->getConfig(self::XML_PATH_SITEMAP_VALID_PATHS),
-            $this->_coreData->getPublicFilesValidPath()
+            $this->_coreStoreConfig->getConfig(self::XML_PATH_PUBLIC_FILES_VALID_PATHS)
         );
     }
 }
diff --git a/app/code/Magento/Catalog/Helper/Data.php b/app/code/Magento/Catalog/Helper/Data.php
index ecadc54f73e..1184ad2eb56 100644
--- a/app/code/Magento/Catalog/Helper/Data.php
+++ b/app/code/Magento/Catalog/Helper/Data.php
@@ -75,12 +75,13 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     protected $_storeId = null;
 
-    /** Core registry
+    /**
+     * Core registry
      *
      * @var \Magento\Core\Model\Registry
      */
     protected $_coreRegistry = null;
-    
+
     /**
      * Catalog product
      *
@@ -96,17 +97,15 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     protected $_catalogCategory = null;
 
     /**
-     * Core string
-     *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
      * @var string
      */
     protected $_templateFilterModel;
-    
+
     /**
      * Catalog session
      *
@@ -149,6 +148,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     protected $_templateFilterFactory;
 
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
     /**
      * Construct
      *
@@ -157,13 +161,14 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Session $catalogSession
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Catalog\Helper\Category $catalogCategory
      * @param \Magento\Catalog\Helper\Product $catalogProduct
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Catalog\Model\Template\Filter\Factory $templateFilterFactory
+     * @param \Magento\Escaper $escaper
      * @param $templateFilterModel
      */
     public function __construct(
@@ -172,13 +177,14 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Session $catalogSession,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Catalog\Helper\Category $catalogCategory,
         \Magento\Catalog\Helper\Product $catalogProduct,
         \Magento\Core\Helper\Context $context,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Catalog\Model\Template\Filter\Factory $templateFilterFactory,
+        \Magento\Escaper $escaper,
         $templateFilterModel
     ) {
         $this->_eavAttributeFactory = $eavAttributeFactory;
@@ -187,12 +193,13 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         $this->_storeManager = $storeManager;
         $this->_catalogSession = $catalogSession;
         $this->_templateFilterFactory = $templateFilterFactory;
-        $this->_coreString = $coreString;
+        $this->string = $string;
         $this->_catalogCategory = $catalogCategory;
         $this->_catalogProduct = $catalogProduct;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_coreRegistry = $coreRegistry;
         $this->_templateFilterModel = $templateFilterModel;
+        $this->_escaper = $escaper;
         parent::__construct($context);
     }
 
@@ -320,7 +327,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function splitSku($sku, $length = 30)
     {
-        return $this->_coreString->strSplit($sku, $length, true, false, '[\-\s]');
+        return $this->string->split($sku, $length, true, false, '[\-\s]');
     }
 
     /**
@@ -449,7 +456,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function getMsrpExplanationMessage()
     {
-        return $this->escapeHtml(
+        return $this->_escaper->escapeHtml(
             $this->_coreStoreConfig->getConfig(self::XML_PATH_MSRP_EXPLANATION_MESSAGE, $this->_storeId),
             array('b','br','strong','i','u', 'p', 'span')
         );
@@ -462,7 +469,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function getMsrpExplanationMessageWhatsThis()
     {
-        return $this->escapeHtml(
+        return $this->_escaper->escapeHtml(
             $this->_coreStoreConfig->getConfig(self::XML_PATH_MSRP_EXPLANATION_MESSAGE_WHATS_THIS, $this->_storeId),
             array('b','br','strong','i','u', 'p', 'span')
         );
diff --git a/app/code/Magento/Catalog/Helper/Output.php b/app/code/Magento/Catalog/Helper/Output.php
index 51c259bb523..5aa52bcf820 100644
--- a/app/code/Magento/Catalog/Helper/Output.php
+++ b/app/code/Magento/Catalog/Helper/Output.php
@@ -56,20 +56,28 @@ class Output extends \Magento\Core\Helper\AbstractHelper
      */
     protected $_eavConfig;
 
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
     /**
      * Construct
      *
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param \Magento\Core\Helper\Context $context
+     * @param \Magento\Escaper $escaper
      */
     public function __construct(
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Catalog\Helper\Data $catalogData,
-        \Magento\Core\Helper\Context $context
+        \Magento\Core\Helper\Context $context,
+        \Magento\Escaper $escaper
     ) {
         $this->_eavConfig = $eavConfig;
         $this->_catalogData = $catalogData;
+        $this->_escaper = $escaper;
         parent::__construct($context);
     }
 
@@ -148,7 +156,7 @@ class Output extends \Magento\Core\Helper\AbstractHelper
         if ($attribute && $attribute->getId() && ($attribute->getFrontendInput() != 'media_image')
             && (!$attribute->getIsHtmlAllowedOnFront() && !$attribute->getIsWysiwygEnabled())) {
                 if ($attribute->getFrontendInput() != 'price') {
-                    $attributeHtml = $this->escapeHtml($attributeHtml);
+                    $attributeHtml = $this->_escaper->escapeHtml($attributeHtml);
                 }
                 if ($attribute->getFrontendInput() == 'textarea') {
                     $attributeHtml = nl2br($attributeHtml);
@@ -182,7 +190,7 @@ class Output extends \Magento\Core\Helper\AbstractHelper
 
         if ($attribute && ($attribute->getFrontendInput() != 'image')
             && (!$attribute->getIsHtmlAllowedOnFront() && !$attribute->getIsWysiwygEnabled())) {
-            $attributeHtml = $this->escapeHtml($attributeHtml);
+            $attributeHtml = $this->_escaper->escapeHtml($attributeHtml);
         }
         if ($attribute->getIsHtmlAllowedOnFront() && $attribute->getIsWysiwygEnabled()) {
             if ($this->_catalogData->isUrlDirectivesParsingAllowed()) {
diff --git a/app/code/Magento/Catalog/Helper/Product.php b/app/code/Magento/Catalog/Helper/Product.php
index 66a2db4375d..35799827b19 100644
--- a/app/code/Magento/Catalog/Helper/Product.php
+++ b/app/code/Magento/Catalog/Helper/Product.php
@@ -101,7 +101,7 @@ class Product extends \Magento\Core\Helper\Url
     protected $_coreConfig;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
diff --git a/app/code/Magento/Catalog/Helper/Product/Configuration.php b/app/code/Magento/Catalog/Helper/Product/Configuration.php
index 4ce24d1353a..07bf007fbdd 100644
--- a/app/code/Magento/Catalog/Helper/Product/Configuration.php
+++ b/app/code/Magento/Catalog/Helper/Product/Configuration.php
@@ -40,11 +40,12 @@ class Configuration extends \Magento\Core\Helper\AbstractHelper
     protected $_config;
 
     /**
-     * Core string
+     * Filter manager
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Filter\FilterManager
      */
-    protected $_coreString = null;
+    protected $filter;
+
 
     /**
      * Product option factory
@@ -54,22 +55,30 @@ class Configuration extends \Magento\Core\Helper\AbstractHelper
     protected $_productOptionFactory;
 
     /**
-     * Construct
+     * Magento string lib
      *
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
+    /**
      * @param \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Filter\FilterManager $filter
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $config
+     * @param \Magento\Stdlib\String $string
      */
     public function __construct(
         \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Filter\FilterManager $filter,
         \Magento\Core\Helper\Context $context,
-        \Magento\Catalog\Model\ProductTypes\ConfigInterface $config
+        \Magento\Catalog\Model\ProductTypes\ConfigInterface $config,
+        \Magento\Stdlib\String $string
     ) {
         $this->_productOptionFactory = $productOptionFactory;
-        $this->_coreString = $coreString;
+        $this->filter = $filter;
         $this->_config = $config;
+        $this->string = $string;
         parent::__construct($context);
     }
 
@@ -205,9 +214,9 @@ class Configuration extends \Magento\Core\Helper\AbstractHelper
         switch ($typeId) {
             case \Magento\Catalog\Model\Product\Type\Configurable::TYPE_CODE:
                 return $this->getConfigurableOptions($item);
-                break;
             case \Magento\Catalog\Model\Product\Type\Grouped::TYPE_CODE:
                 return $this->getGroupedOptions($item);
+            default:
                 break;
         }
         return $this->getCustomOptions($item);
@@ -276,23 +285,22 @@ class Configuration extends \Magento\Core\Helper\AbstractHelper
         }
 
         // Truncate standard view
-        $result = array();
         if (is_array($optionValue)) {
-            $_truncatedValue = implode("\n", $optionValue);
-            $_truncatedValue = nl2br($_truncatedValue);
-            return array('value' => $_truncatedValue);
+            $truncatedValue = implode("\n", $optionValue);
+            $truncatedValue = nl2br($truncatedValue);
+            return array('value' => $truncatedValue);
         } else {
             if ($maxLength) {
-                $_truncatedValue = $this->_coreString->truncate($optionValue, $maxLength, '');
+                $truncatedValue = $this->filter->truncate($optionValue, array('length' => $maxLength, 'etc' => ''));
             } else {
-                $_truncatedValue = $optionValue;
+                $truncatedValue = $optionValue;
             }
-            $_truncatedValue = nl2br($_truncatedValue);
+            $truncatedValue = nl2br($truncatedValue);
         }
 
-        $result = array('value' => $_truncatedValue);
+        $result = array('value' => $truncatedValue);
 
-        if ($maxLength && ($this->_coreString->strlen($optionValue) > $maxLength)) {
+        if ($maxLength && ($this->string->strlen($optionValue) > $maxLength)) {
             $result['value'] = $result['value'] . $cutReplacer;
             $optionValue = nl2br($optionValue);
             $result['full_view'] = $optionValue;
diff --git a/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php b/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php
index 1d4ce6d2813..c6bcb4f01a9 100644
--- a/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php
+++ b/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php
@@ -69,37 +69,32 @@ class Attribute extends \Magento\Backend\Helper\Data
 
     /**
      * @param \Magento\Core\Helper\Context $context
-     * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Model\Config\Primary $primaryConfig
-     * @param \Magento\App\RouterList $routerList
+     * @param \Magento\App\Route\Config $routeConfig
      * @param \Magento\Core\Model\AppInterface $app
      * @param \Magento\Backend\Model\Url $backendUrl
      * @param \Magento\Backend\Model\Auth $auth
      * @param \Magento\Backend\App\Area\FrontNameResolver $frontNameResolver
+     * @param \Magento\Math\Random $mathRandom
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Backend\Model\Session $session
      * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productsFactory
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
-        \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Model\Config\Primary $primaryConfig,
-        \Magento\App\RouterList $routerList,
+        \Magento\App\Route\Config $routeConfig,
         \Magento\Core\Model\AppInterface $app,
         \Magento\Backend\Model\Url $backendUrl,
         \Magento\Backend\Model\Auth $auth,
         \Magento\Backend\App\Area\FrontNameResolver $frontNameResolver,
+        \Magento\Math\Random $mathRandom,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Backend\Model\Session $session,
         \Magento\Catalog\Model\Resource\Product\CollectionFactory $productsFactory
     ) {
-
         $this->_eavConfig = $eavConfig;
         $this->_session = $session;
         $this->_productsFactory = $productsFactory;
-        parent::__construct(
-            $context, $coreData, $primaryConfig, $routerList, $app, $backendUrl, $auth, $frontNameResolver
-        );
+        parent::__construct($context, $routeConfig, $app, $backendUrl, $auth, $frontNameResolver, $mathRandom);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Helper/Product/Flat.php b/app/code/Magento/Catalog/Helper/Product/Flat.php
index 212ed6cfad4..43b6888ecc1 100644
--- a/app/code/Magento/Catalog/Helper/Product/Flat.php
+++ b/app/code/Magento/Catalog/Helper/Product/Flat.php
@@ -96,10 +96,6 @@ class Flat extends \Magento\Catalog\Helper\Flat\AbstractFlat
      * Construct
      *
      * @param \Magento\Index\Model\ProcessFactory $processFactory
-
-     * 
-     * Constructor
-     * @param \Magento\Index\Model\ProcessFactory $processFactory
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Catalog\Model\Product\Flat\Flag $flatFlag
@@ -116,7 +112,7 @@ class Flat extends \Magento\Catalog\Helper\Flat\AbstractFlat
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
         parent::__construct($processFactory, $context);
-        $this->_flagObject = $flatFlag;
+        $this->_flagObject = $flatFlag->loadSelf();
         $this->_addFilterableAttrs = intval($addFilterableAttrs);
         $this->_addChildData = intval($addChildData);
     }
@@ -128,9 +124,6 @@ class Flat extends \Magento\Catalog\Helper\Flat\AbstractFlat
      */
     public function getFlag()
     {
-        if (is_null($this->_flagObject)) {
-            $this->_flagObject->loadSelf();
-        }
         return $this->_flagObject;
     }
 
diff --git a/app/code/Magento/Catalog/Helper/Product/Url.php b/app/code/Magento/Catalog/Helper/Product/Url.php
index 934b3c5cd16..ed198dc39e8 100644
--- a/app/code/Magento/Catalog/Helper/Product/Url.php
+++ b/app/code/Magento/Catalog/Helper/Product/Url.php
@@ -138,7 +138,7 @@ class Url extends \Magento\Core\Helper\Url
     {
         $string = strtr($string, $this->getConvertTable());
         return '"libiconv"' == ICONV_IMPL
-            ? iconv(\Magento\Core\Helper\String::ICONV_CHARSET, 'ascii//ignore//translit', $string)
+            ? iconv(\Magento\Stdlib\String::ICONV_CHARSET, 'ascii//ignore//translit', $string)
             : $string;
     }
 }
diff --git a/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php b/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php
index fe7b554af08..d7c7a6c3111 100644
--- a/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php
+++ b/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php
@@ -52,11 +52,11 @@ class Customlayoutupdate extends \Magento\Eav\Model\Entity\Attribute\Backend\Abs
      * Construct
      *
      * @param \Magento\Adminhtml\Model\LayoutUpdate\ValidatorFactory $layoutUpdateValidatorFactory
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */
     public function __construct(
         \Magento\Adminhtml\Model\LayoutUpdate\ValidatorFactory $layoutUpdateValidatorFactory,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger
     ) {
         $this->_layoutUpdateValidatorFactory = $layoutUpdateValidatorFactory;
         parent::__construct($logger);
diff --git a/app/code/Magento/Catalog/Model/Attribute/Config/SchemaLocator.php b/app/code/Magento/Catalog/Model/Attribute/Config/SchemaLocator.php
index 3bb4ad8ed12..dfe49589e7b 100644
--- a/app/code/Magento/Catalog/Model/Attribute/Config/SchemaLocator.php
+++ b/app/code/Magento/Catalog/Model/Attribute/Config/SchemaLocator.php
@@ -35,9 +35,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     private $_schema;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Catalog') . '/catalog_attributes.xsd';
     }
diff --git a/app/code/Magento/Catalog/Model/Category.php b/app/code/Magento/Catalog/Model/Category.php
index bb70f6ef4d0..bda04ca32e7 100644
--- a/app/code/Magento/Catalog/Model/Category.php
+++ b/app/code/Magento/Catalog/Model/Category.php
@@ -121,9 +121,9 @@ class Category extends \Magento\Catalog\Model\AbstractModel
     /**
      * Core data
      *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Filter\FilterManager
      */
-    protected $_coreData = null;
+    protected $filter;
 
     /**
      * Core event manager proxy
@@ -199,6 +199,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel
      * @param \Magento\Catalog\Helper\Category\Flat $catalogCategoryFlat
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Filter\FilterManager $filter
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -221,6 +222,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel
         \Magento\Catalog\Helper\Category\Flat $catalogCategoryFlat,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
+        \Magento\Filter\FilterManager $filter,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -234,7 +236,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel
         $this->_catalogConfig = $catalogConfig;
         $this->_indexIndexer = $indexIndexer;
         $this->_eventManager = $eventManager;
-        $this->_coreData = $coreData;
+        $this->filter = $filter;
         $this->_catalogCategoryFlat = $catalogCategoryFlat;
         $this->_treeModel = $categoryTreeResource;
         parent::__construct($storeManager, $context, $registry, $resource, $resourceCollection, $data);
@@ -305,6 +307,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel
      * @param   int $parentId new parent category id
      * @param   int $afterCategoryId category id after which we have put current category
      * @return  \Magento\Catalog\Model\Category
+     * @throws \Magento\Core\Exception|\Exception
      */
     public function move($parentId, $afterCategoryId)
     {
@@ -399,6 +402,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel
      * Retrieve all customer attributes
      *
      * @todo Use with Flat Resource
+     * @param bool $noDesignAttributes
      * @return array
      */
     public function getAttributes($noDesignAttributes = false)
@@ -408,7 +412,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel
             ->getSortedAttributes();
 
         if ($noDesignAttributes){
-            foreach ($result as $k=>$a){
+            foreach ($result as $k => $a){
                 if (in_array($k, $this->_designAttributes)) {
                     unset($result[$k]);
                 }
@@ -522,11 +526,11 @@ class Category extends \Magento\Catalog\Model\AbstractModel
     {
         $url = $this->_getData('url');
         if (is_null($url)) {
-            \Magento\Profiler::start('REWRITE: '.__METHOD__, array('group' => 'REWRITE', 'method' => __METHOD__));
+            \Magento\Profiler::start('REWRITE: ' . __METHOD__, array('group' => 'REWRITE', 'method' => __METHOD__));
 
             if ($this->hasData('request_path') && $this->getRequestPath() != '') {
                 $this->setData('url', $this->getUrlInstance()->getDirectUrl($this->getRequestPath()));
-                \Magento\Profiler::stop('REWRITE: '.__METHOD__);
+                \Magento\Profiler::stop('REWRITE: ' . __METHOD__);
                 return $this->getData('url');
             }
 
@@ -539,11 +543,11 @@ class Category extends \Magento\Catalog\Model\AbstractModel
 
             if ($rewrite->getId()) {
                 $this->setData('url', $this->getUrlInstance()->getDirectUrl($rewrite->getRequestPath()));
-                \Magento\Profiler::stop('REWRITE: '.__METHOD__);
+                \Magento\Profiler::stop('REWRITE: ' . __METHOD__);
                 return $this->getData('url');
             }
 
-            \Magento\Profiler::stop('REWRITE: '.__METHOD__);
+            \Magento\Profiler::stop('REWRITE: ' . __METHOD__);
 
             $this->setData('url', $this->getCategoryIdUrl());
             return $this->getData('url');
@@ -576,7 +580,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel
      */
     public function formatUrlKey($str)
     {
-        $str = $this->_coreData->removeAccents($str);
+        $str = $this->filter->removeAccents($str);
         $urlKey = preg_replace('#[^0-9a-z]+#i', '-', $str);
         $urlKey = strtolower($urlKey);
         $urlKey = trim($urlKey, '-');
@@ -593,7 +597,8 @@ class Category extends \Magento\Catalog\Model\AbstractModel
         $url = false;
         $image = $this->getImage();
         if ($image) {
-            $url = $this->_storeManager->getStore()->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA) . 'catalog/category/' . $image;
+            $url = $this->_storeManager->getStore()->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA)
+                . 'catalog/category/' . $image;
         }
         return $url;
     }
diff --git a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php
index c687969e5c4..222c0136f2e 100644
--- a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php
+++ b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php
@@ -58,12 +58,12 @@ class Image extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\App\Dir $dir
      * @param \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\App\Dir $dir,
         \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
     ) {
diff --git a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php
index 11d8c411f6a..74d7299cda5 100644
--- a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php
+++ b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php
@@ -46,11 +46,11 @@ class Sortby
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\Store\Config $coreStoreConfig
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Attribute.php b/app/code/Magento/Catalog/Model/Layer/Filter/Attribute.php
index 3b015df49d6..38385f7cebf 100644
--- a/app/code/Magento/Catalog/Model/Layer/Filter/Attribute.php
+++ b/app/code/Magento/Catalog/Model/Layer/Filter/Attribute.php
@@ -43,20 +43,18 @@ class Attribute extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter
     protected $_resource;
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * Construct
-     *
      * @param \Magento\Catalog\Model\Layer\Filter\ItemFactory $filterItemFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Layer $catalogLayer
      * @param \Magento\Catalog\Model\Resource\Layer\Filter\AttributeFactory $filterAttributeFactory
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param array $data
      */
     public function __construct(
@@ -64,11 +62,11 @@ class Attribute extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Layer $catalogLayer,
         \Magento\Catalog\Model\Resource\Layer\Filter\AttributeFactory $filterAttributeFactory,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         array $data = array()
     ) {
         $this->_resource = $filterAttributeFactory->create();
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct($filterItemFactory, $storeManager, $catalogLayer, $data);
         $this->_requestVar = 'attribute';
     }
@@ -144,7 +142,7 @@ class Attribute extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter
             if (is_array($option['value'])) {
                 continue;
             }
-            if ($this->_coreString->strlen($option['value'])) {
+            if ($this->string->strlen($option['value'])) {
                 // Check filter type
                 if ($this->_getIsFilterableAttribute($attribute) == self::OPTIONS_ONLY_WITH_RESULTS) {
                     if (!empty($optionsCount[$option['value']])) {
diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Category.php b/app/code/Magento/Catalog/Model/Layer/Filter/Category.php
index b740a1e7e5a..52930b3b25c 100644
--- a/app/code/Magento/Catalog/Model/Layer/Filter/Category.php
+++ b/app/code/Magento/Catalog/Model/Layer/Filter/Category.php
@@ -47,21 +47,21 @@ class Category extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter
      *
      * @var \Magento\Catalog\Model\Category
      */
-    protected $_appliedCategory = null;
+    protected $_appliedCategory;
 
     /**
      * Core data
      *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Escaper
      */
-    protected $_coreData = null;
+    protected $_escaper;
 
     /**
      * Core registry
      *
      * @var \Magento\Core\Model\Registry
      */
-    protected $_coreRegistry = null;
+    protected $_coreRegistry;
 
     /**
      * Category factory
@@ -77,7 +77,7 @@ class Category extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Layer $catalogLayer
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param array $data
      */
@@ -86,12 +86,12 @@ class Category extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Layer $catalogLayer,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Core\Model\Registry $coreRegistry,
         array $data = array()
     ) {
         $this->_categoryFactory = $categoryFactory;
-        $this->_coreData = $coreData;
+        $this->_escaper = $escaper;
         $this->_coreRegistry = $coreRegistry;
         parent::__construct($filterItemFactory, $storeManager, $catalogLayer, $data);
         $this->_requestVar = 'cat';
@@ -206,7 +206,7 @@ class Category extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter
         foreach ($categories as $category) {
             if ($category->getIsActive() && $category->getProductCount()) {
                 $data[] = array(
-                    'label' => $this->_coreData->escapeHtml($category->getName()),
+                    'label' => $this->_escaper->escapeHtml($category->getName()),
                     'value' => $category->getId(),
                     'count' => $category->getProductCount(),
                 );
diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php
index 7966229e8f9..16ba34b0e77 100644
--- a/app/code/Magento/Catalog/Model/Product.php
+++ b/app/code/Magento/Catalog/Model/Product.php
@@ -2068,7 +2068,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel
         $this->setData(array());
         $this->setOrigData();
         $this->_customOptions       = array();
-        $this->_optionInstance      = null;
         $this->_options             = array();
         $this->_canAffectOptions    = false;
         $this->_errors              = array();
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice.php
index 36f6e8bb3b0..9972c5f7861 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice.php
@@ -44,7 +44,7 @@ class Groupprice
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
      * @param \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice $productAttributeBackendGroupprice
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -53,7 +53,7 @@ class Groupprice
      * @param \Magento\Core\Model\Config $config
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
         \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice $productAttributeBackendGroupprice,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php
index 8b458261d4b..40bc88be6ab 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php
@@ -62,7 +62,7 @@ abstract class AbstractGroupprice
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Product\Type $catalogProductType
@@ -70,7 +70,7 @@ abstract class AbstractGroupprice
      * @param \Magento\Core\Model\Config $config
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Product\Type $catalogProductType,
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php
index 72525d68099..cda164b93ee 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php
@@ -95,7 +95,7 @@ class Media extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Catalog\Model\Resource\ProductFactory $productFactory
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
@@ -106,7 +106,7 @@ class Media extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
      * @param \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Media $resourceProductAttribute
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Catalog\Model\Resource\ProductFactory $productFactory,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Msrp.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Msrp.php
index 761c302de6f..c2d8f7d28dc 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Msrp.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Msrp.php
@@ -43,11 +43,11 @@ class Msrp extends \Magento\Catalog\Model\Product\Attribute\Backend\Boolean
     protected $_catalogData = null;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Catalog\Helper\Data $catalogData
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Catalog\Helper\Data $catalogData
     ) {
         $this->_catalogData = $catalogData;
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php
index a3cd655b524..e3c1a1ee7cd 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php
@@ -67,14 +67,14 @@ class Price extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param \Magento\Core\Model\Config $config
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Helper\Data $catalogData,
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php
index 78f650bba7a..90d7a2e72f6 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php
@@ -44,23 +44,21 @@ class Sku extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
     const SKU_MAX_LENGTH = 64;
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * Construct
-     *
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Logger $logger
+     * @param \Magento\Stdlib\String $string
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Helper\String $coreString
+        \Magento\Logger $logger,
+        \Magento\Stdlib\String $string
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct($logger);
     }
 
@@ -73,14 +71,13 @@ class Sku extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
      */
     public function validate($object)
     {
-        $helper = $this->_coreString;
         $attrCode = $this->getAttribute()->getAttributeCode();
         $value = $object->getData($attrCode);
         if ($this->getAttribute()->getIsRequired() && $this->getAttribute()->isValueEmpty($value)) {
             return false;
         }
 
-        if ($helper->strlen($object->getSku()) > self::SKU_MAX_LENGTH) {
+        if ($this->string->strlen($object->getSku()) > self::SKU_MAX_LENGTH) {
             throw new \Magento\Core\Exception(
                 __('SKU length should be %1 characters maximum.', self::SKU_MAX_LENGTH)
             );
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Startdate.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Startdate.php
index 15f97df1086..f2d3db3d839 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Startdate.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Startdate.php
@@ -49,12 +49,12 @@ class Startdate extends \Magento\Eav\Model\Entity\Attribute\Backend\Datetime
      *
      * @param \Magento\Core\Model\Date $date
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */
     public function __construct(
         \Magento\Core\Model\Date $date,
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger
     ) {
         $this->_date = $date;
         parent::__construct($logger, $locale);
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Stock.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Stock.php
index 7b284f59833..f05bb82e2b2 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Stock.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Stock.php
@@ -46,11 +46,11 @@ class Stock extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\CatalogInventory\Model\Stock\ItemFactory $stockItemFactory
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\CatalogInventory\Model\Stock\ItemFactory $stockItemFactory
     ) {
         $this->_stockItemFactory = $stockItemFactory;
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Tierprice.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Tierprice.php
index 7c231afdcf2..5de002872a2 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Tierprice.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Tierprice.php
@@ -47,7 +47,7 @@ class Tierprice
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
      * @param \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Tierprice $productAttributeTierprice
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -56,7 +56,7 @@ class Tierprice
      * @param \Magento\Core\Model\Config $config
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
         \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Tierprice $productAttributeTierprice,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Catalog/Model/Product/Option.php b/app/code/Magento/Catalog/Model/Product/Option.php
index 6f7e829697a..ff27e811b57 100644
--- a/app/code/Magento/Catalog/Model/Product/Option.php
+++ b/app/code/Magento/Catalog/Model/Product/Option.php
@@ -91,6 +91,11 @@ class Option extends \Magento\Core\Model\AbstractModel
      */
     protected $_optionFactory;
 
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
     /**
      * Construct
      *
@@ -98,6 +103,7 @@ class Option extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Catalog\Model\Product\Option\Type\Factory $optionFactory
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -107,12 +113,14 @@ class Option extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Catalog\Model\Product\Option\Type\Factory $optionFactory,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         $this->_productOptionValue = $productOptionValue;
         $this->_optionFactory = $optionFactory;
+        $this->string = $string;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -279,7 +287,9 @@ class Option extends \Magento\Core\Model\AbstractModel
     {
         $group = $this->getGroupByType($type);
         if (!empty($group)) {
-            return $this->_optionFactory->create('Magento\Catalog\Model\Product\Option\Type\\' . uc_words($group));
+            return $this->_optionFactory->create(
+                'Magento\Catalog\Model\Product\Option\Type\\' . $this->string->upperCaseWords($group)
+            );
         }
         throw new \Magento\Core\Exception(__('The option type to get group instance is incorrect.'));
     }
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php b/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php
index b9bbe8ba5d6..e27fd34751e 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/Date.php
@@ -172,7 +172,7 @@ class Date extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
             }
 
             $date = new \Zend_Date($timestamp);
-            $result = $date->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT);
+            $result = $date->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
 
             // Save date in internal format to avoid locale date bugs
             $this->_setInternalInRequest($result);
@@ -201,7 +201,7 @@ class Date extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
             } elseif ($this->getOption()->getType() == \Magento\Catalog\Model\Product\Option::OPTION_TYPE_DATE_TIME) {
                 $format = $this->_locale->getDateTimeFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT);
                 $result = $this->_locale
-                    ->date($optionValue, \Magento\Date::DATETIME_INTERNAL_FORMAT, null, false)->toString($format);
+                    ->date($optionValue, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT, null, false)->toString($format);
             } elseif ($this->getOption()->getType() == \Magento\Catalog\Model\Product\Option::OPTION_TYPE_TIME) {
                 $date = new \Zend_Date($optionValue);
                 $result = date($this->is24hTimeFormat() ? 'H:i' : 'h:i a', $date->getTimestamp());
@@ -250,7 +250,7 @@ class Date extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
         }
 
         $date = new \Zend_Date($timestamp);
-        return $date->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT);
+        return $date->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
index fa120dd6f16..ed4a58fd804 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
@@ -64,11 +64,9 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
     protected $_coreFileStorageDatabase = null;
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Escaper
      */
-    protected $_coreData = null;
+    protected $_escaper;
 
     /**
      * Dir
@@ -98,7 +96,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
      * @param \Magento\UrlInterface $url
      * @param \Magento\App\Dir $dir
      * @param \Magento\Checkout\Model\Session $checkoutSession
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Filesystem $filesystem
@@ -110,7 +108,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
         \Magento\UrlInterface $url,
         \Magento\App\Dir $dir,
         \Magento\Checkout\Model\Session $checkoutSession,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Filesystem $filesystem,
@@ -120,7 +118,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
         $this->_itemOptionFactory = $itemOptionFactory;
         $this->_url = $url;
         $this->_dir = $dir;
-        $this->_coreData = $coreData;
+        $this->_escaper = $escaper;
         $this->_coreFileStorageDatabase = $coreFileStorageDatabase;
         $this->_filesystem = $filesystem;
         $this->_fileSize = $fileSize;
@@ -627,7 +625,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
 
             return sprintf('<a href="%s" target="_blank">%s</a> %s',
                 $this->_getOptionDownloadUrl($urlRoute, $urlParams),
-                $this->_coreData->escapeHtml($title),
+                $this->_escaper->escapeHtml($title),
                 $sizes
             );
         } catch (\Exception $e) {
@@ -674,7 +672,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
         try {
             $value = unserialize($optionValue);
             return sprintf('%s [%d]',
-                $this->_coreData->escapeHtml($value['title']),
+                $this->_escaper->escapeHtml($value['title']),
                 $this->getConfigurationItemOption()->getId()
             );
 
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/Select.php b/app/code/Magento/Catalog/Model/Product/Option/Type/Select.php
index 692eb3b4551..83ac16ae118 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/Select.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/Select.php
@@ -24,54 +24,46 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Catalog\Model\Product\Option\Type;
+
 /**
  * Catalog product option select type
- *
- * @category   Magento
- * @package    Magento_Catalog
- * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Catalog\Model\Product\Option\Type;
-
 class Select extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
 {
     /**
      * @var mixed
      */
-    protected $_formattedOptionValue = null;
+    protected $_formattedOptionValue;
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Escaper
      */
-    protected $_coreData = null;
+    protected $_escaper;
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * Construct
-     *
      * @param \Magento\Checkout\Model\Session $checkoutSession
-     * @param \Magento\Core\Helper\String $coreString
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Stdlib\String $string
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param array $data
      */
     public function __construct(
         \Magento\Checkout\Model\Session $checkoutSession,
-        \Magento\Core\Helper\String $coreString,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Stdlib\String $string,
+        \Magento\Escaper $escaper,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
-        $this->_coreData = $coreData;
+        $this->string = $string;
+        $this->_escaper = $escaper;
         parent::__construct($checkoutSession, $coreStoreConfig, $data);
     }
 
@@ -128,7 +120,7 @@ class Select extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
     public function getFormattedOptionValue($optionValue)
     {
         if ($this->_formattedOptionValue === null) {
-            $this->_formattedOptionValue = $this->_coreData->escapeHtml(
+            $this->_formattedOptionValue = $this->_escaper->escapeHtml(
                 $this->getEditableOptionValue($optionValue)
             );
         }
@@ -168,31 +160,29 @@ class Select extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
         $result = '';
         if (!$this->_isSingleSelection()) {
             foreach (explode(',', $optionValue) as $_value) {
-                if ($_result = $option->getValueById($_value)) {
+                $_result = $option->getValueById($_value);
+                if ($_result) {
                     $result .= $_result->getTitle() . ', ';
                 } else {
                     if ($this->getListener()) {
-                        $this->getListener()
-                                ->setHasError(true)
-                                ->setMessage(
-                                    $this->_getWrongConfigurationMessage()
-                                );
+                        $this->getListener()->setHasError(true)->setMessage(
+                            $this->_getWrongConfigurationMessage()
+                        );
                         $result = '';
                         break;
                     }
                 }
             }
-            $result = $this->_coreString->substr($result, 0, -2);
+            $result = $this->string->substr($result, 0, -2);
         } elseif ($this->_isSingleSelection()) {
-            if ($_result = $option->getValueById($optionValue)) {
+            $_result = $option->getValueById($optionValue);
+            if ($_result) {
                 $result = $_result->getTitle();
             } else {
                 if ($this->getListener()) {
-                    $this->getListener()
-                            ->setHasError(true)
-                            ->setMessage(
-                                $this->_getWrongConfigurationMessage()
-                            );
+                    $this->getListener()->setHasError(true)->setMessage(
+                        $this->_getWrongConfigurationMessage()
+                    );
                 }
                 $result = '';
             }
@@ -211,19 +201,19 @@ class Select extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
      */
     public function parseOptionValue($optionValue, $productOptionValues)
     {
-        $_values = array();
+        $values = array();
         if (!$this->_isSingleSelection()) {
-            foreach (explode(',', $optionValue) as $_value) {
-                $_value = trim($_value);
-                if (array_key_exists($_value, $productOptionValues)) {
-                    $_values[] = $productOptionValues[$_value];
+            foreach (explode(',', $optionValue) as $value) {
+                $value = trim($value);
+                if (array_key_exists($value, $productOptionValues)) {
+                    $values[] = $productOptionValues[$value];
                 }
             }
         } elseif ($this->_isSingleSelection() && array_key_exists($optionValue, $productOptionValues)) {
-            $_values[] = $productOptionValues[$optionValue];
+            $values[] = $productOptionValues[$optionValue];
         }
-        if (count($_values)) {
-            return implode(',', $_values);
+        if (count($values)) {
+            return implode(',', $values);
         } else {
             return null;
         }
@@ -257,7 +247,8 @@ class Select extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
 
         if (!$this->_isSingleSelection()) {
             foreach(explode(',', $optionValue) as $value) {
-                if ($_result = $option->getValueById($value)) {
+                $_result = $option->getValueById($value);
+                if ($_result) {
                     $result += $this->_getChargableOptionPrice(
                         $_result->getPrice(),
                         $_result->getPriceType() == 'percent',
@@ -275,7 +266,8 @@ class Select extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
                 }
             }
         } elseif ($this->_isSingleSelection()) {
-            if ($_result = $option->getValueById($optionValue)) {
+            $_result = $option->getValueById($optionValue);
+            if ($_result) {
                 $result = $this->_getChargableOptionPrice(
                     $_result->getPrice(),
                     $_result->getPriceType() == 'percent',
@@ -283,11 +275,9 @@ class Select extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
                 );
             } else {
                 if ($this->getListener()) {
-                    $this->getListener()
-                            ->setHasError(true)
-                            ->setMessage(
-                                $this->_getWrongConfigurationMessage()
-                            );
+                    $this->getListener()->setHasError(true)->setMessage(
+                        $this->_getWrongConfigurationMessage()
+                    );
                 }
             }
         }
@@ -309,30 +299,28 @@ class Select extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
         if (!$this->_isSingleSelection()) {
             $skus = array();
             foreach(explode(',', $optionValue) as $value) {
-                if ($optionSku = $option->getValueById($value)) {
+                $optionSku = $option->getValueById($value);
+                if ($optionSku) {
                     $skus[] = $optionSku->getSku();
                 } else {
                     if ($this->getListener()) {
-                        $this->getListener()
-                                ->setHasError(true)
-                                ->setMessage(
-                                    $this->_getWrongConfigurationMessage()
-                                );
+                        $this->getListener()->setHasError(true)->setMessage(
+                            $this->_getWrongConfigurationMessage()
+                        );
                         break;
                     }
                 }
             }
             $result = implode($skuDelimiter, $skus);
         } elseif ($this->_isSingleSelection()) {
-            if ($result = $option->getValueById($optionValue)) {
+            $result = $option->getValueById($optionValue);
+            if ($result) {
                 return $result->getSku();
             } else {
                 if ($this->getListener()) {
-                    $this->getListener()
-                            ->setHasError(true)
-                            ->setMessage(
-                                $this->_getWrongConfigurationMessage()
-                            );
+                    $this->getListener()->setHasError(true)->setMessage(
+                        $this->_getWrongConfigurationMessage()
+                    );
                 }
                 return '';
             }
@@ -350,10 +338,10 @@ class Select extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
      */
     protected function _isSingleSelection()
     {
-        $_single = array(
+        $single = array(
             \Magento\Catalog\Model\Product\Option::OPTION_TYPE_DROP_DOWN,
             \Magento\Catalog\Model\Product\Option::OPTION_TYPE_RADIO
         );
-        return in_array($this->getOption()->getType(), $_single);
+        return in_array($this->getOption()->getType(), $single);
     }
 }
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/Text.php b/app/code/Magento/Catalog/Model/Product/Option/Type/Text.php
index 50c629cc34f..29c7bbf4f35 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/Text.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/Text.php
@@ -24,49 +24,41 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Catalog\Model\Product\Option\Type;
+
 /**
  * Catalog product option text type
- *
- * @category   Magento
- * @package    Magento_Catalog
- * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Catalog\Model\Product\Option\Type;
-
 class Text extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
 {
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Escaper
      */
-    protected $_coreData = null;
+    protected $_escaper = null;
 
     /**
-     * Constructor
-     *
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Escaper $escaper
+     * @param \Magento\Stdlib\String $string
      * @param array $data
      */
     public function __construct(
         \Magento\Checkout\Model\Session $checkoutSession,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Escaper $escaper,
+        \Magento\Stdlib\String $string,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
-        $this->_coreString = $coreString;
+        $this->_escaper = $escaper;
+        $this->string = $string;
         parent::__construct($checkoutSession, $coreStoreConfig, $data);
     }
 
@@ -92,7 +84,7 @@ class Text extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
 
         // Check maximal length limit
         $maxCharacters = $option->getMaxCharacters();
-        if ($maxCharacters > 0 && $this->_coreString->strlen($value) > $maxCharacters) {
+        if ($maxCharacters > 0 && $this->string->strlen($value) > $maxCharacters) {
             $this->setIsValid(false);
             throw new \Magento\Core\Exception(__('The text is too long.'));
         }
@@ -123,6 +115,6 @@ class Text extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
      */
     public function getFormattedOptionValue($value)
     {
-        return $this->_coreData->escapeHtml($value);
+        return $this->_escaper->escapeHtml($value);
     }
 }
diff --git a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
index d97dd402425..985f1b154f7 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
+++ b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
@@ -143,7 +143,7 @@ abstract class AbstractType
     protected $_eventManager = null;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -187,7 +187,7 @@ abstract class AbstractType
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Model\Registry $coreRegistry
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param array $data
      */
     public function __construct(
@@ -200,7 +200,7 @@ abstract class AbstractType
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
         \Magento\Filesystem $filesystem,
         \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         array $data = array()
     ) {
         $this->_productFactory = $productFactory;
diff --git a/app/code/Magento/Catalog/Model/Product/Type/Configurable.php b/app/code/Magento/Catalog/Model/Product/Type/Configurable.php
index d4f7ad732e9..2cdec88051b 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/Configurable.php
+++ b/app/code/Magento/Catalog/Model/Product/Type/Configurable.php
@@ -183,7 +183,7 @@ class Configurable extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Model\Registry $coreRegistry
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param array $data
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -207,7 +207,7 @@ class Configurable extends \Magento\Catalog\Model\Product\Type\AbstractType
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
         \Magento\Filesystem $filesystem,
         \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         array $data = array()
     ) {
         $this->_typeConfigurableFactory = $typeConfigurableFactory;
diff --git a/app/code/Magento/Catalog/Model/Product/Type/Grouped.php b/app/code/Magento/Catalog/Model/Product/Type/Grouped.php
index 4dbbc4bd442..6fc9353d9ba 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/Grouped.php
+++ b/app/code/Magento/Catalog/Model/Product/Type/Grouped.php
@@ -108,7 +108,7 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Model\Registry $coreRegistry
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param array $data
      */
     public function __construct(
@@ -124,7 +124,7 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
         \Magento\Filesystem $filesystem,
         \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         array $data = array()
     ) {
         $this->_catalogProductLink = $catalogProductLink;
diff --git a/app/code/Magento/Catalog/Model/ProductOptions/Config/SchemaLocator.php b/app/code/Magento/Catalog/Model/ProductOptions/Config/SchemaLocator.php
index 682715f433a..fe7fae5ce51 100644
--- a/app/code/Magento/Catalog/Model/ProductOptions/Config/SchemaLocator.php
+++ b/app/code/Magento/Catalog/Model/ProductOptions/Config/SchemaLocator.php
@@ -40,9 +40,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $etcDir = $moduleReader->getModuleDir('etc', 'Magento_Catalog');
         $this->_schema = $etcDir . DIRECTORY_SEPARATOR . 'product_options_merged.xsd';
diff --git a/app/code/Magento/Catalog/Model/ProductTypes/Config/Converter.php b/app/code/Magento/Catalog/Model/ProductTypes/Config/Converter.php
index 6b996246922..22673f2359a 100644
--- a/app/code/Magento/Catalog/Model/ProductTypes/Config/Converter.php
+++ b/app/code/Magento/Catalog/Model/ProductTypes/Config/Converter.php
@@ -42,14 +42,17 @@ class Converter implements \Magento\Config\ConverterInterface
         /** @var $typeNode DOMNode */
         foreach ($types as $typeNode) {
             $typeName = $this->_getAttributeValue($typeNode, 'name');
+            $isComposite = $this->_getAttributeValue($typeNode, 'composite', 'false');
+            $isDecimal = $this->_getAttributeValue($typeNode, 'canUseQtyDecimals', 'true');
+            $isQty = $this->_getAttributeValue($typeNode, 'isQty', 'false');
             $data = array();
             $data['name'] = $typeName;
             $data['label'] = $this->_getAttributeValue($typeNode, 'label', '');
             $data['model'] = $this->_getAttributeValue($typeNode, 'modelInstance');
-            $data['composite'] = (bool) $this->_getAttributeValue($typeNode, 'composite', false);
+            $data['composite'] = !empty($isComposite) && 'false' !== $isComposite;
             $data['index_priority'] = (int) $this->_getAttributeValue($typeNode, 'indexPriority', 0);
-            $data['can_use_qty_decimals'] = (bool) $this->_getAttributeValue($typeNode, 'canUseQtyDecimals', false);
-            $data['is_qty'] = (bool) $this->_getAttributeValue($typeNode, 'isQty', false);
+            $data['can_use_qty_decimals'] = !empty($isDecimal) && 'false' !== $isDecimal;
+            $data['is_qty'] = !empty($isQty) && 'false' !== $isQty;
 
             /** @var $childNode DOMNode */
             foreach ($typeNode->childNodes as $childNode) {
diff --git a/app/code/Magento/Catalog/Model/ProductTypes/Config/SchemaLocator.php b/app/code/Magento/Catalog/Model/ProductTypes/Config/SchemaLocator.php
index 88f3b595aa8..71e831d56a3 100644
--- a/app/code/Magento/Catalog/Model/ProductTypes/Config/SchemaLocator.php
+++ b/app/code/Magento/Catalog/Model/ProductTypes/Config/SchemaLocator.php
@@ -40,9 +40,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $etcDir = $moduleReader->getModuleDir('etc', 'Magento_Catalog');
         $this->_schema = $etcDir . DIRECTORY_SEPARATOR . 'product_types_merged.xsd';
diff --git a/app/code/Magento/Catalog/Model/Resource/AbstractResource.php b/app/code/Magento/Catalog/Model/Resource/AbstractResource.php
index 8055f16033f..b6633459753 100644
--- a/app/code/Magento/Catalog/Model/Resource/AbstractResource.php
+++ b/app/code/Magento/Catalog/Model/Resource/AbstractResource.php
@@ -60,7 +60,7 @@ abstract class AbstractResource extends \Magento\Eav\Model\Entity\AbstractEntity
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -71,7 +71,7 @@ abstract class AbstractResource extends \Magento\Eav\Model\Entity\AbstractEntity
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity,
         \Magento\Core\Model\LocaleInterface $locale,
diff --git a/app/code/Magento/Catalog/Model/Resource/Attribute.php b/app/code/Magento/Catalog/Model/Resource/Attribute.php
index 2050761ae64..67f908c11ce 100644
--- a/app/code/Magento/Catalog/Model/Resource/Attribute.php
+++ b/app/code/Magento/Catalog/Model/Resource/Attribute.php
@@ -53,7 +53,7 @@ class Attribute extends \Magento\Eav\Model\Resource\Entity\Attribute
     /**
      * Class constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\App $app
      * @param \Magento\Eav\Model\Resource\Entity\Type $eavEntityType
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -61,7 +61,7 @@ class Attribute extends \Magento\Eav\Model\Resource\Entity\Attribute
      * @param array $arguments
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\App $app,
         \Magento\Eav\Model\Resource\Entity\Type $eavEntityType,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Catalog/Model/Resource/Category.php b/app/code/Magento/Catalog/Model/Resource/Category.php
index 0c861a49f68..6fdf136e677 100644
--- a/app/code/Magento/Catalog/Model/Resource/Category.php
+++ b/app/code/Magento/Catalog/Model/Resource/Category.php
@@ -88,7 +88,7 @@ class Category extends \Magento\Catalog\Model\Resource\AbstractResource
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -104,7 +104,7 @@ class Category extends \Magento\Catalog\Model\Resource\AbstractResource
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity,
         \Magento\Core\Model\LocaleInterface $locale,
diff --git a/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Collection.php b/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Collection.php
index 81f129748ed..8e371e22e53 100644
--- a/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Collection.php
+++ b/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Collection.php
@@ -49,7 +49,7 @@ class Collection
      *
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
@@ -57,7 +57,7 @@ class Collection
     public function __construct(
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
diff --git a/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Source/Layout.php b/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Source/Layout.php
index 5bd85563eca..cdf17bb3731 100644
--- a/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Source/Layout.php
+++ b/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Source/Layout.php
@@ -38,19 +38,16 @@ class Layout
     extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
 {
     /**
-     * @var \Magento\Core\Model\Config
+     * @var array
      */
-    protected $_coreConfig;
+    protected $_cmsLayouts;
 
     /**
-     * Constructor
-     *
-     * @param \Magento\Core\Model\Config $coreConfig
+     * @param array $cmsLayouts
      */
-    public function __construct(
-        \Magento\Core\Model\Config $coreConfig
-    ) {
-        $this->_coreConfig = $coreConfig;
+    public function __construct(array $cmsLayouts = array())
+    {
+        $this->_cmsLayouts = $cmsLayouts;
     }
 
     /**
@@ -61,11 +58,10 @@ class Layout
     public function getAllOptions()
     {
         if (!$this->_options) {
-            $layouts = array();
-            foreach ($this->_coreConfig->getNode('global/cms/layouts')->children() as $layoutName=>$layoutConfig) {
+            foreach ($this->_cmsLayouts as $layoutName => $layoutConfig) {
                 $this->_options[] = array(
-                   'value'=>$layoutName,
-                   'label'=>(string)$layoutConfig->label
+                   'value' => $layoutName,
+                   'label' => $layoutConfig
                 );
             }
             array_unshift($this->_options, array('value'=>'', 'label' => __('No layout updates')));
diff --git a/app/code/Magento/Catalog/Model/Resource/Category/Flat.php b/app/code/Magento/Catalog/Model/Resource/Category/Flat.php
index 1d0540dd195..503094f1168 100644
--- a/app/code/Magento/Catalog/Model/Resource/Category/Flat.php
+++ b/app/code/Magento/Catalog/Model/Resource/Category/Flat.php
@@ -157,7 +157,7 @@ class Flat extends \Magento\Index\Model\Resource\AbstractResource
     /**
      * Class constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
      * @param \Magento\Catalog\Model\Resource\Category\CollectionFactory $categoryCollectionFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -167,7 +167,7 @@ class Flat extends \Magento\Index\Model\Resource\AbstractResource
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
         \Magento\Catalog\Model\Resource\Category\CollectionFactory $categoryCollectionFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Catalog/Model/Resource/Category/Flat/Collection.php b/app/code/Magento/Catalog/Model/Resource/Category/Flat/Collection.php
index cbeca8bafa1..149ab71dd9e 100644
--- a/app/code/Magento/Catalog/Model/Resource/Category/Flat/Collection.php
+++ b/app/code/Magento/Catalog/Model/Resource/Category/Flat/Collection.php
@@ -69,7 +69,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      *
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
@@ -77,7 +77,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     public function __construct(
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
diff --git a/app/code/Magento/Catalog/Model/Resource/Category/Indexer/Product.php b/app/code/Magento/Catalog/Model/Resource/Category/Indexer/Product.php
index abdbda5092e..cbf6bc92ffc 100644
--- a/app/code/Magento/Catalog/Model/Resource/Category/Indexer/Product.php
+++ b/app/code/Magento/Catalog/Model/Resource/Category/Indexer/Product.php
@@ -89,11 +89,11 @@ class Product extends \Magento\Index\Model\Resource\AbstractResource
      * Class constructor
      *
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_eavConfig = $eavConfig;
         parent::__construct($resource);
diff --git a/app/code/Magento/Catalog/Model/Resource/Category/Tree.php b/app/code/Magento/Catalog/Model/Resource/Category/Tree.php
index dce8772cc17..399e73c59f3 100644
--- a/app/code/Magento/Catalog/Model/Resource/Category/Tree.php
+++ b/app/code/Magento/Catalog/Model/Resource/Category/Tree.php
@@ -81,7 +81,7 @@ class Tree extends \Magento\Data\Tree\Dbp
     protected $_storeId                          = null;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_coreResource;
 
@@ -95,7 +95,7 @@ class Tree extends \Magento\Data\Tree\Dbp
     /**
      * Cache
      *
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cache;
 
@@ -110,18 +110,18 @@ class Tree extends \Magento\Data\Tree\Dbp
      * Construct
      *
      * @param \Magento\Catalog\Model\Resource\Category $catalogCategory
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Catalog\Model\Attribute\Config $attributeConfig
      * @param \Magento\Catalog\Model\Resource\Category\Collection\Factory $collectionFactory
      */
     public function __construct(
         \Magento\Catalog\Model\Resource\Category $catalogCategory,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Catalog\Model\Attribute\Config $attributeConfig,
         \Magento\Catalog\Model\Resource\Category\Collection\Factory $collectionFactory
@@ -398,6 +398,21 @@ class Tree extends \Magento\Data\Tree\Dbp
         return $this->_collection;
     }
 
+    /**
+     * Clean unneeded collection
+     *
+     * @param \Magento\Catalog\Model\Resource\Category\Collection|array $object
+     */
+    protected function _clean($object)
+    {
+        if (is_array($object)) {
+            foreach ($object as $obj) {
+                $this->_clean($obj);
+            }
+        }
+        unset($object);
+    }
+
     /**
      * Enter description here...
      *
@@ -407,7 +422,7 @@ class Tree extends \Magento\Data\Tree\Dbp
     public function setCollection($collection)
     {
         if (!is_null($this->_collection)) {
-            destruct($this->_collection);
+            $this->_clean($this->_collection);
         }
         $this->_collection = $collection;
         return $this;
diff --git a/app/code/Magento/Catalog/Model/Resource/Collection/AbstractCollection.php b/app/code/Magento/Catalog/Model/Resource/Collection/AbstractCollection.php
index c4457cace2d..7dd01c133ec 100644
--- a/app/code/Magento/Catalog/Model/Resource/Collection/AbstractCollection.php
+++ b/app/code/Magento/Catalog/Model/Resource/Collection/AbstractCollection.php
@@ -55,11 +55,11 @@ class AbstractCollection extends \Magento\Eav\Model\Entity\Collection\AbstractCo
      * Construct
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Eav\Model\Resource\Helper $resourceHelper
      * @param \Magento\Validator\UniversalFactory $universalFactory
@@ -67,11 +67,11 @@ class AbstractCollection extends \Magento\Eav\Model\Entity\Collection\AbstractCo
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Eav\Model\Resource\Helper $resourceHelper,
         \Magento\Validator\UniversalFactory $universalFactory,
diff --git a/app/code/Magento/Catalog/Model/Resource/Config.php b/app/code/Magento/Catalog/Model/Resource/Config.php
index f3b71eb712d..15957d4c4f4 100644
--- a/app/code/Magento/Catalog/Model/Resource/Config.php
+++ b/app/code/Magento/Catalog/Model/Resource/Config.php
@@ -69,12 +69,12 @@ class Config extends \Magento\Core\Model\Resource\Db\AbstractDb
      *
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_storeManager = $storeManager;
         $this->_eavConfig = $eavConfig;
diff --git a/app/code/Magento/Catalog/Model/Resource/Helper.php b/app/code/Magento/Catalog/Model/Resource/Helper.php
index f344f62ed6d..f20a94f52b6 100644
--- a/app/code/Magento/Catalog/Model/Resource/Helper.php
+++ b/app/code/Magento/Catalog/Model/Resource/Helper.php
@@ -39,10 +39,10 @@ class Helper extends \Magento\Eav\Model\Resource\Helper
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param string $modulePrefix
      */
-    public function __construct(\Magento\Core\Model\Resource $resource, $modulePrefix = 'Magento_Catalog')
+    public function __construct(\Magento\App\Resource $resource, $modulePrefix = 'Magento_Catalog')
     {
         parent::__construct($resource, $modulePrefix);
     }
diff --git a/app/code/Magento/Catalog/Model/Resource/Layer/Filter/Price.php b/app/code/Magento/Catalog/Model/Resource/Layer/Filter/Price.php
index 77e22eabd43..b67c27a54df 100644
--- a/app/code/Magento/Catalog/Model/Resource/Layer/Filter/Price.php
+++ b/app/code/Magento/Catalog/Model/Resource/Layer/Filter/Price.php
@@ -54,11 +54,11 @@ class Price extends \Magento\Core\Model\Resource\Db\AbstractDb
      *
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_eventManager = $eventManager;
         parent::__construct($resource);
diff --git a/app/code/Magento/Catalog/Model/Resource/Product.php b/app/code/Magento/Catalog/Model/Resource/Product.php
index 572cc993c9b..bea631ab776 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product.php
@@ -64,7 +64,7 @@ class Product extends \Magento\Catalog\Model\Resource\AbstractResource
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -79,7 +79,7 @@ class Product extends \Magento\Catalog\Model\Resource\AbstractResource
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity,
         \Magento\Core\Model\LocaleInterface $locale,
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Image.php b/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Image.php
index 8add8de7aa6..3a8aa9d12d3 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Image.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Image.php
@@ -55,12 +55,12 @@ class Image
      * Construct
      *
      * @param \Magento\App\Dir $dir
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
      */
     public function __construct(
         \Magento\App\Dir $dir,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
     ) {
         $this->_dir = $dir;
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Urlkey.php b/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Urlkey.php
index 926451e2d0c..ab653e852e2 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Urlkey.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Urlkey.php
@@ -48,11 +48,11 @@ class Urlkey
      * Construct
      *
      * @param \Magento\Catalog\Model\Url $catalogUrl
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */
     public function __construct(
         \Magento\Catalog\Model\Url $catalogUrl,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger
     ) {
         $this->_catalogUrl = $catalogUrl;
         parent::__construct($logger);
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Collection.php
index 8c8e3e87379..99867d52719 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Collection.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Collection.php
@@ -49,7 +49,7 @@ class Collection
      *
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
@@ -57,7 +57,7 @@ class Collection
     public function __construct(
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php
index d9317c9a798..6142b9caac2 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php
@@ -257,15 +257,20 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl
      */
     protected $_resourceHelper;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * Construct
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -277,16 +282,17 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\DateTime $dateTime
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -297,7 +303,8 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl
         \Magento\Catalog\Model\Resource\Url $catalogUrl,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Customer\Model\Session $customerSession,
-        \Magento\Catalog\Model\Resource\Helper $resourceHelper
+        \Magento\Catalog\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\DateTime $dateTime
     ) {
         $this->_catalogData = $catalogData;
         $this->_catalogProductFlat = $catalogProductFlat;
@@ -307,6 +314,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl
         $this->_locale = $locale;
         $this->_customerSession = $customerSession;
         $this->_resourceHelper = $resourceHelper;
+        $this->dateTime = $dateTime;
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource,
             $eavEntityFactory, $resourceHelper, $universalFactory, $storeManager);
     }
@@ -1302,7 +1310,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl
 
         $storeDate = $this->_locale->storeTimeStamp($this->getStoreId());
         $conditions  = 'price_rule.product_id = e.entity_id AND ';
-        $conditions .= "price_rule.rule_date = '".$this->getResource()->formatDate($storeDate, false)."' AND ";
+        $conditions .= "price_rule.rule_date = '" . $this->dateTime->formatDate($storeDate, false) . "' AND ";
         $conditions .= $this->getConnection()->quoteInto('price_rule.website_id = ? AND', $wId);
         $conditions .= $this->getConnection()->quoteInto('price_rule.customer_group_id = ?', $gId);
 
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php b/app/code/Magento/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php
index caee095e4d7..ab01778c839 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php
@@ -58,11 +58,11 @@ class AssociatedProduct
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -74,6 +74,7 @@ class AssociatedProduct
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Registry $registryManager
      * @param \Magento\Catalog\Model\Product\Type\Configurable $productType
      * @param \Magento\Catalog\Helper\Product\Configuration $configurationHelper
@@ -81,11 +82,11 @@ class AssociatedProduct
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -97,6 +98,7 @@ class AssociatedProduct
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Registry $registryManager,
         \Magento\Catalog\Model\Product\Type\Configurable $productType,
         \Magento\Catalog\Helper\Product\Configuration $configurationHelper
@@ -106,7 +108,7 @@ class AssociatedProduct
         $this->_configurationHelper = $configurationHelper;
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource,
             $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig,
-            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper
+            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime
         );
     }
 
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php
index 7b05d36586c..8dc2d65adfc 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php
@@ -74,11 +74,11 @@ class Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -90,6 +90,7 @@ class Collection
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Catalog\Model\Resource\Product\Compare\Item $catalogProductCompareItem
      * @param \Magento\Catalog\Helper\Product\Compare $catalogProductCompare
      *
@@ -97,11 +98,11 @@ class Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -113,15 +114,15 @@ class Collection
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Catalog\Model\Resource\Product\Compare\Item $catalogProductCompareItem,
         \Magento\Catalog\Helper\Product\Compare $catalogProductCompare
-    )
-    {
+    ) {
         $this->_catalogProductCompareItem = $catalogProductCompareItem;
         $this->_catalogProductCompare = $catalogProductCompare;
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig,
             $coreResource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat,
-            $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper
+            $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime
         );
     }
 
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Flat.php b/app/code/Magento/Catalog/Model/Resource/Product/Flat.php
index 3008f9180ae..297bd6e8cea 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Flat.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Flat.php
@@ -62,12 +62,12 @@ class Flat extends \Magento\Core\Model\Resource\Db\AbstractDb
      *
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Config $catalogConfig
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Config $catalogConfig,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_storeManager = $storeManager;
         $this->_catalogConfig = $catalogConfig;
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Flat/Indexer.php b/app/code/Magento/Catalog/Model/Resource/Product/Flat/Indexer.php
index 70c22b43374..29a2dab2aec 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Flat/Indexer.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Flat/Indexer.php
@@ -135,7 +135,7 @@ class Indexer extends \Magento\Index\Model\Resource\AbstractResource
     protected $_flatAttributeGroups;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -173,13 +173,11 @@ class Indexer extends \Magento\Index\Model\Resource\AbstractResource
     protected $_resourceHelper;
 
     /**
-     * Construct
-     *
      * @param \Magento\Catalog\Model\Resource\ConfigFactory $configFactory
      * @param \Magento\Catalog\Model\Resource\Eav\AttributeFactory $eavAttributeFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Model\Resource $resource
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Eav\Model\Config $eavConfig
@@ -189,15 +187,15 @@ class Indexer extends \Magento\Index\Model\Resource\AbstractResource
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
      * @param $maxIndexCount
      * @param array $flatAttributeGroups
-     *
+     * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\Catalog\Model\Resource\ConfigFactory $configFactory,
         \Magento\Catalog\Model\Resource\Eav\AttributeFactory $eavAttributeFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Model\Resource $resource,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\App\Resource $resource,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Eav\Model\Config $eavConfig,
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/AbstractIndexer.php b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/AbstractIndexer.php
index 4bfe0f38ac7..72e0478537f 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/AbstractIndexer.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/AbstractIndexer.php
@@ -46,11 +46,11 @@ abstract class AbstractIndexer extends \Magento\Index\Model\Resource\AbstractRes
     /**
      * Class constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig
     ) {
         $this->_eavConfig = $eavConfig;
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav.php b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav.php
index bea91868989..6ef01c26066 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav.php
@@ -63,13 +63,13 @@ class Eav extends \Magento\Catalog\Model\Resource\Product\Indexer\AbstractIndexe
      * @param \Magento\Catalog\Model\Resource\Product\Indexer\Eav\DecimalFactory $eavDecimalFactory
      * @param \Magento\Catalog\Model\Resource\Product\Indexer\Eav\SourceFactory $eavSourceFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Catalog\Model\Resource\Product\Indexer\Eav\DecimalFactory $eavDecimalFactory,
         \Magento\Catalog\Model\Resource\Product\Indexer\Eav\SourceFactory $eavSourceFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_eavDecimalFactory = $eavDecimalFactory;
         $this->_eavSourceFactory = $eavSourceFactory;
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav/AbstractEav.php b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav/AbstractEav.php
index 39da61a6335..b1c92c4a510 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav/AbstractEav.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav/AbstractEav.php
@@ -47,12 +47,12 @@ abstract class AbstractEav
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Event\ManagerInterface $eventManager
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Event\ManagerInterface $eventManager
     ) {
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav/Source.php b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav/Source.php
index 94b16cbdf10..319e342ccf3 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav/Source.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Eav/Source.php
@@ -47,13 +47,13 @@ class Source
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Catalog\Model\Resource\Helper $resourceHelper
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price.php b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price.php
index 1b70c297742..25fda479b95 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price.php
@@ -92,6 +92,11 @@ class Price extends \Magento\Index\Model\Resource\AbstractResource
      */
     protected $_indexerPriceFactory;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * Class constructor
      *
@@ -99,18 +104,20 @@ class Price extends \Magento\Index\Model\Resource\AbstractResource
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Catalog\Model\Product\Type $catalogProductType
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Catalog\Model\Resource\Product\Indexer\Price\Factory $indexerPriceFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
      */
     public function __construct(
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Catalog\Model\Product\Type $catalogProductType,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\Config $config,
-        \Magento\Catalog\Model\Resource\Product\Indexer\Price\Factory $indexerPriceFactory
+        \Magento\Catalog\Model\Resource\Product\Indexer\Price\Factory $indexerPriceFactory,
+        \Magento\Stdlib\DateTime $dateTime
     ) {
         $this->_currencyFactory = $currencyFactory;
         $this->_storeManager = $storeManager;
@@ -118,6 +125,7 @@ class Price extends \Magento\Index\Model\Resource\AbstractResource
         $this->_catalogProductType = $catalogProductType;
         $this->_config = $config;
         $this->_indexerPriceFactory = $indexerPriceFactory;
+        $this->dateTime = $dateTime;
         parent::__construct($resource);
     }
 
@@ -655,7 +663,7 @@ class Price extends \Magento\Index\Model\Resource\AbstractResource
                 $timestamp = $this->_locale->storeTimeStamp($store);
                 $data[] = array(
                     'website_id' => $website->getId(),
-                    'website_date'       => $this->formatDate($timestamp, false),
+                    'website_date'       => $this->dateTime->formatDate($timestamp, false),
                     'rate'       => $rate
                 );
             }
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php
index 85338f590a0..e536b695ae0 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/DefaultPrice.php
@@ -68,13 +68,13 @@ class DefaultPrice
     protected $_eventManager = null;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Link.php b/app/code/Magento/Catalog/Model/Resource/Product/Link.php
index 4562fa1291e..2ac004f3b56 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Link.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Link.php
@@ -54,11 +54,11 @@ class Link extends \Magento\Core\Model\Resource\Db\AbstractDb
      * Class constructor
      *
      * @param \Magento\Catalog\Model\Resource\Product\Relation $catalogProductRelation
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Catalog\Model\Resource\Product\Relation $catalogProductRelation,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_catalogProductRelation = $catalogProductRelation;
         parent::__construct($resource);
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Option.php b/app/code/Magento/Catalog/Model/Resource/Product/Option.php
index dee59c83366..b2aa803203e 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Option.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Option.php
@@ -60,13 +60,13 @@ class Option extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Class constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Config $config
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Config $config
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Option/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Option/Collection.php
index 06125badce5..e7a8650a8e2 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Option/Collection.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Option/Collection.php
@@ -53,7 +53,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      * @param \Magento\Catalog\Model\Resource\Product\Option\Value\CollectionFactory $optionValueCollectionFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
@@ -62,7 +62,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
         \Magento\Catalog\Model\Resource\Product\Option\Value\CollectionFactory $optionValueCollectionFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php b/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php
index 5b5683a0a43..7e2e8605b82 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php
@@ -60,13 +60,13 @@ class Value extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Class constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Config $config
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Config $config
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Status.php b/app/code/Magento/Catalog/Model/Resource/Product/Status.php
index 820b4a672a2..a99e7f75747 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Status.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Status.php
@@ -70,13 +70,13 @@ class Status extends \Magento\Core\Model\Resource\Db\AbstractDb
      * @param \Magento\Catalog\Model\Resource\Product $productResource
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Product $catalogProduct
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Catalog\Model\Resource\Product $productResource,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Product $catalogProduct,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_productResource = $productResource;
         $this->_storeManager = $storeManager;
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable.php b/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable.php
index e6f593446a4..7ad006c29ac 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable.php
@@ -47,11 +47,11 @@ class Configurable extends \Magento\Core\Model\Resource\Db\AbstractDb
      * Class constructor
      *
      * @param \Magento\Catalog\Model\Resource\Product\Relation $catalogProductRelation
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Catalog\Model\Resource\Product\Relation $catalogProductRelation,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_catalogProductRelation = $catalogProductRelation;
         parent::__construct($resource);
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable/Attribute.php b/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable/Attribute.php
index 96594cc436a..43be06b240b 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable/Attribute.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable/Attribute.php
@@ -69,12 +69,12 @@ class Attribute extends \Magento\Core\Model\Resource\Db\AbstractDb
      *
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Helper\Data $catalogData
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Helper\Data $catalogData,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_storeManager = $storeManager;
         $this->_catalogData = $catalogData;
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php
index 8bcc774f8da..023381887b8 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php
@@ -82,7 +82,7 @@ class Collection
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Product\Type\Configurable $catalogProductTypeConfigurable
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
@@ -92,7 +92,7 @@ class Collection
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Product\Type\Configurable $catalogProductTypeConfigurable,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Catalog\Helper\Data $catalogData,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php b/app/code/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php
index af0a033e753..f7c9281ac29 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php
@@ -54,11 +54,11 @@ class AssociatedProductsCollection
      * Construct
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -70,6 +70,7 @@ class AssociatedProductsCollection
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $config
      *
@@ -77,11 +78,11 @@ class AssociatedProductsCollection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -93,6 +94,7 @@ class AssociatedProductsCollection
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Catalog\Model\ProductTypes\ConfigInterface $config
     ) {
@@ -100,7 +102,7 @@ class AssociatedProductsCollection
         $this->_config = $config;
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource,
             $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig,
-            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper
+            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime
         );
     }
 
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Website.php b/app/code/Magento/Catalog/Model/Resource/Product/Website.php
index 63ebaa6ffab..2cc60096ae4 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Website.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Website.php
@@ -55,12 +55,12 @@ class Website extends \Magento\Core\Model\Resource\Db\AbstractDb
      *
      * @param \Magento\Catalog\Model\Resource\Product $productResource
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Catalog\Model\Resource\Product $productResource,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_productResource = $productResource;
         $this->_storeManager = $storeManager;
diff --git a/app/code/Magento/Catalog/Model/Resource/Setup.php b/app/code/Magento/Catalog/Model/Resource/Setup.php
index 7f6195a6c7d..50200f13d17 100755
--- a/app/code/Magento/Catalog/Model/Resource/Setup.php
+++ b/app/code/Magento/Catalog/Model/Resource/Setup.php
@@ -68,7 +68,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
      * Construct
      * 
      * @param \Magento\Core\Model\Resource\Setup\Context $context
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
      * @param string $resourceName
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
@@ -80,7 +80,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
      */
     public function __construct(
         \Magento\Core\Model\Resource\Setup\Context $context,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
         $resourceName,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
diff --git a/app/code/Magento/Catalog/Model/Resource/Url.php b/app/code/Magento/Catalog/Model/Resource/Url.php
index e75e6998dd4..7f423a01a2b 100644
--- a/app/code/Magento/Catalog/Model/Resource/Url.php
+++ b/app/code/Magento/Catalog/Model/Resource/Url.php
@@ -72,7 +72,7 @@ class Url extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_rootChildrenIds             = array();
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -114,22 +114,20 @@ class Url extends \Magento\Core\Model\Resource\Db\AbstractDb
     }
 
     /**
-     * Class constructor
-     *
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Catalog\Model\Product $catalogProduct
      * @param \Magento\Catalog\Model\Category $catalogCategory
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Logger $logger
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Catalog\Model\Product $catalogProduct,
         \Magento\Catalog\Model\Category $catalogCategory,
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\Resource $resource
+        \Magento\Logger $logger,
+        \Magento\App\Resource $resource
     ) {
         $this->_storeManager = $storeManager;
         $this->_eavConfig = $eavConfig;
diff --git a/app/code/Magento/Catalog/Model/Template/Filter.php b/app/code/Magento/Catalog/Model/Template/Filter.php
index e5a34f541f7..02e9b137d21 100644
--- a/app/code/Magento/Catalog/Model/Template/Filter.php
+++ b/app/code/Magento/Catalog/Model/Template/Filter.php
@@ -66,15 +66,18 @@ class Filter extends \Magento\Filter\Template
     /**
      * Construct
      *
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\View\Url $viewUrl
      */
     public function __construct(
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\View\Url $viewUrl
     ) {
         $this->_storeManager = $storeManager;
         $this->_viewUrl = $viewUrl;
+        parent::__construct($string);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/etc/adminhtml/di.xml b/app/code/Magento/Catalog/etc/adminhtml/di.xml
index 2b2384435b1..f78dcd79a14 100644
--- a/app/code/Magento/Catalog/etc/adminhtml/di.xml
+++ b/app/code/Magento/Catalog/etc/adminhtml/di.xml
@@ -34,4 +34,26 @@
             <value>adminhtml</value>
         </param>
     </type>
+    <type name="Magento\Catalog\Block\Adminhtml\Product\Frontend\Product\Watermark">
+        <param name="imageTypes">
+            <value>
+                <small>
+                    <title>Small</title>
+                    <attribute>small_image</attribute>
+                </small>
+                <main>
+                    <title>Main</title>
+                    <attribute>image</attribute>
+                </main>
+                <cart>
+                    <title>Thumbnail</title>
+                    <attribute>thumbnail</attribute>
+                </cart>
+                <custom>
+                    <title>Custom image</title>
+                    <attribute>custom_image</attribute>
+                </custom>
+            </value>
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Catalog/etc/di.xml b/app/code/Magento/Catalog/etc/di.xml
index 037247ce409..65741871b75 100644
--- a/app/code/Magento/Catalog/etc/di.xml
+++ b/app/code/Magento/Catalog/etc/di.xml
@@ -109,7 +109,7 @@
             <instance type="Magento\Catalog\Model\Layer\Proxy" />
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <catalog_setup>Magento\Catalog\Model\Resource\Setup</catalog_setup>
diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/main.phtml b/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/main.phtml
index d5fa98cfb0a..ddd93915bc7 100644
--- a/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/main.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/main.phtml
@@ -211,12 +211,12 @@
                         }
 
                         if( editSet.SystemNodesExists(editSet.currentNode) ) {
-                            alert('<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('This group contains system attributes. Please move system attributes to another group and try again.')) ?>');
+                            alert('<?php echo $this->escapeJsQuote(__('This group contains system attributes. Please move system attributes to another group and try again.')) ?>');
                             return;
                         }
 
                         if (editSet.ConfigurableNodeExists(editSet.currentNode)) {
-                            alert('<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('This group contains attributes used in configurable products. Please move these attributes to another group and try again.')) ?>');
+                            alert('<?php echo $this->escapeJsQuote(__('This group contains attributes used in configurable products. Please move these attributes to another group and try again.')) ?>');
                             return;
                         }
 
@@ -346,7 +346,7 @@
                     },
 
                     failure : function(o) {
-                        alert('<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('We\'re unable to complete this request.')) ?>');
+                        alert('<?php echo $this->escapeJsQuote(__('We\'re unable to complete this request.')) ?>');
                     },
 
                     groupBeforeMove : function(tree, nodeThis, oldParent, newParent) {
@@ -361,11 +361,11 @@
 
                     rightBeforeAppend : function(tree, nodeThis, node, newParent) {
                         if (node.attributes.is_user_defined == 0) {
-                            alert('<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('You cannot remove system attributes from this set.')) ?>');
+                            alert('<?php echo $this->escapeJsQuote(__('You cannot remove system attributes from this set.')) ?>');
                             return false;
                         }
                         else if (node.attributes.is_configurable == 1) {
-                            alert('<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('This attribute is used in configurable products. You cannot remove it from the attribute set.')) ?>');
+                            alert('<?php echo $this->escapeJsQuote(__('This attribute is used in configurable products. You cannot remove it from the attribute set.')) ?>');
                             return false;
                         }
                         else {
@@ -380,10 +380,10 @@
                         }
 
                         if (node.attributes.is_unassignable == 0) {
-                            alert('<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('You cannot remove system attributes from this set.')) ?>');
+                            alert('<?php echo $this->escapeJsQuote(__('You cannot remove system attributes from this set.')) ?>');
                             return false;
                         } else if (node.attributes.is_configurable == 1) {
-                            alert('<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('This attribute is used in configurable products. You cannot remove it from the attribute set.')) ?>');
+                            alert('<?php echo $this->escapeJsQuote(__('This attribute is used in configurable products. You cannot remove it from the attribute set.')) ?>');
                             return false;
                         } else {
                             return true;
diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/date.phtml b/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/date.phtml
index d973e79ade1..4437cb2bee4 100644
--- a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/date.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/date.phtml
@@ -63,10 +63,10 @@
         jQuery.validator.addMethod('validate-datetime-<?php echo $_optionId ?>', function(v) {
             var dateTimeParts = jQuery('.datetime-picker[id^="options_<?php echo $_optionId ?>"]');
             for (var i=0; i < dateTimeParts.length; i++) {
-                if (dateTimeParts[i].val() == "") return false;
+                if (dateTimeParts[i].value == "") return false;
             }
             return true;
-        }, '<?php echo $this->jsQuoteEscape( __('This is a required option.') )?>');
+        }, '<?php echo $this->escapeJsQuote( __('This is a required option.') )?>');
 <?php else: ?>
         jQuery.validator.addMethod('validate-datetime-<?php echo $_optionId ?>', function(v) {
             var dateTimeParts = jQuery('.datetime-picker[id^="options_<?php echo $_optionId ?>"]');
@@ -82,8 +82,9 @@
                 }
             }
             return hasWithValue ^ hasWithNoValue;
-        }, '<?php echo $this->jsQuoteEscape( __('Field is not complete') )?>');
+        }, '<?php echo $this->escapeJsQuote( __('Field is not complete') )?>');
 <?php endif; ?>
     //]]>
     </script>
-</dd>
+  </div>
+</div>
diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/group.phtml b/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/group.phtml
index 7cb368bb0cf..a1a0d21acdf 100644
--- a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/group.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/group.phtml
@@ -66,12 +66,12 @@ var groupPriceRowTemplate = '<tr>'
     + '<td<?php if (!$_showWebsite): ?> style="display:none"<?php endif; ?>>'
     + '<select class="<?php echo $_htmlClass; ?> required-entry" name="<?php echo $_htmlName; ?>[{{index}}][website_id]" id="group_price_row_{{index}}_website">'
     <?php foreach ($this->getWebsites() as $_websiteId => $_info) : ?>
-    + '<option value="<?php echo $_websiteId; ?>"><?php echo $this->jsQuoteEscape($this->escapeHtml($_info['name'])); ?><?php if (!empty($_info['currency'])) : ?> [<?php echo $this->escapeHtml($_info['currency']); ?>]<?php endif; ?></option>'
+    + '<option value="<?php echo $_websiteId; ?>"><?php echo $this->escapeJsQuote($this->escapeHtml($_info['name'])); ?><?php if (!empty($_info['currency'])) : ?> [<?php echo $this->escapeHtml($_info['currency']); ?>]<?php endif; ?></option>'
     <?php endforeach; ?>
     + '</select></td>'
     + '<td><select class="<?php echo $_htmlClass; ?> custgroup required-entry" name="<?php echo $_htmlName; ?>[{{index}}][cust_group]" id="group_price_row_{{index}}_cust_group">'
     <?php foreach ($this->getCustomerGroups() as $_groupId => $_groupName): ?>
-    + '<option value="<?php echo $_groupId; ?>"><?php echo $this->jsQuoteEscape($this->escapeHtml($_groupName)); ?></option>'
+    + '<option value="<?php echo $_groupId; ?>"><?php echo $this->escapeJsQuote($this->escapeHtml($_groupName)); ?></option>'
     <?php endforeach; ?>
     + '</select></td>'
     + '<td><input class="<?php echo $_htmlClass; ?> required-entry <?php echo $_priceValueValidation; ?>" type="text" name="<?php echo $_htmlName; ?>[{{index}}][price]" value="{{price}}" id="group_price_row_{{index}}_price" /></td>'
diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/tier.phtml b/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/tier.phtml
index e65adb72e6b..93611cd05ae 100644
--- a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/tier.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/tier.phtml
@@ -69,12 +69,12 @@ var tierPriceRowTemplate = '<tr>'
     + '<td class="col-websites"<?php if (!$_showWebsite): ?> style="display:none"<?php endif; ?>>'
     + '<select class="<?php echo $_htmlClass ?> required-entry" name="<?php echo $_htmlName ?>[{{index}}][website_id]" id="tier_price_row_{{index}}_website">'
     <?php foreach ($this->getWebsites() as $_websiteId => $_info): ?>
-    + '<option value="<?php echo $_websiteId ?>"><?php echo $this->jsQuoteEscape($this->escapeHtml($_info['name'])) ?><?php if (!empty($_info['currency'])): ?> [<?php echo $this->escapeHtml($_info['currency']) ?>]<?php endif; ?></option>'
+    + '<option value="<?php echo $_websiteId ?>"><?php echo $this->escapeJsQuote($this->escapeHtml($_info['name'])) ?><?php if (!empty($_info['currency'])): ?> [<?php echo $this->escapeHtml($_info['currency']) ?>]<?php endif; ?></option>'
     <?php endforeach ?>
     + '</select></td>'
     + '<td class="col-customer-group"><select class="<?php echo $_htmlClass ?> custgroup required-entry" name="<?php echo $_htmlName ?>[{{index}}][cust_group]" id="tier_price_row_{{index}}_cust_group">'
     <?php foreach ($this->getCustomerGroups() as $_groupId=>$_groupName): ?>
-    + '<option value="<?php echo $_groupId ?>"><?php echo $this->jsQuoteEscape($this->escapeHtml($_groupName)) ?></option>'
+    + '<option value="<?php echo $_groupId ?>"><?php echo $this->escapeJsQuote($this->escapeHtml($_groupName)) ?></option>'
     <?php endforeach ?>
     + '</select></td>'
     + '<td class="col-qty"><small class="nobr" title="<?php echo __("and above")?>"><?php echo __("and above")?></small><input class="<?php echo $_htmlClass ?> qty required-entry validate-greater-than-zero" type="text" name="<?php echo $_htmlName ?>[{{index}}][price_qty]" value="{{qty}}" id="tier_price_row_{{index}}_qty" />'
diff --git a/app/code/Magento/Catalog/view/frontend/layer/state.phtml b/app/code/Magento/Catalog/view/frontend/layer/state.phtml
index fca3a8d7634..fa2c8783093 100644
--- a/app/code/Magento/Catalog/view/frontend/layer/state.phtml
+++ b/app/code/Magento/Catalog/view/frontend/layer/state.phtml
@@ -28,7 +28,7 @@
 /**
  * Category layered navigation state
  *
- * @see \Magento\Catalog\Block\Layer\State
+ * @var $this \Magento\Catalog\Block\Layer\State
  */
 ?>
 <?php $_filters = $this->getActiveFilters() ?>
diff --git a/app/code/Magento/Catalog/view/frontend/product/price_msrp_item.phtml b/app/code/Magento/Catalog/view/frontend/product/price_msrp_item.phtml
index cdf3193eb5b..003c3ecc19d 100644
--- a/app/code/Magento/Catalog/view/frontend/product/price_msrp_item.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/price_msrp_item.phtml
@@ -54,7 +54,7 @@ $priceElementIdPrefix = $this->getPriceElementIdPrefix() ? $this->getPriceElemen
     <?php if ($_catalogHelper->isShowPriceOnGesture($_product)): ?>
     <?php $priceElementId = $priceElementIdPrefix . $_id . $this->getIdSuffix(); ?>
     <span id="<?php echo $priceElementId ?>" style="display:none"></span>
-    <?php $popupId = 'msrp-popup-' . $_id . $_coreHelper->getRandomString(20); ?>
+    <?php $popupId = 'msrp-popup-' . $_id . $this->getRandomString(20); ?>
     <a href="#" id="<?php echo($popupId);?>"><?php echo __('Click for price'); ?></a>
 
     <?php else: ?>
@@ -63,7 +63,7 @@ $priceElementIdPrefix = $this->getPriceElementIdPrefix() ? $this->getPriceElemen
     </span>
     <?php endif; ?>
 
-    <?php $helpLinkId = 'msrp-help-' . $_id . $_coreHelper->getRandomString(20); ?>
+    <?php $helpLinkId = 'msrp-help-' . $_id . $this->getRandomString(20); ?>
     <a href="#" id="<?php echo($helpLinkId);?>"><?php echo __("What's this?"); ?></a>
 </div>
 
diff --git a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php
index c83762f3341..1d8d9c2fd9c 100644
--- a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php
+++ b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php
@@ -57,14 +57,14 @@ class Stock extends \Magento\Data\Form\Element\Select
     /**
      * Construct
      * 
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\Data\Form\Element\TextFactory $factoryText
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\Data\Form\Element\TextFactory $factoryText,
@@ -73,7 +73,7 @@ class Stock extends \Magento\Data\Form\Element\Select
         $this->_factoryText = $factoryText;
         $this->_qty = isset($attributes['qty']) ? $attributes['qty'] : $this->_createQtyElement();
         unset($attributes['qty']);
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setName($attributes['name']);
     }
 
diff --git a/app/code/Magento/CatalogInventory/Helper/Minsaleqty.php b/app/code/Magento/CatalogInventory/Helper/Minsaleqty.php
index ac10463417f..7d36740eb0d 100644
--- a/app/code/Magento/CatalogInventory/Helper/Minsaleqty.php
+++ b/app/code/Magento/CatalogInventory/Helper/Minsaleqty.php
@@ -31,13 +31,6 @@ namespace Magento\CatalogInventory\Helper;
 
 class Minsaleqty
 {
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
-
     /**
      * Core store config
      *
@@ -46,15 +39,20 @@ class Minsaleqty
     protected $_coreStoreConfig;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
+    /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
+     * @param \Magento\Math\Random $mathRandom
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Model\Store\Config $coreStoreConfig
+        \Magento\Core\Model\Store\Config $coreStoreConfig,
+        \Magento\Math\Random $mathRandom
     ) {
-        $this->_coreData = $coreData;
         $this->_coreStoreConfig = $coreStoreConfig;
+        $this->mathRandom = $mathRandom;
     }
 
     /**
@@ -144,7 +142,7 @@ class Minsaleqty
     {
         $result = array();
         foreach ($value as $groupId => $qty) {
-            $_id = $this->_coreData->uniqHash('_');
+            $_id = $this->mathRandom->getUniqueHash('_');
             $result[$_id] = array(
                 'customer_group_id' => $groupId,
                 'min_sale_qty' => $this->_fixQty($qty),
diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock.php b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock.php
index ee23cfa7b80..7474411b02d 100644
--- a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock.php
+++ b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock.php
@@ -55,13 +55,13 @@ class Stock extends \Magento\Catalog\Model\Resource\Product\Indexer\AbstractInde
     protected $_productType;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\CatalogInventory\Model\Resource\Indexer\StockFactory $indexerFactory
      * @param \Magento\Catalog\Model\Product\Type $productType
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\CatalogInventory\Model\Resource\Indexer\StockFactory $indexerFactory,
         \Magento\Catalog\Model\Product\Type $productType
diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php
index c68ea6fddbb..aff991e4fa7 100644
--- a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php
+++ b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/DefaultStock.php
@@ -62,12 +62,12 @@ class DefaultStock
     /**
      * Class constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Core\Model\Store\Config $coreStoreConfig
     ) {
diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Stock.php b/app/code/Magento/CatalogInventory/Model/Resource/Stock.php
index cf0ba293194..83de0cb2192 100644
--- a/app/code/Magento/CatalogInventory/Model/Resource/Stock.php
+++ b/app/code/Magento/CatalogInventory/Model/Resource/Stock.php
@@ -99,25 +99,33 @@ class Stock extends \Magento\Core\Model\Resource\Db\AbstractDb
      * @var \Magento\CatalogInventory\Model\StockFactory
      */
     protected $_stockFactory;
-    
+
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * Construct
      * 
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\CatalogInventory\Model\StockFactory $stockFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\CatalogInventory\Helper\Data $catalogInventoryData,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\CatalogInventory\Model\StockFactory $stockFactory
+        \Magento\CatalogInventory\Model\StockFactory $stockFactory,
+        \Magento\Stdlib\DateTime $dateTime
     ) {
         parent::__construct($resource);
         $this->_catalogInventoryData = $catalogInventoryData;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_stockFactory = $stockFactory;
+        $this->dateTime = $dateTime;
     }
 
     /**
@@ -342,7 +350,7 @@ class Stock extends \Magento\Core\Model\Resource\Db\AbstractDb
         $adapter = $this->_getWriteAdapter();
         $condition = $adapter->quoteInto('(use_config_notify_stock_qty = 1 AND qty < ?)',
             $this->_configNotifyStockQty) . ' OR (use_config_notify_stock_qty = 0 AND qty < notify_stock_qty)';
-        $currentDbTime = $adapter->quoteInto('?', $this->formatDate(true));
+        $currentDbTime = $adapter->quoteInto('?', $this->dateTime->formatDate(true));
         $conditionalDate = $adapter->getCheckSql($condition, $currentDbTime, 'NULL');
 
         $value  = array(
diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item.php b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item.php
index d32eba40001..2e920d1b6cc 100644
--- a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item.php
+++ b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item.php
@@ -44,11 +44,11 @@ class Item extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_coreStoreConfig;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\Store\Config $coreStoreConfig
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/Collection.php b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/Collection.php
index efa15f0d8fe..169aac95102 100644
--- a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/Collection.php
+++ b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/Collection.php
@@ -38,7 +38,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -46,7 +46,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Status.php b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Status.php
index 3cc16817a94..8da9c643f50 100644
--- a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Status.php
+++ b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Status.php
@@ -49,12 +49,12 @@ class Status extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\WebsiteFactory $websiteFactory
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\WebsiteFactory $websiteFactory
     ) {
diff --git a/app/code/Magento/CatalogInventory/Model/Stock/Item.php b/app/code/Magento/CatalogInventory/Model/Stock/Item.php
index 5c4c791a7c8..b3bb34fe97b 100644
--- a/app/code/Magento/CatalogInventory/Model/Stock/Item.php
+++ b/app/code/Magento/CatalogInventory/Model/Stock/Item.php
@@ -142,13 +142,6 @@ class Item extends \Magento\Core\Model\AbstractModel
      */
     protected $_catalogInventoryMinsaleqty;
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData;
-
     /**
      * Catalog inventory data
      *
@@ -192,6 +185,11 @@ class Item extends \Magento\Core\Model\AbstractModel
      */
     protected $_customerSession;
 
+    /**
+     * @var \Magento\Math\Division
+     */
+    protected $mathDivision;
+
     /**
      * Construct
      *
@@ -201,11 +199,11 @@ class Item extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\CatalogInventory\Helper\Minsaleqty $catalogInventoryMinsaleqty
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\LocaleInterface $locale
+     * @param \Magento\Math\Division $mathDivision
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -217,11 +215,11 @@ class Item extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\CatalogInventory\Helper\Data $catalogInventoryData,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\CatalogInventory\Helper\Minsaleqty $catalogInventoryMinsaleqty,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\LocaleInterface $locale,
+        \Magento\Math\Division $mathDivision,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -232,11 +230,11 @@ class Item extends \Magento\Core\Model\AbstractModel
         $this->_indexer = $indexer;
         $this->_stockStatus = $stockStatus;
         $this->_catalogInventoryData = $catalogInventoryData;
-        $this->_coreData = $coreData;
         $this->_catalogInventoryMinsaleqty = $catalogInventoryMinsaleqty;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_storeManager = $storeManager;
         $this->_locale = $locale;
+        $this->mathDivision = $mathDivision;
     }
 
     /**
@@ -750,7 +748,7 @@ class Item extends \Magento\Core\Model\AbstractModel
             $qtyIncrements = $this->getDefaultQtyIncrements();
         }
 
-        if ($qtyIncrements && ($this->_coreData->getExactDivision($qty, $qtyIncrements) != 0)) {
+        if ($qtyIncrements && ($this->mathDivision->getExactDivision($qty, $qtyIncrements) != 0)) {
             $result->setHasError(true)
                 ->setQuoteMessage(
                     __('Please correct the quantity for some products.')
@@ -827,7 +825,7 @@ class Item extends \Magento\Core\Model\AbstractModel
             $this->setLowStockDate(null);
             if ($this->verifyNotification()) {
                 $this->setLowStockDate($this->_locale->date(null, null, null, false)
-                    ->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT)
+                    ->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)
                 );
             }
 
diff --git a/app/code/Magento/CatalogInventory/etc/di.xml b/app/code/Magento/CatalogInventory/etc/di.xml
index 00ca544b8da..36ce0cb5bc2 100644
--- a/app/code/Magento/CatalogInventory/etc/di.xml
+++ b/app/code/Magento/CatalogInventory/etc/di.xml
@@ -47,7 +47,7 @@
             <instance type="Magento\CatalogInventory\Helper\Data\Proxy" />
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <cataloginventory_setup>Magento\Eav\Model\Entity\Setup</cataloginventory_setup>
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Catalog.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog.php
similarity index 82%
rename from app/code/Magento/Adminhtml/Block/Promo/Catalog.php
rename to app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog.php
index f9fc07b8ba5..793241469e7 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Catalog.php
+++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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)
  */
@@ -29,11 +29,11 @@
  *
  * @category    Magento
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_CatalogRule
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\Promo;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo;
 
 class Catalog extends \Magento\Backend\Block\Widget\Grid\Container
 {
@@ -41,11 +41,12 @@ class Catalog extends \Magento\Backend\Block\Widget\Grid\Container
     {
         $this->_addButton('apply_rules', array(
             'label'     => __('Apply Rules'),
-            'onclick'   => "location.href='".$this->getUrl('adminhtml/*/applyRules')."'",
+            'onclick'   => "location.href='".$this->getUrl('catalog_rule/*/applyRules')."'",
             'class'     => 'apply',
         ));
 
-        $this->_controller = 'promo_catalog';
+        $this->_blockGroup = 'Magento_CatalogRule';
+        $this->_controller = 'adminhtml_promo_catalog';
         $this->_headerText = __('Catalog Price Rules');
         $this->_addButtonLabel = __('Add New Rule');
         parent::_construct();
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit.php
rename to app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit.php
index a6e4eea9d41..bfd977961fa 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit.php
+++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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)
  */
@@ -28,7 +28,7 @@
  * Catalog rule edit form block
  */
 
-namespace Magento\Adminhtml\Block\Promo\Catalog;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo\Catalog;
 
 class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 {
@@ -64,7 +64,8 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
     protected function _construct()
     {
         $this->_objectId = 'id';
-        $this->_controller = 'promo_catalog';
+        $this->_blockGroup = 'Magento_CatalogRule';
+        $this->_controller = 'adminhtml_promo_catalog';
 
         parent::_construct();
 
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Form.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Form.php
similarity index 88%
rename from app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Form.php
rename to app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Form.php
index b7cef26a6c4..34ee5a9e41d 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Form.php
+++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Form.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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)
  */
@@ -29,10 +29,10 @@
  *
  * @category    Magento
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_CatalogRule
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Catalog\Edit;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
@@ -49,7 +49,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         $form = $this->_formFactory->create(array(
             'attributes' => array(
                 'id' => 'edit_form',
-                'action' => $this->getData('action'),
+                'action' => $this->getUrl('catalog_rule/promo_catalog/save'),
                 'method' => 'post',
             ))
         );
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Js.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Js.php
similarity index 88%
rename from app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Js.php
rename to app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Js.php
index a8d1abfccfb..0354db80ea3 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Js.php
+++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Js.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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)
  */
@@ -28,10 +28,10 @@
  * description
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Catalog\Edit;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit;
 
 class Js extends \Magento\Adminhtml\Block\Template
 {
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/Actions.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Actions.php
similarity index 97%
rename from app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/Actions.php
rename to app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Actions.php
index 9b3f0622e70..33a47256f2a 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/Actions.php
+++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Actions.php
@@ -19,12 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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\Adminhtml\Block\Promo\Catalog\Edit\Tab;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab;
 
 class Actions
     extends \Magento\Backend\Block\Widget\Form\Generic
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/Conditions.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php
similarity index 90%
rename from app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/Conditions.php
rename to app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php
index e6f427c74d9..b6a95b26c6c 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/Conditions.php
+++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php
@@ -19,12 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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\Adminhtml\Block\Promo\Catalog\Edit\Tab;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab;
 
 class Conditions
     extends \Magento\Backend\Block\Widget\Form\Generic
@@ -44,7 +44,7 @@ class Conditions
      * @param \Magento\Rule\Block\Conditions $conditions
      * @param \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -53,7 +53,7 @@ class Conditions
         \Magento\Rule\Block\Conditions $conditions,
         \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -111,8 +111,8 @@ class Conditions
         $form = $this->_formFactory->create();
         $form->setHtmlIdPrefix('rule_');
 
-        $renderer = $this->_rendererFieldset->setTemplate('Magento_Adminhtml::promo/fieldset.phtml')
-            ->setNewChildUrl($this->getUrl('adminhtml/promo_catalog/newConditionHtml/form/rule_conditions_fieldset'));
+        $renderer = $this->_rendererFieldset->setTemplate('Magento_CatalogRule::promo/fieldset.phtml')
+            ->setNewChildUrl($this->getUrl('catalog_rule/promo_catalog/newConditionHtml/form/rule_conditions_fieldset'));
 
         $fieldset = $form->addFieldset('conditions_fieldset', array(
             'legend'=>__('Conditions (leave blank for all products)'))
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php
rename to app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php
index 6f2ee7f5179..c028300cb3c 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php
+++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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)
  */
@@ -28,10 +28,10 @@
  * Catalog Rule General Information Tab
  *
  * @category Magento
- * @package Magento_Adminhtml
+ * @package Magento_CatalogRule
  * @author Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Catalog\Edit\Tab;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab;
 
 class Main
     extends \Magento\Backend\Block\Widget\Form\Generic
@@ -56,7 +56,7 @@ class Main
      * @param \Magento\Customer\Model\Resource\Group\CollectionFactory $customerGroup
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -65,7 +65,7 @@ class Main
         \Magento\Customer\Model\Resource\Group\CollectionFactory $customerGroup,
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -193,7 +193,7 @@ class Main
             'label'  => __('From Date'),
             'title'  => __('From Date'),
             'image'  => $this->getViewFileUrl('images/grid-cal.gif'),
-            'input_format' => \Magento\Date::DATE_INTERNAL_FORMAT,
+            'input_format' => \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT,
             'date_format' => $dateFormat
         ));
         $fieldset->addField('to_date', 'date', array(
@@ -201,7 +201,7 @@ class Main
             'label'  => __('To Date'),
             'title'  => __('To Date'),
             'image'  => $this->getViewFileUrl('images/grid-cal.gif'),
-            'input_format' => \Magento\Date::DATE_INTERNAL_FORMAT,
+            'input_format' => \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT,
             'date_format' => $dateFormat
         ));
 
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tabs.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tabs.php
similarity index 90%
rename from app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tabs.php
rename to app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tabs.php
index 800fb92ac83..0d96ff0d576 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tabs.php
+++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tabs.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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)
  */
@@ -29,10 +29,10 @@
  *
  * @category    Magento
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_CatalogRule
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Catalog\Edit;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit;
 
 class Tabs extends \Magento\Adminhtml\Block\Widget\Tabs
 {
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Widget/Chooser.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Promo/Widget/Chooser.php
rename to app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser.php
index e3e726fb109..16710323f8a 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Widget/Chooser.php
+++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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)
  */
@@ -27,7 +27,7 @@
 /**
  * Shopping cart price rule chooser
  */
-namespace Magento\Adminhtml\Block\Promo\Widget;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo\Widget;
 
 class Chooser extends \Magento\Backend\Block\Widget\Grid\Extended
 {
@@ -75,8 +75,8 @@ class Chooser extends \Magento\Backend\Block\Widget\Grid\Extended
      */
     public function prepareElementHtml(\Magento\Data\Form\Element\AbstractElement $element)
     {
-        $uniqId = $this->_coreData->uniqHash($element->getId());
-        $sourceUrl = $this->getUrl('adminhtml/promo_quote/chooser', array('uniq_id' => $uniqId));
+        $uniqId = $this->mathRandom->getUniqueHash($element->getId());
+        $sourceUrl = $this->getUrl('catalog_rule/promo_quote/chooser', array('uniq_id' => $uniqId));
 
         $chooser = $this->getLayout()->createBlock('Magento\Widget\Block\Adminhtml\Widget\Chooser')
             ->setElement($element)
@@ -200,6 +200,6 @@ class Chooser extends \Magento\Backend\Block\Widget\Grid\Extended
      */
     public function getGridUrl()
     {
-        return $this->getUrl('adminhtml/promo_quote/chooser', array('_current' => true));
+        return $this->getUrl('catalog_rule/promo_quote/chooser', array('_current' => true));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Daterange.php
similarity index 81%
rename from app/code/Magento/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php
rename to app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Daterange.php
index 3f4dfc25434..287054dc7b3 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php
+++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Daterange.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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)
  */
@@ -28,7 +28,7 @@
  * Date range promo widget chooser
  * Currently works without localized format
  */
-namespace Magento\Adminhtml\Block\Promo\Widget\Chooser;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser;
 
 class Daterange extends \Magento\Backend\Block\AbstractBlock
 {
@@ -54,31 +54,29 @@ class Daterange extends \Magento\Backend\Block\AbstractBlock
     protected $_rangeDelimiter  = '...';
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Data\FormFactory
      */
-    protected $_coreData = null;
+    protected $_formFactory;
 
     /**
-     * @var \Magento\Data\Form\Factory
+     * @var \Magento\Math\Random
      */
-    protected $_formFactory;
+    protected $mathRandom;
 
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Backend\Block\Context $context
+     * @param \Magento\Math\Random $mathRandom
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Backend\Block\Context $context,
+        \Magento\Math\Random $mathRandom,
         array $data = array()
     ) {
         $this->_formFactory = $formFactory;
-        $this->_coreData = $coreData;
+        $this->mathRandom = $mathRandom;
         parent::__construct($context, $data);
     }
 
@@ -94,7 +92,7 @@ class Daterange extends \Magento\Backend\Block\AbstractBlock
             return '';
         }
 
-        $idSuffix = $this->_coreData->uniqHash();
+        $idSuffix = $this->mathRandom->getUniqueHash();
         /** @var \Magento\Data\Form $form */
         $form = $this->_formFactory->create();
         $dateFields = array(
@@ -103,7 +101,7 @@ class Daterange extends \Magento\Backend\Block\AbstractBlock
         );
         foreach ($dateFields as $key => $label) {
             $form->addField("{$key}_{$idSuffix}", 'date', array(
-                'format'   => \Magento\Date::DATE_INTERNAL_FORMAT, // hardcoded because hardcoded values delimiter
+                'format'   => \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT, // hardcoded because hardcoded values delimiter
                 'label'    => $label,
                 'image'    => $this->getViewFileUrl('images/grid-cal.gif'),
                 'onchange' => "dateTimeChoose_{$idSuffix}()", // won't work through Event.observe()
@@ -122,7 +120,7 @@ class Daterange extends \Magento\Backend\Block\AbstractBlock
      * Target element ID setter
      *
      * @param string $value
-     * @return \Magento\Adminhtml\Block\Promo\Widget\Chooser\Daterange
+     * @return \Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser\Daterange
      */
     public function setTargetElementId($value)
     {
@@ -135,7 +133,7 @@ class Daterange extends \Magento\Backend\Block\AbstractBlock
      *
      * @param string $from
      * @param string $to
-     * @return \Magento\Adminhtml\Block\Promo\Widget\Chooser\Daterange
+     * @return \Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser\Daterange
      */
     public function setRangeValues($from, $to)
     {
@@ -148,7 +146,7 @@ class Daterange extends \Magento\Backend\Block\AbstractBlock
      * Automatically attempts to split the string by delimiter
      *
      * @param string $delimitedString
-     * @return \Magento\Adminhtml\Block\Promo\Widget\Chooser\Daterange
+     * @return \Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser\Daterange
      */
     public function setRangeValue($delimitedString)
     {
@@ -164,7 +162,7 @@ class Daterange extends \Magento\Backend\Block\AbstractBlock
      * Range delimiter setter
      *
      * @param string $value
-     * @return \Magento\Adminhtml\Block\Promo\Widget\Chooser\Daterange
+     * @return \Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser\Daterange
      */
     public function setRangeDelimiter($value)
     {
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Widget/Chooser/Sku.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Sku.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/Promo/Widget/Chooser/Sku.php
rename to app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Sku.php
index 482a4daf479..3455e82fbe6 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Widget/Chooser/Sku.php
+++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Sku.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml sales order create search products block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_CatalogRule
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Widget\Chooser;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser;
 
 class Sku extends \Magento\Backend\Block\Widget\Grid\Extended
 {
@@ -127,7 +127,7 @@ class Sku extends \Magento\Backend\Block\Widget\Grid\Extended
     /**
      * Prepare Catalog Product Collection for attribute SKU in Promo Conditions SKU chooser
      *
-     * @return \Magento\Adminhtml\Block\Promo\Widget\Chooser\Sku
+     * @return \Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser\Sku
      */
     protected function _prepareCollection()
     {
@@ -143,7 +143,7 @@ class Sku extends \Magento\Backend\Block\Widget\Grid\Extended
     /**
      * Define Cooser Grid Columns and filters
      *
-     * @return \Magento\Adminhtml\Block\Promo\Widget\Chooser\Sku
+     * @return \Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser\Sku
      */
     protected function _prepareColumns()
     {
@@ -204,7 +204,7 @@ class Sku extends \Magento\Backend\Block\Widget\Grid\Extended
 
     public function getGridUrl()
     {
-        return $this->getUrl('adminhtml/*/chooser', array(
+        return $this->getUrl('catalog_rule/*/chooser', array(
             '_current'          => true,
             'current_grid_id'   => $this->getId(),
             'collapse'          => null
diff --git a/app/code/Magento/Adminhtml/Controller/Promo.php b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Controller/Promo.php
rename to app/code/Magento/CatalogRule/Controller/Adminhtml/Promo.php
index 988b3535165..e6b307b05f8 100644
--- a/app/code/Magento/Adminhtml/Controller/Promo.php
+++ b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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)
  */
@@ -28,10 +28,10 @@
  * sales admin controller
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_CatalogRule
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller;
+namespace Magento\CatalogRule\Controller\Adminhtml;
 
 class Promo extends \Magento\Backend\Controller\Adminhtml\Action
 {
diff --git a/app/code/Magento/Adminhtml/Controller/Promo/Catalog.php b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php
similarity index 90%
rename from app/code/Magento/Adminhtml/Controller/Promo/Catalog.php
rename to app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php
index 8e3568f44fa..67323e46926 100644
--- a/app/code/Magento/Adminhtml/Controller/Promo/Catalog.php
+++ b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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)
  */
@@ -28,16 +28,17 @@
  * Backend Catalog Price Rules controller
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\Promo;
+namespace Magento\CatalogRule\Controller\Adminhtml\Promo;
 
 class Catalog extends \Magento\Backend\Controller\Adminhtml\Action
 {
     /**
      * Dirty rules notice message
      *
+     *
      * @var string
      */
     protected $_dirtyRulesNoticeMessage;
@@ -107,7 +108,7 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(
                     __('This rule no longer exists.')
                 );
-                $this->_redirect('adminhtml/*');
+                $this->_redirect('catalog_rule/*');
                 return;
             }
         }
@@ -124,7 +125,7 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action
         $this->_coreRegistry->register('current_promo_catalog_rule', $model);
 
         $this->_initAction()->getLayout()->getBlock('promo_catalog_edit')
-             ->setData('action', $this->getUrl('adminhtml/promo_catalog/save'));
+            ->setData('action', $this->getUrl('catalog_rule/promo_catalog/save'));
 
         $breadcrumb = $id ? __('Edit Rule') : __('New Rule');
         $this->_addBreadcrumb($breadcrumb, $breadcrumb)->renderLayout();
@@ -155,7 +156,7 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action
                         $this->_getSession()->addError($errorMessage);
                     }
                     $this->_getSession()->setPageData($data);
-                    $this->_redirect('adminhtml/*/edit', array('id'=>$model->getId()));
+                    $this->_redirect('catalog_rule/*/edit', array('id'=>$model->getId()));
                     return;
                 }
 
@@ -180,10 +181,10 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action
                         ->setState(1)
                         ->save();
                     if ($this->getRequest()->getParam('back')) {
-                        $this->_redirect('adminhtml/*/edit', array('id' => $model->getId()));
+                        $this->_redirect('catalog_rule/*/edit', array('id' => $model->getId()));
                         return;
                     }
-                    $this->_redirect('adminhtml/*/');
+                    $this->_redirect('catalog_rule/*/');
                 }
                 return;
             } catch (\Magento\Core\Exception $e) {
@@ -192,13 +193,13 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_getSession()->addError(
                     __('An error occurred while saving the rule data. Please review the log and try again.')
                 );
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setPageData($data);
-                $this->_redirect('adminhtml/*/edit', array('id' => $this->getRequest()->getParam('rule_id')));
+                $this->_redirect('catalog_rule/*/edit', array('id' => $this->getRequest()->getParam('rule_id')));
                 return;
             }
         }
-        $this->_redirect('adminhtml/*/');
+        $this->_redirect('catalog_rule/*/');
     }
 
     public function deleteAction()
@@ -215,7 +216,7 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addSuccess(
                     __('The rule has been deleted.')
                 );
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('catalog_rule/*/');
                 return;
             } catch (\Magento\Core\Exception $e) {
                 $this->_getSession()->addError($e->getMessage());
@@ -223,15 +224,15 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_getSession()->addError(
                     __('An error occurred while deleting the rule. Please review the log and try again.')
                 );
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
-                $this->_redirect('adminhtml/*/edit', array('id' => $this->getRequest()->getParam('id')));
+                $this->_objectManager->get('Magento\Logger')->logException($e);
+                $this->_redirect('catalog_rule/*/edit', array('id' => $this->getRequest()->getParam('id')));
                 return;
             }
         }
         $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(
             __('Unable to find a rule to delete.')
         );
-        $this->_redirect('adminhtml/*/');
+        $this->_redirect('catalog_rule/*/');
     }
 
     public function newConditionHtmlAction()
@@ -261,7 +262,7 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action
     public function chooserAction()
     {
         if ($this->getRequest()->getParam('attribute') == 'sku') {
-            $type = 'Magento\Adminhtml\Block\Promo\Widget\Chooser\Sku';
+            $type = 'Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser\Sku';
         }
         if (!empty($type)) {
             $block = $this->getLayout()->createBlock($type);
@@ -317,7 +318,7 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Exception $e) {
             $this->_getSession()->addError($errorMessage);
         }
-        $this->_redirect('adminhtml/*');
+        $this->_redirect('catalog_rule/*');
     }
 
     protected function _isAllowed()
diff --git a/app/code/Magento/Adminhtml/Controller/Promo/Widget.php b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Widget.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Controller/Promo/Widget.php
rename to app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Widget.php
index 8ab328746ee..69a377fc0cc 100644
--- a/app/code/Magento/Adminhtml/Controller/Promo/Widget.php
+++ b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Widget.php
@@ -19,12 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_CatalogRule
  * @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\Adminhtml\Controller\Promo;
+namespace Magento\CatalogRule\Controller\Adminhtml\Promo;
 
 class Widget extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -59,7 +59,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action
         switch ($request->getParam('attribute')) {
             case 'sku':
                 $block = $this->getLayout()->createBlock(
-                    'Magento\Adminhtml\Block\Promo\Widget\Chooser\Sku', 'promo_widget_chooser_sku',
+                    'Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser\Sku', 'promo_widget_chooser_sku',
                     array('data' => array('js_form_object' => $request->getParam('form')),
                 ));
                 break;
@@ -141,7 +141,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action
                 $rootId = $this->_objectManager->get('Magento\Core\Model\StoreManager')
                     ->getStore($storeId)->getRootCategoryId();
                 if (!in_array($rootId, $category->getPathIds())) {
-                    $this->_redirect('adminhtml/*/', array('_current' => true, 'id' => null));
+                    $this->_redirect('catalog/*/', array('_current' => true, 'id' => null));
                     return false;
                 }
             }
diff --git a/app/code/Magento/CatalogRule/Model/Observer.php b/app/code/Magento/CatalogRule/Model/Observer.php
index af16f9cf583..5d8ed38d7b0 100644
--- a/app/code/Magento/CatalogRule/Model/Observer.php
+++ b/app/code/Magento/CatalogRule/Model/Observer.php
@@ -97,44 +97,49 @@ class Observer
     protected $_resourceRule;
 
     /**
-     * @param \Magento\CatalogRule\Model\Resource\RuleFactory $resourceRuleFactory
-     * @param \Magento\CatalogRule\Model\Resource\Rule $resourceRule
+     * @param Resource\RuleFactory $resourceRuleFactory
+     * @param Resource\Rule $resourceRule
+     * @param Resource\Rule\CollectionFactory $ruleCollFactory
+     * @param Rule\Product\Price $productPrice
+     * @param RuleFactory $ruleFactory
+     * @param FlagFactory $flagFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\CatalogRule\Model\RuleFactory $ruleFactory
-     * @param \Magento\CatalogRule\Model\Resource\Rule\CollectionFactory $ruleCollFactory
-     * @param \Magento\CatalogRule\Model\FlagFactory $flagFactory
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Backend\Model\Session $backendSession
-     * @param \Magento\CatalogRule\Model\Rule\Product\Price $productPrice
+     * @param Rule\Product\Price $productPrice
      * @param \Magento\Core\Model\Registry $coreRegistry
-     *
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\CatalogRule\Model\Resource\RuleFactory $resourceRuleFactory,
-        \Magento\CatalogRule\Model\Resource\Rule $resourceRule,
+        Resource\RuleFactory $resourceRuleFactory,
+        Resource\Rule $resourceRule,
+        Resource\Rule\CollectionFactory $ruleCollFactory,
+        Rule\Product\Price $productPrice,
+        RuleFactory $ruleFactory,
+        FlagFactory $flagFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\CatalogRule\Model\RuleFactory $ruleFactory,
-        \Magento\CatalogRule\Model\Resource\Rule\CollectionFactory $ruleCollFactory,
-        \Magento\CatalogRule\Model\FlagFactory $flagFactory,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Backend\Model\Session $backendSession,
         \Magento\CatalogRule\Model\Rule\Product\Price $productPrice,
-        \Magento\Core\Model\Registry $coreRegistry
+        \Magento\Core\Model\Registry $coreRegistry,
+        \Magento\Stdlib\DateTime $dateTime
     ) {
-        $this->_resourceRule = $resourceRule;
         $this->_resourceRuleFactory = $resourceRuleFactory;
-        $this->_storeManager = $storeManager;
-        $this->_locale = $locale;
+        $this->_resourceRule = $resourceRule;
+        $this->_ruleCollFactory = $ruleCollFactory;
+        $this->_productPrice = $productPrice;
         $this->_ruleFactory = $ruleFactory;
         $this->_flagFactory = $flagFactory;
-        $this->_ruleCollFactory = $ruleCollFactory;
+        $this->_storeManager = $storeManager;
+        $this->_locale = $locale;
         $this->_customerSession = $customerSession;
         $this->_backendSession = $backendSession;
-        $this->_productPrice = $productPrice;
         $this->_coreRegistry = $coreRegistry;
+        $this->dateTime = $dateTime;
     }
 
     /**
@@ -173,7 +178,7 @@ class Observer
      */
     public function applyAllRules($observer)
     {
-        $this->_resourceRule->applyAllRulesForDateRange($this->_resourceRule->formatDate(mktime(0,0,0)));
+        $this->_resourceRule->applyAllRulesForDateRange($this->dateTime->formatDate(mktime(0,0,0)));
         $this->_flagFactory->create()
             ->loadSelf()
             ->setState(0)
diff --git a/app/code/Magento/CatalogRule/Model/Resource/Rule.php b/app/code/Magento/CatalogRule/Model/Resource/Rule.php
index 63a3ce57614..9f37961ec2e 100644
--- a/app/code/Magento/CatalogRule/Model/Resource/Rule.php
+++ b/app/code/Magento/CatalogRule/Model/Resource/Rule.php
@@ -94,22 +94,29 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource
     protected $_storeManager;
 
     /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Product\ConditionFactory $conditionFactory
      * @param \Magento\Core\Model\Date $coreDate
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\CatalogRule\Helper\Data $catalogRuleData
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
      */
     public function __construct(
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Product\ConditionFactory $conditionFactory,
         \Magento\Core\Model\Date $coreDate,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\CatalogRule\Helper\Data $catalogRuleData,
-        \Magento\Core\Model\Resource $resource
+        \Magento\Stdlib\DateTime $dateTime        
     ) {
         $this->_storeManager = $storeManager;
         $this->_conditionFactory = $conditionFactory;
@@ -117,6 +124,7 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource
         $this->_eavConfig = $eavConfig;
         $this->_eventManager = $eventManager;
         $this->_catalogRuleData = $catalogRuleData;
+        $this->dateTime = $dateTime;
         parent::__construct($resource);
     }
 
@@ -296,8 +304,8 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource
     {
         $write = $this->_getWriteAdapter();
         $conds = array();
-        $cond = $write->quoteInto('rule_date between ?', $this->formatDate($fromDate));
-        $cond = $write->quoteInto($cond.' and ?', $this->formatDate($toDate));
+        $cond = $write->quoteInto('rule_date between ?', $this->dateTime->formatDate($fromDate));
+        $cond = $write->quoteInto($cond.' and ?', $this->dateTime->formatDate($toDate));
         $conds[] = $cond;
         if (!is_null($productId)) {
             $conds[] = $write->quoteInto('product_id=?', $productId);
@@ -335,7 +343,7 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource
     {
         $write = $this->_getWriteAdapter();
         $conds = array();
-        $conds[] = $write->quoteInto('rule_date<?', $this->formatDate($date));
+        $conds[] = $write->quoteInto('rule_date<?', $this->dateTime->formatDate($date));
         if (!is_null($productId)) {
             $conds[] = $write->quoteInto('product_id=?', $productId);
         }
@@ -651,9 +659,9 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource
         try {
             foreach ($arrData as $key => $data) {
                 $productIds['product_id'] = $data['product_id'];
-                $arrData[$key]['rule_date'] = $this->formatDate($data['rule_date'], false);
-                $arrData[$key]['latest_start_date'] = $this->formatDate($data['latest_start_date'], false);
-                $arrData[$key]['earliest_end_date'] = $this->formatDate($data['earliest_end_date'], false);
+                $arrData[$key]['rule_date'] = $this->dateTime->formatDate($data['rule_date'], false);
+                $arrData[$key]['latest_start_date'] = $this->dateTime->formatDate($data['latest_start_date'], false);
+                $arrData[$key]['earliest_end_date'] = $this->dateTime->formatDate($data['earliest_end_date'], false);
             }
             $adapter->insertOnDuplicate($this->getTable('catalogrule_affected_product'), array_unique($productIds));
             $adapter->insertOnDuplicate($this->getTable('catalogrule_product_price'), $arrData);
@@ -705,7 +713,7 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource
         $adapter = $this->_getReadAdapter();
         $select  = $adapter->select()
             ->from($this->getTable('catalogrule_product_price'), array('product_id', 'rule_price'))
-            ->where('rule_date = ?', $this->formatDate($date, false))
+            ->where('rule_date = ?', $this->dateTime->formatDate($date, false))
             ->where('website_id = ?', $websiteId)
             ->where('customer_group_id = ?', $customerGroupId)
             ->where('product_id IN(?)', $productIds);
@@ -752,7 +760,7 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource
         $read = $this->_getReadAdapter();
         $select = $read->select()
             ->from($this->getTable('catalogrule_product_price'), '*')
-            ->where('rule_date=?', $this->formatDate($date, false))
+            ->where('rule_date=?', $this->dateTime->formatDate($date, false))
             ->where('website_id=?', $wId)
             ->where('product_id=?', $pId);
 
diff --git a/app/code/Magento/CatalogRule/Model/Rule.php b/app/code/Magento/CatalogRule/Model/Rule.php
index 90281f01bbf..38f1090f216 100644
--- a/app/code/Magento/CatalogRule/Model/Rule.php
+++ b/app/code/Magento/CatalogRule/Model/Rule.php
@@ -24,6 +24,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\CatalogRule\Model;
 
 /**
  * Catalog Rule data model
@@ -55,13 +56,7 @@
  * @method \Magento\CatalogRule\Model\Rule setDiscountAmount(float $value)
  * @method string getWebsiteIds()
  * @method \Magento\CatalogRule\Model\Rule setWebsiteIds(string $value)
- *
- * @category    Magento
- * @package     Magento_CatalogRule
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\CatalogRule\Model;
-
 class Rule extends \Magento\Rule\Model\AbstractModel
 {
     /**
@@ -165,19 +160,24 @@ class Rule extends \Magento\Rule\Model\AbstractModel
      */
     protected $_productCollFactory;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\CatalogRule\Model\Rule\Condition\CombineFactory $combineFactory
-     * @param \Magento\CatalogRule\Model\Rule\Action\CollectionFactory $actionCollFactory
+     * @param Rule\Condition\CombineFactory $combineFactory
+     * @param Rule\Action\CollectionFactory $actionCollFactory
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Core\Model\Resource\Iterator $resourceIterator
      * @param \Magento\Index\Model\Indexer $indexer
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\CatalogRule\Helper\Data $catalogRuleData
      * @param \Magento\Core\Model\Cache\TypeListInterface $cacheTypesList
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -185,7 +185,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $relatedCacheTypes
      * @param array $data
-     *
+     * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -199,7 +199,8 @@ class Rule extends \Magento\Rule\Model\AbstractModel
         \Magento\Customer\Model\Session $customerSession,
         \Magento\CatalogRule\Helper\Data $catalogRuleData,
         \Magento\Core\Model\Cache\TypeListInterface $cacheTypesList,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Stdlib\DateTime $dateTime,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\LocaleInterface $locale,
@@ -219,6 +220,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel
         $this->_catalogRuleData = $catalogRuleData;
         $this->_cacheTypesList = $cacheTypesList;
         $this->_relatedCacheTypes = $relatedCacheTypes;
+        $this->dateTime = $dateTime;
         parent::__construct($formFactory, $context, $registry, $locale, $resource, $resourceCollection, $data);
     }
 
@@ -274,7 +276,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel
     public function getNow()
     {
         if (!$this->_now) {
-            return now();
+            return $this->dateTime->now();
         }
         return $this->_now;
     }
diff --git a/app/code/Magento/CatalogRule/etc/adminhtml/menu.xml b/app/code/Magento/CatalogRule/etc/adminhtml/menu.xml
index 24d42fb5429..84ae05cc481 100644
--- a/app/code/Magento/CatalogRule/etc/adminhtml/menu.xml
+++ b/app/code/Magento/CatalogRule/etc/adminhtml/menu.xml
@@ -28,6 +28,6 @@
 <config>
     <menu>
         <add id="Magento_CatalogRule::promo" title="Promotions" module="Magento_CatalogRule" parent="Magento_Adminhtml::marketing" sortOrder="10" resource="Magento_CatalogRule::promo"/>
-        <add id="Magento_CatalogRule::promo_catalog" title="Catalog Price Rules" sortOrder="10" module="Magento_CatalogRule" parent="Magento_CatalogRule::promo" action="adminhtml/promo_catalog/" dependsOnModule="Magento_Catalog" resource="Magento_CatalogRule::promo_catalog"/>
+        <add id="Magento_CatalogRule::promo_catalog" title="Catalog Price Rules" sortOrder="10" module="Magento_CatalogRule" parent="Magento_CatalogRule::promo" action="catalog_rule/promo_catalog/" dependsOnModule="Magento_Catalog" resource="Magento_CatalogRule::promo_catalog"/>
     </menu>
 </config>
diff --git a/app/code/Magento/CatalogRule/etc/adminhtml/routes.xml b/app/code/Magento/CatalogRule/etc/adminhtml/routes.xml
new file mode 100644
index 00000000000..d17a44e74c9
--- /dev/null
+++ b/app/code/Magento/CatalogRule/etc/adminhtml/routes.xml
@@ -0,0 +1,32 @@
+<?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>
+    <router id="admin">
+        <route id="catalog_rule" frontName="catalog_rule">
+            <module name="Magento_CatalogRule_Adminhtml" before="Magento_Adminhtml" />
+        </route>
+    </router>
+</config>
diff --git a/app/code/Magento/CatalogRule/etc/di.xml b/app/code/Magento/CatalogRule/etc/di.xml
index b0fde245ae4..d206829e3da 100644
--- a/app/code/Magento/CatalogRule/etc/di.xml
+++ b/app/code/Magento/CatalogRule/etc/di.xml
@@ -41,7 +41,7 @@
             <instance type="Magento\Backend\Model\Session\Proxy" />
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <catalogrule_setup>Magento\Core\Model\Resource\Setup\Generic</catalogrule_setup>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_block.xml b/app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_block.xml
similarity index 98%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_block.xml
rename to app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_block.xml
index 438e9e61e45..e10dd567260 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_block.xml
+++ b/app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_block.xml
@@ -36,7 +36,7 @@
             <block class="Magento\Backend\Block\Widget\Grid\ColumnSet" name="promo.catalog.grid.columnSet" as="grid.columnSet">
                 <arguments>
                     <argument name="rowUrl" xsi:type="array">
-                        <item name="path" xsi:type="string">adminhtml/*/edit</item>
+                        <item name="path" xsi:type="string">catalog_rule/*/edit</item>
                         <item name="extraParamsTemplate" xsi:type="array">
                             <item name="id" xsi:type="string">getRuleId</item>
                         </item>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_edit.xml b/app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_edit.xml
similarity index 75%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_edit.xml
rename to app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_edit.xml
index 5f348971038..17c26f871b8 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_edit.xml
+++ b/app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_edit.xml
@@ -33,10 +33,10 @@
         </action>
     </referenceBlock>
     <referenceContainer name="left">
-        <block class="Magento\Adminhtml\Block\Promo\Catalog\Edit\Tabs" name="promo_catalog_edit_tabs">
-            <block class="Magento\Adminhtml\Block\Promo\Catalog\Edit\Tab\Main" name="promo_catalog_edit_tab_main"/>
-            <block class="Magento\Adminhtml\Block\Promo\Catalog\Edit\Tab\Conditions" name="promo_catalog_edit_tab_conditions"/>
-            <block class="Magento\Adminhtml\Block\Promo\Catalog\Edit\Tab\Actions" name="promo_catalog_edit_tab_actions"/>
+        <block class="Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tabs" name="promo_catalog_edit_tabs">
+            <block class="Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Main" name="promo_catalog_edit_tab_main"/>
+            <block class="Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Conditions" name="promo_catalog_edit_tab_conditions"/>
+            <block class="Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Actions" name="promo_catalog_edit_tab_actions"/>
             <action method="addTab">
                 <argument name="name" xsi:type="string">main_section</argument>
                 <argument name="block" xsi:type="string">promo_catalog_edit_tab_main</argument>
@@ -52,9 +52,9 @@
         </block>
     </referenceContainer>
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Promo\Catalog\Edit" name="promo_catalog_edit"/>
+        <block class="Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit" name="promo_catalog_edit"/>
     </referenceContainer>
     <referenceContainer name="js">
-        <block class="Magento\Adminhtml\Block\Promo\Catalog\Edit\Js" template="promo/js.phtml"/>
+        <block class="Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Js" template="promo/js.phtml"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_index.xml b/app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_index.xml
similarity index 85%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_index.xml
rename to app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_index.xml
index 5c379c2bdf3..fbec298ca8a 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_catalog_index.xml
+++ b/app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_index.xml
@@ -24,8 +24,8 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="adminhtml_promo_catalog_block"/>
+    <update handle="catalog_rule_promo_catalog_block"/>
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Promo\Catalog" name="adminhtml.promo.catalog.grid.container"/>
+        <block class="Magento\CatalogRule\Block\Adminhtml\Promo\Catalog" name="adminhtml.promo.catalog.grid.container"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/promo/fieldset.phtml b/app/code/Magento/CatalogRule/view/adminhtml/promo/fieldset.phtml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/promo/fieldset.phtml
rename to app/code/Magento/CatalogRule/view/adminhtml/promo/fieldset.phtml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/promo/form.phtml b/app/code/Magento/CatalogRule/view/adminhtml/promo/form.phtml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/promo/form.phtml
rename to app/code/Magento/CatalogRule/view/adminhtml/promo/form.phtml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/promo/js.phtml b/app/code/Magento/CatalogRule/view/adminhtml/promo/js.phtml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/promo/js.phtml
rename to app/code/Magento/CatalogRule/view/adminhtml/promo/js.phtml
diff --git a/app/code/Magento/CatalogSearch/Helper/Data.php b/app/code/Magento/CatalogSearch/Helper/Data.php
index e89496d2166..93e59294c77 100644
--- a/app/code/Magento/CatalogSearch/Helper/Data.php
+++ b/app/code/Magento/CatalogSearch/Helper/Data.php
@@ -24,16 +24,21 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\CatalogSearch\Helper;
+
 /**
  * Catalog search helper
- *
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\CatalogSearch\Helper;
-
 class Data extends \Magento\Core\Helper\AbstractHelper
 {
+    /**
+     * Query variable
+     */
     const QUERY_VAR_NAME = 'q';
+
+    /**
+     * Max query length
+     */
     const MAX_QUERY_LEN  = 200;
 
     /**
@@ -72,11 +77,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     protected $_engine;
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
      * Core store config
@@ -92,23 +97,39 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     protected $_queryFactory;
 
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
+    /**
+     * @var \Magento\Filter\FilterManager
+     */
+    protected $filter;
+
     /**
      * Construct
-     * 
+     *
      * @param \Magento\Core\Helper\Context $context
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\CatalogSearch\Model\QueryFactory $queryFactory
+     * @param \Magento\Escaper $escaper
+     * @param \Magento\Filter\FilterManager $filter
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
-        \Magento\CatalogSearch\Model\QueryFactory $queryFactory
+        \Magento\CatalogSearch\Model\QueryFactory $queryFactory,
+        \Magento\Escaper $escaper,
+        \Magento\Filter\FilterManager $filter
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_queryFactory = $queryFactory;
+        $this->_escaper = $escaper;
+        $this->filter = $filter;
         parent::__construct($context);
     }
 
@@ -146,7 +167,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     public function isMinQueryLength()
     {
         $minQueryLength = $this->getMinQueryLength();
-        $thisQueryLength = $this->_coreString->strlen($this->getQueryText());
+        $thisQueryLength = $this->string->strlen($this->getQueryText());
         return !$thisQueryLength || $minQueryLength !== '' && $thisQueryLength < $minQueryLength;
     }
 
@@ -162,14 +183,13 @@ class Data extends \Magento\Core\Helper\AbstractHelper
             if ($this->_queryText === null) {
                 $this->_queryText = '';
             } else {
-                /* @var $stringHelper \Magento\Core\Helper\String */
-                $stringHelper = $this->_coreString;
-                $this->_queryText = is_array($this->_queryText) ? ''
-                    : $stringHelper->cleanString(trim($this->_queryText));
+                $this->_queryText = is_array($this->_queryText)
+                    ? ''
+                    : $this->string->cleanString(trim($this->_queryText));
 
                 $maxQueryLength = $this->getMaxQueryLength();
-                if ($maxQueryLength !== '' && $stringHelper->strlen($this->_queryText) > $maxQueryLength) {
-                    $this->_queryText = $stringHelper->substr($this->_queryText, 0, $maxQueryLength);
+                if ($maxQueryLength !== '' && $this->string->strlen($this->_queryText) > $maxQueryLength) {
+                    $this->_queryText = $this->string->substr($this->_queryText, 0, $maxQueryLength);
                     $this->_isMaxLength = true;
                 }
             }
@@ -184,7 +204,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function getEscapedQueryText()
     {
-        return $this->escapeHtml($this->getQueryText());
+        return $this->_escaper->escapeHtml($this->getQueryText());
     }
 
     /**
@@ -252,7 +272,10 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function getMinQueryLength($store = null)
     {
-        return $this->_coreStoreConfig->getConfig(\Magento\CatalogSearch\Model\Query::XML_PATH_MIN_QUERY_LENGTH, $store);
+        return $this->_coreStoreConfig->getConfig(
+            \Magento\CatalogSearch\Model\Query::XML_PATH_MIN_QUERY_LENGTH,
+            $store
+        );
     }
 
     /**
@@ -263,7 +286,10 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function getMaxQueryLength($store = null)
     {
-        return $this->_coreStoreConfig->getConfig(\Magento\CatalogSearch\Model\Query::XML_PATH_MAX_QUERY_LENGTH, $store);
+        return $this->_coreStoreConfig->getConfig(
+            \Magento\CatalogSearch\Model\Query::XML_PATH_MAX_QUERY_LENGTH,
+            $store
+        );
     }
 
     /**
@@ -274,7 +300,10 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function getMaxQueryWords($store = null)
     {
-        return $this->_coreStoreConfig->getConfig(\Magento\CatalogSearch\Model\Query::XML_PATH_MAX_QUERY_WORDS, $store);
+        return $this->_coreStoreConfig->getConfig(
+            \Magento\CatalogSearch\Model\Query::XML_PATH_MAX_QUERY_WORDS,
+            $store
+        );
     }
 
     /**
@@ -320,20 +349,24 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     public function checkNotes($store = null)
     {
         if ($this->_isMaxLength) {
-            $this->addNoteMessage(__('Your search query can\'t be longer than %1, so we had to shorten your query.', $this->getMaxQueryLength()));
+            $this->addNoteMessage(
+                __('Your search query can\'t be longer than %1, so we had to shorten your query.',
+                $this->getMaxQueryLength())
+            );
         }
 
-        /* @var $stringHelper \Magento\Core\Helper\String */
-        $stringHelper = $this->_coreString;
-
-        $searchType = $this->_coreStoreConfig->getConfig(\Magento\CatalogSearch\Model\Fulltext::XML_PATH_CATALOG_SEARCH_TYPE);
+        $searchType = $this->_coreStoreConfig
+            ->getConfig(\Magento\CatalogSearch\Model\Fulltext::XML_PATH_CATALOG_SEARCH_TYPE);
         if ($searchType == \Magento\CatalogSearch\Model\Fulltext::SEARCH_TYPE_COMBINE
             || $searchType == \Magento\CatalogSearch\Model\Fulltext::SEARCH_TYPE_LIKE
         ) {
-            $wordsFull = $stringHelper->splitWords($this->getQueryText(), true);
-            $wordsLike = $stringHelper->splitWords($this->getQueryText(), true, $this->getMaxQueryWords());
+            $wordsFull = $this->filter->splitWords($this->getQueryText(), array('uniqueOnly' => true));
+            $wordsLike = $this->filter->splitWords(
+                $this->getQueryText(),
+                array('uniqueOnly' => true, 'wordsQty' => $this->getMaxQueryWords())
+            );
             if (count($wordsFull) > count($wordsLike)) {
-                $wordsCut = array_map(array($this, 'escapeHtml'), array_diff($wordsFull, $wordsLike));
+                $wordsCut = array_map(array($this->_escaper, 'escapeHtml'), array_diff($wordsFull, $wordsLike));
                 $this->addNoteMessage(
                     __('Sorry, but the maximum word count is %1. We left out this part of your search: %2.', $this->getMaxQueryWords(), join(' ', $wordsCut))
                 );
@@ -356,8 +389,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         foreach ($index as $value) {
             if (!is_array($value)) {
                 $_index[] = $value;
-            }
-            else {
+            } else {
                 $_index = array_merge($_index, $value);
             }
         }
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php b/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php
index 5d3ebe37e58..92ea67b3e74 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php
@@ -53,12 +53,12 @@ class Advanced extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Event\ManagerInterface $eventManager
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Event\ManagerInterface $eventManager
     ) {
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php
index 9ae353ae4c3..7fda440d4cb 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php
@@ -45,11 +45,11 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -61,17 +61,18 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Date $date
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -83,14 +84,14 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Date $date
-    )
-    {
+    ) {
         $this->_date = $date;
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig,
             $coreResource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData,
             $catalogProductFlat, $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale,
-            $customerSession, $resourceHelper
+            $customerSession, $resourceHelper, $dateTime
         );
     }
 
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
index 04a52573293..e98e60c5b01 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\CatalogSearch\Model\Resource;
 
 /**
  * CatalogSearch Fulltext Index resource model
- *
- * @category    Magento
- * @package     Magento_CatalogSearch
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\CatalogSearch\Model\Resource;
-
 class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
     /**
@@ -107,9 +102,9 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Core string
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Filter\FilterManager
      */
-    protected $_coreString;
+    protected $filter;
 
     /**
      * Core event manager proxy
@@ -145,46 +140,52 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_engineProvider;
 
     /**
-     * Construct
-     *
-     * @param \Magento\Core\Model\Resource $resource
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Catalog\Model\Product\Type $catalogProductType
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Catalog\Model\Product\Status $catalogProductStatus
      * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $productAttributeCollFactory
-     * @param \Magento\CatalogSearch\Model\Resource\EngineProvider $engineProvider
+     * @param EngineProvider $engineProvider
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Filter\FilterManager $filter
      * @param \Magento\CatalogSearch\Helper\Data $catalogSearchData
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\CatalogSearch\Model\Resource\Helper $resourceHelper
+     * @param Helper $resourceHelper
+     * @param \Magento\Stdlib\DateTime $dateTime
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Catalog\Model\Product\Type $catalogProductType,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Catalog\Model\Product\Status $catalogProductStatus,
         \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $productAttributeCollFactory,
         \Magento\CatalogSearch\Model\Resource\EngineProvider $engineProvider,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Filter\FilterManager $filter,
         \Magento\CatalogSearch\Helper\Data $catalogSearchData,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\CatalogSearch\Model\Resource\Helper $resourceHelper
+        \Magento\CatalogSearch\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\DateTime $dateTime
     ) {
         $this->_catalogProductType = $catalogProductType;
         $this->_eavConfig = $eavConfig;
         $this->_catalogProductStatus = $catalogProductStatus;
         $this->_productAttributeCollFactory = $productAttributeCollFactory;
         $this->_eventManager = $eventManager;
-        $this->_coreString = $coreString;
+        $this->filter = $filter;
         $this->_catalogSearchData = $catalogSearchData;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_storeManager = $storeManager;
         $this->_resourceHelper = $resourceHelper;
         $this->_engineProvider = $engineProvider;
+        $this->dateTime = $dateTime;
         parent::__construct($resource);
     }
 
@@ -467,8 +468,10 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
             if ($searchType == \Magento\CatalogSearch\Model\Fulltext::SEARCH_TYPE_LIKE
                 || $searchType == \Magento\CatalogSearch\Model\Fulltext::SEARCH_TYPE_COMBINE
             ) {
-                $words = $this->_coreString
-                    ->splitWords($queryText, true, $query->getMaxQueryWords());
+                $words = $this->filter->splitWords($queryText, array(
+                    'uniqueOnly' => true,
+                    'wordsQty' => $query->getMaxQueryWords()
+                ));
                 foreach ($words as $word) {
                     $like[] = $this->_resourceHelper->getCILike('s.data_index', $word, array('position' => 'any'));
                 }
@@ -911,9 +914,9 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
             $this->_dates[$storeId] = array($dateObj, $locale->getTranslation(null, 'date', $locale));
         }
 
-        if (!is_empty_date($date)) {
+        if (!$this->dateTime->isEmptyDate($date)) {
             list($dateObj, $format) = $this->_dates[$storeId];
-            $dateObj->setDate($date, \Magento\Date::DATETIME_INTERNAL_FORMAT);
+            $dateObj->setDate($date, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
 
             return $dateObj->toString($format);
         }
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php
index 5449cc3cc9f..25fbbb41914 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php
@@ -52,11 +52,11 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -68,6 +68,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\CatalogSearch\Helper\Data $catalogSearchData
      * @param \Magento\CatalogSearch\Model\Fulltext $catalogSearchFulltext
      *
@@ -75,11 +76,11 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -91,16 +92,16 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\CatalogSearch\Helper\Data $catalogSearchData,
         \Magento\CatalogSearch\Model\Fulltext $catalogSearchFulltext
-    )
-    {
+    ) {
         $this->_catalogSearchFulltext = $catalogSearchFulltext;
         $this->_catalogSearchData = $catalogSearchData;
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig,
             $coreResource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData,
             $catalogProductFlat, $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale,
-            $customerSession, $resourceHelper
+            $customerSession, $resourceHelper, $dateTime
         );
     }
 
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Engine.php b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Engine.php
index 2b303fececd..e69ac6a9650 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Engine.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Engine.php
@@ -85,7 +85,7 @@ class Engine extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\CatalogSearch\Model\Resource\Advanced\CollectionFactory $catalogSearchAdvancedCollFactory
      * @param \Magento\CatalogSearch\Model\Resource\Fulltext\CollectionFactory $catalogSearchFulltextCollFactory
      * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
@@ -95,7 +95,7 @@ class Engine extends \Magento\Core\Model\Resource\Db\AbstractDb
      * @param \Magento\CatalogSearch\Model\Resource\Helper $resourceHelper
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,    
+        \Magento\App\Resource $resource,
         \Magento\CatalogSearch\Model\Resource\Advanced\CollectionFactory $catalogSearchAdvancedCollFactory,
         \Magento\CatalogSearch\Model\Resource\Fulltext\CollectionFactory $catalogSearchFulltextCollFactory,
         \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility,
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Helper.php b/app/code/Magento/CatalogSearch/Model/Resource/Helper.php
index 7e96a036881..d952b4908ae 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Helper.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Helper.php
@@ -37,11 +37,11 @@ namespace Magento\CatalogSearch\Model\Resource;
 class Helper extends \Magento\Eav\Model\Resource\Helper
 {
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param string $modulePrefix
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         $modulePrefix = 'Magento_CatalogSearch'
     ) {
         parent::__construct($resource, $modulePrefix);
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Query.php b/app/code/Magento/CatalogSearch/Model/Resource/Query.php
index be416f706f4..c16f68cf16d 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Query.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Query.php
@@ -44,16 +44,22 @@ class Query extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_date;
 
     /**
-     * Class constructor
-     *
-     * @param \Magento\Core\Model\Resource $resource
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Date $date
+     * @param \Magento\Stdlib\DateTime $dateTime
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
-        \Magento\Core\Model\Date $date
+        \Magento\App\Resource $resource,
+        \Magento\Core\Model\Date $date,
+        \Magento\Stdlib\DateTime $dateTime
     ) {
         $this->_date = $date;
+        $this->dateTime = $dateTime;
         parent::__construct($resource);
     }
 
@@ -135,7 +141,7 @@ class Query extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     public function _beforeSave(\Magento\Core\Model\AbstractModel $object)
     {
-        $object->setUpdatedAt($this->formatDate($this->_date->gmtTimestamp()));
+        $object->setUpdatedAt($this->dateTime->formatDate($this->_date->gmtTimestamp()));
         return $this;
     }
 }
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Query/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Query/Collection.php
index 487230cd602..db70925f759 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Query/Collection.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Query/Collection.php
@@ -61,7 +61,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      * Construct
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -70,7 +70,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php
index 316c6498933..0da7d62a20e 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php
@@ -50,11 +50,6 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      */
     protected $_searchQuery;
 
-    /**
-     * @var \Magento\Core\Model\Resource
-     */
-    protected $_resource;
-
     /**
      * Attribute collection factory
      *
@@ -64,11 +59,11 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -80,16 +75,16 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $attributeCollectionFactory
-     * @param \Magento\Core\Model\Resource $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -101,16 +96,15 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $attributeCollectionFactory,
-        \Magento\Core\Model\Resource $resource
-    )
-    {
+        \Magento\App\Resource $resource
+    ) {
         $this->_attributeCollectionFactory = $attributeCollectionFactory;
-        $this->_resource = $resource;
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig,
-            $coreResource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData,
+            $resource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData,
             $catalogProductFlat, $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale,
-            $customerSession, $resourceHelper
+            $customerSession, $resourceHelper, $dateTime
         );
     }
 
diff --git a/app/code/Magento/CatalogSearch/view/frontend/layout/catalogsearch_ajax_suggest.xml b/app/code/Magento/CatalogSearch/view/frontend/layout/catalogsearch_ajax_suggest.xml
index 18e98ef4125..0634b0ae444 100644
--- a/app/code/Magento/CatalogSearch/view/frontend/layout/catalogsearch_ajax_suggest.xml
+++ b/app/code/Magento/CatalogSearch/view/frontend/layout/catalogsearch_ajax_suggest.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Catalog Quick Search Form Suggestions" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\CatalogSearch\Block\Autocomplete" name="autocomplete"/>
-    </block>
+    <block class="Magento\CatalogSearch\Block\Autocomplete" name="autocomplete" output="1"/>
 </layout>
diff --git a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index.php b/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index.php
index f915e5050c0..d7460f27cb0 100644
--- a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index.php
+++ b/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index.php
@@ -73,7 +73,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Magento\Core\Exception $e) {
             $result['message'] = $e->getMessage();
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $result['message'] = __('Validation failed.');
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
diff --git a/app/code/Magento/Centinel/Model/Config.php b/app/code/Magento/Centinel/Model/Config.php
index d7d3329f8d9..70bd0de7d94 100644
--- a/app/code/Magento/Centinel/Model/Config.php
+++ b/app/code/Magento/Centinel/Model/Config.php
@@ -45,13 +45,6 @@ class Config
      */
     protected $_serviceConfigPath = 'payment_services/centinel';
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
-
     /**
      * Core store config
      *
@@ -65,18 +58,23 @@ class Config
     protected $_coreConfig;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @var \Magento\Encryption\EncryptorInterface
+     */
+    protected $_encryptor;
+
+    /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\Config $coreConfig
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Core\Model\Config $coreConfig
+        \Magento\Core\Model\Config $coreConfig,
+        \Magento\Encryption\EncryptorInterface $encryptor
     ) {
-        $this->_coreData = $coreData;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_coreConfig = $coreConfig;
+        $this->_encryptor = $encryptor;
     }
 
     /**
@@ -128,7 +126,7 @@ class Config
      */
     public function getTransactionPwd()
     {
-        return $this->_coreData->decrypt($this->_getServiceConfigValue('password'));
+        return $this->_encryptor->decrypt($this->_getServiceConfigValue('password'));
     }
 
     /**
diff --git a/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationcomplete.xml b/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationcomplete.xml
index 09b149fe682..d196a5b277e 100644
--- a/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationcomplete.xml
+++ b/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationcomplete.xml
@@ -24,5 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Centinel\Block\Authentication\Complete" output="1" template="authentication/complete.phtml"/>
+    <block class="Magento\Centinel\Block\Authentication\Complete" name="root" output="1" template="authentication/complete.phtml"/>
 </layout>
diff --git a/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationstart.xml b/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationstart.xml
index 1e2ce8dc255..de9ad4a7bde 100644
--- a/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationstart.xml
+++ b/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationstart.xml
@@ -24,5 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Centinel\Block\Authentication\Start" output="1" template="authentication/start.phtml"/>
+    <block class="Magento\Centinel\Block\Authentication\Start" name="root" output="1" template="authentication/start.phtml"/>
 </layout>
diff --git a/app/code/Magento/Adminhtml/Block/Checkout/Agreement.php b/app/code/Magento/Checkout/Block/Adminhtml/Agreement.php
similarity index 79%
rename from app/code/Magento/Adminhtml/Block/Checkout/Agreement.php
rename to app/code/Magento/Checkout/Block/Adminhtml/Agreement.php
index 2aeb70fbbb0..9f1da0aecd8 100644
--- a/app/code/Magento/Adminhtml/Block/Checkout/Agreement.php
+++ b/app/code/Magento/Checkout/Block/Adminhtml/Agreement.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Checkout
  * @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)
  */
@@ -28,19 +28,20 @@
  * Admin tax rule content block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Checkout
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\Checkout;
+namespace Magento\Checkout\Block\Adminhtml;
 
 class Agreement extends \Magento\Adminhtml\Block\Widget\Grid\Container
 {
     protected function _construct()
     {
-        $this->_controller      = 'checkout_agreement';
-        $this->_headerText      = __('Terms and Conditions');
-        $this->_addButtonLabel  = __('Add New Condition');
+        $this->_controller = 'adminhtml_agreement';
+        $this->_blockGroup = 'Magento_Checkout';
+        $this->_headerText = __('Terms and Conditions');
+        $this->_addButtonLabel = __('Add New Condition');
         parent::_construct();
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Checkout/Agreement/Edit.php b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/Checkout/Agreement/Edit.php
rename to app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit.php
index 44e30ac5094..2654b64b9c5 100644
--- a/app/code/Magento/Adminhtml/Block/Checkout/Agreement/Edit.php
+++ b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit.php
@@ -19,16 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Checkout
  * @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)
  */
 
-/**
- * Adminhtml tax rule Edit Container
- */
-
-namespace Magento\Adminhtml\Block\Checkout\Agreement;
+namespace Magento\Checkout\Block\Adminhtml\Agreement;
 
 class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 {
@@ -62,7 +58,8 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
     protected function _construct()
     {
         $this->_objectId = 'id';
-        $this->_controller = 'checkout_agreement';
+        $this->_controller = 'adminhtml_agreement';
+        $this->_blockGroup = 'Magento_Checkout';
 
         parent::_construct();
 
diff --git a/app/code/Magento/Adminhtml/Block/Checkout/Agreement/Edit/Form.php b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit/Form.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Checkout/Agreement/Edit/Form.php
rename to app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit/Form.php
index aee5eb81574..340071531db 100644
--- a/app/code/Magento/Adminhtml/Block/Checkout/Agreement/Edit/Form.php
+++ b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit/Form.php
@@ -19,15 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Checkout
  * @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)
  */
 
-/**
- * Adminhtml Tax Rule Edit Form
- */
-namespace Magento\Adminhtml\Block\Checkout\Agreement\Edit;
+namespace Magento\Checkout\Block\Adminhtml\Agreement\Edit;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
@@ -39,7 +36,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -47,7 +44,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     public function __construct(
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/Checkout/Agreement/Grid.php b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Grid.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Checkout/Agreement/Grid.php
rename to app/code/Magento/Checkout/Block/Adminhtml/Agreement/Grid.php
index 599d2d53d63..7b28d430ac1 100644
--- a/app/code/Magento/Adminhtml/Block/Checkout/Agreement/Grid.php
+++ b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Grid.php
@@ -19,11 +19,11 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Checkout
  * @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\Adminhtml\Block\Checkout\Agreement;
+namespace Magento\Checkout\Block\Adminhtml\Agreement;
 
 class Grid extends \Magento\Adminhtml\Block\Widget\Grid
 {
@@ -134,7 +134,7 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
 
     public function getRowUrl($row)
     {
-        return $this->getUrl('adminhtml/*/edit', array('id' => $row->getId()));
+        return $this->getUrl('checkout/*/edit', array('id' => $row->getId()));
     }
 
 }
diff --git a/app/code/Magento/Checkout/Block/Cart/Totals.php b/app/code/Magento/Checkout/Block/Cart/Totals.php
index 824698b72c1..cae238ed882 100644
--- a/app/code/Magento/Checkout/Block/Cart/Totals.php
+++ b/app/code/Magento/Checkout/Block/Cart/Totals.php
@@ -94,7 +94,7 @@ class Totals extends \Magento\Checkout\Block\Cart\AbstractCart
         $blockName = $code . '_total_renderer';
         $block = $this->getLayout()->getBlock($blockName);
         if (!$block) {
-            $renderer = $this->_salesConfig->getTotalsRenderer('quote', 'totals', $code, 'frontend');
+            $renderer = $this->_salesConfig->getTotalsRenderer('quote', 'totals', $code);
             if (!empty($renderer)) {
                 $block = $renderer;
             } else {
diff --git a/app/code/Magento/Checkout/Block/Onepage/Success.php b/app/code/Magento/Checkout/Block/Onepage/Success.php
index 6f7f77ceab9..48f6474e6b1 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Success.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Success.php
@@ -72,7 +72,7 @@ class Success extends \Magento\Core\Block\Template
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
      * @param \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory
-     * @param \Magento\Sales\Model\Resource\Recurring\Profile\Collection $profileCollFactory
+     * @param \Magento\Sales\Model\Resource\Recurring\Profile\CollectionFactory $profileCollFactory
      * @param \Magento\Sales\Model\Order\Config $orderConfig
      * @param array $data
      */
@@ -83,7 +83,7 @@ class Success extends \Magento\Core\Block\Template
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Sales\Model\OrderFactory $orderFactory,
         \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory,
-        \Magento\Sales\Model\Resource\Recurring\Profile\Collection $profileCollFactory,
+        \Magento\Sales\Model\Resource\Recurring\Profile\CollectionFactory $profileCollFactory,
         \Magento\Sales\Model\Order\Config $orderConfig,
         array $data = array()
     ) {
diff --git a/app/code/Magento/Adminhtml/Controller/Checkout/Agreement.php b/app/code/Magento/Checkout/Controller/Adminhtml/Agreement.php
similarity index 89%
rename from app/code/Magento/Adminhtml/Controller/Checkout/Agreement.php
rename to app/code/Magento/Checkout/Controller/Adminhtml/Agreement.php
index fea93990fba..8deba3850f3 100644
--- a/app/code/Magento/Adminhtml/Controller/Checkout/Agreement.php
+++ b/app/code/Magento/Checkout/Controller/Adminhtml/Agreement.php
@@ -19,19 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Checkout
  * @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)
  */
 
-/**
- * Tax rule controller
- *
- * @category   Magento
- * @package    Magento_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Adminhtml\Controller\Checkout;
+namespace Magento\Checkout\Controller\Adminhtml;
 
 class Agreement extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -59,7 +52,7 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action
         $this->_title(__('Terms and Conditions'));
 
         $this->_initAction()
-            ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Checkout\Agreement'))
+            ->_addContent($this->getLayout()->createBlock('Magento\Checkout\Block\Adminhtml\Agreement'))
             ->renderLayout();
         return $this;
     }
@@ -82,7 +75,7 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(
                     __('This condition no longer exists.')
                 );
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('checkout/*/');
                 return;
             }
         }
@@ -103,8 +96,8 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action
             )
             ->_addContent(
                 $this->getLayout()
-                    ->createBlock('Magento\Adminhtml\Block\Checkout\Agreement\Edit')
-                    ->setData('action', $this->getUrl('adminhtml/*/save'))
+                    ->createBlock('Magento\Checkout\Block\Adminhtml\Agreement\Edit')
+                    ->setData('action', $this->getUrl('checkout/*/save'))
             )
             ->renderLayout();
     }
@@ -120,7 +113,7 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action
                 $model->save();
 
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addSuccess(__('The condition has been saved.'));
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('checkout/*/');
 
                 return;
             } catch (\Magento\Core\Exception $e) {
@@ -141,14 +134,14 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action
             ->load($id);
         if (!$model->getId()) {
             $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(__('This condition no longer exists.'));
-            $this->_redirect('adminhtml/*/');
+            $this->_redirect('checkout/*/');
             return;
         }
 
         try {
             $model->delete();
             $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addSuccess(__('The condition has been deleted.'));
-            $this->_redirect('adminhtml/*/');
+            $this->_redirect('checkout/*/');
             return;
         } catch (\Magento\Core\Exception $e) {
             $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError($e->getMessage());
diff --git a/app/code/Magento/Checkout/Controller/Cart.php b/app/code/Magento/Checkout/Controller/Cart.php
index ebe8bfcb12c..9d439f87b2a 100644
--- a/app/code/Magento/Checkout/Controller/Cart.php
+++ b/app/code/Magento/Checkout/Controller/Cart.php
@@ -160,7 +160,7 @@ class Cart
         foreach ($cart->getQuote()->getMessages() as $message) {
             if ($message) {
                 // Escape HTML entities in quote message to prevent XSS
-                $message->setCode($this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($message->getCode()));
+                $message->setCode($this->_objectManager->get('Magento\Escaper')->escapeHtml($message->getCode()));
                 $messages[] = $message;
             }
         }
@@ -226,18 +226,18 @@ class Cart
 
             if (!$this->_checkoutSession->getNoCartRedirect(true)) {
                 if (!$cart->getQuote()->getHasError()){
-                    $message = __('You added %1 to your shopping cart.', $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($product->getName()));
+                    $message = __('You added %1 to your shopping cart.', $this->_objectManager->get('Magento\Escaper')->escapeHtml($product->getName()));
                     $this->_checkoutSession->addSuccess($message);
                 }
                 $this->_goBack();
             }
         } catch (\Magento\Core\Exception $e) {
             if ($this->_checkoutSession->getUseNotice(true)) {
-                $this->_checkoutSession->addNotice($this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($e->getMessage()));
+                $this->_checkoutSession->addNotice($this->_objectManager->get('Magento\Escaper')->escapeHtml($e->getMessage()));
             } else {
                 $messages = array_unique(explode("\n", $e->getMessage()));
                 foreach ($messages as $message) {
-                    $this->_checkoutSession->addError($this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($message));
+                    $this->_checkoutSession->addError($this->_objectManager->get('Magento\Escaper')->escapeHtml($message));
                 }
             }
 
@@ -249,7 +249,7 @@ class Cart
             }
         } catch (\Exception $e) {
             $this->_checkoutSession->addException($e, __('We cannot add this item to your shopping cart'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_goBack();
         }
     }
@@ -275,7 +275,7 @@ class Cart
                     }
                 } catch (\Exception $e) {
                     $this->_checkoutSession->addException($e, __('We cannot add this item to your shopping cart'));
-                    $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                    $this->_objectManager->get('Magento\Logger')->logException($e);
                     $this->_goBack();
                 }
             }
@@ -315,7 +315,7 @@ class Cart
             );
         } catch (\Exception $e) {
             $this->_checkoutSession->addError(__('We cannot configure the product.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_goBack();
             return;
         }
@@ -368,7 +368,7 @@ class Cart
             );
             if (!$this->_checkoutSession->getNoCartRedirect(true)) {
                 if (!$cart->getQuote()->getHasError()){
-                    $message = __('%1 was updated in your shopping cart.', $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($item->getProduct()->getName()));
+                    $message = __('%1 was updated in your shopping cart.', $this->_objectManager->get('Magento\Escaper')->escapeHtml($item->getProduct()->getName()));
                     $this->_checkoutSession->addSuccess($message);
                 }
                 $this->_goBack();
@@ -391,7 +391,7 @@ class Cart
             }
         } catch (\Exception $e) {
             $this->_checkoutSession->addException($e, __('We cannot update the item.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_goBack();
         }
         $this->_redirect('*/*');
@@ -445,10 +445,10 @@ class Cart
             }
             $this->_checkoutSession->setCartWasUpdated(true);
         } catch (\Magento\Core\Exception $e) {
-            $this->_checkoutSession->addError($this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($e->getMessage()));
+            $this->_checkoutSession->addError($this->_objectManager->get('Magento\Escaper')->escapeHtml($e->getMessage()));
         } catch (\Exception $e) {
             $this->_checkoutSession->addException($e, __('We cannot update the shopping cart.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
     }
 
@@ -479,7 +479,7 @@ class Cart
                   ->save();
             } catch (\Exception $e) {
                 $this->_checkoutSession->addError(__('We cannot remove the item.'));
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
             }
         }
         $this->_redirectReferer($this->_objectManager->create('Magento\UrlInterface')->getUrl('*/*'));
@@ -552,11 +552,11 @@ class Cart
             if ($codeLength) {
                 if ($isCodeLengthValid && $couponCode == $this->_getQuote()->getCouponCode()) {
                     $this->_checkoutSession->addSuccess(
-                        __('The coupon code "%1" was applied.', $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($couponCode))
+                        __('The coupon code "%1" was applied.', $this->_objectManager->get('Magento\Escaper')->escapeHtml($couponCode))
                     );
                 } else {
                     $this->_checkoutSession->addError(
-                        __('The coupon code "%1" is not valid.', $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($couponCode))
+                        __('The coupon code "%1" is not valid.', $this->_objectManager->get('Magento\Escaper')->escapeHtml($couponCode))
                     );
                 }
             } else {
@@ -567,7 +567,7 @@ class Cart
             $this->_checkoutSession->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_checkoutSession->addError(__('We cannot apply the coupon code.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
 
         $this->_goBack();
diff --git a/app/code/Magento/Checkout/Controller/Multishipping.php b/app/code/Magento/Checkout/Controller/Multishipping.php
index 7ac37e99e25..29da8e0daf5 100644
--- a/app/code/Magento/Checkout/Controller/Multishipping.php
+++ b/app/code/Magento/Checkout/Controller/Multishipping.php
@@ -453,7 +453,7 @@ class Multishipping extends \Magento\Checkout\Controller\Action
             $this->_getCheckoutSession()->addError($e->getMessage());
             $this->_redirect('*/*/billing');
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_getCheckoutSession()->addException($e, __('We cannot open the overview page.'));
             $this->_redirect('*/*/billing');
         }
@@ -518,7 +518,7 @@ class Multishipping extends \Magento\Checkout\Controller\Action
             $this->_getCheckoutSession()->addError($e->getMessage());
             $this->_redirect('*/*/billing');
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_objectManager->get('Magento\Checkout\Helper\Data')
                 ->sendPaymentFailedEmail($this->_getCheckout()->getQuote(), $e->getMessage(), 'multi-shipping');
             $this->_getCheckoutSession()->addError(__('Order place error'));
diff --git a/app/code/Magento/Checkout/Controller/Onepage.php b/app/code/Magento/Checkout/Controller/Onepage.php
index cc6869c7f66..0a538f3918e 100644
--- a/app/code/Magento/Checkout/Controller/Onepage.php
+++ b/app/code/Magento/Checkout/Controller/Onepage.php
@@ -93,8 +93,7 @@ class Onepage extends \Magento\Checkout\Controller\Action
     {
         $this->getResponse()
             ->setHeader('HTTP/1.1', '403 Session Expired')
-            ->setHeader('Login-Required', 'true')
-            ->sendResponse();
+            ->setHeader('Login-Required', 'true');
         return $this;
     }
 
@@ -477,7 +476,7 @@ class Onepage extends \Magento\Checkout\Controller\Action
         } catch (\Magento\Core\Exception $e) {
             $result['error'] = $e->getMessage();
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $result['error'] = __('Unable to set Payment Method');
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
@@ -574,7 +573,7 @@ class Onepage extends \Magento\Checkout\Controller\Action
                 'html' => $this->_getPaymentMethodsHtml()
             );
         } catch (\Magento\Core\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_objectManager->get('Magento\Checkout\Helper\Data')->sendPaymentFailedEmail(
                 $this->getOnepage()->getQuote(),
                 $e->getMessage()
@@ -600,7 +599,7 @@ class Onepage extends \Magento\Checkout\Controller\Action
                 $this->getOnepage()->getCheckout()->setUpdateSection(null);
             }
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_objectManager->get('Magento\Checkout\Helper\Data')->sendPaymentFailedEmail(
                 $this->getOnepage()->getQuote(),
                 $e->getMessage()
diff --git a/app/code/Magento/Checkout/Model/Resource/Agreement.php b/app/code/Magento/Checkout/Model/Resource/Agreement.php
index c07af1c44b2..e7d001da610 100644
--- a/app/code/Magento/Checkout/Model/Resource/Agreement.php
+++ b/app/code/Magento/Checkout/Model/Resource/Agreement.php
@@ -37,25 +37,19 @@ namespace Magento\Checkout\Model\Resource;
 class Agreement extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
     /**
-     * Checkout data
-     *
-     * @var \Magento\Checkout\Helper\Data
+     * @var \Magento\Filter\FilterManager
      */
-    protected $_checkoutData = null;
+    protected $filterManager;
 
     /**
-     * Class constructor
-     *
-     *
-     *
-     * @param \Magento\Checkout\Helper\Data $checkoutData
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Filter\FilterManager $filterManager
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
-        \Magento\Checkout\Helper\Data $checkoutData,
-        \Magento\Core\Model\Resource $resource
+        \Magento\Filter\FilterManager $filterManager,
+        \Magento\App\Resource $resource
     ) {
-        $this->_checkoutData = $checkoutData;
+        $this->filterManager = $filterManager;
         parent::__construct($resource);
     }
 
@@ -78,7 +72,7 @@ class Agreement extends \Magento\Core\Model\Resource\Db\AbstractDb
     {
         // format height
         $height = $object->getContentHeight();
-        $height = $this->_checkoutData->stripTags($height);
+        $height = $this->filterManager->stripTags($height);
         if (!$height) {
             $height = '';
         }
diff --git a/app/code/Magento/Checkout/Model/Resource/Setup.php b/app/code/Magento/Checkout/Model/Resource/Setup.php
index 4cdca96d315..1af9e5dd1f1 100644
--- a/app/code/Magento/Checkout/Model/Resource/Setup.php
+++ b/app/code/Magento/Checkout/Model/Resource/Setup.php
@@ -43,7 +43,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
 
     /**
      * @param \Magento\Core\Model\Resource\Setup\Context $context
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
      * @param \Magento\Customer\Helper\Address $customerAddress
      * @param string $resourceName
@@ -52,7 +52,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
      */
     public function __construct(
         \Magento\Core\Model\Resource\Setup\Context $context,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
         \Magento\Customer\Helper\Address $customerAddress,
         $resourceName,
diff --git a/app/code/Magento/Checkout/Model/Session.php b/app/code/Magento/Checkout/Model/Session.php
index 4aa73f1edd7..de136ca5222 100644
--- a/app/code/Magento/Checkout/Model/Session.php
+++ b/app/code/Magento/Checkout/Model/Session.php
@@ -89,6 +89,11 @@ class Session extends \Magento\Core\Model\Session\AbstractSession
      */
     protected $_request;
 
+    /**
+     * @var \Magento\HTTP\PhpEnvironment\RemoteAddress
+     */
+    protected $_remoteAddress;
+
     /**
      * @param \Magento\Core\Model\Session\Context $context
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
@@ -96,6 +101,7 @@ class Session extends \Magento\Core\Model\Session\AbstractSession
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Core\Model\Message\CollectionFactory $messageCollFactory
      * @param \Magento\Sales\Model\QuoteFactory $quoteFactory
+     * @param \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress
      * @param null $sessionName
      * @param array $data
      */
@@ -106,6 +112,7 @@ class Session extends \Magento\Core\Model\Session\AbstractSession
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Core\Model\Message\CollectionFactory $messageCollFactory,
         \Magento\Sales\Model\QuoteFactory $quoteFactory,
+        \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress,
         $sessionName = null,
         array $data = array()
     ) {
@@ -114,6 +121,7 @@ class Session extends \Magento\Core\Model\Session\AbstractSession
         $this->_customerSession = $customerSession;
         $this->_messageCollFactory = $messageCollFactory;
         $this->_quoteFactory = $quoteFactory;
+        $this->_remoteAddress = $remoteAddress;
         parent::__construct($context, $data);
         $this->init('checkout', $sessionName);
     }
@@ -222,7 +230,7 @@ class Session extends \Magento\Core\Model\Session\AbstractSession
             $this->_quote = $quote;
         }
 
-        if ($remoteAddr = $this->_coreHttp->getRemoteAddr()) {
+        if ($remoteAddr = $this->_remoteAddress->getRemoteAddress()) {
             $this->_quote->setRemoteIp($remoteAddr);
             $xForwardIp = $this->_request->getServer('HTTP_X_FORWARDED_FOR');
             $this->_quote->setXForwardedFor($xForwardIp);
diff --git a/app/code/Magento/Checkout/Model/Type/Onepage.php b/app/code/Magento/Checkout/Model/Type/Onepage.php
index 4258599363d..0384042495e 100644
--- a/app/code/Magento/Checkout/Model/Type/Onepage.php
+++ b/app/code/Magento/Checkout/Model/Type/Onepage.php
@@ -66,7 +66,7 @@ class Onepage
     protected $_helper;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -131,7 +131,7 @@ class Onepage
      * @param \Magento\Checkout\Helper\Data $helper
      * @param \Magento\Customer\Helper\Data $customerData
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -147,7 +147,7 @@ class Onepage
         \Magento\Checkout\Helper\Data $helper,
         \Magento\Customer\Helper\Data $customerData,
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Checkout\Model\Session $checkoutSession,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Checkout/etc/adminhtml/menu.xml b/app/code/Magento/Checkout/etc/adminhtml/menu.xml
index 33f7cbc0ec8..fabe4fb08a1 100644
--- a/app/code/Magento/Checkout/etc/adminhtml/menu.xml
+++ b/app/code/Magento/Checkout/etc/adminhtml/menu.xml
@@ -27,6 +27,6 @@
 -->
 <config>
     <menu>
-        <add id="Magento_Checkout::sales_checkoutagreement" title="Terms and Conditions" module="Magento_Checkout" sortOrder="30" parent="Magento_Adminhtml::stores_settings" action="adminhtml/checkout_agreement/" resource="Magento_Checkout::checkoutagreement"/>
+        <add id="Magento_Checkout::sales_checkoutagreement" title="Terms and Conditions" module="Magento_Checkout" sortOrder="30" parent="Magento_Adminhtml::stores_settings" action="checkout/agreement/" resource="Magento_Checkout::checkoutagreement"/>
     </menu>
 </config>
diff --git a/app/code/Magento/Checkout/etc/adminhtml/routes.xml b/app/code/Magento/Checkout/etc/adminhtml/routes.xml
new file mode 100644
index 00000000000..43113893ea2
--- /dev/null
+++ b/app/code/Magento/Checkout/etc/adminhtml/routes.xml
@@ -0,0 +1,32 @@
+<?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>
+    <router id="admin">
+        <route id="checkout" frontName="checkout">
+            <module name="Magento_Checkout_Adminhtml" before="Magento_Adminhtml" />
+        </route>
+    </router>
+</config>
diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml
index cd103944fe6..023a7768da4 100644
--- a/app/code/Magento/Checkout/etc/di.xml
+++ b/app/code/Magento/Checkout/etc/di.xml
@@ -24,7 +24,7 @@
  */
 -->
 <config>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <checkout_setup>Magento\Checkout\Model\Resource\Setup</checkout_setup>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_paymentmethod.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_paymentmethod.xml
index 08648cb20f1..8a9230c4df9 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_paymentmethod.xml
+++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_paymentmethod.xml
@@ -24,12 +24,10 @@
  */
  -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="One Page Checkout Choose Payment Method" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Checkout\Block\Onepage\Payment\Methods" name="payment_method" template="onepage/payment/methods.phtml">
-            <action method="setMethodFormTemplate">
-                <argument name="method" xsi:type="string">purchaseorder</argument>
-                <argument name="template" xsi:type="string">Magento_Payment::form/purchaseorder.phtml</argument>
-            </action>
-        </block>
+    <block class="Magento\Checkout\Block\Onepage\Payment\Methods" name="payment_method" output="1" template="onepage/payment/methods.phtml">
+        <action method="setMethodFormTemplate">
+            <argument name="method" xsi:type="string">purchaseorder</argument>
+            <argument name="template" xsi:type="string">Magento_Payment::form/purchaseorder.phtml</argument>
+        </action>
     </block>
 </layout>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_review.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_review.xml
index 27d4d6e5ab7..1db04c0ed12 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_review.xml
+++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_review.xml
@@ -24,16 +24,14 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="One Page Checkout Overview" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Checkout\Block\Onepage\Review\Info" name="order_review" template="onepage/review/info.phtml">
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="onepage/review/item.phtml"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="onepage/review/item.phtml"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="onepage/review/item.phtml"/>
-            <block class="Magento\Checkout\Block\Cart\Totals" name="checkout.onepage.review.info.totals" as="totals" template="onepage/review/totals.phtml"/>
-            <container name="checkout.onepage.review.info.items.before" as="items_before" label="Items Before"/>
-            <container name="checkout.onepage.review.info.items.after" as="items_after" label="Items After"/>
-            <block class="Magento\Checkout\Block\Agreements" name="checkout.onepage.agreements" as="agreements" template="onepage/agreements.phtml"/>
-            <block class="Magento\Core\Block\Template" name="checkout.onepage.review.button" as="button" template="Magento_Checkout::onepage/review/button.phtml"/>
-        </block>
+    <block class="Magento\Checkout\Block\Onepage\Review\Info" name="order_review" output="1" template="onepage/review/info.phtml">
+        <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="onepage/review/item.phtml"/>
+        <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="onepage/review/item.phtml"/>
+        <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="onepage/review/item.phtml"/>
+        <block class="Magento\Checkout\Block\Cart\Totals" name="checkout.onepage.review.info.totals" as="totals" template="onepage/review/totals.phtml"/>
+        <container name="checkout.onepage.review.info.items.before" as="items_before" label="Items Before"/>
+        <container name="checkout.onepage.review.info.items.after" as="items_after" label="Items After"/>
+        <block class="Magento\Checkout\Block\Agreements" name="checkout.onepage.agreements" as="agreements" template="onepage/agreements.phtml"/>
+        <block class="Magento\Core\Block\Template" name="checkout.onepage.review.button" as="button" template="Magento_Checkout::onepage/review/button.phtml"/>
     </block>
 </layout>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_shippingmethod.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_shippingmethod.xml
index 6e27ca6cc78..d00f291336f 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_shippingmethod.xml
+++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_shippingmethod.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="One Page Checkout Choose Shipping Method" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Available" name="shipping_method" template="onepage/shipping_method/available.phtml"/>
-    </block>
+    <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Available" name="shipping_method" output="1" template="onepage/shipping_method/available.phtml"/>
 </layout>
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Block.php b/app/code/Magento/Cms/Block/Adminhtml/Block.php
similarity index 87%
rename from app/code/Magento/Adminhtml/Block/Cms/Block.php
rename to app/code/Magento/Cms/Block/Adminhtml/Block.php
index ece9d903546..7710c16dabd 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Block.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Block.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,17 +28,18 @@
  * Adminhtml cms blocks content block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms;
+namespace Magento\Cms\Block\Adminhtml;
 
 class Block extends \Magento\Adminhtml\Block\Widget\Grid\Container
 {
 
     protected function _construct()
     {
-        $this->_controller = 'cms_block';
+        $this->_blockGroup = 'Magento_Cms';
+        $this->_controller = 'adminhtml_block';
         $this->_headerText = __('Static Blocks');
         $this->_addButtonLabel = __('Add New Block');
         parent::_construct();
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Block/Edit.php b/app/code/Magento/Cms/Block/Adminhtml/Block/Edit.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Cms/Block/Edit.php
rename to app/code/Magento/Cms/Block/Adminhtml/Block/Edit.php
index 28cf4890fdf..231df64e1a1 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Block/Edit.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Block/Edit.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * CMS block edit form container
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Block;
+namespace Magento\Cms\Block\Adminhtml\Block;
 
 class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 {
@@ -61,7 +61,8 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
     protected function _construct()
     {
         $this->_objectId = 'block_id';
-        $this->_controller = 'cms_block';
+        $this->_blockGroup = 'Magento_Cms';
+        $this->_controller = 'adminhtml_block';
 
         parent::_construct();
 
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Block/Edit/Form.php b/app/code/Magento/Cms/Block/Adminhtml/Block/Edit/Form.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Cms/Block/Edit/Form.php
rename to app/code/Magento/Cms/Block/Adminhtml/Block/Edit/Form.php
index 0a2a8e565ab..22a28803c44 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Block/Edit/Form.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Block/Edit/Form.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -29,10 +29,10 @@
  * Adminhtml cms block edit form
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Block\Edit;
+namespace Magento\Cms\Block\Adminhtml\Block\Edit;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
@@ -50,7 +50,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -59,7 +59,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Block/Widget/Chooser.php b/app/code/Magento/Cms/Block/Adminhtml/Block/Widget/Chooser.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Block/Cms/Block/Widget/Chooser.php
rename to app/code/Magento/Cms/Block/Adminhtml/Block/Widget/Chooser.php
index f2e13864c8e..d4402ced6f4 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Block/Widget/Chooser.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Block/Widget/Chooser.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * CMS block chooser for Wysiwyg CMS widget
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Block\Widget;
+namespace Magento\Cms\Block\Adminhtml\Block\Widget;
 
 class Chooser extends \Magento\Adminhtml\Block\Widget\Grid
 {
@@ -88,8 +88,8 @@ class Chooser extends \Magento\Adminhtml\Block\Widget\Grid
      */
     public function prepareElementHtml(\Magento\Data\Form\Element\AbstractElement $element)
     {
-        $uniqId = $this->_coreData->uniqHash($element->getId());
-        $sourceUrl = $this->getUrl('adminhtml/cms_block_widget/chooser', array('uniq_id' => $uniqId));
+        $uniqId = $this->mathRandom->getUniqueHash($element->getId());
+        $sourceUrl = $this->getUrl('cms/block_widget/chooser', array('uniq_id' => $uniqId));
 
         $chooser = $this->getLayout()->createBlock('Magento\Widget\Block\Adminhtml\Widget\Chooser')
             ->setElement($element)
@@ -184,6 +184,6 @@ class Chooser extends \Magento\Adminhtml\Block\Widget\Grid
 
     public function getGridUrl()
     {
-        return $this->getUrl('adminhtml/cms_block_widget/chooser', array('_current' => true));
+        return $this->getUrl('cms/block_widget/chooser', array('_current' => true));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Page.php b/app/code/Magento/Cms/Block/Adminhtml/Page.php
similarity index 90%
rename from app/code/Magento/Adminhtml/Block/Cms/Page.php
rename to app/code/Magento/Cms/Block/Adminhtml/Page.php
index cffbd576f86..9b18263f7fa 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Page.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Page.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -29,20 +29,20 @@
  * Adminhtml cms pages content block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms;
+namespace Magento\Cms\Block\Adminhtml;
 
 class Page extends \Magento\Adminhtml\Block\Widget\Grid\Container
 {
-
     /**
      * Block constructor
      */
     protected function _construct()
     {
-        $this->_controller = 'cms_page';
+        $this->_controller = 'adminhtml_page';
+        $this->_blockGroup = 'Magento_Cms';
         $this->_headerText = __('Manage Pages');
 
         parent::_construct();
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Cms/Page/Edit.php
rename to app/code/Magento/Cms/Block/Adminhtml/Page/Edit.php
index 2c0ad037b43..d3c42da2cd8 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * Admin CMS page
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Page;
+namespace Magento\Cms\Block\Adminhtml\Page;
 
 class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 {
@@ -66,7 +66,8 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
     protected function _construct()
     {
         $this->_objectId   = 'page_id';
-        $this->_controller = 'cms_page';
+        $this->_blockGroup = 'Magento_Cms';
+        $this->_controller = 'adminhtml_page';
 
         parent::_construct();
 
@@ -126,7 +127,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
      */
     protected function _getSaveAndContinueUrl()
     {
-        return $this->getUrl('adminhtml/*/save', array(
+        return $this->getUrl('cms/*/save', array(
             '_current'   => true,
             'back'       => 'edit',
             'active_tab' => '{{tab_id}}'
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Form.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Form.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Form.php
rename to app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Form.php
index 323e93bdbea..c12d7811468 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Form.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Form.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -29,10 +29,10 @@
  * Adminhtml cms page edit form block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Page\Edit;
+namespace Magento\Cms\Block\Adminhtml\Page\Edit;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Content.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php
rename to app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Content.php
index 0bbda0d7ad0..760268aca13 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Content.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -27,7 +27,7 @@
 /**
  * Cms page edit form main tab
  */
-namespace Magento\Adminhtml\Block\Cms\Page\Edit\Tab;
+namespace Magento\Cms\Block\Adminhtml\Page\Edit\Tab;
 
 class Content
     extends \Magento\Backend\Block\Widget\Form\Generic
@@ -41,7 +41,7 @@ class Content
     /**
      * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
      * @param \Magento\Backend\Block\Template\Context $context
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Model\Registry $coreRegistry
@@ -50,7 +50,7 @@ class Content
     public function __construct(
         \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
         \Magento\Backend\Block\Template\Context $context,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Model\Registry $coreRegistry,
@@ -114,7 +114,7 @@ class Content
 
         // Setting custom renderer for content field to remove label column
         $renderer = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Form\Renderer\Fieldset\Element')
-                    ->setTemplate('cms/page/edit/form/renderer/content.phtml');
+                    ->setTemplate('Magento_Cms::page/edit/form/renderer/content.phtml');
         $contentField->setRenderer($renderer);
 
         $this->_eventManager->dispatch('adminhtml_cms_page_edit_tab_content_prepare_form', array('form' => $form));
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php
rename to app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php
index 435c43bb4e8..0119a603a67 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php
@@ -19,11 +19,11 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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\Adminhtml\Block\Cms\Page\Edit\Tab;
+namespace Magento\Cms\Block\Adminhtml\Page\Edit\Tab;
 
 /**
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
@@ -46,7 +46,7 @@ class Design
      * @param \Magento\Page\Model\Source\Layout $pageLayout
      * @param \Magento\Core\Model\Theme\LabelFactory $labelFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -55,7 +55,7 @@ class Design
         \Magento\Page\Model\Source\Layout $pageLayout,
         \Magento\Core\Model\Theme\LabelFactory $labelFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -77,7 +77,7 @@ class Design
     /**
      * Initialise form fields
      *
-     * @return \Magento\Adminhtml\Block\Cms\Page\Edit\Tab\Design
+     * @return \Magento\Cms\Block\Adminhtml\Page\Edit\Tab\Design
      */
     protected function _prepareForm()
     {
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php
rename to app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php
index 086e4ed9876..3cedb1c24eb 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -27,7 +27,7 @@
 /**
  * Cms page edit form main tab
  */
-namespace Magento\Adminhtml\Block\Cms\Page\Edit\Tab;
+namespace Magento\Cms\Block\Adminhtml\Page\Edit\Tab;
 
 class Main
     extends \Magento\Backend\Block\Widget\Form\Generic
@@ -41,7 +41,7 @@ class Main
     /**
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -49,7 +49,7 @@ class Main
     public function __construct(
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Meta.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php
rename to app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Meta.php
index b7b83daa810..5942f65fcf5 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Meta.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * Customer account form block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Page\Edit\Tab;
+namespace Magento\Cms\Block\Adminhtml\Page\Edit\Tab;
 
 class Meta
     extends \Magento\Backend\Block\Widget\Form\Generic
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tabs.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tabs.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tabs.php
rename to app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tabs.php
index effbb9633f9..178be6c9132 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tabs.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tabs.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * Admin page left menu
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Page\Edit;
+namespace Magento\Cms\Block\Adminhtml\Page\Edit;
 
 class Tabs extends \Magento\Adminhtml\Block\Widget\Tabs
 {
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Page/Grid.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/Cms/Page/Grid.php
rename to app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php
index ee26de4e3e1..48d4298126d 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Page/Grid.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml cms pages grid
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Page;
+namespace Magento\Cms\Block\Adminhtml\Page;
 
 class Grid extends \Magento\Adminhtml\Block\Widget\Grid
 {
@@ -157,7 +157,7 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
             'width'     => 10,
             'sortable'  => false,
             'filter'    => false,
-            'renderer'  => 'Magento\Adminhtml\Block\Cms\Page\Grid\Renderer\Action',
+            'renderer'  => 'Magento\Cms\Block\Adminhtml\Page\Grid\Renderer\Action',
         ));
 
         return parent::_prepareColumns();
@@ -185,6 +185,6 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
      */
     public function getRowUrl($row)
     {
-        return $this->getUrl('adminhtml/*/edit', array('page_id' => $row->getId()));
+        return $this->getUrl('*/*/edit', array('page_id' => $row->getId()));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid/Renderer/Action.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php
rename to app/code/Magento/Cms/Block/Adminhtml/Page/Grid/Renderer/Action.php
index b681f38532c..eed40c878d1 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid/Renderer/Action.php
@@ -19,12 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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\Adminhtml\Block\Cms\Page\Grid\Renderer;
+namespace Magento\Cms\Block\Adminhtml\Page\Grid\Renderer;
 
 class Action
     extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Page/Widget/Chooser.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Cms/Page/Widget/Chooser.php
rename to app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php
index 125c99d4849..fac8309d3bc 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Page/Widget/Chooser.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * CMS page chooser for Wysiwyg CMS widget
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Page\Widget;
+namespace Magento\Cms\Block\Adminhtml\Page\Widget;
 
 class Chooser extends \Magento\Adminhtml\Block\Widget\Grid
 {
@@ -103,8 +103,8 @@ class Chooser extends \Magento\Adminhtml\Block\Widget\Grid
      */
     public function prepareElementHtml(\Magento\Data\Form\Element\AbstractElement $element)
     {
-        $uniqId = $this->_coreData->uniqHash($element->getId());
-        $sourceUrl = $this->getUrl('adminhtml/cms_page_widget/chooser', array('uniq_id' => $uniqId));
+        $uniqId = $this->mathRandom->getUniqueHash($element->getId());
+        $sourceUrl = $this->getUrl('cms/page_widget/chooser', array('uniq_id' => $uniqId));
 
         $chooser = $this->getLayout()->createBlock('Magento\Widget\Block\Adminhtml\Widget\Chooser')
             ->setElement($element)
@@ -212,6 +212,6 @@ class Chooser extends \Magento\Adminhtml\Block\Widget\Grid
 
     public function getGridUrl()
     {
-        return $this->getUrl('adminhtml/cms_page_widget/chooser', array('_current' => true));
+        return $this->getUrl('cms/page_widget/chooser', array('_current' => true));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content.php
similarity index 89%
rename from app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php
rename to app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content.php
index acbb6a4b772..99c4d820ee5 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * Wysiwyg Images content block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Wysiwyg\Images;
+namespace Magento\Cms\Block\Adminhtml\Wysiwyg\Images;
 
 class Content extends \Magento\Adminhtml\Block\Widget\Container
 {
@@ -75,7 +75,7 @@ class Content extends \Magento\Adminhtml\Block\Widget\Container
      */
     public function getContentsUrl()
     {
-        return $this->getUrl('adminhtml/*/contents', array('type' => $this->getRequest()->getParam('type')));
+        return $this->getUrl('cms/*/contents', array('type' => $this->getRequest()->getParam('type')));
     }
 
     /**
@@ -111,7 +111,7 @@ class Content extends \Magento\Adminhtml\Block\Widget\Container
      */
     public function getNewfolderUrl()
     {
-        return $this->getUrl('adminhtml/*/newFolder');
+        return $this->getUrl('cms/*/newFolder');
     }
 
     /**
@@ -121,7 +121,7 @@ class Content extends \Magento\Adminhtml\Block\Widget\Container
      */
     protected function getDeletefolderUrl()
     {
-        return $this->getUrl('adminhtml/*/deleteFolder');
+        return $this->getUrl('cms/*/deleteFolder');
     }
 
     /**
@@ -132,7 +132,7 @@ class Content extends \Magento\Adminhtml\Block\Widget\Container
      */
     public function getDeleteFilesUrl()
     {
-        return $this->getUrl('adminhtml/*/deleteFiles');
+        return $this->getUrl('cms/*/deleteFiles');
     }
 
     /**
@@ -142,7 +142,7 @@ class Content extends \Magento\Adminhtml\Block\Widget\Container
      */
     public function getOnInsertUrl()
     {
-        return $this->getUrl('adminhtml/*/onInsert');
+        return $this->getUrl('cms/*/onInsert');
     }
 
     /**
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Files.php
similarity index 97%
rename from app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php
rename to app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Files.php
index c5b6bb17ddf..10fea8eea10 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Files.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * Directory contents block for Wysiwyg Images
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Content;
+namespace Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content;
 
 class Files extends \Magento\Adminhtml\Block\Template
 {
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Newfolder.php
similarity index 89%
rename from app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php
rename to app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Newfolder.php
index b41192e7116..2240478bf1c 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Newfolder.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * New directory block for Wysiwyg Images
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Content;
+namespace Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content;
 
 class Newfolder extends \Magento\Adminhtml\Block\Template
 {
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Uploader.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php
rename to app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Uploader.php
index 87e51428d38..c2462939da2 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Uploader.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * Uploader block for Wysiwyg Images
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Content;
+namespace Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content;
 
 class Uploader extends \Magento\Adminhtml\Block\Media\Uploader
 {
@@ -72,7 +72,7 @@ class Uploader extends \Magento\Adminhtml\Block\Media\Uploader
             $files[] = '*.' . $ext;
         }
         $this->getConfig()
-            ->setUrl($this->_urlBuilder->addSessionParam()->getUrl('adminhtml/*/upload', array('type' => $type)))
+            ->setUrl($this->_urlBuilder->addSessionParam()->getUrl('cms/*/upload', array('type' => $type)))
             ->setFileField('image')
             ->setFilters(array(
                 'images' => array(
diff --git a/app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Tree.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php
rename to app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Tree.php
index 78defe801e7..bca6fda2869 100644
--- a/app/code/Magento/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php
+++ b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Tree.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * Directory tree renderer for Cms Wysiwyg Images
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Cms\Wysiwyg\Images;
+namespace Magento\Cms\Block\Adminhtml\Wysiwyg\Images;
 
 class Tree extends \Magento\Adminhtml\Block\Template
 {
@@ -97,7 +97,7 @@ class Tree extends \Magento\Adminhtml\Block\Template
      */
     public function getTreeLoaderUrl()
     {
-        return $this->getUrl('adminhtml/*/treeJson');
+        return $this->getUrl('cms/*/treeJson');
     }
 
     /**
diff --git a/app/code/Magento/Adminhtml/Controller/Cms/Block.php b/app/code/Magento/Cms/Controller/Adminhtml/Block.php
similarity index 89%
rename from app/code/Magento/Adminhtml/Controller/Cms/Block.php
rename to app/code/Magento/Cms/Controller/Adminhtml/Block.php
index e33189ae35e..1c01373f4c5 100644
--- a/app/code/Magento/Adminhtml/Controller/Cms/Block.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Block.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -29,10 +29,10 @@
  * Cms manage blocks controller
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\Cms;
+namespace Magento\Cms\Controller\Adminhtml;
 
 class Block extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -58,7 +58,7 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action
     /**
      * Init actions
      *
-     * @return \Magento\Adminhtml\Controller\Cms\Block
+     * @return \Magento\Cms\Controller\Adminhtml\Block
      */
     protected function _initAction()
     {
@@ -106,7 +106,7 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action
             $model->load($id);
             if (! $model->getId()) {
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(__('This block no longer exists.'));
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('*/*/');
                 return;
             }
         }
@@ -140,7 +140,7 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action
             $model = $this->_objectManager->create('Magento\Cms\Model\Block')->load($id);
             if (!$model->getId() && $id) {
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(__('This block no longer exists.'));
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('*/*/');
                 return;
             }
 
@@ -159,11 +159,11 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action
 
                 // check if 'Save and Continue'
                 if ($this->getRequest()->getParam('back')) {
-                    $this->_redirect('adminhtml/*/edit', array('block_id' => $model->getId()));
+                    $this->_redirect('*/*/edit', array('block_id' => $model->getId()));
                     return;
                 }
                 // go to grid
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('*/*/');
                 return;
 
             } catch (\Exception $e) {
@@ -172,11 +172,11 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action
                 // save data in session
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setFormData($data);
                 // redirect to edit form
-                $this->_redirect('adminhtml/*/edit', array('block_id' => $this->getRequest()->getParam('block_id')));
+                $this->_redirect('*/*/edit', array('block_id' => $this->getRequest()->getParam('block_id')));
                 return;
             }
         }
-        $this->_redirect('adminhtml/*/');
+        $this->_redirect('*/*/');
     }
 
     /**
@@ -195,20 +195,20 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action
                 // display success message
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addSuccess(__('The block has been deleted.'));
                 // go to grid
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('*/*/');
                 return;
             } catch (\Exception $e) {
                 // display error message
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError($e->getMessage());
                 // go back to edit form
-                $this->_redirect('adminhtml/*/edit', array('block_id' => $id));
+                $this->_redirect('*/*/edit', array('block_id' => $id));
                 return;
             }
         }
         // display error message
         $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(__('We can\'t find a block to delete.'));
         // go to grid
-        $this->_redirect('adminhtml/*/');
+        $this->_redirect('*/*/');
     }
 
     /**
diff --git a/app/code/Magento/Adminhtml/Controller/Cms/Block/Widget.php b/app/code/Magento/Cms/Controller/Adminhtml/Block/Widget.php
similarity index 85%
rename from app/code/Magento/Adminhtml/Controller/Cms/Block/Widget.php
rename to app/code/Magento/Cms/Controller/Adminhtml/Block/Widget.php
index ef35401ebd9..83e42be7a0f 100644
--- a/app/code/Magento/Adminhtml/Controller/Cms/Block/Widget.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Block/Widget.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -29,10 +29,10 @@
  * Controller for CMS Block Widget plugin
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\Cms\Block;
+namespace Magento\Cms\Controller\Adminhtml\Block;
 
 class Widget extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -42,7 +42,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action
     public function chooserAction()
     {
         $uniqId = $this->getRequest()->getParam('uniq_id');
-        $pagesGrid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Cms\Block\Widget\Chooser', '', array(
+        $pagesGrid = $this->getLayout()->createBlock('Magento\Cms\Block\Adminhtml\Block\Widget\Chooser', '', array(
             'data' => array('id' => $uniqId)
         ));
         $this->getResponse()->setBody($pagesGrid->toHtml());
diff --git a/app/code/Magento/Adminhtml/Controller/Cms/Page.php b/app/code/Magento/Cms/Controller/Adminhtml/Page.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Controller/Cms/Page.php
rename to app/code/Magento/Cms/Controller/Adminhtml/Page.php
index 2fa76351d34..0427e9e664d 100644
--- a/app/code/Magento/Adminhtml/Controller/Cms/Page.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Page.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -32,7 +32,7 @@
  * @package    Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\Cms;
+namespace Magento\Cms\Controller\Adminhtml;
 
 class Page extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -58,7 +58,7 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action
     /**
      * Init actions
      *
-     * @return \Magento\Adminhtml\Controller\Cms\Page
+     * @return \Magento\Cms\Controller\Adminhtml\Page
      */
     protected function _initAction()
     {
@@ -108,7 +108,7 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action
             if (! $model->getId()) {
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(
                     __('This page no longer exists.'));
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('*/*/');
                 return;
             }
         }
@@ -157,7 +157,7 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action
 
             //validating
             if (!$this->_validatePostData($data)) {
-                $this->_redirect('adminhtml/*/edit', array('page_id' => $model->getId(), '_current' => true));
+                $this->_redirect('*/*/edit', array('page_id' => $model->getId(), '_current' => true));
                 return;
             }
 
@@ -173,11 +173,11 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setFormData(false);
                 // check if 'Save and Continue'
                 if ($this->getRequest()->getParam('back')) {
-                    $this->_redirect('adminhtml/*/edit', array('page_id' => $model->getId(), '_current'=>true));
+                    $this->_redirect('*/*/edit', array('page_id' => $model->getId(), '_current'=>true));
                     return;
                 }
                 // go to grid
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('*/*/');
                 return;
 
             } catch (\Magento\Core\Exception $e) {
@@ -188,10 +188,10 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action
             }
 
             $this->_getSession()->setFormData($data);
-            $this->_redirect('adminhtml/*/edit', array('page_id' => $this->getRequest()->getParam('page_id')));
+            $this->_redirect('*/*/edit', array('page_id' => $this->getRequest()->getParam('page_id')));
             return;
         }
-        $this->_redirect('adminhtml/*/');
+        $this->_redirect('*/*/');
     }
 
     /**
@@ -214,7 +214,7 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action
                     __('The page has been deleted.'));
                 // go to grid
                 $this->_eventManager->dispatch('adminhtml_cmspage_on_delete', array('title' => $title, 'status' => 'success'));
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('*/*/');
                 return;
 
             } catch (\Exception $e) {
@@ -222,14 +222,14 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action
                 // display error message
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError($e->getMessage());
                 // go back to edit form
-                $this->_redirect('adminhtml/*/edit', array('page_id' => $id));
+                $this->_redirect('*/*/edit', array('page_id' => $id));
                 return;
             }
         }
         // display error message
         $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(__('We can\'t find a page to delete.'));
         // go to grid
-        $this->_redirect('adminhtml/*/');
+        $this->_redirect('*/*/');
     }
 
     /**
diff --git a/app/code/Magento/Adminhtml/Controller/Cms/Page/Widget.php b/app/code/Magento/Cms/Controller/Adminhtml/Page/Widget.php
similarity index 86%
rename from app/code/Magento/Adminhtml/Controller/Cms/Page/Widget.php
rename to app/code/Magento/Cms/Controller/Adminhtml/Page/Widget.php
index a92e8ccfbde..70a04863dbc 100644
--- a/app/code/Magento/Adminhtml/Controller/Cms/Page/Widget.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Page/Widget.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -29,10 +29,10 @@
  * Controller for CMS Page Link Widget plugin
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Cms
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\Cms\Page;
+namespace Magento\Cms\Controller\Adminhtml\Page;
 
 class Widget extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -42,7 +42,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action
     public function chooserAction()
     {
         $uniqId = $this->getRequest()->getParam('uniq_id');
-        $pagesGrid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Cms\Page\Widget\Chooser', '', array(
+        $pagesGrid = $this->getLayout()->createBlock('Magento\Cms\Block\Adminhtml\Page\Widget\Chooser', '', array(
             'data' => array('id' => $uniqId)
         ));
         $this->getResponse()->setBody($pagesGrid->toHtml());
diff --git a/app/code/Magento/Adminhtml/Controller/Cms/Wysiwyg.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Controller/Cms/Wysiwyg.php
rename to app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg.php
index 12404b58351..34f89faad01 100644
--- a/app/code/Magento/Adminhtml/Controller/Cms/Wysiwyg.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * Wysiwyg controller for different purposes
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\Cms;
+namespace Magento\Cms\Controller\Adminhtml;
 
 class Wysiwyg extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -53,7 +53,7 @@ class Wysiwyg extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Exception $e) {
             $image->open($this->_objectManager->get('Magento\Cms\Model\Wysiwyg\Config')->getSkinImagePlaceholderUrl());
             $response->setHeader('Content-Type', $image->getMimeType())->setBody($image->getImage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
     }
 }
diff --git a/app/code/Magento/Adminhtml/Controller/Cms/Wysiwyg/Images.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Controller/Cms/Wysiwyg/Images.php
rename to app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php
index 5961f0f53a9..868c2dd6c2f 100644
--- a/app/code/Magento/Adminhtml/Controller/Cms/Wysiwyg/Images.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @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)
  */
@@ -28,10 +28,10 @@
  * Images manage controller for Cms WYSIWYG editor
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\Cms\Wysiwyg;
+namespace Magento\Cms\Controller\Adminhtml\Wysiwyg;
 
 class Images extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -57,7 +57,7 @@ class Images extends \Magento\Backend\Controller\Adminhtml\Action
     /**
      * Init storage
      *
-     * @return \Magento\Adminhtml\Controller\Cms\Wysiwyg\Images
+     * @return \Magento\Cms\Controller\Adminhtml\Wysiwyg\Images
      */
     protected function _initAction()
     {
@@ -87,7 +87,7 @@ class Images extends \Magento\Backend\Controller\Adminhtml\Action
         try {
             $this->_initAction();
             $this->getResponse()->setBody(
-                $this->getLayout()->createBlock('Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Tree')
+                $this->getLayout()->createBlock('Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Tree')
                     ->getTreeJson()
             );
         } catch (\Exception $e) {
@@ -233,7 +233,7 @@ class Images extends \Magento\Backend\Controller\Adminhtml\Action
     /**
      * Save current path in session
      *
-     * @return \Magento\Adminhtml\Controller\Cms\Wysiwyg\Images
+     * @return \Magento\Cms\Controller\Adminhtml\Wysiwyg\Images
      */
     protected function _saveSessionCurrentPath()
     {
diff --git a/app/code/Magento/Cms/Controller/Router.php b/app/code/Magento/Cms/Controller/Router.php
index 4dae02e646c..84d9f2b199b 100644
--- a/app/code/Magento/Cms/Controller/Router.php
+++ b/app/code/Magento/Cms/Controller/Router.php
@@ -81,7 +81,7 @@ class Router extends \Magento\App\Router\AbstractRouter
     /**
      * Construct
      *
-     * @param \Magento\App\ActionFactory $controllerFactory
+     * @param \Magento\App\ActionFactory $actionFactory
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\UrlInterface $url
      * @param \Magento\App\State $appState
@@ -90,7 +90,7 @@ class Router extends \Magento\App\Router\AbstractRouter
      * @param \Magento\App\ResponseInterface $response
      */
     public function __construct(
-        \Magento\App\ActionFactory $controllerFactory,
+        \Magento\App\ActionFactory $actionFactory,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\UrlInterface $url,
         \Magento\App\State $appState,
@@ -98,7 +98,7 @@ class Router extends \Magento\App\Router\AbstractRouter
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\App\ResponseInterface $response
     ) {
-        parent::__construct($controllerFactory);
+        parent::__construct($actionFactory);
         $this->_eventManager = $eventManager;
         $this->_url = $url;
         $this->_appState = $appState;
@@ -136,10 +136,9 @@ class Router extends \Magento\App\Router\AbstractRouter
         $identifier = $condition->getIdentifier();
 
         if ($condition->getRedirectUrl()) {
-            $this->_response->setRedirect($condition->getRedirectUrl())
-                ->sendResponse();
+            $this->_response->setRedirect($condition->getRedirectUrl());
             $request->setDispatched(true);
-            return $this->_controllerFactory->createController('Magento\App\Action\Redirect',
+            return $this->_actionFactory->createController('Magento\App\Action\Redirect',
                 array('request' => $request)
             );
         }
@@ -164,7 +163,7 @@ class Router extends \Magento\App\Router\AbstractRouter
             $identifier
         );
 
-        return $this->_controllerFactory->createController('Magento\App\Action\Forward',
+        return $this->_actionFactory->createController('Magento\App\Action\Forward',
             array('request' => $request)
         );
     }
diff --git a/app/code/Magento/Cms/Helper/Page.php b/app/code/Magento/Cms/Helper/Page.php
index e539a22f2d3..1961a2d978e 100644
--- a/app/code/Magento/Cms/Helper/Page.php
+++ b/app/code/Magento/Cms/Helper/Page.php
@@ -100,6 +100,13 @@ class Page extends \Magento\Core\Helper\AbstractHelper
     protected $_url;
 
     /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
+    /**
+     * Construct
+     *
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Core\Model\Session\Pool $sessionFactory
      * @param \Magento\Cms\Model\Page $page
@@ -110,6 +117,7 @@ class Page extends \Magento\Core\Helper\AbstractHelper
      * @param \Magento\Cms\Model\PageFactory $pageFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\LocaleInterface $locale
+     * @param \Magento\Escaper $escaper
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
@@ -121,7 +129,8 @@ class Page extends \Magento\Core\Helper\AbstractHelper
         \Magento\UrlInterface $url,
         \Magento\Cms\Model\PageFactory $pageFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Model\LocaleInterface $locale
+        \Magento\Core\Model\LocaleInterface $locale,
+        \Magento\Escaper $escaper
     ) {
         $this->_sessionPool = $sessionFactory;
         // used singleton (instead factory) because there exist dependencies on \Magento\Cms\Helper\Page
@@ -133,6 +142,7 @@ class Page extends \Magento\Core\Helper\AbstractHelper
         $this->_pageFactory = $pageFactory;
         $this->_storeManager = $storeManager;
         $this->_locale = $locale;
+        $this->_escaper = $escaper;
         parent::__construct($context);
     }
 
@@ -210,7 +220,7 @@ class Page extends \Magento\Core\Helper\AbstractHelper
 
         $contentHeadingBlock = $action->getLayout()->getBlock('page_content_heading');
         if ($contentHeadingBlock) {
-            $contentHeading = $this->escapeHtml($this->_page->getContentHeading());
+            $contentHeading = $this->_escaper->escapeHtml($this->_page->getContentHeading());
             $contentHeadingBlock->setContentHeading($contentHeading);
         }
 
diff --git a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
index 65f82ba9f5c..8abb1516f9c 100644
--- a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
+++ b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
@@ -258,7 +258,7 @@ class Images extends \Magento\Core\Helper\AbstractHelper
             } else {
                 $directive = $this->_coreData->urlEncode($directive);
                 $html = $this->_backendData->getUrl(
-                    '*/cms_wysiwyg/directive',
+                    'cms/wysiwyg/directive',
                     array('___directive' => $directive)
                 );
             }
diff --git a/app/code/Magento/Cms/Model/Resource/Block.php b/app/code/Magento/Cms/Model/Resource/Block.php
index f148ef1e9fa..d15eb9f7910 100644
--- a/app/code/Magento/Cms/Model/Resource/Block.php
+++ b/app/code/Magento/Cms/Model/Resource/Block.php
@@ -51,12 +51,12 @@ class Block extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Date $date
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\Date $date,
         \Magento\Core\Model\StoreManagerInterface $storeManager
     ) {
diff --git a/app/code/Magento/Cms/Model/Resource/Page.php b/app/code/Magento/Cms/Model/Resource/Page.php
index 155893e8f53..7226b38da31 100644
--- a/app/code/Magento/Cms/Model/Resource/Page.php
+++ b/app/code/Magento/Cms/Model/Resource/Page.php
@@ -55,21 +55,29 @@ class Page extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected $_storeManager;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Date $date
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Stdlib\DateTime $dateTime
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\Date $date,
-        \Magento\Core\Model\StoreManagerInterface $storeManager
+        \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Stdlib\DateTime $dateTime
     ) {
         parent::__construct($resource);
         $this->_date = $date;
         $this->_storeManager = $storeManager;
+        $this->dateTime = $dateTime;
     }
 
     /**
@@ -115,7 +123,7 @@ class Page extends \Magento\Core\Model\Resource\Db\AbstractDb
          */
         foreach (array('custom_theme_from', 'custom_theme_to') as $field) {
             $value = !$object->getData($field) ? null : $object->getData($field);
-            $object->setData($field, $this->formatDate($value));
+            $object->setData($field, $this->dateTime->formatDate($value));
         }
 
         if (!$this->getIsUniquePageToStores($object)) {
diff --git a/app/code/Magento/Cms/Model/Resource/Page/Collection.php b/app/code/Magento/Cms/Model/Resource/Page/Collection.php
index a07fef4f2ad..e0b164fadc5 100644
--- a/app/code/Magento/Cms/Model/Resource/Page/Collection.php
+++ b/app/code/Magento/Cms/Model/Resource/Page/Collection.php
@@ -55,7 +55,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      * Construct
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -63,7 +63,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Config.php b/app/code/Magento/Cms/Model/Wysiwyg/Config.php
index 4105a7246dd..92c3eeb22b7 100644
--- a/app/code/Magento/Cms/Model/Wysiwyg/Config.php
+++ b/app/code/Magento/Cms/Model/Wysiwyg/Config.php
@@ -160,7 +160,7 @@ class Config extends \Magento\Object
             'no_display'                    => false,
             'translator'                    => $this->_cmsData,
             'encode_directives'             => true,
-            'directives_url'                => $this->_backendUrl->getUrl('adminhtml/cms_wysiwyg/directive'),
+            'directives_url'                => $this->_backendUrl->getUrl('cms/wysiwyg/directive'),
             'popup_css'                     =>
                 $viewUrl->getViewFileUrl('mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css'),
             'content_css'                   =>
@@ -174,7 +174,7 @@ class Config extends \Magento\Object
         if ($this->_authorization->isAllowed('Magento_Cms::media_gallery')) {
             $config->addData(array(
                 'add_images' => true,
-                'files_browser_window_url' => $this->_backendUrl->getUrl('adminhtml/cms_wysiwyg_images/index'),
+                'files_browser_window_url' => $this->_backendUrl->getUrl('cms/wysiwyg_images/index'),
                 'files_browser_window_width' => $this->_windowSize['width'],
                 'files_browser_window_height'=> $this->_windowSize['height'],
             ));
diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
index 35f29ec38e0..4bb2ef57295 100644
--- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
+++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
@@ -303,7 +303,7 @@ class Storage extends \Magento\Object
                 $thumbUrl = $this->getThumbnailUrl($item->getFilename(), true);
                 // generate thumbnail "on the fly" if it does not exists
                 if (!$thumbUrl) {
-                    $thumbUrl = $this->_backendUrl->getUrl('adminhtml/*/thumbnail', array('file' => $item->getId()));
+                    $thumbUrl = $this->_backendUrl->getUrl('cms/*/thumbnail', array('file' => $item->getId()));
                 }
 
                 $size = @getimagesize($item->getFilename());
diff --git a/app/code/Magento/Cms/etc/adminhtml/menu.xml b/app/code/Magento/Cms/etc/adminhtml/menu.xml
index 29c0d578b16..81982bc3066 100644
--- a/app/code/Magento/Cms/etc/adminhtml/menu.xml
+++ b/app/code/Magento/Cms/etc/adminhtml/menu.xml
@@ -27,7 +27,7 @@
 -->
 <config>
     <menu>
-        <add id="Magento_Cms::cms_page" title="Pages" module="Magento_Cms" sortOrder="0" parent="Magento_Adminhtml::content_elements" action="adminhtml/cms_page" resource="Magento_Cms::page"/>
-        <add id="Magento_Cms::cms_block" title="Blocks" module="Magento_Cms" sortOrder="30" parent="Magento_Adminhtml::content_elements" action="adminhtml/cms_block" resource="Magento_Cms::block"/>
+        <add id="Magento_Cms::cms_page" title="Pages" module="Magento_Cms" sortOrder="0" parent="Magento_Adminhtml::content_elements" action="cms/page" resource="Magento_Cms::page"/>
+        <add id="Magento_Cms::cms_block" title="Blocks" module="Magento_Cms" sortOrder="30" parent="Magento_Adminhtml::content_elements" action="cms/block" resource="Magento_Cms::block"/>
     </menu>
 </config>
diff --git a/app/code/Magento/Cms/etc/adminhtml/routes.xml b/app/code/Magento/Cms/etc/adminhtml/routes.xml
new file mode 100644
index 00000000000..0134d08bf47
--- /dev/null
+++ b/app/code/Magento/Cms/etc/adminhtml/routes.xml
@@ -0,0 +1,32 @@
+<?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>
+    <router id="admin">
+        <route id="cms" frontName="cms">
+            <module name="Magento_Cms_Adminhtml" before="Magento_Adminhtml" />
+        </route>
+    </router>
+</config>
diff --git a/app/code/Magento/Cms/etc/di.xml b/app/code/Magento/Cms/etc/di.xml
index f764b802e9e..d95c689faca 100644
--- a/app/code/Magento/Cms/etc/di.xml
+++ b/app/code/Magento/Cms/etc/di.xml
@@ -24,17 +24,6 @@
  */
 -->
 <config>
-    <type name="Magento\App\RouterList">
-        <param name="routerList">
-            <value>
-                <cms>
-                    <instance>Magento\Cms\Controller\Router</instance>
-                    <disable type="bool">false</disable>
-                    <sortOrder>60</sortOrder>
-                </cms>
-            </value>
-        </param>
-    </type>
     <type name="Magento\Cms\Model\Wysiwyg\Config">
         <param name="windowSize">
             <value>
@@ -81,12 +70,7 @@
             </value>
         </param>
     </type>
-    <type name="Magento\Core\Helper\Data">
-        <param name="config">
-            <instance type="Magento\Core\Model\ConfigProxy" />
-        </param>
-    </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <cms_setup>Magento\Cms\Model\Resource\Setup</cms_setup>
diff --git a/app/code/Magento/Cms/etc/frontend/di.xml b/app/code/Magento/Cms/etc/frontend/di.xml
new file mode 100644
index 00000000000..c9d16f9fb73
--- /dev/null
+++ b/app/code/Magento/Cms/etc/frontend/di.xml
@@ -0,0 +1,38 @@
+<?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\App\RouterList">
+        <param name="routerList">
+            <value>
+                <cms>
+                    <instance>Magento\Cms\Controller\Router</instance>
+                    <disable type="bool">false</disable>
+                    <sortOrder>60</sortOrder>
+                </cms>
+            </value>
+        </param>
+    </type>
+</config>
\ No newline at end of file
diff --git a/app/code/Magento/Cms/etc/widget.xml b/app/code/Magento/Cms/etc/widget.xml
index 9f2a5f1ff16..f5e7d70d006 100644
--- a/app/code/Magento/Cms/etc/widget.xml
+++ b/app/code/Magento/Cms/etc/widget.xml
@@ -32,7 +32,7 @@
         <parameters>
             <parameter name="page_id" xsi:type="block" visible="true" required="true" sort_order="10">
                 <label translate="true">CMS Page</label>
-                <block class="Magento\Adminhtml\Block\Cms\Page\Widget\Chooser">
+                <block class="Magento\Cms\Block\Adminhtml\Page\Widget\Chooser">
                     <data>
                         <item name="button" xsi:type="array">
                             <item name="open" xsi:type="string">Select Page...</item>
@@ -67,7 +67,7 @@
         <parameters>
             <parameter name="block_id" xsi:type="block" visible="true" required="true" sort_order="20">
                 <label translate="true">Block</label>
-                <block class="Magento\Adminhtml\Block\Cms\Block\Widget\Chooser">
+                <block class="Magento\Cms\Block\Adminhtml\Block\Widget\Chooser">
                     <data>
                         <item name="button" xsi:type="array">
                             <item name="open" xsi:type="string">Select Block...</item>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/cms/browser/content.phtml b/app/code/Magento/Cms/view/adminhtml/browser/content.phtml
similarity index 96%
rename from app/code/Magento/Adminhtml/view/adminhtml/cms/browser/content.phtml
rename to app/code/Magento/Cms/view/adminhtml/browser/content.phtml
index bc23833802b..28096edfad7 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/cms/browser/content.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/browser/content.phtml
@@ -23,7 +23,7 @@
  * @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)
  */
- /** @var $this \Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Content */
+ /** @var $this \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content */
 ?>
 
 <div data-mage-init="{mediabrowser: <?php echo $this->escapeHtml($this->getFilebrowserSetupObject()); ?>}">
@@ -40,4 +40,4 @@
         <div id="contents"></div>
     </div>
     <div style="float:left;  width: 20%"><?php echo $this->getChildHtml('wysiwyg_images.tree') ?></div>
-</div>
\ No newline at end of file
+</div>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/cms/browser/content/files.phtml b/app/code/Magento/Cms/view/adminhtml/browser/content/files.phtml
similarity index 96%
rename from app/code/Magento/Adminhtml/view/adminhtml/cms/browser/content/files.phtml
rename to app/code/Magento/Cms/view/adminhtml/browser/content/files.phtml
index f1f3578ca5d..eb55ed53c23 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/cms/browser/content/files.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/browser/content/files.phtml
@@ -23,7 +23,7 @@
  * @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)
  */
- /** @var $this \Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Content\Files */
+ /** @var $this \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content\Files */
 
 $_width  = $this->getImagesWidth();
 $_height = $this->getImagesHeight();
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml b/app/code/Magento/Cms/view/adminhtml/browser/content/uploader.phtml
similarity index 98%
rename from app/code/Magento/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml
rename to app/code/Magento/Cms/view/adminhtml/browser/content/uploader.phtml
index e87883d9678..80d0d63287f 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/browser/content/uploader.phtml
@@ -23,7 +23,7 @@
  * @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)
  */
-/** @var $this \Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Content\Uploader */
+/** @var $this \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content\Uploader */
 ?>
 
 <div id="<?php echo $this->getHtmlId() ?>" class="uploader">
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/cms/browser/tree.phtml b/app/code/Magento/Cms/view/adminhtml/browser/tree.phtml
similarity index 96%
rename from app/code/Magento/Adminhtml/view/adminhtml/cms/browser/tree.phtml
rename to app/code/Magento/Cms/view/adminhtml/browser/tree.phtml
index 5daf5086360..c6cd374aa80 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/cms/browser/tree.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/browser/tree.phtml
@@ -23,7 +23,7 @@
  * @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)
  */
- /** @var \Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Tree $this */
+ /** @var \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Tree $this */
 ?>
 <div class="tree-panel" >
     <div class="categories-side-col">
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_block_edit.xml b/app/code/Magento/Cms/view/adminhtml/layout/cms_block_edit.xml
similarity index 97%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_block_edit.xml
rename to app/code/Magento/Cms/view/adminhtml/layout/cms_block_edit.xml
index e08b6735bf6..96f6417ba01 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_block_edit.xml
+++ b/app/code/Magento/Cms/view/adminhtml/layout/cms_block_edit.xml
@@ -58,6 +58,6 @@
         </block>
     </referenceBlock>
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Cms\Block\Edit" name="cms_block_edit"/>
+        <block class="Magento\Cms\Block\Adminhtml\Block\Edit" name="cms_block_edit"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_block_index.xml b/app/code/Magento/Cms/view/adminhtml/layout/cms_block_index.xml
similarity index 98%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_block_index.xml
rename to app/code/Magento/Cms/view/adminhtml/layout/cms_block_index.xml
index 265c1599966..55a837448cd 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_block_index.xml
+++ b/app/code/Magento/Cms/view/adminhtml/layout/cms_block_index.xml
@@ -25,7 +25,7 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Cms\Block" name="cms_block">
+        <block class="Magento\Cms\Block\Adminhtml\Block" name="cms_block">
             <block class="Magento\Backend\Block\Widget\Grid" name="adminhtml.cms.block.grid" as="grid">
                 <arguments>
                     <argument name="id" xsi:type="string">cmsBlockGrid</argument>
@@ -37,7 +37,7 @@
                     <arguments>
                         <argument name="id" xsi:type="string">cmsBlockGrid</argument>
                         <argument name="rowUrl" xsi:type="array">
-                            <item name="path" xsi:type="string">adminhtml/*/edit</item>
+                            <item name="path" xsi:type="string">*/*/edit</item>
                             <item name="extraParamsTemplate" xsi:type="array">
                                 <item name="block_id" xsi:type="string">getId</item>
                             </item>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_page_new.xml b/app/code/Magento/Cms/view/adminhtml/layout/cms_block_new.xml
similarity index 95%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_page_new.xml
rename to app/code/Magento/Cms/view/adminhtml/layout/cms_block_new.xml
index 77b08640833..c7b28047712 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_page_new.xml
+++ b/app/code/Magento/Cms/view/adminhtml/layout/cms_block_new.xml
@@ -24,5 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="adminhtml_cms_page_edit"/>
+    <update handle="cms_block_edit"/>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_page_edit.xml b/app/code/Magento/Cms/view/adminhtml/layout/cms_page_edit.xml
similarity index 91%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_page_edit.xml
rename to app/code/Magento/Cms/view/adminhtml/layout/cms_page_edit.xml
index 738cadfd99a..c694e9b8564 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_page_edit.xml
+++ b/app/code/Magento/Cms/view/adminhtml/layout/cms_page_edit.xml
@@ -63,14 +63,14 @@
     </referenceBlock>
     <update handle="editor"/>
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Cms\Page\Edit" name="cms_page_edit"/>
+        <block class="Magento\Cms\Block\Adminhtml\Page\Edit" name="cms_page_edit"/>
     </referenceContainer>
     <referenceContainer name="left">
-        <block class="Magento\Adminhtml\Block\Cms\Page\Edit\Tabs" name="cms_page_edit_tabs">
-            <block class="Magento\Adminhtml\Block\Cms\Page\Edit\Tab\Main" name="cms_page_edit_tab_main"/>
-            <block class="Magento\Adminhtml\Block\Cms\Page\Edit\Tab\Content" name="cms_page_edit_tab_content"/>
-            <block class="Magento\Adminhtml\Block\Cms\Page\Edit\Tab\Design" name="cms_page_edit_tab_design"/>
-            <block class="Magento\Adminhtml\Block\Cms\Page\Edit\Tab\Meta" name="cms_page_edit_tab_meta"/>
+        <block class="Magento\Cms\Block\Adminhtml\Page\Edit\Tabs" name="cms_page_edit_tabs">
+            <block class="Magento\Cms\Block\Adminhtml\Page\Edit\Tab\Main" name="cms_page_edit_tab_main"/>
+            <block class="Magento\Cms\Block\Adminhtml\Page\Edit\Tab\Content" name="cms_page_edit_tab_content"/>
+            <block class="Magento\Cms\Block\Adminhtml\Page\Edit\Tab\Design" name="cms_page_edit_tab_design"/>
+            <block class="Magento\Cms\Block\Adminhtml\Page\Edit\Tab\Meta" name="cms_page_edit_tab_meta"/>
             <action method="addTab">
                 <argument name="name" xsi:type="string">main_section</argument>
                 <argument name="block" xsi:type="string">cms_page_edit_tab_main</argument>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_page_index.xml b/app/code/Magento/Cms/view/adminhtml/layout/cms_page_index.xml
similarity index 94%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_page_index.xml
rename to app/code/Magento/Cms/view/adminhtml/layout/cms_page_index.xml
index bff9e70149c..73f201d9f7f 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_page_index.xml
+++ b/app/code/Magento/Cms/view/adminhtml/layout/cms_page_index.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Cms\Page" name="cms_page"/>
+        <block class="Magento\Cms\Block\Adminhtml\Page" name="cms_page"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_block_new.xml b/app/code/Magento/Cms/view/adminhtml/layout/cms_page_new.xml
similarity index 95%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_block_new.xml
rename to app/code/Magento/Cms/view/adminhtml/layout/cms_page_new.xml
index deb7ea38d78..c5a86664a08 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_block_new.xml
+++ b/app/code/Magento/Cms/view/adminhtml/layout/cms_page_new.xml
@@ -24,5 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="adminhtml_cms_block_edit"/>
+    <update handle="cms_page_edit"/>
 </layout>
diff --git a/app/code/Magento/PaypalUk/view/frontend/layout/paypaluk_express_review_details.xml b/app/code/Magento/Cms/view/adminhtml/layout/cms_wysiwyg_images_contents.xml
similarity index 86%
rename from app/code/Magento/PaypalUk/view/frontend/layout/paypaluk_express_review_details.xml
rename to app/code/Magento/Cms/view/adminhtml/layout/cms_wysiwyg_images_contents.xml
index 4f46c82923b..2e40d476653 100644
--- a/app/code/Magento/PaypalUk/view/frontend/layout/paypaluk_express_review_details.xml
+++ b/app/code/Magento/Cms/view/adminhtml/layout/cms_wysiwyg_images_contents.xml
@@ -24,5 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml"/>
+    <block class="Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content\Files" name="wysiwyg_images.files" template="browser/content/files.phtml" output="1"/>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_wysiwyg_images_index.xml b/app/code/Magento/Cms/view/adminhtml/layout/cms_wysiwyg_images_index.xml
similarity index 76%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_wysiwyg_images_index.xml
rename to app/code/Magento/Cms/view/adminhtml/layout/cms_wysiwyg_images_index.xml
index 5cbaf74f7ea..e5ab74c51cc 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_wysiwyg_images_index.xml
+++ b/app/code/Magento/Cms/view/adminhtml/layout/cms_wysiwyg_images_index.xml
@@ -28,9 +28,9 @@
     <remove name="head"/>
     <remove name="left"/>
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Content" name="wysiwyg_images.content" template="cms/browser/content.phtml">
-            <block class="Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Tree" name="wysiwyg_images.tree" template="cms/browser/tree.phtml"/>
-            <block class="Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Content\Uploader" name="wysiwyg_images.uploader" template="cms/browser/content/uploader.phtml"/>
+        <block class="Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content" name="wysiwyg_images.content" template="browser/content.phtml">
+            <block class="Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Tree" name="wysiwyg_images.tree" template="browser/tree.phtml"/>
+            <block class="Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content\Uploader" name="wysiwyg_images.uploader" template="Magento_Cms::browser/content/uploader.phtml"/>
         </block>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/cms/page/edit/form/renderer/content.phtml b/app/code/Magento/Cms/view/adminhtml/page/edit/form/renderer/content.phtml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/cms/page/edit/form/renderer/content.phtml
rename to app/code/Magento/Cms/view/adminhtml/page/edit/form/renderer/content.phtml
diff --git a/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/AbstractTab.php b/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/AbstractTab.php
index 4fad445d926..ba6a666aaa7 100644
--- a/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/AbstractTab.php
+++ b/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/AbstractTab.php
@@ -54,7 +54,7 @@ abstract class AbstractTab
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Connect\Model\Session $session
@@ -62,7 +62,7 @@ abstract class AbstractTab
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Connect\Model\Session $session,
diff --git a/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Contents.php b/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Contents.php
index 80e90e98ec5..642f27dd1a3 100644
--- a/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Contents.php
+++ b/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Contents.php
@@ -46,7 +46,7 @@ class Contents
     /**
      * @param \Magento\Connect\Model\ExtensionFactory $extensionFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Connect\Model\Session $session
@@ -55,7 +55,7 @@ class Contents
     public function __construct(
         \Magento\Connect\Model\ExtensionFactory $extensionFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Connect\Model\Session $session,
diff --git a/app/code/Magento/Connect/Helper/Data.php b/app/code/Magento/Connect/Helper/Data.php
index 5d323abaa7f..0f111de9692 100644
--- a/app/code/Magento/Connect/Helper/Data.php
+++ b/app/code/Magento/Connect/Helper/Data.php
@@ -23,16 +23,11 @@
  * @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\Connect\Helper;
 
 /**
  * Default helper of the module
- *
- * @category    Magento
- * @package     Magento_Connect
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Connect\Helper;
-
 class Data extends \Magento\Core\Helper\Data
 {
     /**
@@ -47,41 +42,49 @@ class Data extends \Magento\Core\Helper\Data
      */
     protected $_dirs;
 
+    /**
+     * @var \Magento\Convert\Xml
+     */
+    protected $_xmlConverter;
+
     /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Encryption $encryptor
      * @param \Magento\Filesystem $filesystem
+     * @param \Magento\Convert\Xml $xmlConverter
      * @param \Magento\App\Dir $dirs
      * @param bool $dbCompatibleMode
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\Core\Model\Date $dateModel,
         \Magento\App\State $appState,
-        \Magento\Core\Model\Encryption $encryptor,
         \Magento\Filesystem $filesystem,
+        \Magento\Convert\Xml $xmlConverter,
         \Magento\App\Dir $dirs,
         $dbCompatibleMode = true
-    )
-    {
+    ) {
         $this->_filesystem = $filesystem;
         $this->_dirs = $dirs;
-        parent::__construct($context, $eventManager, $coreHttp, $config, $coreStoreConfig, $storeManager,
-            $locale, $dateModel, $appState, $encryptor, $dbCompatibleMode
+        $this->_xmlConverter = $xmlConverter;
+        parent::__construct(
+            $context,
+            $eventManager,
+            $coreStoreConfig,
+            $storeManager,
+            $locale,
+            $dateModel,
+            $appState,
+            $dbCompatibleMode
         );
     }
 
@@ -173,27 +176,23 @@ class Data extends \Magento\Core\Helper\Data
     public function loadLocalPackage($packageName)
     {
         //check LFI protection
-        $this->checkLfiProtection($packageName);
-
+        $this->_filesystem->checkLfiProtection($packageName);
         $path = $this->getLocalPackagesPath();
         $xmlFile = $path . $packageName . '.xml';
         $serFile = $path . $packageName . '.ser';
-
         if ($this->_filesystem->isFile($xmlFile) && $this->_filesystem->isReadable($xmlFile)) {
-            $xml  = simplexml_load_string($this->_filesystem->read($xmlFile));
-            $data = $this->xmlToAssoc($xml);
+            $xml = simplexml_load_string($this->_filesystem->read($xmlFile));
+            $data = $this->_xmlConverter->xmlToAssoc($xml);
             if (!empty($data)) {
                 return $data;
             }
         }
-
         if ($this->_filesystem->isFile($serFile) && $this->_filesystem->isReadable($xmlFile)) {
             $data = unserialize($this->_filesystem->read($serFile));
             if (!empty($data)) {
                 return $data;
             }
         }
-
         return false;
     }
 }
diff --git a/app/code/Magento/Connect/Model/Extension.php b/app/code/Magento/Connect/Model/Extension.php
index 8efaaec271b..6eb6cf76e7f 100644
--- a/app/code/Magento/Connect/Model/Extension.php
+++ b/app/code/Magento/Connect/Model/Extension.php
@@ -24,15 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Connect\Model;
+
 /**
  * Extension model
- *
- * @category    Magento
- * @package     Magento_Connect
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Connect\Model;
-
 class Extension extends \Magento\Object
 {
     /**
@@ -59,14 +55,12 @@ class Extension extends \Magento\Object
      *
      * @var \Magento\Connect\Helper\Data
      */
-    protected $_connectData = null;
+    protected $_connectData;
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Convert\ConvertArray
      */
-    protected $_coreData = null;
+    protected $_convertArray;
 
     /**
      * Session
@@ -76,20 +70,20 @@ class Extension extends \Magento\Object
     protected $_session;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Convert\ConvertArray $convertArray
      * @param \Magento\Connect\Helper\Data $connectData
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Connect\Model\Session $session
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Convert\ConvertArray $convertArray,
         \Magento\Connect\Helper\Data $connectData,
         \Magento\Filesystem $filesystem,
         \Magento\Connect\Model\Session $session,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
+        $this->_convertArray = $convertArray;
         $this->_connectData = $connectData;
         $this->_session = $session;
         parent::__construct($data);
@@ -110,14 +104,14 @@ class Extension extends \Magento\Object
     }
 
     /**
-     * Set package object.
+     * Set package object
      *
      * @return \Magento\Connect\Model\Extension
+     * @throws \Magento\Core\Exception
      */
     public function generatePackageXml()
     {
-        $this->_session
-            ->setLocalExtensionPackageFormData($this->getData());
+        $this->_session->setLocalExtensionPackageFormData($this->getData());
 
         $this->_setPackage()
             ->_setRelease()
@@ -180,6 +174,10 @@ class Extension extends \Magento\Object
         return $this;
     }
 
+    /**
+     * @param string $filesString
+     * @return array
+     */
     protected function packageFilesToArray($filesString)
     {
         $packageFiles = array();
@@ -190,7 +188,7 @@ class Extension extends \Magento\Object
                 $res = explode(DIRECTORY_SEPARATOR, $file, 2);
                 array_map('trim', $res);
                 if (2 == count($res)) {
-                    $packageFiles[] = array('target'=>$res[0], 'path'=>$res[1]);
+                    $packageFiles[] = array('target' => $res[0], 'path' => $res[1]);
                 }
             }
         }
@@ -208,31 +206,32 @@ class Extension extends \Magento\Object
             ->clearDependencies()
             ->setDependencyPhpVersion($this->getData('depends_php_min'), $this->getData('depends_php_max'));
 
-        foreach ($this->getData('depends') as $deptype=>$deps) {
-            foreach ($deps['name'] as $i=>$type) {
-                if (0===$i) {
+        foreach ($this->getData('depends') as $depType => $deps) {
+            foreach (array_keys($deps['name']) as $key) {
+                if (0 === $key) {
                     continue;
                 }
-                $name = $deps['name'][$i];
-                $min = !empty($deps['min'][$i]) ? $deps['min'][$i] : false;
-                $max = !empty($deps['max'][$i]) ? $deps['max'][$i] : false;
+                $name = $deps['name'][$key];
+                $min = !empty($deps['min'][$key]) ? $deps['min'][$key] : false;
+                $max = !empty($deps['max'][$key]) ? $deps['max'][$key] : false;
 
-                $files = !empty($deps['files'][$i]) ? $deps['files'][$i] : false;
+                $files = !empty($deps['files'][$key]) ? $deps['files'][$key] : false;
                 $packageFiles = $this->packageFilesToArray($files);
 
-                if ($deptype !== 'extension') {
-                    $channel = !empty($deps['channel'][$i])
-                        ? $deps['channel'][$i]
+                if ($depType !== 'extension') {
+                    $channel = !empty($deps['channel'][$key])
+                        ? $deps['channel'][$key]
                         : 'connect.magentocommerce.com/core';
                 }
-                switch ($deptype) {
+                switch ($depType) {
                     case 'package':
                         $this->getPackage()->addDependencyPackage($name, $channel, $min, $max, $packageFiles);
                         break;
-
                     case 'extension':
                         $this->getPackage()->addDependencyExtension($name, $min, $max);
                         break;
+                    default:
+                        break;
                 }
             }
         }
@@ -248,15 +247,14 @@ class Extension extends \Magento\Object
     {
         $this->getPackage()->clearContents();
         $contents = $this->getData('contents');
-        foreach ($contents['target'] as $i=>$target) {
-            if (0===$i) {
+        foreach ($contents['target'] as $i => $target) {
+            if (0 === $i) {
                 continue;
             }
             switch ($contents['type'][$i]) {
                 case 'file':
                     $this->getPackage()->addContent($contents['path'][$i], $contents['target'][$i]);
                     break;
-
                 case 'dir':
                     $target = $contents['target'][$i];
                     $path = $contents['path'][$i];
@@ -264,6 +262,8 @@ class Extension extends \Magento\Object
                     $ignore = $contents['ignore'][$i];
                     $this->getPackage()->addContentDir($target, $path, $ignore, $include);
                     break;
+                default:
+                    break;
             }
         }
         return $this;
@@ -301,7 +301,7 @@ class Extension extends \Magento\Object
 
             $this->unsPackageXml();
             $this->unsTargets();
-            $xml = $this->_coreData->assocToXml($this->getData());
+            $xml = $this->_convertArray->assocToXml($this->getData());
             $xml = new \Magento\Simplexml\Element($xml->asXML());
 
             // prepare dir to save
diff --git a/app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php b/app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php
new file mode 100644
index 00000000000..378994adff2
--- /dev/null
+++ b/app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php
@@ -0,0 +1,75 @@
+<?php
+/**
+ * Dispatch exception handler
+ *
+ * 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\App\FrontController\Plugin;
+
+use Magento\Core\Model\StoreManager,
+    Magento\App\Dir;
+
+class DispatchExceptionHandler
+{
+    /**
+     * @var \Magento\Core\Model\StoreManager
+     */
+    protected $_storeManager;
+
+
+    /**
+     * @var \Magento\App\Dir
+     */
+    protected $_dir;
+
+    /**
+     * @param StoreManager $storeManager
+     * @param Dir $dir
+     */
+    public function __construct(
+        StoreManager $storeManager,
+        Dir $dir
+    ) {
+        $this->_storeManager = $storeManager;
+        $this->_dir = $dir;
+    }
+
+    /**
+     * Handle dispatch exceptions
+     *
+     * @param array $arguments
+     * @param \Magento\Code\Plugin\InvocationChain $invocationChain
+     * @return mixed
+     */
+    public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain)
+    {
+        try {
+            return $invocationChain->proceed($arguments);
+        } catch (\Magento\Core\Model\Session\Exception $e) {
+            header('Location: ' . $this->_storeManager->getStore()->getBaseUrl());
+            exit;
+        } catch (\Magento\Core\Model\Store\Exception $e) {
+            require $this->_dir->getDir(Dir::PUB) . DS . 'errors' . DS . '404.php';
+            exit;
+        }
+    }
+}
diff --git a/app/code/Magento/Core/App/FrontController/Plugin/RequestPreprocessor.php b/app/code/Magento/Core/App/FrontController/Plugin/RequestPreprocessor.php
index 358c748aece..8ea7e827e02 100644
--- a/app/code/Magento/Core/App/FrontController/Plugin/RequestPreprocessor.php
+++ b/app/code/Magento/Core/App/FrontController/Plugin/RequestPreprocessor.php
@@ -25,11 +25,6 @@ namespace Magento\Core\App\FrontController\Plugin;
 
 class RequestPreprocessor
 {
-    /**
-     * @var \Magento\Core\App\Request\RewriteService RewriteService
-     */
-    protected $_rewriteService;
-
     /**
      * @var \Magento\Core\Model\Store\Config
      */
@@ -56,30 +51,19 @@ class RequestPreprocessor
     protected $_storeManager;
 
     /**
-     * @var \Magento\Backend\Helper\Data
-     */
-    protected $_backendData;
-
-    /**
-     * @param \Magento\Core\App\Request\RewriteService $rewriteService
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\App\State $appState
      * @param \Magento\Core\Model\Url $url
-     * @param \Magento\Backend\Helper\Data $backendData
      * @param \Magento\Core\Model\Store\Config $storeConfig
      * @param \Magento\App\ResponseFactory $responseFactory
      */
     public function __construct(
-        \Magento\Core\App\Request\RewriteService $rewriteService,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\App\State $appState,
         \Magento\Core\Model\Url $url,
-        \Magento\Backend\Helper\Data $backendData,
         \Magento\Core\Model\Store\Config $storeConfig,
         \Magento\App\ResponseFactory $responseFactory
     ) {
-        $this->_backendData = $backendData;
-        $this->_rewriteService = $rewriteService;
         $this->_storeManager = $storeManager;
         $this->_appState = $appState;
         $this->_url = $url;
@@ -88,7 +72,8 @@ class RequestPreprocessor
     }
 
     /**
-     * Preprocess request
+     * Auto-redirect to base url (without SID) if the requested url doesn't match it.
+     * By default this feature is enabled in configuration.
      *
      * @param array $arguments
      * @param \Magento\Code\Plugin\InvocationChain $invocationChain
@@ -97,88 +82,54 @@ class RequestPreprocessor
     public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain)
     {
         $request = $arguments[0];
-        // If pre-configured, check equality of base URL and requested URL
-        $this->_checkBaseUrl($request);
+        if ($this->_appState->isInstalled() && !$request->isPost() && $this->_isBaseUrlCheckEnabled()) {
+            $baseUrl = $this->_storeManager->getStore()->getBaseUrl(
+                \Magento\Core\Model\Store::URL_TYPE_WEB,
+                $this->_storeManager->getStore()->isCurrentlySecure()
+            );
+            if ($baseUrl) {
+                $uri = parse_url($baseUrl);
+                if (!$this->_isBaseUrlCorrect($uri, $request)) {
+                    $redirectUrl = $this->_url->getRedirectUrl(
+                        $this->_url->getUrl(ltrim($request->getPathInfo(), '/'), array('_nosid' => true))
+                    );
+                    $redirectCode = (int)$this->_storeConfig->getConfig('web/url/redirect_to_base') !== 301
+                        ? 302
+                        : 301;
+
+                    $response = $this->_responseFactory->create();
+                    $response->setRedirect($redirectUrl, $redirectCode);
+                    return $response;
+                }
+            }
+        }
         $request->setDispatched(false);
-        $this->_rewriteService->applyRewrites($request);
 
         return $invocationChain->proceed($arguments);
     }
 
     /**
-     * Check if requested path starts with one of the admin front names
+     * Is base url check enabled
      *
-     * @param \Magento\App\RequestInterface $request
-     * @return boolean
+     * @return bool
      */
-    protected function _isAdminFrontNameMatched($request)
+    protected function _isBaseUrlCheckEnabled()
     {
-        $pathPrefix = $this->_extractPathPrefixFromUrl($request);
-        return $pathPrefix == $this->_backendData->getAreaFrontName();
+        return (bool) $this->_storeConfig->getConfig('web/url/redirect_to_base');
     }
 
     /**
-     * Extract first path part from url (in most cases this is area code)
+     * Check if base url enabled
      *
-     * @param \Magento\App\RequestInterface $request
-     * @return string
+     * @param array $uri
+     * @param \Magento\App\Request\Http $request
+     * @return bool
      */
-    protected function _extractPathPrefixFromUrl($request)
+    protected function _isBaseUrlCorrect($uri, $request)
     {
-        $pathPrefix = ltrim($request->getPathInfo(), '/');
-        $urlDelimiterPos = strpos($pathPrefix, '/');
-        if ($urlDelimiterPos) {
-            $pathPrefix = substr($pathPrefix, 0, $urlDelimiterPos);
-        }
-
-        return $pathPrefix;
-    }
-
-    /**
-     * Auto-redirect to base url (without SID) if the requested url doesn't match it.
-     * By default this feature is enabled in configuration.
-     *
-     * @param \Magento\App\RequestInterface $request
-     */
-    protected function _checkBaseUrl($request)
-    {
-        if (!$this->_appState->isInstalled() || $request->getPost() || strtolower($request->getMethod()) == 'post') {
-            return;
-        }
-
-        $redirectCode = (int)$this->_storeConfig->getConfig('web/url/redirect_to_base');
-        if (!$redirectCode) {
-            return;
-        } elseif ($redirectCode != 301) {
-            $redirectCode = 302;
-        }
-
-        if ($this->_isAdminFrontNameMatched($request)) {
-            return;
-        }
-
-        $baseUrl = $this->_storeManager->getStore()->getBaseUrl(
-            \Magento\Core\Model\Store::URL_TYPE_WEB,
-            $this->_storeManager->getStore()->isCurrentlySecure()
-        );
-        if (!$baseUrl) {
-            return;
-        }
-
-        $uri = parse_url($baseUrl);
         $requestUri = $request->getRequestUri() ? $request->getRequestUri() : '/';
-        if (isset($uri['scheme']) && $uri['scheme'] != $request->getScheme()
-            || isset($uri['host']) && $uri['host'] != $request->getHttpHost()
-            || isset($uri['path']) && strpos($requestUri, $uri['path']) === false
-        ) {
-            $redirectUrl = $this->_url->getRedirectUrl(
-                $this->_url->getUrl(ltrim($request->getPathInfo(), '/'), array('_nosid' => true))
-            );
-
-            $response = $this->_responseFactory->create();
-            $response->setRedirect($redirectUrl, $redirectCode);
-            $response->sendResponse();
-            exit;
-        }
+        return (!isset($uri['scheme']) || $uri['scheme'] === $request->getScheme())
+            && (!isset($uri['host']) || $uri['host'] === $request->getHttpHost())
+            && (!isset($uri['path']) || strpos($requestUri, $uri['path']) !== false);
     }
-}
\ No newline at end of file
+}
diff --git a/app/code/Magento/Core/App/FrontController/Plugin/UrlRewrite.php b/app/code/Magento/Core/App/FrontController/Plugin/UrlRewrite.php
new file mode 100644
index 00000000000..1bc71d37439
--- /dev/null
+++ b/app/code/Magento/Core/App/FrontController/Plugin/UrlRewrite.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Url Rewrite front controller plugin. Performs url rewrites
+ *
+ * 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\App\FrontController\Plugin;
+
+class UrlRewrite
+{
+    /**
+     * @var \Magento\Core\App\Request\RewriteService RewriteService
+     */
+    protected $_rewriteService;
+
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_state;
+
+    /**
+     * @param \Magento\Core\App\Request\RewriteService $rewriteService
+     * @param \Magento\App\State $state
+     */
+    public function __construct(\Magento\Core\App\Request\RewriteService $rewriteService, \Magento\App\State $state)
+    {
+        $this->_rewriteService = $rewriteService;
+        $this->_state = $state;
+    }
+
+    /**
+     * Perform url rewites
+     *
+     * @param array $arguments
+     * @param \Magento\Code\Plugin\InvocationChain $invocationChain
+     * @return mixed
+     */
+    public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain)
+    {
+        if (!$this->_state->isInstalled()) {
+            return $invocationChain->proceed($arguments);
+        }
+        $request = $arguments[0];
+        $this->_rewriteService->applyRewrites($request);
+        return $invocationChain->proceed($arguments);
+    }
+}
\ No newline at end of file
diff --git a/app/code/Magento/Core/Model/EntryPoint/Media.php b/app/code/Magento/Core/App/Media.php
similarity index 77%
rename from app/code/Magento/Core/Model/EntryPoint/Media.php
rename to app/code/Magento/Core/App/Media.php
index 740b4cce7e2..08743890f8a 100644
--- a/app/code/Magento/Core/Model/EntryPoint/Media.php
+++ b/app/code/Magento/Core/App/Media.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Media downloader entry point
+ * Media application
  *
  * Magento
  *
@@ -23,10 +23,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\Core\Model\EntryPoint;
+namespace Magento\Core\App;
 
-class Media extends \Magento\Core\Model\AbstractEntryPoint
+use Magento\App\State,
+    Magento\AppInterface,
+    Magento\ObjectManager,
+    Magento\Core\Model\File\Storage\Request,
+    Magento\Core\Model\File\Storage\Response;
+
+class Media implements AppInterface
 {
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_applicationState;
+
+    /**
+     * @var \Magento\ObjectManager
+     */
+    protected $_objectManager;
+
     /**
      * @var \Magento\Core\Model\File\Storage\Request
      */
@@ -73,47 +89,49 @@ class Media extends \Magento\Core\Model\AbstractEntryPoint
     protected $_response;
 
     /**
-     * @param \Magento\Core\Model\Config\Primary $config
-     * @param \Magento\Core\Model\File\Storage\Request $request
+     * @param State $applicationState
+     * @param ObjectManager $objectManager
+     * @param Request $request
+     * @param Response $response
      * @param callable $isAllowed
      * @param string $workingDirectory
      * @param string $mediaDirectory
      * @param string $configCacheFile
      * @param string $relativeFileName
-     * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Core\Model\File\Storage\Response
      */
     public function __construct(
-        \Magento\Core\Model\Config\Primary $config,
-        \Magento\Core\Model\File\Storage\Request $request,
+        State $applicationState,
+        ObjectManager $objectManager,
+        Request $request,
+        Response $response,
         \Closure $isAllowed,
         $workingDirectory,
         $mediaDirectory,
         $configCacheFile,
-        $relativeFileName,
-        \Magento\ObjectManager $objectManager = null,
-        \Magento\Core\Model\File\Storage\Response $response = null
+        $relativeFileName
     ) {
-        parent::__construct($config, $objectManager);
+        $this->_applicationState = $applicationState;
+        $this->_objectManager = $objectManager;
         $this->_request = $request;
+        $this->_response = $response;
         $this->_isAllowed = $isAllowed;
         $this->_workingDirectory = $workingDirectory;
         $this->_mediaDirectory = $mediaDirectory;
         $this->_configCacheFile = $configCacheFile;
         $this->_relativeFileName = $relativeFileName;
-        $this->_response = $response ?: new \Magento\Core\Model\File\Storage\Response($this->_objectManager);
     }
 
     /**
-     * Process request to application
+     * Execute application
+     *
+     * @return int
      */
-    protected function _processRequest()
+    public function execute()
     {
         try {
-            $appState = $this->_objectManager->get('Magento\App\State');
-            if (!$appState->isInstalled()) {
+            if (!$this->_applicationState->isInstalled()) {
                 $this->_response->sendNotFound();
-                return;
+                return -1;
             }
             if (!$this->_mediaDirectory) {
                 $config = $this->_objectManager->create(
@@ -128,13 +146,13 @@ class Media extends \Magento\Core\Model\AbstractEntryPoint
                 $isAllowed = $this->_isAllowed;
                 if (!$isAllowed($this->_relativeFileName, $allowedResources)) {
                     $this->_response->sendNotFound();
-                    return;
+                    return -1;
                 }
             }
 
             if (0 !== stripos($this->_request->getPathInfo(), $this->_mediaDirectory . '/')) {
                 $this->_response->sendNotFound();
-                return;
+                return -1;
             }
 
             $sync = $this->_objectManager->get('Magento\Core\Model\File\Storage\Synchronization');
@@ -142,12 +160,14 @@ class Media extends \Magento\Core\Model\AbstractEntryPoint
 
             if (is_readable($this->_request->getFilePath())) {
                 $this->_response->sendFile($this->_request->getFilePath());
+                return 0;
             } else {
                 $this->_response->sendNotFound();
+                return -1;
             }
         } catch (\Magento\Core\Model\Store\Exception $e) {
             $this->_response->sendNotFound();
-            return;
+            return -1;
         }
     }
 }
diff --git a/app/code/Magento/Core/App/Router/Base.php b/app/code/Magento/Core/App/Router/Base.php
new file mode 100644
index 00000000000..742c4168bdb
--- /dev/null
+++ b/app/code/Magento/Core/App/Router/Base.php
@@ -0,0 +1,436 @@
+<?php
+/**
+ * Base router
+ *
+ * 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\App\Router;
+
+class Base extends \Magento\App\Router\AbstractRouter
+{
+    /**
+     * @var array
+     */
+    protected $_modules = array();
+
+    /**
+     * @var array
+     */
+    protected $_dispatchData = array();
+
+    /**
+     * List of required request parameters
+     * Order sensitive
+     * @var array
+     */
+    protected $_requiredParams = array(
+        'moduleFrontName',
+        'controllerName',
+        'actionName',
+    );
+
+    /**
+     * @var \Magento\App\Route\ConfigInterface
+     */
+    protected $_routeConfig;
+
+    /**
+     * Url security information.
+     *
+     * @var \Magento\Core\Model\Url\SecurityInfoInterface
+     */
+    protected $_urlSecurityInfo;
+
+    /**
+     * Core store config
+     *
+     * @var \Magento\Core\Model\Store\Config
+     */
+    protected $_storeConfig;
+
+    /**
+     * Core config
+     *
+     * @var \Magento\Core\Model\Config
+     */
+    protected $_config = null;
+
+    /**
+     * @var \Magento\UrlInterface
+     */
+    protected $_url;
+
+    /**
+     * @var \Magento\Core\Model\StoreManager
+     */
+    protected $_storeManager;
+
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
+    /**
+     * @var \Magento\App\ResponseFactory
+     */
+    protected $_responseFactory;
+
+    /**
+     * @var \Magento\App\DefaultPathInterface
+     */
+    protected $_defaultPath;
+
+    /**
+     * @param \Magento\App\ActionFactory $actionFactory
+     * @param \Magento\App\DefaultPathInterface $defaultPath
+     * @param \Magento\App\ResponseFactory $responseFactory
+     * @param \Magento\App\Route\ConfigInterface $routeConfig
+     * @param \Magento\App\State $appState
+     * @param \Magento\Core\Model\Url|\Magento\UrlInterface $url
+     * @param \Magento\Core\Model\StoreManager|\Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Core\Model\Store\Config $storeConfig
+     * @param \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo
+     * @param $routerId
+     * @throws \InvalidArgumentException
+     */
+    public function __construct(
+        \Magento\App\ActionFactory $actionFactory,
+        \Magento\App\DefaultPathInterface $defaultPath,
+        \Magento\App\ResponseFactory $responseFactory,
+        \Magento\App\Route\ConfigInterface $routeConfig,
+        \Magento\App\State $appState,
+        \Magento\UrlInterface $url,
+        \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Core\Model\Store\Config $storeConfig,
+        \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo,
+        $routerId
+    ) {
+        parent::__construct($actionFactory);
+
+        $this->_responseFactory = $responseFactory;
+        $this->_defaultPath     = $defaultPath;
+        $this->_routeConfig     = $routeConfig;
+        $this->_urlSecurityInfo = $urlSecurityInfo;
+        $this->_storeConfig     = $storeConfig;
+        $this->_url             = $url;
+        $this->_storeManager    = $storeManager;
+        $this->_appState        = $appState;
+    }
+
+    /**
+     * Match provided request and if matched - return corresponding controller
+     *
+     * @param \Magento\App\RequestInterface $request
+     * @return \Magento\Core\Controller\Front\Action|null
+     */
+    public function match(\Magento\App\RequestInterface $request)
+    {
+        $params = $this->_parseRequest($request);
+
+        return $this->_matchController($request, $params);
+    }
+
+    /**
+     * Parse request URL params
+     *
+     * @param \Magento\App\RequestInterface $request
+     * @return array
+     */
+    protected function _parseRequest(\Magento\App\RequestInterface $request)
+    {
+        $output = array();
+
+        $path = trim($request->getPathInfo(), '/');
+
+        $params = explode('/', ($path ? $path : $this->_getDefaultPath()));
+        foreach ($this->_requiredParams as $paramName) {
+            $output[$paramName] = array_shift($params);
+        }
+
+        for ($i = 0, $l = sizeof($params); $i < $l; $i += 2) {
+            $output['variables'][$params[$i]] = isset($params[$i+1]) ? urldecode($params[$i + 1]) : '';
+        }
+        return $output;
+    }
+
+    /**
+     * Match module front name
+     *
+     * @param \Magento\App\RequestInterface $request
+     * @param string $param
+     * @return string|null
+     */
+    protected function _matchModuleFrontName(\Magento\App\RequestInterface $request, $param)
+    {
+        // get module name
+        if ($request->getModuleName()) {
+            $moduleFrontName = $request->getModuleName();
+        } else if (!empty($param)) {
+            $moduleFrontName = $param;
+        } else {
+            $moduleFrontName = $this->_defaultPath->getPart('module');
+            $request->setAlias(\Magento\Core\Model\Url\Rewrite::REWRITE_REQUEST_PATH_ALIAS, '');
+        }
+        if (!$moduleFrontName) {
+            return null;
+        }
+        return $moduleFrontName;
+    }
+
+    /**
+     * Match controller name
+     *
+     * @param \Magento\App\RequestInterface $request
+     * @param string $param
+     * @return string
+     */
+    protected function _matchControllerName(\Magento\App\RequestInterface $request,  $param)
+    {
+        if ($request->getControllerName()) {
+            $controller = $request->getControllerName();
+        } else if (!empty($param)) {
+            $controller = $param;
+        } else {
+            $controller = $this->_defaultPath->getPart('controller');
+            $request->setAlias(
+                \Magento\Core\Model\Url\Rewrite::REWRITE_REQUEST_PATH_ALIAS,
+                ltrim($request->getOriginalPathInfo(), '/')
+            );
+        }
+        return $controller;
+    }
+
+    /**
+     * Match controller name
+     *
+     * @param \Magento\App\RequestInterface $request
+     * @param string $param
+     * @return string
+     */
+    protected function _matchActionName(\Magento\App\RequestInterface $request, $param)
+    {
+        if ($request->getActionName()) {
+            $action = $request->getActionName();
+        } else if (empty($param)) {
+            $action = $this->_defaultPath->getPart('action');
+        } else {
+            $action = $param;
+        }
+
+        return $action;
+    }
+
+    /**
+     * Get not found controller instance
+     *
+     * @param $currentModuleName
+     * @param \Magento\App\RequestInterface $request
+     * @return \Magento\Core\Controller\Varien\Action|null
+     */
+    protected function _getNotFoundControllerInstance($currentModuleName, \Magento\App\RequestInterface $request)
+    {
+        if (!$this->_noRouteShouldBeApplied()) {
+            return null;
+        }
+
+        $controllerClassName = $this->getControllerClassName($currentModuleName, 'index');
+        if (!$controllerClassName || !method_exists($controllerClassName, 'norouteAction')) {
+            return null;
+        }
+
+        // instantiate controller class
+        return $this->_actionFactory->createController($controllerClassName,
+            array('request' => $request)
+        );
+    }
+
+    /**
+     * Create matched controller instance
+     *
+     * @param \Magento\App\RequestInterface $request
+     * @param array $params
+     * @return \Magento\Core\Controller\Front\Action|null
+     */
+    protected function _matchController(\Magento\App\RequestInterface $request, array $params)
+    {
+        $moduleFrontName = $this->_matchModuleFrontName($request, $params['moduleFrontName']);
+        if (empty($moduleFrontName)) {
+            return null;
+        }
+
+        /**
+         * Searching router args by module name from route using it as key
+         */
+        $modules = $this->_routeConfig->getModulesByFrontName($moduleFrontName);
+
+        if (empty($modules) === true) {
+            return null;
+        }
+
+        /**
+         * Going through modules to find appropriate controller
+         */
+        $currentModuleName = null;
+        $controller = null;
+        $action = null;
+        $controllerInstance = null;
+
+        $request->setRouteName($this->_routeConfig->getRouteByFrontName($moduleFrontName));
+        $controller = $this->_matchControllerName($request, $params['controllerName']);
+        $action = $this->_matchActionName($request, $params['actionName']);
+        $this->_checkShouldBeSecure($request, '/' . $moduleFrontName . '/' . $controller . '/' . $action);
+
+        foreach ($modules as $moduleName) {
+            $currentModuleName = $moduleName;
+
+            $controllerClassName = $this->getControllerClassName($moduleName, $controller);
+            if (!$controllerClassName || false === method_exists($controllerClassName, $action . 'Action')) {
+                continue;
+            }
+
+            $controllerInstance = $this->_actionFactory->createController($controllerClassName,
+                array('request' => $request)
+            );
+            break;
+        }
+
+        if (null == $controllerInstance) {
+            $controllerInstance = $this->_getNotFoundControllerInstance($currentModuleName, $request);
+            if (is_null($controllerInstance)) {
+                return null;
+            }
+        }
+
+        // set values only after all the checks are done
+        $request->setModuleName($moduleFrontName);
+        $request->setControllerName($controller);
+        $request->setActionName($action);
+        $request->setControllerModule($currentModuleName);
+        if (isset($params['variables'])) {
+            $request->setParams($params['variables']);
+        }
+        return $controllerInstance;
+    }
+
+    /**
+     * Get router default request path
+     * @return string
+     */
+    protected function _getDefaultPath()
+    {
+        return $this->_storeConfig->getConfig('web/default/front');
+    }
+
+    /**
+     * Allow to control if we need to enable no route functionality in current router
+     *
+     * @return bool
+     */
+    protected function _noRouteShouldBeApplied()
+    {
+        return false;
+    }
+
+    /**
+     * Build controller class name
+     *
+     * @param string $realModule
+     * @param string $controller
+     * @return string
+     */
+    public function getControllerClassName($realModule, $controller)
+    {
+        return \Magento\Core\Helper\String::buildClassName(array(
+            $realModule,
+            'Controller',
+            $controller
+        ));
+    }
+
+    /**
+     * Check that request uses https protocol if it should.
+     * Function redirects user to correct URL if needed.
+     *
+     * @param \Magento\App\RequestInterface $request
+     * @param string $path
+     * @return void
+     */
+    protected function _checkShouldBeSecure(\Magento\App\RequestInterface $request, $path = '')
+    {
+        if (!$this->_appState->isInstalled() || $request->getPost()) {
+            return;
+        }
+
+        if ($this->_shouldBeSecure($path) && !$request->isSecure()) {
+            $url = $this->_getCurrentSecureUrl($request);
+            if ($this->_shouldRedirectToSecure()) {
+                $url = $this->_url->getRedirectUrl($url);
+            }
+
+            $this->_responseFactory->create()
+                ->setRedirect($url)
+                ->sendResponse();
+            exit;
+        }
+    }
+
+    /**
+     * Check whether redirect url should be used for secure routes
+     *
+     * @return bool
+     */
+    protected function _shouldRedirectToSecure()
+    {
+        return $this->_url->getUseSession();
+    }
+
+    /**
+     * Retrieve secure url for current request
+     *
+     * @param \Magento\App\RequestInterface $request
+     * @return string
+     */
+    protected function _getCurrentSecureUrl($request)
+    {
+        $alias = $request->getAlias(\Magento\Core\Model\Url\Rewrite::REWRITE_REQUEST_PATH_ALIAS);
+        if ($alias) {
+            return $this->_storeManager->getStore()->getBaseUrl('link', true) . ltrim($alias, '/');
+        }
+
+        return $this->_storeManager->getStore()->getBaseUrl('link', true) . ltrim($request->getPathInfo(), '/');
+    }
+
+    /**
+     * Check whether given path should be secure according to configuration security requirements for URL
+     * "Secure" should not be confused with https protocol, it is about web/secure/*_url settings usage only
+     *
+     * @param string $path
+     * @return bool
+     */
+    protected function _shouldBeSecure($path)
+    {
+        return substr($this->_storeConfig->getConfig('web/unsecure/base_url'), 0, 5) === 'https'
+            || $this->_storeConfig->getConfigFlag('web/secure/use_in_frontend')
+                && substr($this->_storeConfig->getConfig('web/secure/base_url'), 0, 5) == 'https'
+                && $this->_urlSecurityInfo->isSecure($path);
+    }
+}
diff --git a/app/code/Magento/Core/App/Router/NoRouteHandler.php b/app/code/Magento/Core/App/Router/NoRouteHandler.php
index f5dd26fdbd6..ac90babbf1a 100644
--- a/app/code/Magento/Core/App/Router/NoRouteHandler.php
+++ b/app/code/Magento/Core/App/Router/NoRouteHandler.php
@@ -26,7 +26,7 @@
 
 namespace Magento\Core\App\Router;
 
-class NoRouteHandler implements \Magento\Appl\Router\NoRouteHandlerInterface
+class NoRouteHandler implements \Magento\App\Router\NoRouteHandlerInterface
 {
     /**
      * @var \Magento\Core\Model\Config
diff --git a/app/code/Magento/Core/Block/AbstractBlock.php b/app/code/Magento/Core/Block/AbstractBlock.php
index 0c49aefc14b..bd9d74ed8fa 100644
--- a/app/code/Magento/Core/Block/AbstractBlock.php
+++ b/app/code/Magento/Core/Block/AbstractBlock.php
@@ -24,6 +24,9 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Block;
+
+use Magento\View\Element\BlockInterface;
 
 /**
  * Base Content Block class
@@ -31,15 +34,6 @@
  * For block generation you must define Data source class, data source class method,
  * parameters array and block template
  *
- * @category   Magento
- * @package    Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Core\Block;
-
-use Magento\View\Element\BlockInterface;
-
-/**
  * @SuppressWarnings(PHPMD.ExcessivePublicCount)
  * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -149,14 +143,24 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface
     protected $_cacheState;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
      * @var \Magento\Core\Model\App
      */
-    protected $_storeManager;
+    protected $_app;
+
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
+    /**
+     * @var \Magento\Filter\FilterManager
+     */
+    protected $filterManager;
 
     /**
      * @param \Magento\Core\Block\Context $context
@@ -179,7 +183,9 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface
         $this->_viewConfig      = $context->getViewConfig();
         $this->_cacheState      = $context->getCacheState();
         $this->_logger          = $context->getLogger();
-        $this->_storeManager    = $context->getApp();
+        $this->_app    = $context->getApp();
+        $this->_escaper         = $context->getEscaper();
+        $this->filterManager    = $context->getFilterManager();
         parent::__construct($data);
         $this->_construct();
     }
@@ -862,7 +868,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface
      */
     public function escapeHtml($data, $allowedTags = null)
     {
-        return $this->helper('Magento\Core\Helper\Data')->escapeHtml($data, $allowedTags);
+        return $this->_escaper->escapeHtml($data, $allowedTags);
     }
 
     /**
@@ -875,7 +881,10 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface
      */
     public function stripTags($data, $allowableTags = null, $allowHtmlEntities = false)
     {
-        return $this->helper('Magento\Core\Helper\Data')->stripTags($data, $allowableTags, $allowHtmlEntities);
+        return $this->filterManager->stripTags($data, array(
+            'allowableTags' => $allowableTags,
+            'escape'        => $allowHtmlEntities
+        ));
     }
 
     /**
@@ -886,7 +895,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface
      */
     public function escapeUrl($data)
     {
-        return $this->helper('Magento\Core\Helper\Data')->escapeUrl($data);
+        return $this->_escaper->escapeUrl($data);
     }
 
     /**
@@ -897,9 +906,9 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface
      * @param  bool $addSlashes
      * @return string
      */
-    public function quoteEscape($data, $addSlashes = false)
+    public function escapeQuote($data, $addSlashes = false)
     {
-        return $this->helper('Magento\Core\Helper\Data')->quoteEscape($data, $addSlashes);
+        return $this->_escaper->escapeQuote($data, $addSlashes);
     }
 
     /**
@@ -909,9 +918,9 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface
      * @param string $quote
      * @return mixed
      */
-    public function jsQuoteEscape($data, $quote = '\'')
+    public function escapeJsQuote($data, $quote = '\'')
     {
-        return $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape($data, $quote);
+        return $this->_escaper->escapeJsQuote($data, $quote);
     }
 
     /**
diff --git a/app/code/Magento/Core/Block/Context.php b/app/code/Magento/Core/Block/Context.php
index 693d2c7e56f..5302aff7c4a 100644
--- a/app/code/Magento/Core/Block/Context.php
+++ b/app/code/Magento/Core/Block/Context.php
@@ -54,7 +54,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_translator;
 
     /**
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cache;
 
@@ -101,7 +101,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_cacheState;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -110,13 +110,23 @@ class Context implements \Magento\ObjectManager\ContextInterface
      */
     protected $_app;
 
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
+    /**
+     * @var \Magento\Filter\FilterManager
+     */
+    protected $_filterManager;
+
     /**
      * @param \Magento\App\RequestInterface $request
      * @param \Magento\View\LayoutInterface $layout
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\UrlInterface $urlBuilder
      * @param \Magento\Core\Model\Translate $translator
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\View\DesignInterface $design
      * @param \Magento\Core\Model\Session\AbstractSession $session
      * @param \Magento\Core\Model\Store\Config $storeConfig
@@ -125,8 +135,10 @@ class Context implements \Magento\ObjectManager\ContextInterface
      * @param \Magento\Core\Model\View\Url $viewUrl
      * @param \Magento\View\ConfigInterface $viewConfig
      * @param \Magento\Core\Model\Cache\StateInterface $cacheState
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\App $app
+     * @param \Magento\Escaper $escaper
+     * @param \Magento\Filter\FilterManager $filterManager
      * @param array $data
      */
     public function __construct(
@@ -135,7 +147,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\UrlInterface $urlBuilder,
         \Magento\Core\Model\Translate $translator,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\View\DesignInterface $design,
         \Magento\Core\Model\Session\AbstractSession $session,
         \Magento\Core\Model\Store\Config $storeConfig,
@@ -144,8 +156,10 @@ class Context implements \Magento\ObjectManager\ContextInterface
         \Magento\Core\Model\View\Url $viewUrl,
         \Magento\View\ConfigInterface $viewConfig,
         \Magento\Core\Model\Cache\StateInterface $cacheState,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\App $app,
+        \Magento\Escaper $escaper,
+        \Magento\Filter\FilterManager $filterManager,
         array $data = array()
     ) {
         $this->_request         = $request;
@@ -164,10 +178,12 @@ class Context implements \Magento\ObjectManager\ContextInterface
         $this->_cacheState      = $cacheState;
         $this->_logger          = $logger;
         $this->_app             = $app;
+        $this->_escaper         = $escaper;
+        $this->_filterManager   = $filterManager;
     }
 
     /**
-     * @return \Magento\Core\Model\CacheInterface
+     * @return \Magento\App\CacheInterface
      */
     public function getCache()
     {
@@ -279,7 +295,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Core\Model\Logger
+     * @return \Magento\Logger
      */
     public function getLogger()
     {
@@ -293,4 +309,20 @@ class Context implements \Magento\ObjectManager\ContextInterface
     {
         return $this->_app;
     }
+
+    /**
+     * @return \Magento\Escaper
+     */
+    public function getEscaper()
+    {
+        return $this->_escaper;
+    }
+
+    /**
+     * @return \Magento\Filter\FilterManager
+     */
+    public function getFilterManager()
+    {
+        return $this->_filterManager;
+    }
 }
diff --git a/app/code/Magento/Core/Block/Template.php b/app/code/Magento/Core/Block/Template.php
index f067fcbb201..96ae28dd034 100644
--- a/app/code/Magento/Core/Block/Template.php
+++ b/app/code/Magento/Core/Block/Template.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Block;
 
 /**
  * Base html block
- *
- * @category   Magento
- * @package    Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Core\Block;
-
 class Template extends \Magento\Core\Block\AbstractBlock
 {
     const XML_PATH_TEMPLATE_ALLOW_SYMLINK       = 'dev/template/allow_symlink';
@@ -67,11 +62,6 @@ class Template extends \Magento\Core\Block\AbstractBlock
      */
     protected $_dirs;
 
-    /**
-     * @var \Magento\Core\Model\Logger
-     */
-    protected $_logger;
-
     /**
      * @var \Magento\Filesystem
      */
@@ -99,13 +89,18 @@ class Template extends \Magento\Core\Block\AbstractBlock
      *
      * @var \Magento\Core\Helper\Data
      */
-    protected $_coreData = null;
+    protected $_coreData;
 
     /**
      * @var \Magento\Core\Model\App
      */
     protected $_storeManager;
 
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
     /**
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Block\Template\Context $context
@@ -119,11 +114,11 @@ class Template extends \Magento\Core\Block\AbstractBlock
     ) {
         $this->_coreData = $coreData;
         $this->_dirs = $context->getDirs();
-        $this->_logger = $context->getLogger();
         $this->_filesystem = $context->getFilesystem();
         $this->_viewFileSystem = $context->getViewFileSystem();
         $this->_templateEngineFactory = $context->getEngineFactory();
         $this->_storeManager = $context->getApp();
+        $this->_appState = $context->getAppState();
         parent::__construct($context, $data);
     }
 
@@ -185,15 +180,13 @@ class Template extends \Magento\Core\Block\AbstractBlock
 
     /**
      * Get design area
+     *
+     * @deprecated
      * @return string
      */
     public function getArea()
     {
-        $result = $this->_getData('area');
-        if (!$result && $this->getLayout()) {
-            $result = $this->getLayout()->getArea();
-        }
-        return $result;
+        return $this->_appState->getAreaCode();
     }
 
     /**
diff --git a/app/code/Magento/Core/Block/Template/Context.php b/app/code/Magento/Core/Block/Template/Context.php
index 4e5852162c8..5c8565fe2de 100644
--- a/app/code/Magento/Core/Block/Template/Context.php
+++ b/app/code/Magento/Core/Block/Template/Context.php
@@ -21,7 +21,7 @@ class Context extends \Magento\Core\Block\Context
     /**
      * Logger instance
      *
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -42,13 +42,18 @@ class Context extends \Magento\Core\Block\Context
      */
     protected $_engineFactory;
 
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
     /**
      * @param \Magento\App\RequestInterface $request
      * @param \Magento\View\LayoutInterface $layout
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\UrlInterface $urlBuilder
      * @param \Magento\Core\Model\Translate $translator
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\View\DesignInterface $design
      * @param \Magento\Core\Model\Session $session
      * @param \Magento\Core\Model\Store\Config $storeConfig
@@ -58,11 +63,14 @@ class Context extends \Magento\Core\Block\Context
      * @param \Magento\View\ConfigInterface $viewConfig
      * @param \Magento\Core\Model\Cache\StateInterface $cacheState
      * @param \Magento\App\Dir $dirs
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Model\View\FileSystem $viewFileSystem
      * @param \Magento\View\TemplateEngineFactory $engineFactory
      * @param \Magento\Core\Model\App $app
+     * @param \Magento\App\State $appState
+     * @param \Magento\Escaper $escaper
+     * @param \Magento\Filter\FilterManager $filterManager
      */
     public function __construct(
         \Magento\App\RequestInterface $request,
@@ -70,7 +78,7 @@ class Context extends \Magento\Core\Block\Context
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\UrlInterface $urlBuilder,
         \Magento\Core\Model\Translate $translator,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\View\DesignInterface $design,
         \Magento\Core\Model\Session $session,
         \Magento\Core\Model\Store\Config $storeConfig,
@@ -80,17 +88,37 @@ class Context extends \Magento\Core\Block\Context
         \Magento\View\ConfigInterface $viewConfig,
         \Magento\Core\Model\Cache\StateInterface $cacheState,
         \Magento\App\Dir $dirs,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Filesystem $filesystem,
         \Magento\Core\Model\View\FileSystem $viewFileSystem,
         \Magento\View\TemplateEngineFactory $engineFactory,
-        \Magento\Core\Model\App $app
+        \Magento\Core\Model\App $app,
+        \Magento\App\State $appState,
+        \Magento\Escaper $escaper,
+        \Magento\Filter\FilterManager $filterManager
     ) {
         parent::__construct(
-            $request, $layout, $eventManager, $urlBuilder, $translator, $cache, $design, $session,
-            $storeConfig, $frontController, $helperFactory, $viewUrl, $viewConfig, $cacheState, $logger, $app
+            $request,
+            $layout,
+            $eventManager,
+            $urlBuilder,
+            $translator,
+            $cache,
+            $design,
+            $session,
+            $storeConfig,
+            $frontController,
+            $helperFactory,
+            $viewUrl,
+            $viewConfig,
+            $cacheState,
+            $logger,
+            $app,
+            $escaper,
+            $filterManager
         );
 
+        $this->_appState = $appState;
         $this->_dirs = $dirs;
         $this->_logger = $logger;
         $this->_filesystem = $filesystem;
@@ -120,7 +148,7 @@ class Context extends \Magento\Core\Block\Context
     /**
      * Get logger instance
      *
-     * @return \Magento\Core\Model\Logger
+     * @return \Magento\Logger
      */
     public function getLogger()
     {
@@ -146,4 +174,14 @@ class Context extends \Magento\Core\Block\Context
     {
         return $this->_engineFactory;
     }
+
+    /**
+     * Get app state object
+     *
+     * @return \Magento\App\State
+     */
+    public function getAppState()
+    {
+        return $this->_appState;
+    }
 }
diff --git a/app/code/Magento/Core/Controller/Front/Action.php b/app/code/Magento/Core/Controller/Front/Action.php
index b3b3a8dad6a..6555ad32388 100644
--- a/app/code/Magento/Core/Controller/Front/Action.php
+++ b/app/code/Magento/Core/Controller/Front/Action.php
@@ -59,45 +59,4 @@ class Action extends \Magento\Core\Controller\Varien\Action
         }
         return $this;
     }
-
-    /**
-     * Check if admin is logged in and authorized to access resource by specified ACL path
-     *
-     * If not authenticated, will try to do it using credentials from HTTP-request
-     *
-     * @param string $aclResource
-     * @param \Magento\Core\Model\Logger $logger
-     * @return bool
-     */
-    public function authenticateAndAuthorizeAdmin($aclResource, $logger)
-    {
-        $this->_objectManager->get('Magento\Core\Model\App')
-            ->loadAreaPart(\Magento\Core\Model\App\Area::AREA_ADMINHTML, \Magento\Core\Model\App\Area::PART_CONFIG);
-
-        /** @var $auth \Magento\Backend\Model\Auth */
-        $auth = $this->_objectManager->create('Magento\Backend\Model\Auth');
-        $session = $auth->getAuthStorage();
-
-        // Try to login using HTTP-authentication
-        if (!$session->isLoggedIn()) {
-            list($login, $password) = $this->_objectManager->get('Magento\Core\Helper\Http')
-                ->getHttpAuthCredentials($this->getRequest());
-            try {
-                $auth->login($login, $password);
-            } catch (\Magento\Backend\Model\Auth\Exception $e) {
-                $logger->logException($e);
-            }
-        }
-
-        // Verify if logged in and authorized
-        if (!$session->isLoggedIn()
-            || !$this->_objectManager->get('Magento\AuthorizationInterface')->isAllowed($aclResource)) {
-            $this->_objectManager->get('Magento\Core\Helper\Http')
-                ->failHttpAuthentication($this->getResponse(), 'RSS Feeds');
-            $this->setFlag('', self::FLAG_NO_DISPATCH, true);
-            return false;
-        }
-
-        return true;
-    }
 }
diff --git a/app/code/Magento/Core/Controller/Varien/Action.php b/app/code/Magento/Core/Controller/Varien/Action.php
index 98c72360509..8d92cf3a721 100644
--- a/app/code/Magento/Core/Controller/Varien/Action.php
+++ b/app/code/Magento/Core/Controller/Varien/Action.php
@@ -136,6 +136,11 @@ class Action extends \Magento\App\Action\AbstractAction
      */
     protected $_isRenderInherited;
 
+    /**
+     * @var \Magento\HTTP\Authentication
+     */
+    protected $authentication;
+
     /**
      * @param \Magento\Core\Controller\Varien\Action\Context $context
      */
@@ -149,6 +154,7 @@ class Action extends \Magento\App\Action\AbstractAction
         $this->_eventManager    = $context->getEventManager();
         $this->_isRenderInherited = $context->isRenderInherited();
         $this->_frontController->setAction($this);
+        $this->authentication = $context->getAuthentication();
 
         $this->_construct();
     }
@@ -509,7 +515,7 @@ class Action extends \Magento\App\Action\AbstractAction
                     $session->setSkipSessionIdFlag(true);
                 } elseif ($checkCookie) {
                     if (isset($_GET[$session->getSessionIdQueryParam()])
-                        && $this->_objectManager->get('Magento\Core\Model\App')->getUseSessionInUrl()
+                        && $this->_objectManager->get('Magento\Core\Model\Url')->getUseSession()
                         && $this->_sessionNamespace != \Magento\Backend\Controller\AbstractAction::SESSION_NAMESPACE
                     ) {
                         $session->setCookieShouldBeReceived(true);
@@ -530,7 +536,8 @@ class Action extends \Magento\App\Action\AbstractAction
     protected function _initDesign()
     {
         $area = $this->_objectManager->get('Magento\Core\Model\App')->getArea($this->getLayout()->getArea());
-        $area->load();
+        $area->load(\Magento\Core\Model\App\Area::PART_DESIGN);
+        $area->load(\Magento\Core\Model\App\Area::PART_TRANSLATE);
         $area->detectDesign($this->getRequest());
         return $this;
     }
@@ -552,14 +559,12 @@ class Action extends \Magento\App\Action\AbstractAction
 
         // Prohibit disabled store actions
         $storeManager = $this->_objectManager->get('Magento\Core\Model\StoreManager');
-        if ($this->_objectManager->get('Magento\App\State') && !$storeManager->getStore()->getIsActive()) {
+        if ($this->_objectManager->get('Magento\App\State')->isInstalled()
+            && !$storeManager->getStore()->getIsActive()
+        ) {
             $this->_objectManager->get('Magento\Core\Model\StoreManager')->throwStoreException();
         }
 
-        if ($this->_rewrite()) {
-            return;
-        }
-
         // Start session
         $this->_startSession();
 
@@ -773,7 +778,7 @@ class Action extends \Magento\App\Action\AbstractAction
         /** @var $session \Magento\Core\Model\Session */
         $session = $this->_objectManager->get('Magento\Core\Model\Session');
         if ($session->getCookieShouldBeReceived()
-            && $this->_objectManager->get('Magento\Core\Model\App')->getUseSessionInUrl()
+            && $this->_objectManager->get('Magento\Core\Model\Url')->getUseSession()
             && $this->_sessionNamespace != \Magento\Backend\Controller\AbstractAction::SESSION_NAMESPACE
         ) {
             $arguments += array('_query' => array(
@@ -895,65 +900,6 @@ class Action extends \Magento\App\Action\AbstractAction
         return false;
     }
 
-    /**
-     * Support for controllers rewrites
-     *
-     * Example of configuration:
-     * <global>
-     *   <routers>
-     *     <core_module>
-     *       <rewrite>
-     *         <core_controller>
-     *           <to>new_route/new_controller</to>
-     *           <override_actions>true</override_actions>
-     *           <actions>
-     *             <core_action><to>new_module/new_controller/new_action</core_action>
-     *           </actions>
-     *         <core_controller>
-     *       </rewrite>
-     *     </core_module>
-     *   </routers>
-     * </global>
-     *
-     * This will override:
-     * 1. core_module/core_controller/core_action to new_module/new_controller/new_action
-     * 2. all other actions of core_module/core_controller to new_module/new_controller
-     *
-     * @return boolean true if rewrite happened
-     */
-    protected function _rewrite()
-    {
-        $route = $this->getRequest()->getRouteName();
-        $controller = $this->getRequest()->getControllerName();
-        $action = $this->getRequest()->getActionName();
-
-        $rewrite = $this->_objectManager->get('Magento\Core\Model\Config')->getNode('global/routers/' . $route . '/rewrite/' . $controller);
-        if (!$rewrite) {
-            return false;
-        }
-
-        if (!($rewrite->actions && $rewrite->actions->$action) || $rewrite->is('override_actions')) {
-            $rewriteTo = explode('/', (string)$rewrite->to);
-            if (sizeof($rewriteTo) !== 2 || empty($rewriteTo[0]) || empty($rewriteTo[1])) {
-                return false;
-            }
-            $rewriteTo[2] = $action;
-        } else {
-            $rewriteTo = explode('/', (string)$rewrite->actions->$action->to);
-            if (sizeof($rewriteTo) !== 3 || empty($rewriteTo[0]) || empty($rewriteTo[1]) || empty($rewriteTo[2])) {
-                return false;
-            }
-        }
-
-        $this->_forward(
-            $rewriteTo[2] === '*' ? $action : $rewriteTo[2],
-            $rewriteTo[1] === '*' ? $controller : $rewriteTo[1],
-            $rewriteTo[0] === '*' ? $route : $rewriteTo[0]
-        );
-
-        return true;
-    }
-
     /**
      * Validate Form Key
      *
@@ -1027,7 +973,7 @@ class Action extends \Magento\App\Action\AbstractAction
                 ->getDateFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT)
         ));
         $filterInternal = new \Zend_Filter_NormalizedToLocalized(array(
-            'date_format' => \Magento\Date::DATE_INTERNAL_FORMAT
+            'date_format' => \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT
         ));
 
         foreach ($dateFields as $dateField) {
@@ -1056,7 +1002,7 @@ class Action extends \Magento\App\Action\AbstractAction
                 ->getDateTimeFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT)
         ));
         $filterInternal = new \Zend_Filter_NormalizedToLocalized(array(
-            'date_format' => \Magento\Date::DATETIME_INTERNAL_FORMAT
+            'date_format' => \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT
         ));
 
         foreach ($dateFields as $dateField) {
diff --git a/app/code/Magento/Core/Controller/Varien/Action/Context.php b/app/code/Magento/Core/Controller/Varien/Action/Context.php
index 88139ce82fa..e76f4ed68ad 100644
--- a/app/code/Magento/Core/Controller/Varien/Action/Context.php
+++ b/app/code/Magento/Core/Controller/Varien/Action/Context.php
@@ -65,28 +65,35 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_isRenderInherited;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @var \Magento\HTTP\Authentication
+     */
+    protected $authentication;
+
+    /**
+     * @param \Magento\Logger $logger
      * @param \Magento\App\RequestInterface $request
      * @param \Magento\App\ResponseInterface $response
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\App\FrontController $frontController
      * @param \Magento\View\LayoutInterface $layout
      * @param \Magento\Event\ManagerInterface $eventManager
+     * @param \Magento\HTTP\Authentication $authentication
      * @param bool $isRenderInherited
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\App\RequestInterface $request,
         \Magento\App\ResponseInterface $response,
         \Magento\ObjectManager $objectManager,
         \Magento\App\FrontController $frontController,
         \Magento\View\LayoutInterface $layout,
         \Magento\Event\ManagerInterface $eventManager,
+        \Magento\HTTP\Authentication $authentication,
         $isRenderInherited
     ) {
         $this->_request           = $request;
@@ -97,6 +104,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
         $this->_eventManager      = $eventManager;
         $this->_isRenderInherited = $isRenderInherited;
         $this->_logger            = $logger;
+        $this->authentication     = $authentication;
     }
 
     /**
@@ -158,10 +166,18 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Core\Model\Logger
+     * @return \Magento\Logger
      */
     public function getLogger()
     {
         return $this->_logger;
     }
+
+    /**
+     * @return \Magento\HTTP\Authentication
+     */
+    public function getAuthentication()
+    {
+        return $this->authentication;
+    }
 }
diff --git a/app/code/Magento/Core/Controller/Varien/Router/Base.php b/app/code/Magento/Core/Controller/Varien/Router/Base.php
deleted file mode 100644
index 711c65027c2..00000000000
--- a/app/code/Magento/Core/Controller/Varien/Router/Base.php
+++ /dev/null
@@ -1,698 +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_Core
- * @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\Controller\Varien\Router;
-
-use Magento\App\Router\AbstractRouter;
-
-class Base extends \Magento\App\Router\AbstractRouter
-{
-    /**
-     * @var array
-     */
-    protected $_modules = array();
-
-    /**
-     * @var array
-     */
-    protected $_dispatchData = array();
-
-    /**
-     * List of required request parameters
-     * Order sensitive
-     * @var array
-     */
-    protected $_requiredParams = array(
-        'moduleFrontName',
-        'controllerName',
-        'actionName',
-    );
-
-    /**
-     * Current router belongs to the area
-     *
-     * @var string
-     */
-    protected $_areaCode;
-
-    /**
-     * Unique router id
-     *
-     * @var string
-     */
-    protected $_routerId;
-
-    /**
-     * Base controller that belongs to area
-     *
-     * @var string
-     */
-    protected $_baseController;
-
-    /**
-     * @var \Magento\Core\Model\App
-     */
-    protected $_app;
-
-    /**
-     * @var \Magento\Core\Model\Route\Config
-     */
-    protected $_routeConfig;
-
-    /**
-     * @var array
-     */
-    protected $_routes;
-
-    /**
-     * Url security information.
-     *
-     * @var \Magento\Core\Model\Url\SecurityInfoInterface
-     */
-    protected $_urlSecurityInfo;
-
-    /**
-     * Core store config
-     *
-     * @var \Magento\Core\Model\Store\Config
-     */
-    protected $_coreStoreConfig;
-
-    /**
-     * Core config
-     *
-     * @var \Magento\Core\Model\Config
-     */
-    protected $_config = null;
-
-    /**
-     * @var \Magento\Core\Model\Url
-     */
-    protected $_url;
-
-    /**
-     * @var \Magento\Core\Model\StoreManager
-     */
-    protected $_storeManager;
-
-    /**
-     * @var \Magento\App\State
-     */
-    protected $_appState;
-
-    /**
-     * @param \Magento\App\ActionFactory $controllerFactory
-     * @param \Magento\Filesystem $filesystem
-     * @param \Magento\Core\Model\App $app
-     * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Core\Model\Route\Config $routeConfig
-     * @param \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo
-     * @param \Magento\Core\Model\Config $config
-     * @param \Magento\Core\Model\Url $url
-     * @param \Magento\Core\Model\StoreManager $storeManager
-     * @param \Magento\App\State $appState
-     * @param string $areaCode
-     * @param string $baseController
-     * @param string $routerId
-     * @throws \InvalidArgumentException
-     */
-    public function __construct(
-        \Magento\App\ActionFactory $controllerFactory,
-        \Magento\Filesystem $filesystem,
-        \Magento\Core\Model\App $app,
-        \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Core\Model\Route\Config $routeConfig,
-        \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo,
-        \Magento\Core\Model\Config $config,
-        \Magento\Core\Model\Url $url,
-        \Magento\Core\Model\StoreManager $storeManager,
-        \Magento\App\State $appState,
-        $areaCode,
-        $baseController,
-        $routerId
-    ) {
-        parent::__construct($controllerFactory);
-
-        $this->_app             = $app;
-        $this->_filesystem      = $filesystem;
-        $this->_areaCode        = $areaCode;
-        $this->_baseController  = $baseController;
-        $this->_routeConfig     = $routeConfig;
-        $this->_routerId        = $routerId;
-        $this->_urlSecurityInfo = $urlSecurityInfo;
-        $this->_coreStoreConfig = $coreStoreConfig;
-        $this->_config          = $config;
-        $this->_url             = $url;
-        $this->_storeManager    = $storeManager;
-        $this->_appState        = $appState;
-
-        if (is_null($this->_areaCode) || is_null($this->_baseController)) {
-            throw new \InvalidArgumentException("Not enough options to initialize router.");
-        }
-    }
-
-    /**
-     * Get routes for router
-     *
-     * @return array
-     */
-    protected function _getRoutes()
-    {
-        if (empty($this->_routes)) {
-            $this->_routes = $this->_routeConfig->getRoutes($this->_areaCode, $this->_routerId);
-        }
-
-        return $this->_routes;
-    }
-
-    /**
-     * Set default module/controller/action values
-     */
-    public function fetchDefault()
-    {
-        $this->getFront()->setDefault(array(
-            'module'     => 'core',
-            'controller' => 'index',
-            'action'     => 'index'
-        ));
-    }
-
-    /**
-     * checking if this admin if yes then we don't use this router
-     *
-     * @return bool
-     */
-    protected function _beforeModuleMatch()
-    {
-        if ($this->_app->getStore()->isAdmin()) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * dummy call to pass through checking
-     *
-     * @return bool
-     */
-    protected function _afterModuleMatch()
-    {
-        return true;
-    }
-
-    /**
-     * Match provided request and if matched - return corresponding controller
-     *
-     * @param \Magento\App\RequestInterface $request
-     * @return \Magento\Core\Controller\Front\Action|null
-     */
-    public function match(\Magento\App\RequestInterface $request)
-    {
-        //checking before even try to find out that current module
-        //should use this router
-        if (!$this->_beforeModuleMatch()) {
-            return null;
-        }
-
-        $params = $this->_parseRequest($request);
-
-        if (false == $this->_canProcess($params)) {
-            return null;
-        }
-
-        return $this->_matchController($request, $params);
-    }
-
-    /**
-     * Check if router can process provided request
-     *
-     * @param array $params
-     * @return bool
-     */
-    protected function _canProcess(array $params)
-    {
-        return true;
-    }
-
-    /**
-     * Parse request URL params
-     *
-     * @param \Magento\App\RequestInterface $request
-     * @return array
-     */
-    protected function _parseRequest(\Magento\App\RequestInterface $request)
-    {
-        $output = array();
-
-        $path = trim($request->getPathInfo(), '/');
-
-        $params = explode('/', ($path ? $path : $this->_getDefaultPath()));
-        foreach ($this->_requiredParams as $paramName) {
-            $output[$paramName] = array_shift($params);
-        }
-
-        for ($i = 0, $l = sizeof($params); $i < $l; $i += 2) {
-            $output['variables'][$params[$i]] = isset($params[$i+1]) ? urldecode($params[$i + 1]) : '';
-        }
-        return $output;
-    }
-
-    /**
-     * Match module front name
-     *
-     * @param \Magento\App\RequestInterface $request
-     * @param string $param
-     * @return string|null
-     */
-    protected function _matchModuleFrontName(\Magento\App\RequestInterface $request, $param)
-    {
-        // get module name
-        if ($request->getModuleName()) {
-            $moduleFrontName = $request->getModuleName();
-        } else {
-            if (!empty($param)) {
-                $moduleFrontName = $param;
-            } else {
-                $moduleFrontName = $this->getFront()->getDefault('module');
-                $request->setAlias(\Magento\Core\Model\Url\Rewrite::REWRITE_REQUEST_PATH_ALIAS, '');
-            }
-        }
-        if (!$moduleFrontName) {
-            return null;
-        }
-        return $moduleFrontName;
-    }
-
-    /**
-     * Match controller name
-     *
-     * @param \Magento\App\RequestInterface $request
-     * @param string $param
-     * @return string
-     */
-    protected function _matchControllerName(\Magento\App\RequestInterface $request,  $param)
-    {
-        if ($request->getControllerName()) {
-            $controller = $request->getControllerName();
-        } else {
-            if (!empty($param)) {
-                $controller = $param;
-            } else {
-                $controller = $this->getFront()->getDefault('controller');
-                $request->setAlias(
-                    \Magento\Core\Model\Url\Rewrite::REWRITE_REQUEST_PATH_ALIAS,
-                    ltrim($request->getOriginalPathInfo(), '/')
-                );
-            }
-        }
-        return $controller;
-    }
-
-    /**
-     * Match controller name
-     *
-     * @param \Magento\App\RequestInterface $request
-     * @param string $param
-     * @return string
-     */
-    protected function _matchActionName(\Magento\App\RequestInterface $request, $param)
-    {
-        if (empty($action)) {
-            if ($request->getActionName()) {
-                $action = $request->getActionName();
-            } else {
-                $action = !empty($param) ? $param : $this->getFront()->getDefault('action');
-            }
-        } else {
-            $action = $param;
-        }
-
-        return $action;
-    }
-
-    /**
-     * Get not found controller instance
-     *
-     * @param $currentModuleName
-     * @param \Magento\App\RequestInterface $request
-     * @return \Magento\Core\Controller\Varien\Action|null
-     */
-    protected function _getNotFoundControllerInstance($currentModuleName, \Magento\App\RequestInterface $request)
-    {
-        $controllerInstance = null;
-
-        if ($this->_noRouteShouldBeApplied()) {
-            $controller = 'index';
-            $action = 'noroute';
-
-            $controllerClassName = $this->_validateControllerClassName($currentModuleName, $controller);
-            if (false == $controllerClassName) {
-                return null;
-            }
-
-            if (false == $this->_validateControllerAction($controllerClassName, $action)) {
-                return null;
-            }
-
-            // instantiate controller class
-            $controllerInstance = $this->_controllerFactory->createController($controllerClassName,
-                array('request' => $request, 'areaCode' => $this->_areaCode)
-            );
-        } else {
-            return null;
-        }
-
-        return $controllerInstance;
-    }
-
-    /**
-     * Check whether action handler exists for provided handler
-     *
-     * @param string $controllerClassName
-     * @param string $action
-     * @return bool
-     */
-    protected function _validateControllerAction($controllerClassName, $action)
-    {
-        return method_exists($controllerClassName, $action . 'Action');
-    }
-
-    /**
-     * Create matched controller instance
-     *
-     * @param \Magento\App\RequestInterface $request
-     * @param array $params
-     * @return \Magento\Core\Controller\Front\Action|null
-     */
-    protected function _matchController(\Magento\App\RequestInterface $request, array $params)
-    {
-        $this->fetchDefault();
-
-        $moduleFrontName = $this->_matchModuleFrontName($request, $params['moduleFrontName']);
-        if (empty($moduleFrontName)) {
-            return null;
-        }
-
-        /**
-         * Searching router args by module name from route using it as key
-         */
-        $modules = $this->getModulesByFrontName($moduleFrontName);
-
-        if (empty($modules) === true) {
-            return null;
-        }
-
-        // checks after we found out that this router should be used for current module
-        if (!$this->_afterModuleMatch()) {
-            return null;
-        }
-
-        /**
-         * Going through modules to find appropriate controller
-         */
-        $found = false;
-        $currentModuleName = null;
-        $controller = null;
-        $action = null;
-        $controllerInstance = null;
-
-        foreach ($modules as $moduleName) {
-            $currentModuleName = $moduleName;
-
-            $request->setRouteName($this->getRouteByFrontName($moduleFrontName));
-
-            $controller = $this->_matchControllerName($request, $params['controllerName']);
-
-            $action = $this->_matchActionName($request, $params['actionName']);
-
-            //checking if this place should be secure
-            $this->_checkShouldBeSecure($request, '/' . $moduleFrontName . '/' . $controller . '/' . $action);
-
-            $controllerClassName = $this->_validateControllerClassName($moduleName, $controller);
-            if (false == $controllerClassName) {
-                continue;
-            }
-
-            if (false === $this->_validateControllerAction($controllerClassName, $action)) {
-                continue;
-            }
-
-            // instantiate controller class
-            $controllerInstance = $this->_controllerFactory->createController($controllerClassName,
-                array('request' => $request)
-            );
-
-            $found = true;
-            break;
-        }
-
-        /**
-         * if we did not found any suitable
-         */
-        if (false == $found) {
-            $controllerInstance = $this->_getNotFoundControllerInstance($currentModuleName, $request);
-            if (is_null($controllerInstance)) {
-                return null;
-            }
-        }
-
-        // set values only after all the checks are done
-        $request->setModuleName($moduleFrontName);
-        $request->setControllerName($controller);
-        $request->setActionName($action);
-        $request->setControllerModule($currentModuleName);
-        if (isset($params['variables'])) {
-            $request->setParams($params['variables']);
-        }
-        return $controllerInstance;
-    }
-
-    /**
-     * Get router default request path
-     * @return string
-     */
-    protected function _getDefaultPath()
-    {
-        return $this->_coreStoreConfig->getConfig('web/default/front');
-    }
-
-    /**
-     * Allow to control if we need to enable no route functionality in current router
-     *
-     * @return bool
-     */
-    protected function _noRouteShouldBeApplied()
-    {
-        return false;
-    }
-
-    /**
-     * Generating and validating class file name,
-     * class and if everything ok do include if needed and return of class name
-     *
-     * @param $realModule
-     * @param $controller
-     * @return bool|string
-     */
-    protected function _validateControllerClassName($realModule, $controller)
-    {
-        $controllerClassName = $this->getControllerClassName($realModule, $controller);
-        if (!$controllerClassName) {
-            return false;
-        }
-
-        return $controllerClassName;
-    }
-
-    /**
-     * Include the file containing controller class if this class is not defined yet
-     *
-     * @param $controllerFileName
-     * @param $controllerClassName
-     * @return bool
-     * @throws \Magento\Core\Exception
-     */
-    protected function _includeControllerClass($controllerFileName, $controllerClassName)
-    {
-        if (!class_exists($controllerClassName, false)) {
-            if (!$this->_filesystem->isFile($controllerFileName)) {
-                return false;
-            }
-            include $controllerFileName;
-
-            if (!class_exists($controllerClassName, false)) {
-                throw new \Magento\Core\Exception(__('Controller file was loaded but class does not exist'));
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Retrieve list of modules subscribed to given frontName
-     *
-     * @param string $frontName
-     * @return array
-     */
-    public function getModulesByFrontName($frontName)
-    {
-        $modules = array();
-
-        $routes = $this->_getRoutes();
-        foreach ($routes as $routeData) {
-            if ($routeData['frontName'] == $frontName && isset($routeData['modules'])) {
-                $modules = $routeData['modules'];
-                break;
-            }
-        }
-
-        return array_unique($modules);
-    }
-
-    /**
-     * Get route frontName by id
-     * @param string $routeId
-     * @return string
-     */
-    public function getFrontNameByRoute($routeId)
-    {
-        $routes = $this->_getRoutes();
-        if (isset($routes[$routeId])) {
-            return $routes[$routeId]['frontName'];
-        }
-
-        return false;
-    }
-
-    /**
-     * Get route Id by route frontName
-     *
-     * @param string $frontName
-     * @return string
-     */
-    public function getRouteByFrontName($frontName)
-    {
-        foreach ($this->_getRoutes() as $routeId => $routeData) {
-            if ($routeData['frontName'] == $frontName) {
-                return $routeId;
-            }
-        }
-
-        return false;
-    }
-
-    public function getControllerClassName($realModule, $controller)
-    {
-        $class = str_replace('_', \Magento\Autoload\IncludePath::NS_SEPARATOR, $realModule) .
-            \Magento\Autoload\IncludePath::NS_SEPARATOR . 'Controller' .
-            \Magento\Autoload\IncludePath::NS_SEPARATOR .
-            str_replace('_','\\', uc_words(str_replace('_', ' ', $controller)));
-        return $class;
-    }
-
-    public function rewrite(array $p)
-    {
-        $rewrite = $this->_config->getNode('global/rewrite');
-        if ($module = $rewrite->{$p[0]}) {
-            if (!$module->children()) {
-                $p[0] = trim((string)$module);
-            }
-        }
-        if (isset($p[1]) && ($controller = $rewrite->{$p[0]}->{$p[1]})) {
-            if (!$controller->children()) {
-                $p[1] = trim((string)$controller);
-            }
-        }
-        if (isset($p[2]) && ($action = $rewrite->{$p[0]}->{$p[1]}->{$p[2]})) {
-            if (!$action->children()) {
-                $p[2] = trim((string)$action);
-            }
-        }
-
-        return $p;
-    }
-
-    /**
-     * Check that request uses https protocol if it should.
-     * Function redirects user to correct URL if needed.
-     *
-     * @param \Magento\App\RequestInterface $request
-     * @param string $path
-     * @return void
-     */
-    protected function _checkShouldBeSecure(\Magento\App\RequestInterface $request, $path = '')
-    {
-        if (!$this->_appState->isInstalled() || $request->getPost()) {
-            return;
-        }
-
-        if ($this->_shouldBeSecure($path) && !$request->isSecure()) {
-            $url = $this->_getCurrentSecureUrl($request);
-            if ($this->_shouldRedirectToSecure()) {
-                $url = $this->_url->getRedirectUrl($url);
-            }
-
-            $this->_app->getFrontController()->getResponse()
-                ->setRedirect($url)
-                ->sendResponse();
-            exit;
-        }
-    }
-
-    /**
-     * Check whether redirect url should be used for secure routes
-     *
-     * @return bool
-     */
-    protected function _shouldRedirectToSecure()
-    {
-        return $this->_app->getUseSessionInUrl();
-    }
-
-    protected function _getCurrentSecureUrl($request)
-    {
-        $alias = $request->getAlias(\Magento\Core\Model\Url\Rewrite::REWRITE_REQUEST_PATH_ALIAS);
-        if ($alias) {
-            return $this->_storeManager->getStore()->getBaseUrl('link', true) . ltrim($alias, '/');
-        }
-
-        return $this->_storeManager->getStore()->getBaseUrl('link', true) . ltrim($request->getPathInfo(), '/');
-    }
-
-    /**
-     * Check whether given path should be secure according to configuration security requirements for URL
-     * "Secure" should not be confused with https protocol, it is about web/secure/*_url settings usage only
-     *
-     * @param string $path
-     * @return bool
-     */
-    protected function _shouldBeSecure($path)
-    {
-        return substr($this->_coreStoreConfig->getConfig('web/unsecure/base_url'), 0, 5) === 'https'
-            || $this->_coreStoreConfig->getConfigFlag('web/secure/use_in_frontend')
-                && substr($this->_coreStoreConfig->getConfig('web/secure/base_url'), 0, 5) == 'https'
-                && $this->_urlSecurityInfo->isSecure($path);
-    }
-}
diff --git a/app/code/Magento/Core/Helper/AbstractHelper.php b/app/code/Magento/Core/Helper/AbstractHelper.php
index 65310664153..3952405aa7d 100644
--- a/app/code/Magento/Core/Helper/AbstractHelper.php
+++ b/app/code/Magento/Core/Helper/AbstractHelper.php
@@ -60,7 +60,7 @@ abstract class AbstractHelper
     private $_moduleManager;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -74,6 +74,11 @@ abstract class AbstractHelper
      */
     protected $_urlBuilder;
 
+    /**
+     * @var \Magento\HTTP\Header
+     */
+    protected $_httpHeader;
+
     /**
      * @param \Magento\Core\Helper\Context $context
      */
@@ -85,6 +90,7 @@ abstract class AbstractHelper
         $this->_request = $context->getRequest();
         $this->_app = $context->getApp();
         $this->_urlBuilder = $context->getUrlBuilder();
+        $this->_httpHeader = $context->getHttpHeader();
     }
 
     /**
@@ -191,114 +197,6 @@ abstract class AbstractHelper
         return $this->_moduleManager->isEnabled($moduleName);
     }
 
-    /**
-     * Escape html entities
-     *
-     * @param   string|array $data
-     * @param   array $allowedTags
-     * @return  mixed
-     */
-    public function escapeHtml($data, $allowedTags = null)
-    {
-        if (is_array($data)) {
-            $result = array();
-            foreach ($data as $item) {
-                $result[] = $this->escapeHtml($item);
-            }
-        } else {
-            // process single item
-            if (strlen($data)) {
-                if (is_array($allowedTags) and !empty($allowedTags)) {
-                    $allowed = implode('|', $allowedTags);
-                    $result = preg_replace('/<([\/\s\r\n]*)(' . $allowed . ')([\/\s\r\n]*)>/si', '##$1$2$3##', $data);
-                    $result = htmlspecialchars($result, ENT_COMPAT, 'UTF-8', false);
-                    $result = preg_replace('/##([\/\s\r\n]*)(' . $allowed . ')([\/\s\r\n]*)##/si', '<$1$2$3>', $result);
-                } else {
-                    $result = htmlspecialchars($data, ENT_COMPAT, 'UTF-8', false);
-                }
-            } else {
-                $result = $data;
-            }
-        }
-        return $result;
-    }
-
-    /**
-     * Remove html tags, but leave "<" and ">" signs
-     *
-     * @param string $html
-     * @return string
-     */
-    public function removeTags($html)
-    {
-        $callback = function ($matches) {
-            return htmlentities($matches[0]);
-        };
-        $html = preg_replace_callback("# <(?![/a-z]) | (?<=\s)>(?![a-z]) #xi", $callback, $html);
-        $html =  strip_tags($html);
-        return htmlspecialchars_decode($html);
-    }
-
-    /**
-     * Wrapper for standard strip_tags() function with extra functionality for html entities
-     *
-     * @param string $data
-     * @param string $allowableTags
-     * @param bool $escape
-     * @return string
-     */
-    public function stripTags($data, $allowableTags = null, $escape = false)
-    {
-        $result = strip_tags($data, $allowableTags);
-        return $escape ? $this->escapeHtml($result, $allowableTags) : $result;
-    }
-
-    /**
-     * Escape html entities in url
-     *
-     * @param string $data
-     * @return string
-     */
-    public function escapeUrl($data)
-    {
-        return htmlspecialchars($data);
-    }
-
-    /**
-     * Escape quotes in java script
-     *
-     * @param mixed $data
-     * @param string $quote
-     * @return mixed
-     */
-    public function jsQuoteEscape($data, $quote = '\'')
-    {
-        if (is_array($data)) {
-            $result = array();
-            foreach ($data as $item) {
-                $result[] = str_replace($quote, '\\' . $quote, $item);
-            }
-            return $result;
-        }
-        return str_replace($quote, '\\' . $quote, $data);
-    }
-
-    /**
-     * Escape quotes inside html attributes
-     * Use $addSlashes = false for escaping js that inside html attribute (onClick, onSubmit etc)
-     *
-     * @param string $data
-     * @param bool $addSlashes
-     * @return string
-     */
-    public function quoteEscape($data, $addSlashes = false)
-    {
-        if ($addSlashes === true) {
-            $data = addslashes($data);
-        }
-        return htmlspecialchars($data, ENT_QUOTES, null, false);
-    }
-
     /**
      * Retrieve url
      *
diff --git a/app/code/Magento/Core/Helper/Context.php b/app/code/Magento/Core/Helper/Context.php
index 690b01f85e5..f7d892d6345 100644
--- a/app/code/Magento/Core/Helper/Context.php
+++ b/app/code/Magento/Core/Helper/Context.php
@@ -43,7 +43,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_eventManager;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -57,11 +57,6 @@ class Context implements \Magento\ObjectManager\ContextInterface
      */
     protected $_cacheConfig;
 
-    /**
-     * @var \Magento\Core\Model\EncryptionFactory
-     */
-    protected $_encryptorFactory;
-
     /**
      * @var \Magento\Core\Model\Fieldset\Config
      */
@@ -78,39 +73,52 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_urlBuilder;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @var \Magento\HTTP\Header
+     */
+    protected $_httpHeader;
+
+    /**
+     * @var \Magento\HTTP\PhpEnvironment\RemoteAddress
+     */
+    protected $_remoteAddress;
+
+    /**
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\Translate $translator
      * @param \Magento\Core\Model\ModuleManager $moduleManager
      * @param \Magento\App\RequestInterface $httpRequest
      * @param \Magento\Core\Model\Cache\Config $cacheConfig
-     * @param \Magento\Core\Model\EncryptionFactory $encryptorFactory
      * @param \Magento\Core\Model\Fieldset\Config $fieldsetConfig
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Model\App $app
      * @param \Magento\UrlInterface $urlBuilder
+     * @param \Magento\HTTP\Header $httpHeader
+     * @param \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\Translate $translator,
         \Magento\Core\Model\ModuleManager $moduleManager,
         \Magento\App\RequestInterface $httpRequest,
         \Magento\Core\Model\Cache\Config $cacheConfig,
-        \Magento\Core\Model\EncryptionFactory $encryptorFactory,
         \Magento\Core\Model\Fieldset\Config $fieldsetConfig,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Model\App $app,
-        \Magento\UrlInterface $urlBuilder
+        \Magento\UrlInterface $urlBuilder,
+        \Magento\HTTP\Header $httpHeader,
+        \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress
     ) {
         $this->_translator = $translator;
         $this->_moduleManager = $moduleManager;
         $this->_httpRequest = $httpRequest;
         $this->_cacheConfig = $cacheConfig;
-        $this->_encryptorFactory = $encryptorFactory;
         $this->_fieldsetConfig = $fieldsetConfig;
         $this->_eventManager = $eventManager;
         $this->_logger = $logger;
         $this->_app = $app;
         $this->_urlBuilder = $urlBuilder;
+        $this->_httpHeader = $httpHeader;
+        $this->_remoteAddress = $remoteAddress;
     }
 
     /**
@@ -161,14 +169,6 @@ class Context implements \Magento\ObjectManager\ContextInterface
         return $this->_cacheConfig;
     }
 
-    /**
-     * @return \Magento\Core\Model\EncryptionFactory
-     */
-    public function getEncryptorFactory()
-    {
-        return $this->_encryptorFactory;
-    }
-
     /**
      * @return \Magento\Event\ManagerInterface
      */
@@ -186,10 +186,26 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
     
     /**
-     * @return \Magento\Core\Model\Logger
+     * @return \Magento\Logger
      */
     public function getLogger()
     {
         return $this->_logger;
     }
+
+    /**
+     * @return \Magento\HTTP\Header
+     */
+    public function getHttpHeader()
+    {
+        return $this->_httpHeader;
+    }
+
+    /**
+     * @return \Magento\HTTP\PhpEnvironment\RemoteAddress
+     */
+    public function getRemoteAddress()
+    {
+        return $this->_remoteAddress;
+    }
 }
diff --git a/app/code/Magento/Core/Helper/Data.php b/app/code/Magento/Core/Helper/Data.php
index 1f1a6591cda..e7d9ef9eada 100644
--- a/app/code/Magento/Core/Helper/Data.php
+++ b/app/code/Magento/Core/Helper/Data.php
@@ -24,37 +24,17 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Helper;
+
 /**
  * Core data helper
- *
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Core\Helper;
-
 class Data extends \Magento\Core\Helper\AbstractHelper
 {
     const XML_PATH_DEFAULT_COUNTRY              = 'general/country/default';
-    const XML_PATH_PROTECTED_FILE_EXTENSIONS    = 'general/file/protected_extensions';
-    const XML_PATH_PUBLIC_FILES_VALID_PATHS     = 'general/file/public_files_valid_paths';
     const XML_PATH_DEV_ALLOW_IPS                = 'dev/restrict/allow_ips';
     const XML_PATH_CONNECTION_TYPE              = 'global/resources/default_setup/connection/type';
 
-    const CHARS_LOWERS                          = 'abcdefghijklmnopqrstuvwxyz';
-    const CHARS_UPPERS                          = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
-    const CHARS_DIGITS                          = '0123456789';
-    const CHARS_SPECIALS                        = '!$*+-.=?@^_|~';
-    const CHARS_PASSWORD_LOWERS                 = 'abcdefghjkmnpqrstuvwxyz';
-    const CHARS_PASSWORD_UPPERS                 = 'ABCDEFGHJKLMNPQRSTUVWXYZ';
-    const CHARS_PASSWORD_DIGITS                 = '23456789';
-    const CHARS_PASSWORD_SPECIALS               = '!$*-.=?@_';
-
-    /**
-     * Config pathes to merchant country code and merchant VAT number
-     */
-    const XML_PATH_MERCHANT_COUNTRY_CODE = 'general/store_information/country_id';
-    const XML_PATH_MERCHANT_VAT_NUMBER = 'general/store_information/merchant_vat_number';
-    const XML_PATH_EU_COUNTRIES_LIST = 'general/country/eu_countries';
-
     const XML_PATH_SINGLE_STORE_MODE_ENABLED = 'general/single_store_mode/enabled';
 
     /**
@@ -67,11 +47,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     const XML_PATH_SYSTEM_SMTP_DISABLE = 'system/smtp/disable';
 
-    /**
-     * @var \Magento\Core\Model\Encryption
-     */
-    protected $_encryptor;
-
     protected $_allowedFormats = array(
         \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_FULL,
         \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_LONG,
@@ -79,18 +54,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT
     );
 
-    /**
-     * @var \Magento\Core\Model\Config
-     */
-    protected $_config;
-
-    /**
-     * Core http
-     *
-     * @var \Magento\Core\Helper\Http
-     */
-    protected $_coreHttp = null;
-
     /**
      * Core event manager proxy
      *
@@ -103,11 +66,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     protected $_cacheConfig;
 
-    /**
-     * @var \Magento\Core\Model\EncryptionFactory
-     */
-    protected $_encryptorFactory;
-
     /**
      * @var \Magento\Core\Model\Fieldset\Config
      */
@@ -146,56 +104,43 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     protected $_dbCompatibleMode;
 
     /**
-     * @param \Magento\Core\Helper\Context $context
+     * @var \Magento\HTTP\PhpEnvironment\RemoteAddress
+     */
+    protected $_remoteAddress;
+
+    /**
+     * @param Context $context
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Encryption $encryptor
      * @param bool $dbCompatibleMode
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\Core\Model\Date $dateModel,
         \Magento\App\State $appState,
-        \Magento\Core\Model\Encryption $encryptor,
         $dbCompatibleMode = true
     ) {
         $this->_eventManager = $eventManager;
-        $this->_coreHttp = $coreHttp;
         $this->_coreStoreConfig = $coreStoreConfig;
+        $this->_remoteAddress = $context->getRemoteAddress();
         parent::__construct($context);
-        $this->_config = $config;
         $this->_cacheConfig = $context->getCacheConfig();
-        $this->_encryptorFactory = $context->getEncryptorFactory();
         $this->_fieldsetConfig = $context->getFieldsetConfig();
         $this->_storeManager = $storeManager;
         $this->_locale = $locale;
         $this->_dateModel = $dateModel;
         $this->_appState = $appState;
-        $this->_encryptor = $encryptor;
-        $this->_encryptor->setHelper($this);
         $this->_dbCompatibleMode = $dbCompatibleMode;
     }
 
-    /**
-     * @return \Magento\Core\Model\Encryption
-     */
-    public function getEncryptor()
-    {
-        return $this->_encryptor;
-    }
-
     /**
      * Convert and format price value for current application store
      *
@@ -266,8 +211,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      * @param   bool                $showTime Whether to include time
      * @return  string
      */
-    public function formatDate($date = null, $format = \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT, $showTime = false)
-    {
+    public function formatDate(
+        $date = null,
+        $format = \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT,
+        $showTime = false
+    ) {
         if (!in_array($format, $this->_allowedFormats, true)) {
             return $date;
         }
@@ -301,8 +249,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      * @param   bool                $showDate
      * @return  string
      */
-    public function formatTime($time = null, $format = \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT, $showDate = false)
-    {
+    public function formatTime(
+        $time = null,
+        $format = \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT,
+        $showDate = false
+    ) {
         if (!in_array($format, $this->_allowedFormats, true)) {
             return $time;
         }
@@ -325,148 +276,19 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     }
 
     /**
-     * Encrypt data using application key
-     *
-     * @param   string $data
-     * @return  string
-     */
-    public function encrypt($data)
-    {
-        if (!$this->_appState->isInstalled()) {
-            return $data;
-        }
-        return $this->getEncryptor()->encrypt($data);
-    }
-
-    /**
-     * Decrypt data using application key
-     *
-     * @param   string $data
-     * @return  string
-     */
-    public function decrypt($data)
-    {
-        if (!$this->_appState->isInstalled()) {
-            return $data;
-        }
-        return $this->getEncryptor()->decrypt($data);
-    }
-
-    public function validateKey($key)
-    {
-        return $this->getEncryptor()->validateKey($key);
-    }
-
-    public function getRandomString($len, $chars = null)
-    {
-        if (is_null($chars)) {
-            $chars = self::CHARS_LOWERS . self::CHARS_UPPERS . self::CHARS_DIGITS;
-        }
-        mt_srand(10000000*(double)microtime());
-        for ($i = 0, $str = '', $lc = strlen($chars)-1; $i < $len; $i++) {
-            $str .= $chars[mt_rand(0, $lc)];
-        }
-        return $str;
-    }
-
-    /**
-     * Generate salted hash from password
-     *
-     * @param string $password
-     * @param string|integer|boolean $salt
-     * @return string
-     */
-    public function getHash($password, $salt = false)
-    {
-        return $this->getEncryptor()->getHash($password, $salt);
-    }
-
-    public function validateHash($password, $hash)
-    {
-        return $this->getEncryptor()->validateHash($password, $hash);
-    }
-
-    /**
-     * Retrieve store identifier
-     *
-     * @param   mixed $store
-     * @return  int
-     */
-    public function getStoreId($store=null)
-    {
-        return $this->_storeManager->getStore($store)->getId();
-    }
-
-    /**
-     * Remove accents
-     *
-     * @param string $string
-     * @param bool $german
-     * @return string
+     * @param null $storeId
+     * @return bool
      */
-    public function removeAccents($string, $german = false)
-    {
-        static $replacements;
-
-        if (empty($replacements[$german])) {
-            $substitutions = array(
-                // single ISO-8859-1 letters
-                192 => 'A', 193 => 'A', 194 => 'A', 195 => 'A', 196 => 'A', 197 => 'A', 199 => 'C',
-                208 => 'D', 200 => 'E', 201 => 'E', 202 => 'E', 203 => 'E', 204 => 'I', 205 => 'I',
-                206 => 'I', 207 => 'I', 209 => 'N', 210 => 'O', 211 => 'O', 212 => 'O', 213 => 'O',
-                214 => 'O', 216 => 'O', 138 => 'S', 217 => 'U', 218 => 'U', 219 => 'U', 220 => 'U',
-                221 => 'Y', 142 => 'Z', 224 => 'a', 225 => 'a', 226 => 'a', 227 => 'a', 228 => 'a',
-                229 => 'a', 231 => 'c', 232 => 'e', 233 => 'e', 234 => 'e', 235 => 'e', 236 => 'i',
-                237 => 'i', 238 => 'i', 239 => 'i', 241 => 'n', 240 => 'o', 242 => 'o', 243 => 'o',
-                244 => 'o', 245 => 'o', 246 => 'o', 248 => 'o', 154 => 's', 249 => 'u', 250 => 'u',
-                251 => 'u', 252 => 'u', 253 => 'y', 255 => 'y', 158 => 'z',
-                // HTML entities
-                258 => 'A', 260 => 'A', 262 => 'C', 268 => 'C', 270 => 'D', 272 => 'D', 280 => 'E',
-                282 => 'E', 286 => 'G', 304 => 'I', 313 => 'L', 317 => 'L', 321 => 'L', 323 => 'N',
-                327 => 'N', 336 => 'O', 340 => 'R', 344 => 'R', 346 => 'S', 350 => 'S', 354 => 'T',
-                356 => 'T', 366 => 'U', 368 => 'U', 377 => 'Z', 379 => 'Z', 259 => 'a', 261 => 'a',
-                263 => 'c', 269 => 'c', 271 => 'd', 273 => 'd', 281 => 'e', 283 => 'e', 287 => 'g',
-                305 => 'i', 322 => 'l', 314 => 'l', 318 => 'l', 324 => 'n', 328 => 'n', 337 => 'o',
-                341 => 'r', 345 => 'r', 347 => 's', 351 => 's', 357 => 't', 355 => 't', 367 => 'u',
-                369 => 'u', 378 => 'z', 380 => 'z',
-                // ligatures
-                198 => 'Ae', 230 => 'ae', 140 => 'Oe', 156 => 'oe', 223 => 'ss',
-            );
-
-            if ($german) {
-                // umlauts
-                $germanReplacements = array(
-                    196 => 'Ae', 228 => 'ae', 214 => 'Oe', 246 => 'oe', 220 => 'Ue', 252 => 'ue'
-                );
-                $substitutions = $germanReplacements + $substitutions;
-            }
-
-            $replacements[$german] = array();
-            foreach ($substitutions as $code => $value) {
-                $replacements[$german][$code < 256 ? chr($code) : '&#' . $code . ';'] = $value;
-            }
-        }
-
-        // convert string from default database format (UTF-8)
-        // to encoding which replacement arrays made with (ISO-8859-1)
-        if ($convertedString = @iconv('UTF-8', 'ISO-8859-1', $string)) {
-            $string = $convertedString;
-        }
-        // Replace
-        $string = strtr($string, $replacements[$german]);
-        return $string;
-    }
-
     public function isDevAllowed($storeId = null)
     {
         $allow = true;
 
         $allowedIps = $this->_coreStoreConfig->getConfig(self::XML_PATH_DEV_ALLOW_IPS, $storeId);
-        $remoteAddr = $this->_coreHttp->getRemoteAddr();
+        $remoteAddr = $this->_remoteAddress->getRemoteAddress();
         if (!empty($allowedIps) && !empty($remoteAddr)) {
             $allowedIps = preg_split('#\s*,\s*#', $allowedIps, null, PREG_SPLIT_NO_EMPTY);
             if (array_search($remoteAddr, $allowedIps) === false
-                && array_search($this->_coreHttp->getHttpHost(), $allowedIps) === false) {
+                && array_search($this->_httpHeader->getHttpHost(), $allowedIps) === false) {
                 $allow = false;
             }
         }
@@ -649,101 +471,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         }
     }
 
-    /**
-     * Transform an assoc array to \SimpleXMLElement object
-     * Array has some limitations. Appropriate exceptions will be thrown
-     *
-     * @param array $array
-     * @param string $rootName
-     * @return \SimpleXMLElement
-     * @throws \Magento\Exception
-     */
-    public function assocToXml(array $array, $rootName = '_')
-    {
-        if (empty($rootName) || is_numeric($rootName)) {
-            throw new \Magento\Exception('Root element must not be empty or numeric');
-        }
-
-        $xmlstr = <<<XML
-<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
-<$rootName></$rootName>
-XML;
-        $xml = new \SimpleXMLElement($xmlstr);
-        foreach ($array as $key => $value) {
-            if (is_numeric($key)) {
-                throw new \Magento\Exception('Array root keys must not be numeric.');
-            }
-        }
-        return self::_assocToXml($array, $rootName, $xml);
-    }
-
-    /**
-     * Function, that actually recursively transforms array to xml
-     *
-     * @param array $array
-     * @param string $rootName
-     * @param \SimpleXMLElement $xml
-     * @return \SimpleXMLElement
-     * @throws \Magento\Exception
-     */
-    private function _assocToXml(array $array, $rootName, \SimpleXMLElement &$xml)
-    {
-        $hasNumericKey = false;
-        $hasStringKey  = false;
-        foreach ($array as $key => $value) {
-            if (!is_array($value)) {
-                if (is_string($key)) {
-                    if ($key === $rootName) {
-                        throw new \Magento\Exception(
-                            'Associative key must not be the same as its parent associative key.'
-                        );
-                    }
-                    $hasStringKey = true;
-                    $xml->$key = $value;
-                } elseif (is_int($key)) {
-                    $hasNumericKey = true;
-                    $xml->{$rootName}[$key] = $value;
-                }
-            } else {
-                self::_assocToXml($value, $key, $xml->$key);
-            }
-        }
-        if ($hasNumericKey && $hasStringKey) {
-            throw new \Magento\Exception('Associative and numeric keys must not be mixed at one level.');
-        }
-        return $xml;
-    }
-
-    /**
-     * Transform \SimpleXMLElement to associative array
-     * \SimpleXMLElement must be conform structure, generated by assocToXml()
-     *
-     * @param \SimpleXMLElement $xml
-     * @return array
-     */
-    public function xmlToAssoc(\SimpleXMLElement $xml)
-    {
-        $array = array();
-        foreach ($xml as $key => $value) {
-            if (isset($value->$key)) {
-                $i = 0;
-                foreach ($value->$key as $v) {
-                    $array[$key][$i++] = (string)$v;
-                }
-            } else {
-                // try to transform it into string value, trimming spaces between elements
-                $array[$key] = trim((string)$value);
-                if (empty($array[$key]) && !empty($value)) {
-                    $array[$key] = self::xmlToAssoc($value);
-                } else {
-                    // untrim strings values
-                    $array[$key] = (string)$value;
-                }
-            }
-        }
-        return $array;
-    }
-
     /**
      * Encode the mixed $valueToEncode into the JSON format
      *
@@ -775,17 +502,6 @@ XML;
         return \Zend_Json::decode($encodedValue, $objectDecodeType);
     }
 
-    /**
-     * Generate a hash from unique ID
-     *
-     * @param string $prefix
-     * @return string
-     */
-    public function uniqHash($prefix = '')
-    {
-        return $prefix . md5(uniqid(microtime() . mt_rand(), true));
-    }
-
     /**
      * Return default country code
      *
@@ -797,42 +513,6 @@ XML;
         return $this->_coreStoreConfig->getConfig(self::XML_PATH_DEFAULT_COUNTRY, $store);
     }
 
-    /**
-     * Return list with protected file extensions
-     *
-     * @param \Magento\Core\Model\Store|string|int $store
-     * @return array
-     */
-    public function getProtectedFileExtensions($store = null)
-    {
-        return $this->_coreStoreConfig->getConfig(self::XML_PATH_PROTECTED_FILE_EXTENSIONS, $store);
-    }
-
-    /**
-     * Return list with public files valid paths
-     *
-     * @return array
-     */
-    public function getPublicFilesValidPath()
-    {
-        return $this->_coreStoreConfig->getConfig(self::XML_PATH_PUBLIC_FILES_VALID_PATHS);
-    }
-
-    /**
-     * Check LFI protection
-     *
-     * @throws \Magento\Core\Exception
-     * @param string $name
-     * @return bool
-     */
-    public function checkLfiProtection($name)
-    {
-        if (preg_match('#\.\.[\\\/]#', $name)) {
-            throw new \Magento\Core\Exception(__('Requested file may not include parent directory traversal ("../", "..\\" notation)'));
-        }
-        return true;
-    }
-
     /**
      * Check whether database compatible mode is used (configs enable it for MySQL by default).
      *
@@ -843,60 +523,6 @@ XML;
         return $this->_dbCompatibleMode;
     }
 
-    /**
-     * Retrieve merchant country code
-     *
-     * @param \Magento\Core\Model\Store|string|int|null $store
-     * @return string
-     */
-    public function getMerchantCountryCode($store = null)
-    {
-        return (string) $this->_coreStoreConfig->getConfig(self::XML_PATH_MERCHANT_COUNTRY_CODE, $store);
-    }
-
-    /**
-     * Retrieve merchant VAT number
-     *
-     * @param \Magento\Core\Model\Store|string|int|null $store
-     * @return string
-     */
-    public function getMerchantVatNumber($store = null)
-    {
-        return (string) $this->_coreStoreConfig->getConfig(self::XML_PATH_MERCHANT_VAT_NUMBER, $store);
-    }
-
-    /**
-     * Check whether specified country is in EU countries list
-     *
-     * @param string $countryCode
-     * @param null|int $storeId
-     * @return bool
-     */
-    public function isCountryInEU($countryCode, $storeId = null)
-    {
-        $euCountries = explode(',', $this->_coreStoreConfig->getConfig(self::XML_PATH_EU_COUNTRIES_LIST, $storeId));
-        return in_array($countryCode, $euCountries);
-    }
-
-    /**
-     * Returns the floating point remainder (modulo) of the division of the arguments
-     *
-     * @param float|int $dividend
-     * @param float|int $divisor
-     * @return float|int
-     */
-    public function getExactDivision($dividend, $divisor)
-    {
-        $epsilon = $divisor / self::DIVIDE_EPSILON;
-
-        $remainder = fmod($dividend, $divisor);
-        if (abs($remainder - $divisor) < $epsilon || abs($remainder) < $epsilon) {
-            $remainder = 0;
-        }
-
-        return $remainder;
-    }
-
     /**
      * Check if Single-Store mode is enabled in configuration
      *
diff --git a/app/code/Magento/Core/Model/File/Storage/AbstractStorage.php b/app/code/Magento/Core/Helper/File/Media.php
similarity index 52%
rename from app/code/Magento/Core/Model/File/Storage/AbstractStorage.php
rename to app/code/Magento/Core/Helper/File/Media.php
index c05a8e90d57..9518ad1ac78 100644
--- a/app/code/Magento/Core/Model/File/Storage/AbstractStorage.php
+++ b/app/code/Magento/Core/Helper/File/Media.php
@@ -24,76 +24,30 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Helper\File;
 
 /**
- * Abstract file storage model class
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Class Media
  */
-namespace Magento\Core\Model\File\Storage;
-
-abstract class AbstractStorage extends \Magento\Core\Model\AbstractModel
+class Media extends \Magento\Core\Helper\AbstractHelper
 {
     /**
-     * Store media base directory path
-     *
-     * @var string
-     */
-    protected $_mediaBaseDirectory = null;
-
-    /**
-     * Core file storage database
-     *
-     * @var \Magento\Core\Helper\File\Storage\Database
-     */
-    protected $_coreFileStorageDb = null;
-
-    /**
-     * Date model
-     *
      * @var \Magento\Core\Model\Date
      */
     protected $_date;
 
     /**
-     * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb
-     * @param \Magento\Core\Model\Context $context
-     * @param \Magento\Core\Model\Registry $registry
+     * Constructor
+     *
+     * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Core\Model\Date $date
-     * @param \Magento\Core\Model\Resource\AbstractResource $resource
-     * @param \Magento\Data\Collection\Db $resourceCollection
-     * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb,
-        \Magento\Core\Model\Context $context,
-        \Magento\Core\Model\Registry $registry,
-        \Magento\Core\Model\Date $date,
-        \Magento\Core\Model\Resource\AbstractResource $resource = null,
-        \Magento\Data\Collection\Db $resourceCollection = null,
-        array $data = array()
+        \Magento\Core\Helper\Context $context,
+        \Magento\Core\Model\Date $date
     ) {
-        $this->_coreFileStorageDb = $coreFileStorageDb;
+        parent::__construct($context);
         $this->_date = $date;
-        parent::__construct($context, $registry, $resource, $resourceCollection, $data);
-    }
-
-    /**
-     * Retrieve media base directory path
-     *
-     * @return string
-     */
-    public function getMediaBaseDirectory()
-    {
-        if (null === $this->_mediaBaseDirectory) {
-            /** @var $helper \Magento\Core\Helper\File\Storage\Database */
-            $helper = $this->_coreFileStorageDb;
-            $this->_mediaBaseDirectory = $helper->getMediaBaseDir();
-        }
-
-        return $this->_mediaBaseDirectory;
     }
 
     /**
@@ -104,16 +58,16 @@ abstract class AbstractStorage extends \Magento\Core\Model\AbstractModel
      *  content     => string|bool
      *  update_time => string
      *  directory   => string
-     * )
      *
-     * @param  string $path
-     * @throws \Magento\Core\Exception
+     * @param string $mediaDirectory
+     * @param string $path
      * @return array
+     * @throws \Magento\Core\Exception
      */
-    public function collectFileInfo($path)
+    public function collectFileInfo($mediaDirectory, $path)
     {
         $path = ltrim($path, '\\/');
-        $fullPath = $this->getMediaBaseDirectory() . DS . $path;
+        $fullPath = $mediaDirectory . DS . $path;
 
         if (!file_exists($fullPath) || !is_file($fullPath)) {
             throw new \Magento\Core\Exception(__('File %1 does not exist', $fullPath));
diff --git a/app/code/Magento/Core/Helper/File/Storage.php b/app/code/Magento/Core/Helper/File/Storage.php
index bc7c116e1ef..3da083470a7 100644
--- a/app/code/Magento/Core/Helper/File/Storage.php
+++ b/app/code/Magento/Core/Helper/File/Storage.php
@@ -64,15 +64,25 @@ class Storage extends \Magento\Core\Helper\AbstractHelper
     protected $_storage;
 
     /**
-     * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb
+     * File system storage model
+     *
+     * @var \Magento\Core\Model\File\Storage\File
+     */
+    protected $_filesystemStorage;
+
+    /**
+     * @param Storage\Database $coreFileStorageDb
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Core\Model\File\Storage $storage
+     * @param \Magento\Core\Model\File\Storage\File $filesystemStorage
      */
     public function __construct(
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb,
         \Magento\Core\Helper\Context $context,
-        \Magento\Core\Model\File\Storage $storage
+        \Magento\Core\Model\File\Storage $storage,
+        \Magento\Core\Model\File\Storage\File $filesystemStorage
     ) {
+        $this->_filesystemStorage = $filesystemStorage;
         $this->_coreFileStorageDb = $coreFileStorageDb;
         $this->_storage = $storage;
         parent::__construct($context);
@@ -100,8 +110,7 @@ class Storage extends \Magento\Core\Helper\AbstractHelper
      */
     public function getStorageFileModel()
     {
-        return $objectManager = \Magento\Core\Model\ObjectManager::getInstance()
-            ->getSingleton('Magento\Core\Model\File\Storage\File');
+        return $this->_filesystemStorage;
     }
 
     /**
diff --git a/app/code/Magento/Core/Helper/Hint.php b/app/code/Magento/Core/Helper/Hint.php
deleted file mode 100644
index 2a865973361..00000000000
--- a/app/code/Magento/Core/Helper/Hint.php
+++ /dev/null
@@ -1,103 +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_Core
- * @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)
- */
-
-/**
- * Core hint helper
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Core\Helper;
-
-class Hint extends \Magento\Core\Helper\AbstractHelper
-{
-    /**
-     * List of available hints
-     *
-     * @var null|array
-     */
-    protected $_availableHints;
-
-    /**
-     * @var \Magento\Core\Model\Config
-     */
-    protected $_coreConfig;
-
-    /**
-     * Constructor
-     *
-     * @param \Magento\Core\Helper\Context $context
-     * @param \Magento\Core\Model\Config $coreConfig
-     */
-    public function __construct(
-        \Magento\Core\Helper\Context $context,
-        \Magento\Core\Model\Config $coreConfig
-    ) {
-        parent::__construct(
-            $context
-        );
-        $this->_coreConfig = $coreConfig;
-    }
-
-    /**
-     * Retrieve list of available hints as [hint code] => [hint url]
-     *
-     * @return array
-     */
-    public function getAvailableHints()
-    {
-        if (null === $this->_availableHints) {
-            $hints = array();
-            $config = $this->_coreConfig->getValue('hints', 'default');
-            if ($config) {
-                foreach ($config as $type => $configValue) {
-                    if (isset($configValue['enabled']) && $configValue['enabled']) {
-                        $hints[$type] = $configValue['url'];
-                    }
-                }
-            }
-            $this->_availableHints = $hints;
-        }
-        return $this->_availableHints;
-    }
-
-    /**
-     * Get Hint Url by Its Code
-     *
-     * @param string $code
-     * @return null|string
-     */
-    public function getHintByCode($code)
-    {
-        $hint = null;
-        $hints = $this->getAvailableHints();
-        if (array_key_exists($code, $hints)) {
-            $hint = $hints[$code];
-        }
-        return $hint;
-    }
-}
diff --git a/app/code/Magento/Core/Helper/Http.php b/app/code/Magento/Core/Helper/Http.php
deleted file mode 100644
index 9171a4c98c1..00000000000
--- a/app/code/Magento/Core/Helper/Http.php
+++ /dev/null
@@ -1,291 +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_Core
- * @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)
- */
-
-/**
- * Core Http Helper
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Core\Helper;
-
-class Http extends \Magento\Core\Helper\AbstractHelper
-{
-    const XML_NODE_REMOTE_ADDR_HEADERS  = 'global/remote_addr_headers';
-
-    /**
-     * Remote address cache
-     *
-     * @var string
-     */
-    protected $_remoteAddr;
-
-    /**
-     * Core string
-     *
-     * @var \Magento\Core\Helper\String
-     */
-    protected $_coreString = null;
-
-    /**
-     * @var \Magento\Core\Model\Config
-     */
-    protected $_coreConfig;
-
-    /**
-     * @param \Magento\Core\Helper\String $coreString
-     * @param \Magento\Core\Helper\Context $context
-     * @param \Magento\Core\Model\Config $coreConfig
-     */
-    public function __construct(
-        \Magento\Core\Helper\String $coreString,
-        \Magento\Core\Helper\Context $context,
-        \Magento\Core\Model\Config $coreConfig
-    ) {
-        $this->_coreString = $coreString;
-        $this->_coreConfig = $coreConfig;
-        parent::__construct($context);
-    }
-
-    /**
-     * Extract "login" and "password" credentials from HTTP-request
-     *
-     * Returns plain array with 2 items: login and password respectively
-     *
-     * @param \Magento\App\RequestInterface $request
-     * @return array
-     */
-    public function getHttpAuthCredentials(\Magento\App\RequestInterface $request)
-    {
-        $server = $request->getServer();
-        $user = '';
-        $pass = '';
-
-        if (empty($server['HTTP_AUTHORIZATION'])) {
-            foreach ($server as $k => $v) {
-                if (substr($k, -18) === 'HTTP_AUTHORIZATION' && !empty($v)) {
-                    $server['HTTP_AUTHORIZATION'] = $v;
-                    break;
-                }
-            }
-        }
-
-        if (isset($server['PHP_AUTH_USER']) && isset($server['PHP_AUTH_PW'])) {
-            $user = $server['PHP_AUTH_USER'];
-            $pass = $server['PHP_AUTH_PW'];
-        }
-        /**
-         * IIS Note: for HTTP authentication to work with IIS,
-         * the PHP directive cgi.rfc2616_headers must be set to 0 (the default value).
-         */
-        elseif (!empty($server['HTTP_AUTHORIZATION'])) {
-            $auth = $server['HTTP_AUTHORIZATION'];
-            list($user, $pass) = explode(':', base64_decode(substr($auth, strpos($auth, " ") + 1)));
-        }
-        elseif (!empty($server['Authorization'])) {
-            $auth = $server['Authorization'];
-            list($user, $pass) = explode(':', base64_decode(substr($auth, strpos($auth, " ") + 1)));
-        }
-
-        return array($user, $pass);
-    }
-
-    /**
-     * Set "auth failed" headers to the specified response object
-     *
-     * @param \Magento\App\ResponseInterface $response
-     * @param string $realm
-     */
-    public function failHttpAuthentication(\Magento\App\ResponseInterface $response, $realm)
-    {
-        $response->setHeader('HTTP/1.1', '401 Unauthorized')
-            ->setHeader('WWW-Authenticate', 'Basic realm="' . $realm . '"')
-            ->setBody('<h1>401 Unauthorized</h1>')
-        ;
-    }
-
-    /**
-     * Retrieve Remote Addresses Additional check Headers
-     *
-     * @return array
-     */
-    public function getRemoteAddrHeaders()
-    {
-        $headers = array();
-        $element = $this->_coreConfig->getNode(self::XML_NODE_REMOTE_ADDR_HEADERS);
-        if ($element instanceof \Magento\Core\Model\Config\Element) {
-            foreach ($element->children() as $node) {
-                $headers[] = (string)$node;
-            }
-        }
-
-        return $headers;
-    }
-
-    /**
-     * Retrieve Client Remote Address
-     *
-     * @param bool $ipToLong converting IP to long format
-     * @return string IPv4|long
-     */
-    public function getRemoteAddr($ipToLong = false)
-    {
-        if (is_null($this->_remoteAddr)) {
-            $headers = $this->getRemoteAddrHeaders();
-            foreach ($headers as $var) {
-                if ($this->_getRequest()->getServer($var, false)) {
-                    $this->_remoteAddr = $_SERVER[$var];
-                    break;
-                }
-            }
-
-            if (!$this->_remoteAddr) {
-                $this->_remoteAddr = $this->_getRequest()->getServer('REMOTE_ADDR');
-            }
-        }
-
-        if (!$this->_remoteAddr) {
-            return false;
-        }
-
-        return $ipToLong ? ip2long($this->_remoteAddr) : $this->_remoteAddr;
-    }
-
-    /**
-     * Retrieve Server IP address
-     *
-     * @param bool $ipToLong converting IP to long format
-     * @return string IPv4|long
-     */
-    public function getServerAddr($ipToLong = false)
-    {
-        $address = $this->_getRequest()->getServer('SERVER_ADDR');
-        if (!$address) {
-            return false;
-        }
-        return $ipToLong ? ip2long($address) : $address;
-    }
-
-    /**
-     * Retrieve HTTP "clean" value
-     *
-     * @param string $var
-     * @param boolean $clean clean non UTF-8 characters
-     * @return string
-     */
-    protected function _getHttpCleanValue($var, $clean = true)
-    {
-        $value = $this->_getRequest()->getServer($var, '');
-        if ($clean) {
-            $value = $this->_coreString->cleanString($value);
-        }
-
-        return $value;
-    }
-
-    /**
-     * Retrieve HTTP HOST
-     *
-     * @param boolean $clean clean non UTF-8 characters
-     * @return string
-     */
-    public function getHttpHost($clean = true)
-    {
-        return $this->_getHttpCleanValue('HTTP_HOST', $clean);
-    }
-
-    /**
-     * Retrieve HTTP USER AGENT
-     *
-     * @param boolean $clean clean non UTF-8 characters
-     * @return string
-     */
-    public function getHttpUserAgent($clean = true)
-    {
-        return $this->_getHttpCleanValue('HTTP_USER_AGENT', $clean);
-    }
-
-    /**
-     * Retrieve HTTP ACCEPT LANGUAGE
-     *
-     * @param boolean $clean clean non UTF-8 characters
-     * @return string
-     */
-    public function getHttpAcceptLanguage($clean = true)
-    {
-        return $this->_getHttpCleanValue('HTTP_ACCEPT_LANGUAGE', $clean);
-    }
-
-    /**
-     * Retrieve HTTP ACCEPT CHARSET
-     *
-     * @param boolean $clean clean non UTF-8 characters
-     * @return string
-     */
-    public function getHttpAcceptCharset($clean = true)
-    {
-        return $this->_getHttpCleanValue('HTTP_ACCEPT_CHARSET', $clean);
-    }
-
-    /**
-     * Retrieve HTTP REFERER
-     *
-     * @param boolean $clean clean non UTF-8 characters
-     * @return string
-     */
-    public function getHttpReferer($clean = true)
-    {
-        return $this->_getHttpCleanValue('HTTP_REFERER', $clean);
-    }
-
-    /**
-     * Returns the REQUEST_URI taking into account
-     * platform differences between Apache and IIS
-     *
-     * @param boolean $clean clean non UTF-8 characters
-     * @return string
-     */
-    public function getRequestUri($clean = false)
-    {
-        $uri = $this->_getRequest()->getRequestUri();
-        if ($clean) {
-            $uri = $this->_coreString->cleanString($uri);
-        }
-        return $uri;
-    }
-
-    /**
-     * Validate IP address
-     *
-     * @param string $address
-     * @return boolean
-     */
-    public function validateIpAddr($address)
-    {
-        return preg_match('#^(1?\d{1,2}|2([0-4]\d|5[0-5]))(\.(1?\d{1,2}|2([0-4]\d|5[0-5]))){3}$#', $address);
-    }
-}
diff --git a/app/code/Magento/Core/Helper/String.php b/app/code/Magento/Core/Helper/String.php
index adbc4aed30c..257003e2198 100644
--- a/app/code/Magento/Core/Helper/String.php
+++ b/app/code/Magento/Core/Helper/String.php
@@ -24,303 +24,28 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Helper;
+
 /**
  * Core data helper
- *
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Core\Helper;
-
 class String extends \Magento\Core\Helper\AbstractHelper
 {
-    const ICONV_CHARSET = 'UTF-8';
-
-    /**
-     * @var \Magento\Core\Model\LocaleInterface
-     */
-    protected $_locale;
-
-    /**
-     * @param \Magento\Core\Helper\Context $context
-     * @param \Magento\Core\Model\Locale $locale
-     */
-    public function __construct(
-        \Magento\Core\Helper\Context $context,
-        \Magento\Core\Model\Locale $locale)
-    {
-        parent::__construct($context);
-        $this->_locale = $locale;
-    }
-
-
-    /**
-     * Truncate a string to a certain length if necessary, appending the $etc string.
-     * $remainder will contain the string that has been replaced with $etc.
-     *
-     * @param string $string
-     * @param int $length
-     * @param string $etc
-     * @param string &$remainder
-     * @param bool $breakWords
-     * @return string
-     */
-    public function truncate($string, $length = 80, $etc = '...', &$remainder = '', $breakWords = true)
-    {
-        $remainder = '';
-        if (0 == $length) {
-            return '';
-        }
-
-        $originalLength = $this->strlen($string);
-        if ($originalLength > $length) {
-            $length -= $this->strlen($etc);
-            if ($length <= 0) {
-                return '';
-            }
-            $preparedString = $string;
-            $preparedlength = $length;
-            if (!$breakWords) {
-                $preparedString = preg_replace('/\s+?(\S+)?$/u', '', $this->substr($string, 0, $length + 1));
-                $preparedlength = $this->strlen($preparedString);
-            }
-            $remainder = $this->substr($string, $preparedlength, $originalLength);
-            return $this->substr($preparedString, 0, $length) . $etc;
-        }
-
-        return $string;
-    }
-
-    /**
-     * Retrieve string length using default charset
-     *
-     * @param string $string
-     * @return int
-     */
-    public function strlen($string)
-    {
-        return iconv_strlen($string, self::ICONV_CHARSET);
-    }
-
-    /**
-     * Passthrough to iconv_substr()
-     *
-     * @param string $string
-     * @param int $offset
-     * @param int $length
-     * @return string
-     */
-    public function substr($string, $offset, $length = null)
-    {
-        $string = $this->cleanString($string);
-        if (is_null($length)) {
-            $length = $this->strlen($string) - $offset;
-        }
-        return iconv_substr($string, $offset, $length, self::ICONV_CHARSET);
-    }
-
-    /**
-     * Split string and appending $insert string after $needle
-     *
-     * @param string $str
-     * @param integer $length
-     * @param string $needle
-     * @param string $insert
-     * @return string
-     */
-    public function splitInjection($str, $length = 50, $needle = '-', $insert = ' ')
-    {
-        $str = $this->strSplit($str, $length);
-        $newStr = '';
-        foreach ($str as $part) {
-            if ($this->strlen($part) >= $length) {
-                $lastDelimetr = $this->strpos($this->strrev($part), $needle);
-                $tmpNewStr = '';
-                $tmpNewStr = $this->substr($this->strrev($part), 0, $lastDelimetr)
-                    . $insert . $this->substr($this->strrev($part), $lastDelimetr);
-                $newStr .= $this->strrev($tmpNewStr);
-            } else {
-                $newStr .= $part;
-            }
-        }
-        return $newStr;
-    }
-
-    /**
-     * Binary-safe strrev()
-     *
-     * @param string $str
-     * @return string
-     */
-    public function strrev($str)
-    {
-        $result = '';
-        $strlen = $this->strlen($str);
-        if (!$strlen) {
-            return $result;
-        }
-        for ($i = $strlen-1; $i >= 0; $i--) {
-            $result .= $this->substr($str, $i, 1);
-        }
-        return $result;
-    }
-
-    /**
-     * Binary-safe variant of strSplit()
-     * + option not to break words
-     * + option to trim spaces (between each word)
-     * + option to set character(s) (pcre pattern) to be considered as words separator
-     *
-     * @param string $str
-     * @param int $length
-     * @param bool $keepWords
-     * @param bool $trim
-     * @param string $wordSeparatorRegex
-     * @return array
-     */
-    public function strSplit($str, $length = 1, $keepWords = false, $trim = false, $wordSeparatorRegex = '\s')
-    {
-        $result = array();
-        $strlen = $this->strlen($str);
-        if ((!$strlen) || (!is_int($length)) || ($length <= 0)) {
-            return $result;
-        }
-        // trim
-        if ($trim) {
-            $str = trim(preg_replace('/\s{2,}/siu', ' ', $str));
-        }
-        // do a usual str_split, but safe for our encoding
-        if ((!$keepWords) || ($length < 2)) {
-            for ($offset = 0; $offset < $strlen; $offset += $length) {
-                $result[] = $this->substr($str, $offset, $length);
-            }
-        }
-        // split smartly, keeping words
-        else {
-            $split = preg_split('/(' . $wordSeparatorRegex . '+)/siu', $str, null, PREG_SPLIT_DELIM_CAPTURE);
-            $i        = 0;
-            $space    = '';
-            $spaceLen = 0;
-            foreach ($split as $key => $part) {
-                if ($trim) {
-                    // ignore spaces (even keys)
-                    if ($key % 2) {
-                        continue;
-                    }
-                    $space    = ' ';
-                    $spaceLen = 1;
-                }
-                if (empty($result[$i])) {
-                    $currentLength = 0;
-                    $result[$i]    = '';
-                    $space         = '';
-                    $spaceLen      = 0;
-                }
-                else {
-                    $currentLength = $this->strlen($result[$i]);
-                }
-                $partLength = $this->strlen($part);
-                // add part to current last element
-                if (($currentLength + $spaceLen + $partLength) <= $length) {
-                    $result[$i] .= $space . $part;
-                }
-                // add part to new element
-                elseif ($partLength <= $length) {
-                    $i++;
-                    $result[$i] = $part;
-                }
-                // break too long part recursively
-                else {
-                    foreach ($this->strSplit($part, $length, false, $trim, $wordSeparatorRegex) as $subpart) {
-                        $i++;
-                        $result[$i] = $subpart;
-                    }
-                }
-            }
-        }
-        // remove last element, if empty
-        if ($count = count($result)) {
-            if ($result[$count - 1] === '') {
-                unset($result[$count - 1]);
-            }
-        }
-        // remove first element, if empty
-        if (isset($result[0]) && $result[0] === '') {
-            array_shift($result);
-        }
-        return $result;
-    }
-
     /**
-     * Split words
+     * Builds namespace + classname out of the parts array
      *
-     * @param string $str The source string
-     * @param bool $uniqueOnly Unique words only
-     * @param int $maxWordLength Limit words count
-     * @param string $wordSeparatorRegexp
-     * @return array
-     */
-    function splitWords($str, $uniqueOnly = false, $maxWordLength = 0, $wordSeparatorRegexp = '\s')
-    {
-        $result = array();
-        $split = preg_split('#' . $wordSeparatorRegexp . '#siu', $str, null, PREG_SPLIT_NO_EMPTY);
-        foreach ($split as $word) {
-            if ($uniqueOnly) {
-                $result[$word] = $word;
-            }
-            else {
-                $result[] = $word;
-            }
-        }
-        if ($maxWordLength && count($result) > $maxWordLength) {
-            $result = array_slice($result, 0, $maxWordLength);
-        }
-        return $result;
-    }
-
-    /**
-     * Clean non UTF-8 characters
+     * Split every part into pieces by _ and \ and uppercase every piece
+     * Then join them back using \
      *
-     * @param string $string
+     * @param $parts
      * @return string
      */
-    public function cleanString($string)
+    public static function buildClassName($parts)
     {
-        return '"libiconv"' == ICONV_IMPL ?
-            iconv(self::ICONV_CHARSET, self::ICONV_CHARSET . '//IGNORE', $string) : $string;
+        $separator = \Magento\Autoload\IncludePath::NS_SEPARATOR;
+        $string = join($separator, $parts);
+        $string = str_replace('_', $separator, $string);
+        $className = str_replace(' ', $separator, ucwords(str_replace($separator, ' ', $string)));
+        return $className;
     }
-
-    /**
-     * Find position of first occurrence of a string
-     *
-     * @param string $haystack
-     * @param string $needle
-     * @param int $offset
-     * @return int|false
-     */
-    public function strpos($haystack, $needle, $offset = null)
-    {
-        return iconv_strpos($haystack, $needle, $offset, self::ICONV_CHARSET);
-    }
-
-    /**
-     * Sorts array with multibyte string keys
-     *
-     * @param array $sort
-     * @return array
-     */
-    public function ksortMultibyte(array &$sort)
-    {
-        if (empty($sort)) {
-            return false;
-        }
-        $oldLocale = setlocale(LC_COLLATE, "0");
-        $localeCode = $this->_locale->getLocaleCode();
-        // use fallback locale if $localeCode is not available
-        setlocale(LC_COLLATE,  $localeCode . '.UTF8', 'C.UTF-8', 'en_US.utf8');
-        ksort($sort, SORT_LOCALE_STRING);
-        setlocale(LC_COLLATE, $oldLocale);
-
-        return $sort;
-    }
-
 }
diff --git a/app/code/Magento/Core/Helper/Translate.php b/app/code/Magento/Core/Helper/Translate.php
index 1d92e730493..2fc62fd7161 100644
--- a/app/code/Magento/Core/Helper/Translate.php
+++ b/app/code/Magento/Core/Helper/Translate.php
@@ -83,23 +83,21 @@ class Translate extends \Magento\Core\Helper\AbstractHelper
     /**
      * This method initializes the Translate object for this instance.
      * @param $localeCode string
-     * @param $area string
      * @param $forceReload bool
      * @return \Magento\Core\Model\Translate
      */
-    public function initTranslate($localeCode, $area, $forceReload)
+    public function initTranslate($localeCode, $forceReload)
     {
         $this->_translator->setLocale($localeCode);
 
         $dispatchResult = new \Magento\Object(array(
-            'inline_type' => null,
-            'params' => array('area' => $area)
+            'inline_type' => null
         ));
         $this->_eventManager->dispatch('translate_initialization_before', array(
             'translate_object' => $this->_translator,
             'result' => $dispatchResult
         ));
-        $this->_translator->init($area, $dispatchResult, $forceReload);
+        $this->_translator->init(null, $dispatchResult, $forceReload);
         return $this;
     }
 }
diff --git a/app/code/Magento/Core/Model/AbstractEntryPoint.php b/app/code/Magento/Core/Model/AbstractEntryPoint.php
deleted file mode 100644
index f2579ef46db..00000000000
--- a/app/code/Magento/Core/Model/AbstractEntryPoint.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-/**
- * Abstract application entry point
- *
- * 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;
-
-abstract class AbstractEntryPoint
-{
-    /**
-     * Application configuration
-     *
-     * @var \Magento\Core\Model\Config\Primary
-     */
-    protected $_config;
-
-    /**
-     * Application object manager
-     *
-     * @var \Magento\Core\Model\ObjectManager
-     */
-    protected $_objectManager;
-
-    /**
-     * @param \Magento\Core\Model\Config\Primary $config
-     * @param \Magento\ObjectManager $objectManager
-     */
-    public function __construct(
-        \Magento\Core\Model\Config\Primary $config,
-        \Magento\ObjectManager $objectManager = null
-    ) {
-        $this->_config = $config;
-        $this->_objectManager = $objectManager;
-    }
-
-    /**
-     * Process request by the application
-     */
-    public function processRequest()
-    {
-        $this->_init();
-        $this->_processRequest();
-    }
-
-    /**
-     * Process exception
-     *
-     * @param \Exception $exception
-     */
-    public function processException(\Exception $exception)
-    {
-        $this->_init();
-        $appMode = $this->_objectManager->get('Magento\App\State')->getMode();
-        if ($appMode == \Magento\App\State::MODE_DEVELOPER) {
-            print '<pre>';
-            print $exception->getMessage() . "\n\n";
-            print $exception->getTraceAsString();
-            print '</pre>';
-        } else {
-            $reportData = array($exception->getMessage(), $exception->getTraceAsString());
-
-            // retrieve server data
-            if (isset($_SERVER)) {
-                if (isset($_SERVER['REQUEST_URI'])) {
-                    $reportData['url'] = $_SERVER['REQUEST_URI'];
-                }
-                if (isset($_SERVER['SCRIPT_NAME'])) {
-                    $reportData['script_name'] = $_SERVER['SCRIPT_NAME'];
-                }
-            }
-
-            // attempt to specify store as a skin
-            try {
-                $storeManager = $this->_objectManager->get('Magento\Core\Model\StoreManager');
-                $reportData['skin'] = $storeManager->getStore()->getCode();
-            } catch (\Exception $exception) {
-            }
-
-            $modelDir = $this->_objectManager->get('Magento\App\Dir');
-            require_once($modelDir->getDir(\Magento\App\Dir::PUB) . DS . 'errors' . DS . 'report.php');
-        }
-    }
-
-    /**
-     * Initializes the entry point, so a Magento application is ready to be used
-     */
-    protected function _init()
-    {
-        if (!$this->_objectManager) {
-            $this->_objectManager = new \Magento\Core\Model\ObjectManager($this->_config);
-        }
-    }
-
-    /**
-     * Template method to process request according to the actual entry point rules
-     */
-    protected abstract function _processRequest();
-}
-
diff --git a/app/code/Magento/Core/Model/AbstractModel.php b/app/code/Magento/Core/Model/AbstractModel.php
index b43e28bbb44..ea2283b2751 100644
--- a/app/code/Magento/Core/Model/AbstractModel.php
+++ b/app/code/Magento/Core/Model/AbstractModel.php
@@ -119,7 +119,7 @@ abstract class AbstractModel extends \Magento\Object
     /**
      * Application Cache Manager
      *
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cacheManager;
 
@@ -129,7 +129,7 @@ abstract class AbstractModel extends \Magento\Object
     protected $_coreRegistry;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -196,9 +196,9 @@ abstract class AbstractModel extends \Magento\Object
      */
     public function __wakeup()
     {
-        $objectManager = \Magento\Core\Model\ObjectManager::getInstance();
+        $objectManager = \Magento\App\ObjectManager::getInstance();
         $this->_eventDispatcher = $objectManager->get('Magento\Event\ManagerInterface');
-        $this->_cacheManager = $objectManager->get('Magento\Core\Model\CacheInterface');
+        $this->_cacheManager = $objectManager->get('Magento\App\CacheInterface');
         $this->_coreRegistry = $objectManager->get('Magento\Core\Model\Registry');
     }
 
@@ -231,7 +231,7 @@ abstract class AbstractModel extends \Magento\Object
             throw new \Magento\Core\Exception(__('Resource is not set.'));
         }
 
-        return $this->_resource ?: \Magento\Core\Model\ObjectManager::getInstance()->get($this->_resourceName);
+        return $this->_resource ?: \Magento\App\ObjectManager::getInstance()->get($this->_resourceName);
     }
 
     /**
@@ -259,7 +259,7 @@ abstract class AbstractModel extends \Magento\Object
         }
         return $this->_resourceCollection
             ? clone $this->_resourceCollection
-            : \Magento\Core\Model\ObjectManager::getInstance()->create(
+            : \Magento\App\ObjectManager::getInstance()->create(
                 $this->_collectionName, array('resource' => $this->_getResource())
             );
     }
@@ -632,7 +632,7 @@ abstract class AbstractModel extends \Magento\Object
             return;
         }
         /* Store manager does not work well in this place when injected via context */
-        if (!\Magento\Core\Model\ObjectManager::getInstance()
+        if (!\Magento\App\ObjectManager::getInstance()
             ->get('Magento\Core\Model\StoreManager')->getStore()->isAdmin()
         ) {
             throw new \Magento\Core\Exception(__('Cannot complete this operation from non-admin area.'));
diff --git a/app/code/Magento/Core/Model/App.php b/app/code/Magento/Core/Model/App.php
index 4cd0af35142..f2b8dbf3156 100644
--- a/app/code/Magento/Core/Model/App.php
+++ b/app/code/Magento/Core/Model/App.php
@@ -31,6 +31,8 @@
  */
 namespace Magento\Core\Model;
 
+use Magento\App\CacheInterface;
+
 class App implements \Magento\Core\Model\AppInterface
 {
     /**#@+
@@ -51,32 +53,8 @@ class App implements \Magento\Core\Model\AppInterface
     /**
      * Magento version
      */
-    const VERSION = '2.0.0.0-dev50';
+    const VERSION = '2.0.0.0-dev51';
 
-    /**
-     * Custom application dirs
-     */
-    const PARAM_APP_DIRS = 'app_dirs';
-
-    /**
-     * Custom application uris
-     */
-    const PARAM_APP_URIS = 'app_uris';
-
-    /**
-     * Custom local configuration file name
-     */
-    const PARAM_CUSTOM_LOCAL_FILE = 'custom_local_xml';
-
-    /**
-     * Custom local configuration
-     */
-    const PARAM_CUSTOM_LOCAL_CONFIG = 'custom_local_config';
-
-    /**
-     * Application run code
-     */
-    const PARAM_MODE = 'MAGE_MODE';
 
     /**
      * Application run code
@@ -141,7 +119,7 @@ class App implements \Magento\Core\Model\AppInterface
     /**
      * Cache object
      *
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cache;
 
@@ -184,7 +162,7 @@ class App implements \Magento\Core\Model\AppInterface
     /**
      * Data base updater object
      *
-     * @var \Magento\App\UpdaterInterface
+     * @var \Magento\Module\UpdaterInterface
      */
     protected $_dbUpdater;
 
@@ -222,7 +200,7 @@ class App implements \Magento\Core\Model\AppInterface
      */
     public function __construct(
         \Magento\Core\Model\Config $config,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\ObjectManager $objectManager,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Event\ManagerInterface $eventManager,
@@ -274,19 +252,6 @@ class App implements \Magento\Core\Model\AppInterface
         return $this;
     }
 
-    /**
-     * Loading application area
-     *
-     * @param   string $code
-     * @return  \Magento\Core\Model\App
-     */
-    public function loadArea($code)
-    {
-        $this->_configScope->setCurrentScope($code);
-        $this->getArea($code)->load();
-        return $this;
-    }
-
     /**
      * Loading part of area data
      *
@@ -383,7 +348,7 @@ class App implements \Magento\Core\Model\AppInterface
     /**
      * Get core cache model
      *
-     * @return \Magento\Core\Model\CacheInterface
+     * @return \Magento\App\CacheInterface
      */
     public function getCacheInstance()
     {
@@ -836,7 +801,7 @@ class App implements \Magento\Core\Model\AppInterface
             'revision'  => '0',
             'patch'     => '0',
             'stability' => 'dev',
-            'number'    => '50',
+            'number'    => '51',
         );
     }
 }
diff --git a/app/code/Magento/Core/Model/App/Area.php b/app/code/Magento/Core/Model/App/Area.php
index b22a806dbdd..ef449a77f93 100644
--- a/app/code/Magento/Core/Model/App/Area.php
+++ b/app/code/Magento/Core/Model/App/Area.php
@@ -36,7 +36,6 @@ class Area
     const AREA_GLOBAL   = 'global';
     const AREA_FRONTEND = 'frontend';
     const AREA_ADMIN    = 'admin';
-    const AREA_ADMINHTML = 'adminhtml';
 
     const PART_CONFIG   = 'config';
     const PART_TRANSLATE= 'translate';
@@ -90,7 +89,7 @@ class Area
     protected $_objectManager;
 
     /**
-     * @var \Magento\Core\Model\ObjectManager\ConfigLoader
+     * @var \Magento\App\ObjectManager\ConfigLoader
      */
     protected $_diConfigLoader;
 
@@ -102,12 +101,12 @@ class Area
     protected $_coreStoreConfig;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * Core design
      *
      * @var \Magento\Core\Model\Design
@@ -120,24 +119,24 @@ class Area
     protected $_storeManager;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Model\Translate $translator
      * @param \Magento\Core\Model\Config $config
-     * @param \Magento\Core\Model\ObjectManager $objectManager
-     * @param \Magento\Core\Model\ObjectManager\ConfigLoader $diConfigLoader
+     * @param \Magento\ObjectManager $objectManager
+     * @param \Magento\App\ObjectManager\ConfigLoader $diConfigLoader
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\Design $design
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param string $areaCode
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Model\Translate $translator,
         \Magento\Core\Model\Config $config,
-        \Magento\Core\Model\ObjectManager $objectManager,
-        \Magento\Core\Model\ObjectManager\ConfigLoader $diConfigLoader,
+        \Magento\ObjectManager $objectManager,
+        \Magento\App\ObjectManager\ConfigLoader $diConfigLoader,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\Design $design,
         \Magento\Core\Model\StoreManager $storeManager,
@@ -281,7 +280,7 @@ class Area
             'translate_object' => $this->_translator,
             'result' => $dispatchResult
         ));
-        $this->_translator->init($this->_code, $dispatchResult, false);
+        $this->_translator->init(null, $dispatchResult, false);
 
         \Magento\Phrase::setRenderer($this->_objectManager->get('Magento\Phrase\RendererInterface'));
         return $this;
diff --git a/app/code/Magento/Core/Model/App/Emulation.php b/app/code/Magento/Core/Model/App/Emulation.php
index bb586f4c813..a14b1719376 100644
--- a/app/code/Magento/Core/Model/App/Emulation.php
+++ b/app/code/Magento/Core/Model/App/Emulation.php
@@ -230,7 +230,7 @@ class Emulation extends \Magento\Object
             $storeId
         );
         $this->_locale->setLocaleCode($newLocaleCode);
-        $this->_helperTranslate->initTranslate($newLocaleCode, $area, true);
+        $this->_helperTranslate->initTranslate($newLocaleCode, true);
         return $initialLocaleCode;
     }
 
@@ -271,7 +271,7 @@ class Emulation extends \Magento\Object
     protected function _restoreInitialLocale($initialLocaleCode, $initialArea = \Magento\Core\Model\App\Area::AREA_ADMIN)
     {
         $this->_app->getLocale()->setLocaleCode($initialLocaleCode);
-        $this->_helperTranslate->initTranslate($initialLocaleCode, $initialArea, true);
+        $this->_helperTranslate->initTranslate($initialLocaleCode, true);
         return $this;
     }
 }
diff --git a/app/code/Magento/Core/Model/AppInterface.php b/app/code/Magento/Core/Model/AppInterface.php
index f0a690829be..7b57c3fffaa 100644
--- a/app/code/Magento/Core/Model/AppInterface.php
+++ b/app/code/Magento/Core/Model/AppInterface.php
@@ -77,14 +77,6 @@ interface AppInterface extends \Magento\Core\Model\StoreManagerInterface
      */
     public function setErrorHandler($handler);
 
-    /**
-     * Loading application area
-     *
-     * @param   string $code
-     * @return  \Magento\Core\Model\AppInterface
-     */
-    public function loadArea($code);
-
     /**
      * Loading part of area data
      *
@@ -147,7 +139,7 @@ interface AppInterface extends \Magento\Core\Model\StoreManagerInterface
     /**
      * Get core cache model
      *
-     * @return \Magento\Core\Model\CacheInterface
+     * @return \Magento\App\CacheInterface
      */
     public function getCacheInstance();
 
diff --git a/app/code/Magento/Core/Model/Cache.php b/app/code/Magento/Core/Model/Cache.php
index 529cebb2833..3b323bd6351 100644
--- a/app/code/Magento/Core/Model/Cache.php
+++ b/app/code/Magento/Core/Model/Cache.php
@@ -31,7 +31,7 @@
 
 namespace Magento\Core\Model;
 
-class Cache implements \Magento\Core\Model\CacheInterface
+class Cache implements \Magento\App\CacheInterface
 {
     /**
      * @var string
diff --git a/app/code/Magento/Core/Model/Cache/Config/SchemaLocator.php b/app/code/Magento/Core/Model/Cache/Config/SchemaLocator.php
index 7a965a1af29..ae426495130 100644
--- a/app/code/Magento/Core/Model/Cache/Config/SchemaLocator.php
+++ b/app/code/Magento/Core/Model/Cache/Config/SchemaLocator.php
@@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Core') . DIRECTORY_SEPARATOR . 'cache.xsd';
     }
diff --git a/app/code/Magento/Core/Model/Cache/Frontend/Factory.php b/app/code/Magento/Core/Model/Cache/Frontend/Factory.php
index 0a1c04524fb..a3dbdb8f8eb 100644
--- a/app/code/Magento/Core/Model/Cache/Frontend/Factory.php
+++ b/app/code/Magento/Core/Model/Cache/Frontend/Factory.php
@@ -90,7 +90,7 @@ class Factory
     /**
      * Resource
      *
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
@@ -98,7 +98,7 @@ class Factory
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\App\Dir $dirs
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param array $enforcedOptions
      * @param array $decorators
      */
@@ -106,7 +106,7 @@ class Factory
         \Magento\ObjectManager $objectManager,
         \Magento\Filesystem $filesystem,
         \Magento\App\Dir $dirs,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         array $enforcedOptions = array(),
         array $decorators = array()
     ) {
diff --git a/app/code/Magento/Core/Model/Cache/Proxy.php b/app/code/Magento/Core/Model/Cache/Proxy.php
index f0304e0cf15..7e8d0336d30 100644
--- a/app/code/Magento/Core/Model/Cache/Proxy.php
+++ b/app/code/Magento/Core/Model/Cache/Proxy.php
@@ -29,7 +29,7 @@
  */
 namespace Magento\Core\Model\Cache;
 
-class Proxy implements \Magento\Core\Model\CacheInterface
+class Proxy implements \Magento\App\CacheInterface
 {
     /**
      * @var \Magento\ObjectManager
@@ -37,7 +37,7 @@ class Proxy implements \Magento\Core\Model\CacheInterface
     protected  $_objectManager;
 
     /**
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected  $_cache;
 
@@ -52,7 +52,7 @@ class Proxy implements \Magento\Core\Model\CacheInterface
     /**
      * Create cache model
      *
-     * @return \Magento\Core\Model\CacheInterface|mixed
+     * @return \Magento\App\CacheInterface|mixed
      */
     protected function _getCache()
     {
diff --git a/app/code/Magento/Core/Model/Cache/TypeList.php b/app/code/Magento/Core/Model/Cache/TypeList.php
index 9767640d93c..fdf796d51ba 100644
--- a/app/code/Magento/Core/Model/Cache/TypeList.php
+++ b/app/code/Magento/Core/Model/Cache/TypeList.php
@@ -43,7 +43,7 @@ class TypeList implements \Magento\Core\Model\Cache\TypeListInterface
     protected $_cacheState;
 
     /**
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cache;
 
@@ -51,13 +51,13 @@ class TypeList implements \Magento\Core\Model\Cache\TypeListInterface
      * @param \Magento\Core\Model\Cache\Config $config
      * @param \Magento\Core\Model\Cache\StateInterface $cacheState
      * @param \Magento\Core\Model\Cache\InstanceFactory $factory
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      */
     public function __construct(
         \Magento\Core\Model\Cache\Config $config,
         \Magento\Core\Model\Cache\StateInterface $cacheState,
         \Magento\Core\Model\Cache\InstanceFactory $factory,
-        \Magento\Core\Model\CacheInterface $cache
+        \Magento\App\CacheInterface $cache
     ) {
         $this->_config = $config;
         $this->_factory = $factory;
diff --git a/app/code/Magento/Core/Model/Config.php b/app/code/Magento/Core/Model/Config.php
index f5301f8c036..0155e227b73 100644
--- a/app/code/Magento/Core/Model/Config.php
+++ b/app/code/Magento/Core/Model/Config.php
@@ -26,12 +26,6 @@
 
 namespace Magento\Core\Model;
 
-/**
- * @SuppressWarnings(PHPMD.ExcessivePublicCount)
- * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
- * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
- * @SuppressWarnings(PHPMD.TooManyFields)
- */
 class Config implements \Magento\Core\Model\ConfigInterface
 {
     /**
@@ -54,98 +48,17 @@ class Config implements \Magento\Core\Model\ConfigInterface
      */
     const SCOPE_WEBSITES = 'websites';
 
-    /**
-     * Storage of validated secure urls
-     *
-     * @var array
-     */
-    protected $_secureUrlCache = array();
-
-    /**
-     * Object manager
-     *
-     * @var \Magento\ObjectManager
-     */
-    protected $_objectManager;
-
-    /**
-     * Configuration storage
-     *
-     * @var \Magento\Core\Model\Config\StorageInterface
-     */
-    protected $_storage;
-
-    /**
-     * Configuration data container
-     *
-     * @var \Magento\Core\Model\ConfigInterface
-     */
-    protected $_config;
-
-    /**
-     * Module configuration reader
-     *
-     * @var \Magento\Core\Model\Config\Modules\Reader
-     */
-    protected $_moduleReader;
-
-    /**
-     * @var \Magento\Config\ScopeInterface
-     */
-    protected $_configScope;
-
-    /**
-     * @var \Magento\App\ModuleListInterface
-     */
-    protected $_moduleList;
-
     /**
      * @var \Magento\Core\Model\Config\SectionPool
      */
     protected $_sectionPool;
 
     /**
-     * @var \Magento\Core\Model\Resource\Store\Collection
-     */
-    protected $_storeCollection;
-
-    /**
-     * @param \Magento\Core\Model\ObjectManager           $objectManager
-     * @param \Magento\Core\Model\Config\StorageInterface $storage
-     * @param \Magento\Core\Model\Config\Modules\Reader   $moduleReader
-     * @param \Magento\App\ModuleListInterface     $moduleList
-     * @param \Magento\Config\ScopeInterface              $configScope
-     * @param \Magento\Core\Model\Config\SectionPool      $sectionPool
-     */
-    public function __construct(
-        \Magento\Core\Model\ObjectManager $objectManager,
-        \Magento\Core\Model\Config\StorageInterface $storage,
-        \Magento\Core\Model\Config\Modules\Reader $moduleReader,
-        \Magento\App\ModuleListInterface $moduleList,
-        \Magento\Config\ScopeInterface $configScope,
-        \Magento\Core\Model\Config\SectionPool $sectionPool
-    ) {
-        \Magento\Profiler::start('config_load');
-        $this->_objectManager = $objectManager;
-        $this->_storage = $storage;
-        $this->_config = $this->_storage->getConfiguration();
-        $this->_moduleReader = $moduleReader;
-        $this->_moduleList = $moduleList;
-        $this->_configScope = $configScope;
-        $this->_sectionPool = $sectionPool;
-        \Magento\Profiler::stop('config_load');
-    }
-
-    /**
-     * Returns node found by the $path and scope info
-     *
-     * @param   string $path
-     * @return \Magento\Core\Model\Config\Element
-     * @deprecated
+     * @param Config\SectionPool $sectionPool
      */
-    public function getNode($path = null)
+    public function __construct(\Magento\Core\Model\Config\SectionPool $sectionPool)
     {
-        return $this->_config->getNode($path);
+        $this->_sectionPool = $sectionPool;
     }
 
     /**
@@ -174,153 +87,6 @@ class Config implements \Magento\Core\Model\ConfigInterface
         $this->_sectionPool->getSection($scope, $scopeCode)->setValue($path, $value);
     }
 
-    /**
-     * Create node by $path and set its value.
-     *
-     * @param string $path separated by slashes
-     * @param string $value
-     * @param bool $overwrite
-     */
-    public function setNode($path, $value, $overwrite = true)
-    {
-        $this->_config->setNode($path, $value, $overwrite);
-    }
-
-    /**
-     * Get allowed areas
-     *
-     * @return array
-     */
-    public function getAreas()
-    {
-        return $this->_allowedAreas;
-    }
-
-    /**
-     * Identify front name of the requested area. Return current area front name if area code is not specified.
-     *
-     * @param string|null $areaCode
-     * @return string
-     * @throws \LogicException If front name is not defined.
-     */
-    public function getAreaFrontName($areaCode = null)
-    {
-        $areaCode = empty($areaCode) ? $this->_configScope->getCurrentScope() : $areaCode;
-        $areaConfig = $this->getAreaConfig($areaCode);
-        if (!isset($areaConfig['frontName'])) {
-            throw new \LogicException(sprintf(
-                'Area "%s" must have front name defined in the application config.',
-                $areaCode
-            ));
-        }
-        return $areaConfig['frontName'];
-    }
-
-    /**
-     * Get module directory by directory type
-     *
-     * @param   string $type
-     * @param   string $moduleName
-     * @return  string
-     */
-    public function getModuleDir($type, $moduleName)
-    {
-        return $this->_moduleReader->getModuleDir($type, $moduleName);
-    }
-
-    /**
-     * Retrieve store Ids for $path with checking
-     *
-     * if empty $allowValues then retrieve all stores values
-     *
-     * return array($storeId => $pathValue)
-     *
-     * @param string $path
-     * @param array $allowedValues
-     * @param string $keyAttribute
-     * @return array
-     * @throws \InvalidArgumentException
-     */
-    public function getStoresConfigByPath($path, $allowedValues = array(), $keyAttribute = 'id')
-    {
-        // @todo inject custom store collection that corresponds to the following requirements
-        if (is_null($this->_storeCollection)) {
-            $this->_storeCollection = $this->_objectManager->create('Magento\Core\Model\Resource\Store\Collection');
-            $this->_storeCollection->setLoadDefault(true);
-        }
-        $storeValues = array();
-        /** @var $store \Magento\Core\Model\Store */
-        foreach ($this->_storeCollection as $store) {
-            switch ($keyAttribute) {
-                case 'id':
-                    $key = $store->getId();
-                    break;
-                case 'code':
-                    $key = $store->getCode();
-                    break;
-                case 'name':
-                    $key = $store->getName();
-                    break;
-                default:
-                    throw new \InvalidArgumentException("'{$keyAttribute}' cannot be used as a key.");
-                    break;
-            }
-
-            $value = $this->getValue($path, 'store', $store->getCode());
-            if (empty($allowedValues)) {
-                $storeValues[$key] = $value;
-            } elseif (in_array($value, $allowedValues)) {
-                $storeValues[$key] = $value;
-            }
-        }
-        return $storeValues;
-    }
-
-    /**
-     * Determine whether provided name begins from any available modules, according to namespaces priority
-     * If matched, returns as the matched module "factory" name or a fully qualified module name
-     *
-     * @param string $name
-     * @param bool $asFullModuleName
-     * @return string
-     */
-    public function determineOmittedNamespace($name, $asFullModuleName = false)
-    {
-        if (null === $this->_moduleNamespaces) {
-            $this->_moduleNamespaces = array();
-            foreach ($this->_moduleList->getModules() as $module) {
-                $moduleName = $module['name'];
-                $module = strtolower($moduleName);
-                $this->_moduleNamespaces[substr($module, 0, strpos($module, '_'))][$module] = $moduleName;
-            }
-        }
-
-        $explodeString = (strpos($name, \Magento\Autoload\IncludePath::NS_SEPARATOR) === false) ?
-            '_' :  \Magento\Autoload\IncludePath::NS_SEPARATOR;
-        $name = explode($explodeString, strtolower($name));
-
-        $partsNum = count($name);
-        $defaultNamespaceFlag = false;
-        foreach ($this->_moduleNamespaces as $namespaceName => $namespace) {
-            // assume the namespace is omitted (default namespace only, which comes first)
-            if ($defaultNamespaceFlag === false) {
-                $defaultNamespaceFlag = true;
-                $defaultNS = $namespaceName . '_' . $name[0];
-                if (isset($namespace[$defaultNS])) {
-                    return $asFullModuleName ? $namespace[$defaultNS] : $name[0]; // return omitted as well
-                }
-            }
-            // assume namespace is qualified
-            if (isset($name[1])) {
-                $fullNS = $name[0] . '_' . $name[1];
-                if (2 <= $partsNum && isset($namespace[$fullNS])) {
-                    return $asFullModuleName ? $namespace[$fullNS] : $fullNS;
-                }
-            }
-        }
-        return '';
-    }
-
     /**
      * Reinitialize configuration
      *
@@ -330,22 +96,4 @@ class Config implements \Magento\Core\Model\ConfigInterface
     {
         $this->_sectionPool->clean();
     }
-
-    /**
-     * Remove configuration cache
-     */
-    public function removeCache()
-    {
-        $this->_storage->removeCache();
-    }
-
-    /**
-     * Reload xml configuration data
-     * @deprecated must be removed after Installation logic is removed from application
-     */
-    public function reloadConfig()
-    {
-        $this->_storage->removeCache();
-        $this->_config = $this->_storage->getConfiguration();
-    }
 }
diff --git a/app/code/Magento/Core/Model/Config/AbstractStorage.php b/app/code/Magento/Core/Model/Config/AbstractStorage.php
deleted file mode 100644
index da519d9fe6a..00000000000
--- a/app/code/Magento/Core/Model/Config/AbstractStorage.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-/**
- * Application config storage
- *
- * 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\Config;
-
-abstract class AbstractStorage implements \Magento\Core\Model\Config\StorageInterface
-{
-    /**
-     * Cache storage object
-     *
-     * @var \Magento\Core\Model\Config\Cache
-     */
-    protected $_cache;
-
-    /**
-     * Configuration loader
-     *
-     * @var \Magento\Core\Model\Config\LoaderInterface
-     */
-    protected $_loader;
-
-    /**
-     * Configuration loader
-     *
-     * @var \Magento\Core\Model\Config\BaseFactory
-     */
-    protected $_configFactory;
-
-    /**
-     * @param \Magento\Core\Model\Config\Cache $cache
-     * @param \Magento\Core\Model\Config\LoaderInterface $loader
-     * @param \Magento\Core\Model\Config\BaseFactory $factory
-     */
-    public function __construct(
-        \Magento\Core\Model\Config\Cache $cache,
-        \Magento\Core\Model\Config\LoaderInterface $loader,
-        \Magento\Core\Model\Config\BaseFactory $factory
-    ) {
-        $this->_cache = $cache;
-        $this->_loader = $loader;
-        $this->_configFactory = $factory;
-    }
-
-    /**
-     * Get loaded configuration
-     *
-     * @return \Magento\Core\Model\ConfigInterface
-     */
-    public function getConfiguration()
-    {
-        $config = $this->_cache->load();
-        if (false === $config) {
-            $config = $this->_configFactory->create('<config/>');
-            $this->_loader->load($config);
-        }
-        return $config;
-    }
-
-    /**
-     * Remove configuration cache
-     */
-    public function removeCache()
-    {
-
-    }
-}
diff --git a/app/code/Magento/Core/Model/Config/Base.php b/app/code/Magento/Core/Model/Config/Base.php
index cd29bfedd76..3c582686719 100644
--- a/app/code/Magento/Core/Model/Config/Base.php
+++ b/app/code/Magento/Core/Model/Config/Base.php
@@ -28,7 +28,7 @@
  */
 namespace Magento\Core\Model\Config;
 
-class Base extends \Magento\Simplexml\Config implements \Magento\Core\Model\ConfigInterface
+class Base extends \Magento\Simplexml\Config
 {
     /**
      * List of instances
@@ -47,14 +47,6 @@ class Base extends \Magento\Simplexml\Config implements \Magento\Core\Model\Conf
         self::$instances[] = $this;
     }
 
-    /**
-     * Reinitialize config object
-     */
-    public function reinit()
-    {
-
-    }
-
     /**
      * Cleanup objects because of simplexml memory leak
      */
diff --git a/app/code/Magento/Core/Model/Config/FileResolver.php b/app/code/Magento/Core/Model/Config/FileResolver.php
index 21b798400f5..ec042016b96 100644
--- a/app/code/Magento/Core/Model/Config/FileResolver.php
+++ b/app/code/Magento/Core/Model/Config/FileResolver.php
@@ -30,7 +30,7 @@ class FileResolver implements \Magento\Config\FileResolverInterface
     /**
      * Module configuration file reader
      *
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_moduleReader;
 
@@ -40,11 +40,11 @@ class FileResolver implements \Magento\Config\FileResolverInterface
     protected $_applicationDirs;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      * @param \Magento\App\Dir $applicationDirs
      */
     public function __construct(
-        \Magento\Core\Model\Config\Modules\Reader $moduleReader,
+        \Magento\Module\Dir\Reader $moduleReader,
         \Magento\App\Dir $applicationDirs
     ) {
         $this->_moduleReader = $moduleReader;
diff --git a/app/code/Magento/Core/Model/Config/Initial/Reader.php b/app/code/Magento/Core/Model/Config/Initial/Reader.php
index caa81da9985..d507e71f53e 100644
--- a/app/code/Magento/Core/Model/Config/Initial/Reader.php
+++ b/app/code/Magento/Core/Model/Config/Initial/Reader.php
@@ -62,18 +62,30 @@ class Reader
      */
     protected $_scopePriorityScheme = array('primary', 'global');
 
+    /**
+     * Path to corresponding XSD file with validation rules for config
+     *
+     * @var string
+     */
+    protected $_schemaFile;
+
     /**
      * @param \Magento\Config\FileResolverInterface $fileResolver
-     * @param \Magento\Core\Model\Config\Initial\Converter $converter
+     * @param Converter $converter
+     * @param SchemaLocator $schemaLocator
+     * @param \Magento\Config\ValidationStateInterface $validationState
      * @param string $fileName
      * @param string $domDocumentClass
      */
     public function __construct(
         \Magento\Config\FileResolverInterface $fileResolver,
-        \Magento\Core\Model\Config\Initial\Converter $converter,
+        Converter $converter,
+        SchemaLocator $schemaLocator,
+        \Magento\Config\ValidationStateInterface $validationState,
         $fileName = 'config.xml',
         $domDocumentClass = 'Magento\Config\Dom'
     ) {
+        $this->_schemaFile = $validationState->isValidated() ? $schemaLocator->getSchema() : null;
         $this->_fileResolver = $fileResolver;
         $this->_converter = $converter;
         $this->_domDocumentClass = $domDocumentClass;
@@ -104,7 +116,11 @@ class Reader
             try {
                 if (is_null($domDocument)) {
                     $class = $this->_domDocumentClass;
-                    $domDocument = new $class(file_get_contents($file));
+                    $domDocument = new $class(
+                        file_get_contents($file),
+                        array(),
+                        $this->_schemaFile
+                    );
                 } else {
                     $domDocument->merge(file_get_contents($file));
                 }
diff --git a/app/code/Magento/Core/Model/Route/Config/SchemaLocator.php b/app/code/Magento/Core/Model/Config/Initial/SchemaLocator.php
similarity index 70%
rename from app/code/Magento/Core/Model/Route/Config/SchemaLocator.php
rename to app/code/Magento/Core/Model/Config/Initial/SchemaLocator.php
index 566deb4b244..d396b168030 100644
--- a/app/code/Magento/Core/Model/Route/Config/SchemaLocator.php
+++ b/app/code/Magento/Core/Model/Config/Initial/SchemaLocator.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Routes configuration schema locator
+ * Logging schema locator
  *
  * Magento
  *
@@ -23,31 +23,23 @@
  * @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\Route\Config;
+namespace Magento\Core\Model\Config\Initial;
 
 class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
 {
     /**
-     * Path to corresponding XSD file with validation rules for merged config
+     * Path to corresponding XSD file with validation rules for config
      *
      * @var string
      */
     protected $_schema = null;
 
     /**
-     * Path to corresponding XSD file with validation rules for separate config files
-     *
-     * @var string
-     */
-    protected $_perFileSchema = null;
-
-    /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
-        $this->_perFileSchema = $moduleReader->getModuleDir('etc', 'Magento_Core') . DIRECTORY_SEPARATOR . 'routes.xsd';
-        $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Core') . DIRECTORY_SEPARATOR . 'routes_merged.xsd';
+        $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Core') . '/config.xsd';
     }
 
     /**
@@ -67,6 +59,6 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
      */
     public function getPerFileSchema()
     {
-        return $this->_perFileSchema;
+        return $this->_schema;
     }
 }
diff --git a/app/code/Magento/Core/Model/Config/Loader.php b/app/code/Magento/Core/Model/Config/Loader.php
deleted file mode 100644
index 1362724d00a..00000000000
--- a/app/code/Magento/Core/Model/Config/Loader.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/**
- * Application config loader
- *
- * 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\Config;
-
-class Loader implements \Magento\Core\Model\Config\LoaderInterface
-{
-    /**
-     * Primary application configuration
-     *
-     * @var \Magento\Core\Model\Config\Primary
-     */
-    protected $_primaryConfig;
-
-    /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
-     */
-    protected $_fileReader;
-
-    /**
-     * @param \Magento\Core\Model\Config\Primary $primaryConfig
-     * @param \Magento\Core\Model\Config\Modules\Reader $fileReader
-     */
-    public function __construct(
-        \Magento\Core\Model\Config\Primary $primaryConfig,
-        \Magento\Core\Model\Config\Modules\Reader $fileReader
-    ) {
-        $this->_primaryConfig = $primaryConfig;
-        $this->_fileReader = $fileReader;
-    }
-
-    /**
-     * Populate configuration object
-     *
-     * @param \Magento\Core\Model\Config\Base $config
-     */
-    public function load(\Magento\Core\Model\Config\Base $config)
-    {
-        if (!$config->getNode()) {
-            $config->loadString('<config></config>');
-        }
-
-        \Magento\Profiler::start('config');
-        \Magento\Profiler::start('load_modules');
-
-        $config->extend($this->_primaryConfig);
-
-        \Magento\Profiler::start('load_modules_configuration');
-
-        $this->_fileReader->loadModulesConfiguration(array('config.xml'), $config);
-        \Magento\Profiler::stop('load_modules_configuration');
-
-        $config->applyExtends();
-
-        \Magento\Profiler::stop('load_modules');
-        \Magento\Profiler::stop('config');
-    }
-}
diff --git a/app/code/Magento/Core/Model/Config/Loader/Primary.php b/app/code/Magento/Core/Model/Config/Loader/Primary.php
deleted file mode 100644
index dd932d491f5..00000000000
--- a/app/code/Magento/Core/Model/Config/Loader/Primary.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-/**
- * Primary configuration loader
- *
- * 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\Config\Loader;
-
-class Primary implements \Magento\Core\Model\Config\LoaderInterface
-{
-    /**
-     * Config Directory
-     *
-     * @var string
-     */
-    protected $_dir;
-
-    /**
-     * Config factory
-     *
-     * @var \Magento\Core\Model\Config\BaseFactory
-     */
-    protected $_prototypeFactory;
-
-    /**
-     * @param string $dir
-     */
-    public function __construct($dir)
-    {
-        $this->_dir = $dir;
-    }
-
-    /**
-     * Load primary configuration
-     *
-     * @param \Magento\Core\Model\Config\Base $config
-     */
-    public function load(\Magento\Core\Model\Config\Base $config)
-    {
-        $etcDir = $this->_dir;
-        if (!$config->getNode()) {
-            $config->loadString('<config/>');
-        }
-        $files = glob($etcDir . DIRECTORY_SEPARATOR . '*' . DIRECTORY_SEPARATOR . 'config.xml');
-        array_unshift($files, $etcDir . DIRECTORY_SEPARATOR . 'config.xml');
-        // 1. app/etc/*.xml (except local config)
-        foreach ($files as $filename) {
-            $baseConfig = new \Magento\Core\Model\Config\Base('<config/>');
-            $baseConfig->loadFile($filename);
-            $config->extend($baseConfig);
-        }
-    }
-}
diff --git a/app/code/Magento/Core/Model/Config/Primary.php b/app/code/Magento/Core/Model/Config/Primary.php
deleted file mode 100644
index 731419ba681..00000000000
--- a/app/code/Magento/Core/Model/Config/Primary.php
+++ /dev/null
@@ -1,192 +0,0 @@
-<?php
-/**
- * Primary application config (app/etc/*.xml)
- *
- * 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\Config;
-
-class Primary extends \Magento\Core\Model\Config\Base
-{
-    /**
-     * @var \Magento\Core\Model\Config\Loader\Primary
-     */
-    protected $_loader;
-
-    /**
-     * Application parameter list
-     *
-     * @var array
-     */
-    protected $_params;
-
-    /**
-     * Directory list
-     *
-     * @var \Magento\App\Dir
-     */
-    protected $_dir;
-
-    /**
-     * @param string $baseDir
-     * @param array $params
-     * @param \Magento\App\Dir $dir
-     * @param \Magento\Core\Model\Config\LoaderInterface $loader
-     */
-    public function __construct(
-        $baseDir,
-        array $params,
-        \Magento\App\Dir $dir = null,
-        \Magento\Core\Model\Config\LoaderInterface $loader = null
-    ) {
-        parent::__construct('<config/>');
-        $this->_params = $params;
-        $this->_dir = $dir ?: new \Magento\App\Dir(
-            $baseDir,
-            $this->getParam(\Magento\Core\Model\App::PARAM_APP_URIS, array()),
-            $this->getParam(\Magento\Core\Model\App::PARAM_APP_DIRS, array())
-        );
-        \Magento\Autoload\IncludePath::addIncludePath(array(
-            $this->_dir->getDir(\Magento\App\Dir::GENERATION)
-        ));
-
-        $this->_loader = $loader ?: new \Magento\Core\Model\Config\Loader\Primary(
-            $this->_dir->getDir(\Magento\App\Dir::CONFIG)
-        );
-        $this->_loader->load($this);
-    }
-
-    /**
-     * Get init param
-     *
-     * @param string $name
-     * @param mixed $defaultValue
-     * @return mixed
-     */
-    public function getParam($name, $defaultValue = null)
-    {
-        return isset($this->_params[$name]) ? $this->_params[$name] : $defaultValue;
-    }
-
-    /**
-     * Get application init params
-     *
-     * @return array
-     */
-    public function getParams()
-    {
-        return $this->_params;
-    }
-
-    /**
-     * Retrieve directories
-     *
-     * @return \Magento\App\Dir
-     */
-    public function getDirectories()
-    {
-        return $this->_dir;
-    }
-
-    /**
-     * Reinitialize primary configuration
-     */
-    public function reinit()
-    {
-        $this->loadString('<config/>');
-        $this->_loader->load($this);
-    }
-
-    /**
-     * Retrieve class definition config
-     *
-     * @return string
-     */
-    public function getDefinitionPath()
-    {
-        $pathInfo = (array) $this->getNode('global/di/definitions');
-        if (isset($pathInfo['path'])) {
-            return $pathInfo['path'];
-        } else if (isset($pathInfo['relativePath'])) {
-            return $this->_dir->getDir(\Magento\App\Dir::ROOT) . DIRECTORY_SEPARATOR . $pathInfo['relativePath'];
-        } else {
-            return $this->_dir->getDir(\Magento\App\Dir::DI);
-        }
-    }
-
-    /**
-     * Retrieve definition format
-     *
-     * @return string
-     */
-    public function getDefinitionFormat()
-    {
-        return (string) $this->getNode('global/di/definitions/format');
-    }
-
-    /**
-     * Configure object manager
-     *
-     * \Magento\Core\Model\ObjectManager $objectManager
-     */
-    public function configure(\Magento\Core\Model\ObjectManager $objectManager)
-    {
-        \Magento\Profiler::start('initial');
-
-        $objectManager->configure(array(
-            'Magento\Core\Model\Config\Loader\Local' => array(
-                'parameters' => array(
-                    'configDirectory' => $this->_dir->getDir(\Magento\App\Dir::CONFIG),
-                )
-            ),
-            'Magento\Core\Model\Cache\Frontend\Factory' => array(
-                'parameters' => array(
-                    'decorators' => $this->_getCacheFrontendDecorators(),
-                )
-            ),
-        ));
-
-        \Magento\Profiler::stop('initial');
-    }
-
-    /**
-     * Retrieve cache frontend decorators configuration
-     *
-     * @return array
-     */
-    protected function _getCacheFrontendDecorators()
-    {
-        $result = array();
-        // mark all cache entries with a special tag to be able to clean only cache belonging to the application
-        $result[] = array(
-            'class' => 'Magento\Cache\Frontend\Decorator\TagScope',
-            'parameters' => array('tag' => 'MAGE'),
-        );
-        if (\Magento\Profiler::isEnabled()) {
-            $result[] = array(
-                'class' => 'Magento\Cache\Frontend\Decorator\Profiler',
-                'parameters' => array('backendPrefixes' => array('Zend_Cache_Backend_', 'Magento\Cache\Backend\\')),
-            );
-        }
-        return $result;
-    }
-}
diff --git a/app/code/Magento/Core/Model/Config/Storage.php b/app/code/Magento/Core/Model/Config/Storage.php
deleted file mode 100644
index bbca49a5471..00000000000
--- a/app/code/Magento/Core/Model/Config/Storage.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/**
- * Application config storage
- *
- * 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\Config;
-
-class Storage extends \Magento\Core\Model\Config\AbstractStorage
-{
-    /**
-     * @param \Magento\Core\Model\Config\Cache $cache
-     * @param \Magento\Core\Model\Config\Loader $loader
-     * @param \Magento\Core\Model\Config\BaseFactory $factory
-     */
-    public function __construct(
-        \Magento\Core\Model\Config\Cache $cache,
-        \Magento\Core\Model\Config\Loader $loader,
-        \Magento\Core\Model\Config\BaseFactory $factory
-    ) {
-        parent::__construct($cache, $loader, $factory);
-    }
-
-    /**
-     * Retrieve application configuration
-     *
-     * @return \Magento\Core\Model\ConfigInterface
-     */
-    public function getConfiguration()
-    {
-        $config = $this->_cache->load();
-        if (false === $config) {
-            $config = $this->_configFactory->create('<config/>');
-            $this->_loader->load($config);
-            $this->_cache->save($config);
-        }
-        return $config;
-    }
-
-    /**
-     * Remove configuration cache
-     */
-    public function removeCache()
-    {
-        $this->_cache->clean();
-    }
-}
diff --git a/app/code/Magento/Core/Model/ConfigInterface.php b/app/code/Magento/Core/Model/ConfigInterface.php
index 395f5d43e74..fb632173c05 100644
--- a/app/code/Magento/Core/Model/ConfigInterface.php
+++ b/app/code/Magento/Core/Model/ConfigInterface.php
@@ -29,21 +29,24 @@ namespace Magento\Core\Model;
 interface ConfigInterface
 {
     /**
-     * Get configuration node
+     * Retrieve config value by path and scope
      *
      * @param string $path
-     * @return \Magento\Simplexml\Element
+     * @param string $scope
+     * @param string $scopeCode
+     * @return mixed
      */
-    public function getNode($path = null);
+    public function getValue($path = null, $scope = 'default', $scopeCode = null);
 
     /**
-     * Create node by $path and set its value
+     * Set config value in the corresponding config scope
      *
-     * @param string $path separated by slashes
-     * @param string $value
-     * @param boolean $overwrite
+     * @param string $path
+     * @param mixed $value
+     * @param string $scope
+     * @param null|string $scopeCode
      */
-    public function setNode($path, $value, $overwrite = true);
+    public function setValue($path, $value, $scope = 'default', $scopeCode = null);
 
     /**
      * Reinitialize config object
diff --git a/app/code/Magento/Core/Model/Context.php b/app/code/Magento/Core/Model/Context.php
index 7fd80fdfd48..53d13a63eec 100644
--- a/app/code/Magento/Core/Model/Context.php
+++ b/app/code/Magento/Core/Model/Context.php
@@ -33,31 +33,31 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_eventDispatcher;
 
     /**
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cacheManager;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @var \Magento\App\State
      */
     protected $_appState;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventDispatcher
-     * @param \Magento\Core\Model\CacheInterface $cacheManager
+     * @param \Magento\App\CacheInterface $cacheManager
      * @param \Magento\App\State $appState
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventDispatcher,
-        \Magento\Core\Model\CacheInterface $cacheManager,
+        \Magento\App\CacheInterface $cacheManager,
         \Magento\App\State $appState
     ) {
         $this->_eventDispatcher = $eventDispatcher;
@@ -67,7 +67,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Core\Model\CacheInterface
+     * @return \Magento\App\CacheInterface
      */
     public function getCacheManager()
     {
@@ -83,7 +83,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Core\Model\Logger
+     * @return \Magento\Logger
      */
     public function getLogger()
     {
diff --git a/app/code/Magento/Core/Model/DataService/Config.php b/app/code/Magento/Core/Model/DataService/Config.php
index 4381f14533f..e0a291853be 100644
--- a/app/code/Magento/Core/Model/DataService/Config.php
+++ b/app/code/Magento/Core/Model/DataService/Config.php
@@ -42,15 +42,16 @@ class Config implements \Magento\Core\Model\DataService\ConfigInterface
     /** @var array $_serviceCallNodes */
     protected $_serviceCallNodes;
 
-    /** @var \Magento\Core\Model\Config\Modules\Reader  */
+    /** @var \Magento\Module\Dir\Reader  */
     protected $_moduleReader;
 
     /**
-     * @param \Magento\Core\Model\DataService\Config\Reader\Factory $readerFactory
-     * @param \Magento\Core\Model\Config\Modules\Reader
+     * @param Config\Reader\Factory $readerFactory
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\DataService\Config\Reader\Factory $readerFactory,
-        \Magento\Core\Model\Config\Modules\Reader $moduleReader
+    public function __construct(
+        \Magento\Core\Model\DataService\Config\Reader\Factory $readerFactory,
+        \Magento\Module\Dir\Reader $moduleReader
     ) {
         $this->_readerFactory = $readerFactory;
         $this->_moduleReader = $moduleReader;
diff --git a/app/code/Magento/Core/Model/DataService/Config/Reader.php b/app/code/Magento/Core/Model/DataService/Config/Reader.php
index 92ccee14bce..71f1a287a60 100644
--- a/app/code/Magento/Core/Model/DataService/Config/Reader.php
+++ b/app/code/Magento/Core/Model/DataService/Config/Reader.php
@@ -28,16 +28,16 @@ namespace Magento\Core\Model\DataService\Config;
 class Reader extends \Magento\Config\AbstractXml
 {
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     private $_modulesReader;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      * @param array $configFiles
      */
     public function __construct(
-        \Magento\Core\Model\Config\Modules\Reader $moduleReader,
+        \Magento\Module\Dir\Reader $moduleReader,
         array $configFiles
     ) {
         if (count($configFiles)) {
diff --git a/app/code/Magento/Core/Model/Date.php b/app/code/Magento/Core/Model/Date.php
index c326688b778..65ecdaa684a 100644
--- a/app/code/Magento/Core/Model/Date.php
+++ b/app/code/Magento/Core/Model/Date.php
@@ -23,8 +23,6 @@
  * @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)
  */
-
-
 /**
  * Date conversion model
  *
@@ -93,20 +91,16 @@ class Date
     {
         $result = true;
         $offset = 0;
-
-        if (!is_null($timezone)){
+        if (!is_null($timezone)) {
             $oldzone = @date_default_timezone_get();
             $result = date_default_timezone_set($timezone);
         }
-
         if ($result === true) {
             $offset = gmmktime(0, 0, 0, 1, 2, 1970) - mktime(0, 0, 0, 1, 2, 1970);
         }
-
-        if (!is_null($timezone)){
+        if (!is_null($timezone)) {
             date_default_timezone_set($oldzone);
         }
-
         return $offset;
     }
 
@@ -122,13 +116,10 @@ class Date
         if (is_null($format)) {
             $format = 'Y-m-d H:i:s';
         }
-
         $date = $this->gmtTimestamp($input);
-
         if ($date === false) {
             return false;
         }
-
         $result = date($format, $date);
         return $result;
     }
@@ -146,7 +137,6 @@ class Date
         if (is_null($format)) {
             $format = 'Y-m-d H:i:s';
         }
-
         $result = date($format, $this->timestamp($input));
         return $result;
     }
@@ -161,23 +151,21 @@ class Date
     {
         if (is_null($input)) {
             return gmdate('U');
-        } else if (is_numeric($input)) {
-            $result = $input;
         } else {
-            $result = strtotime($input);
+            if (is_numeric($input)) {
+                $result = $input;
+            } else {
+                $result = strtotime($input);
+            }
         }
-
         if ($result === false) {
             // strtotime() unable to parse string (it's not a date or has incorrect format)
             return false;
         }
-
-        $date      = $this->_locale->date($result);
+        $date = $this->_locale->date($result);
         $timestamp = $date->get(\Zend_Date::TIMESTAMP) - $date->get(\Zend_Date::TIMEZONE_SECS);
-
         unset($date);
         return $timestamp;
-
     }
 
     /**
@@ -191,15 +179,15 @@ class Date
     {
         if (is_null($input)) {
             $result = $this->gmtTimestamp();
-        } else if (is_numeric($input)) {
-            $result = $input;
         } else {
-            $result = strtotime($input);
+            if (is_numeric($input)) {
+                $result = $input;
+            } else {
+                $result = strtotime($input);
+            }
         }
-
-        $date      = $this->_locale->date($result);
+        $date = $this->_locale->date($result);
         $timestamp = $date->get(\Zend_Date::TIMESTAMP) + $date->get(\Zend_Date::TIMEZONE_SECS);
-
         unset($date);
         return $timestamp;
     }
@@ -217,11 +205,9 @@ class Date
             case 'seconds':
             default:
                 break;
-
             case 'minutes':
                 $result = $result / 60;
                 break;
-
             case 'hours':
                 $result = $result / 60 / 60;
                 break;
diff --git a/app/code/Magento/Core/Model/Design.php b/app/code/Magento/Core/Model/Design.php
index 3f6695993aa..e9c9032cbf1 100644
--- a/app/code/Magento/Core/Model/Design.php
+++ b/app/code/Magento/Core/Model/Design.php
@@ -24,6 +24,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model;
 
 /**
  * Design settings change model
@@ -38,13 +39,7 @@
  * @method \Magento\Core\Model\Design setDateFrom(string $value)
  * @method string getDateTo()
  * @method \Magento\Core\Model\Design setDateTo(string $value)
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Core\Model;
-
 class Design extends \Magento\Core\Model\AbstractModel
 {
     /**
@@ -73,10 +68,16 @@ class Design extends \Magento\Core\Model\AbstractModel
      */
     protected $_locale;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
     /**
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\LocaleInterface $locale
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -85,12 +86,14 @@ class Design extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\LocaleInterface $locale,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
         $this->_locale = $locale;
+        $this->_dateTime = $dateTime;
     }
 
     /**
@@ -111,7 +114,7 @@ class Design extends \Magento\Core\Model\AbstractModel
     public function loadChange($storeId, $date = null)
     {
         if (is_null($date)) {
-            $date = \Magento\Date::formatDate($this->_locale->storeTimeStamp($storeId), false);
+            $date = $this->_dateTime->formatDate($this->_locale->storeTimeStamp($storeId), false);
         }
 
         $changeCacheId = 'design_change_' . md5($storeId . $date);
diff --git a/app/code/Magento/Core/Model/Email/Template.php b/app/code/Magento/Core/Model/Email/Template.php
index 183450178ab..61bb9e35303 100644
--- a/app/code/Magento/Core/Model/Email/Template.php
+++ b/app/code/Magento/Core/Model/Email/Template.php
@@ -106,7 +106,7 @@ class Template extends \Magento\Core\Model\Template
     protected $_viewFileSystem;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
diff --git a/app/code/Magento/Core/Model/Email/Template/Config.php b/app/code/Magento/Core/Model/Email/Template/Config.php
index 4d31feec561..64ff7e15c02 100644
--- a/app/code/Magento/Core/Model/Email/Template/Config.php
+++ b/app/code/Magento/Core/Model/Email/Template/Config.php
@@ -33,17 +33,17 @@ class Config
     protected $_dataStorage;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_moduleReader;
 
     /**
      * @param \Magento\Core\Model\Email\Template\Config\Data $dataStorage
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
     public function __construct(
         \Magento\Core\Model\Email\Template\Config\Data $dataStorage,
-        \Magento\Core\Model\Config\Modules\Reader $moduleReader
+        \Magento\Module\Dir\Reader $moduleReader
     ) {
         $this->_dataStorage = $dataStorage;
         $this->_moduleReader = $moduleReader;
diff --git a/app/code/Magento/Core/Model/Email/Template/Config/Reader.php b/app/code/Magento/Core/Model/Email/Template/Config/Reader.php
index 0fd11cdb394..70c9ef739cd 100644
--- a/app/code/Magento/Core/Model/Email/Template/Config/Reader.php
+++ b/app/code/Magento/Core/Model/Email/Template/Config/Reader.php
@@ -28,7 +28,7 @@ namespace Magento\Core\Model\Email\Template\Config;
 class Reader extends \Magento\Config\Reader\Filesystem
 {
     /**
-     * @var \Magento\App\Module\Dir\ReverseResolver
+     * @var \Magento\Module\Dir\ReverseResolver
      */
     private $_moduleDirResolver;
 
@@ -37,14 +37,14 @@ class Reader extends \Magento\Config\Reader\Filesystem
      * @param \Magento\Core\Model\Email\Template\Config\Converter $converter
      * @param \Magento\Core\Model\Email\Template\Config\SchemaLocator $schemaLocator
      * @param \Magento\Config\ValidationStateInterface $validationState
-     * @param \Magento\App\Module\Dir\ReverseResolver $moduleDirResolver
+     * @param \Magento\Module\Dir\ReverseResolver $moduleDirResolver
      */
     public function __construct(
         \Magento\Config\FileResolverInterface $fileResolver,
         \Magento\Core\Model\Email\Template\Config\Converter $converter,
         \Magento\Core\Model\Email\Template\Config\SchemaLocator $schemaLocator,
         \Magento\Config\ValidationStateInterface $validationState,
-        \Magento\App\Module\Dir\ReverseResolver $moduleDirResolver
+        \Magento\Module\Dir\ReverseResolver $moduleDirResolver
     ) {
         $fileName = 'email_templates.xml';
         $idAttributes = array(
diff --git a/app/code/Magento/Core/Model/Email/Template/Config/SchemaLocator.php b/app/code/Magento/Core/Model/Email/Template/Config/SchemaLocator.php
index dd2c7ceb2f9..a29c6a87c2a 100644
--- a/app/code/Magento/Core/Model/Email/Template/Config/SchemaLocator.php
+++ b/app/code/Magento/Core/Model/Email/Template/Config/SchemaLocator.php
@@ -35,9 +35,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     private $_schema;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Core') . '/email_templates.xsd';
     }
diff --git a/app/code/Magento/Core/Model/Email/Template/Filter.php b/app/code/Magento/Core/Model/Email/Template/Filter.php
index 51baf6ce468..43aeee2868d 100644
--- a/app/code/Magento/Core/Model/Email/Template/Filter.php
+++ b/app/code/Magento/Core/Model/Email/Template/Filter.php
@@ -67,16 +67,14 @@ class Filter extends \Magento\Filter\Template
     protected $_viewUrl;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Escaper
      */
-    protected $_coreData = null;
+    protected $_escaper = null;
 
     /**
      * Core store config
@@ -109,26 +107,44 @@ class Filter extends \Magento\Filter\Template
     protected $_coreStoreConfig;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Helper\Data $coreData
+     * Layout directive params
+     *
+     * @var array
+     */
+    protected $_directiveParams;
+
+    /**
+     * App state
+     *
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
+    /**
+     * @param \Magento\Stdlib\String $string
+     * @param \Magento\Logger $logger
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Core\Model\View\Url $viewUrl
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\VariableFactory $coreVariableFactory
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\View\LayoutInterface $layout
      * @param \Magento\View\LayoutFactory $layoutFactory
+     * @param \Magento\App\State $appState
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Stdlib\String $string,
+        \Magento\Logger $logger,
+        \Magento\Escaper $escaper,
         \Magento\Core\Model\View\Url $viewUrl,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\VariableFactory $coreVariableFactory,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\View\LayoutInterface $layout,
-        \Magento\View\LayoutFactory $layoutFactory
+        \Magento\View\LayoutFactory $layoutFactory,
+        \Magento\App\State $appState
     ) {
-        $this->_coreData = $coreData;
+        $this->_escaper = $escaper;
         $this->_viewUrl = $viewUrl;
         $this->_logger = $logger;
         $this->_coreStoreConfig = $coreStoreConfig;
@@ -137,6 +153,8 @@ class Filter extends \Magento\Filter\Template
         $this->_storeManager = $storeManager;
         $this->_layout = $layout;
         $this->_layoutFactory = $layoutFactory;
+        $this->_appState = $appState;
+        parent::__construct($string);
     }
 
     /**
@@ -263,15 +281,32 @@ class Filter extends \Magento\Filter\Template
      */
     public function layoutDirective($construction)
     {
-        $skipParams = array('handle', 'area');
-        $params = $this->_getIncludeParameters($construction[2]);
-        $layoutParams = array();
-        if (isset($params['area'])) {
-            $layoutParams['area'] = $params['area'];
+        $this->_directiveParams = $this->_getIncludeParameters($construction[2]);
+        if (!isset($this->_directiveParams['area'])) {
+            $this->_directiveParams['area'] = 'frontend';
         }
+        if ($this->_directiveParams['area'] != $this->_appState->getAreaCode()) {
+            return $this->_appState->emulateAreaCode(
+                $this->_directiveParams['area'],
+                array($this, 'emulateAreaCallback')
+            );
+        } else {
+            return $this->emulateAreaCallback();
+        }
+    }
+
+    /**
+     * Retrieve layout html directive callback
+     *
+     * @return string
+     */
+    public function emulateAreaCallback()
+    {
+        $skipParams = array('handle', 'area');
+
         /** @var $layout \Magento\View\LayoutInterface */
-        $layout = $this->_layoutFactory->create($layoutParams);
-        $layout->getUpdate()->addHandle($params['handle'])
+        $layout = $this->_layoutFactory->create();
+        $layout->getUpdate()->addHandle($this->_directiveParams['handle'])
             ->load();
 
         $layout->generateXml();
@@ -283,7 +318,7 @@ class Filter extends \Magento\Filter\Template
             if (!$block->getParentBlock() && !$rootBlock) {
                 $rootBlock = $block;
             }
-            foreach ($params as $k => $v) {
+            foreach ($this->_directiveParams as $k => $v) {
                 if (in_array($k, $skipParams)) {
                     continue;
                 }
@@ -399,7 +434,7 @@ class Filter extends \Magento\Filter\Template
             $allowedTags = preg_split('/\s*\,\s*/', $params['allowed_tags'], 0, PREG_SPLIT_NO_EMPTY);
         }
 
-        return $this->_coreData->escapeHtml($params['var'], $allowedTags);
+        return $this->_escaper->escapeHtml($params['var'], $allowedTags);
     }
 
     /**
diff --git a/app/code/Magento/Core/Model/EntryPoint/Cron.php b/app/code/Magento/Core/Model/EntryPoint/Cron.php
deleted file mode 100644
index 99faf24e5b2..00000000000
--- a/app/code/Magento/Core/Model/EntryPoint/Cron.php
+++ /dev/null
@@ -1,45 +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.
- *
- * @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\EntryPoint;
-
-class Cron extends \Magento\Core\Model\AbstractEntryPoint
-{
-    /**
-     * Process request to application
-     */
-    protected function _processRequest()
-    {
-        /** @var $app \Magento\Core\Model\App */
-        $app = $this->_objectManager->get('Magento\Core\Model\App');
-        $app->setUseSessionInUrl(false);
-        $app->requireInstalledInstance();
-
-        /** @var $eventManager \Magento\Event\ManagerInterface */
-        $eventManager = $this->_objectManager->get('Magento\Event\ManagerInterface');
-        /** @var \Magento\Config\Scope $configScope */
-        $configScope = $this->_objectManager->get('Magento\Config\ScopeInterface');
-        $configScope->setCurrentScope('crontab');
-        $eventManager->dispatch('default');
-    }
-}
diff --git a/app/code/Magento/Core/Model/EntryPoint/Http.php b/app/code/Magento/Core/Model/EntryPoint/Http.php
deleted file mode 100644
index 054c14c2dba..00000000000
--- a/app/code/Magento/Core/Model/EntryPoint/Http.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/**
- * Http entry point
- *
- * 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\EntryPoint;
-
-class Http extends \Magento\Core\Model\AbstractEntryPoint
-{
-    /**
-     * Process http request, output html page or proper information about an exception (if any)
-     */
-    public function processRequest()
-    {
-        try {
-            parent::processRequest();
-        } catch (\Magento\Core\Model\Session\Exception $e) {
-            header(
-                'Location: ' . $this->_objectManager->get('Magento\Core\Model\StoreManager')->getStore()->getBaseUrl()
-            );
-        } catch (\Magento\Core\Model\Store\Exception $e) {
-            require $this->_objectManager->get('Magento\App\Dir')
-                    ->getDir(\Magento\App\Dir::PUB) . DS . 'errors' . DS . '404.php';
-        } catch (\Magento\BootstrapException $e) {
-            header('Content-Type: text/plain', true, 503);
-            echo $e->getMessage();
-        } catch (\Exception $e) {
-            $this->processException($e);
-        }
-    }
-
-    /**
-     * Run http application
-     */
-    protected function _processRequest()
-    {
-        $request = $this->_objectManager->get('Magento\App\RequestInterface');
-        $areas = $this->_objectManager->get('Magento\App\AreaList');
-        $areaCode = $areas->getCodeByFrontName($request->getFrontName());
-        $this->_objectManager->get('Magento\Config\Scope')->setCurrentScope($areaCode);
-        $this->_objectManager->configure(
-            $this->_objectManager->get('Magento\Core\Model\ObjectManager\ConfigLoader')->load($areaCode)
-        );
-        $frontController = $this->_objectManager->get('Magento\App\FrontControllerInterface');
-        $frontController->dispatch($request);
-    }
-}
diff --git a/app/code/Magento/Core/Model/Fieldset/Config/SchemaLocator.php b/app/code/Magento/Core/Model/Fieldset/Config/SchemaLocator.php
index 01c3bbd3224..a53b76838c3 100644
--- a/app/code/Magento/Core/Model/Fieldset/Config/SchemaLocator.php
+++ b/app/code/Magento/Core/Model/Fieldset/Config/SchemaLocator.php
@@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Core') . '/fieldset.xsd';
         $this->_perFileSchemaschema = $moduleReader->getModuleDir('etc', 'Magento_Core') . '/fieldset_file.xsd';
diff --git a/app/code/Magento/Core/Model/File/Storage.php b/app/code/Magento/Core/Model/File/Storage.php
index f9e3c77f5f9..3ae1327c444 100644
--- a/app/code/Magento/Core/Model/File/Storage.php
+++ b/app/code/Magento/Core/Model/File/Storage.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\File;
 
 /**
- * File storage model class
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Class Storage
  */
-namespace Magento\Core\Model\File;
-
 class Storage extends \Magento\Core\Model\AbstractModel
 {
     /**
@@ -142,13 +137,11 @@ class Storage extends \Magento\Core\Model\AbstractModel
     /**
      * Show if there were errors while synchronize process
      *
-     * @param  \Magento\Core\Model\AbstractModel $sourceModel
-     * @param  \Magento\Core\Model\AbstractModel $destinationModel
+     * @param $sourceModel
+     * @param $destinationModel
      * @return bool
      */
-    protected function _synchronizeHasErrors(\Magento\Core\Model\AbstractModel $sourceModel,
-        \Magento\Core\Model\AbstractModel $destinationModel
-    ) {
+    protected function _synchronizeHasErrors($sourceModel, $destinationModel) {
         if (!$sourceModel || !$destinationModel) {
             return true;
         }
@@ -191,8 +184,7 @@ class Storage extends \Magento\Core\Model\AbstractModel
                 break;
             case self::STORAGE_MEDIA_DATABASE:
                 $connection = (isset($params['connection'])) ? $params['connection'] : null;
-                $arguments = array('connection' => $connection);
-                $model = $this->_databaseFactory->create(array('connectionName' => $arguments));
+                $model = $this->_databaseFactory->create(array('connectionName' => $connection));
                 break;
             default:
                 return false;
diff --git a/app/code/Magento/Core/Model/File/Storage/Database.php b/app/code/Magento/Core/Model/File/Storage/Database.php
index 56b486632ed..e09cb374636 100644
--- a/app/code/Magento/Core/Model/File/Storage/Database.php
+++ b/app/code/Magento/Core/Model/File/Storage/Database.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\File\Storage;
 
 /**
- * File storage database model class
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Class Database
  */
-namespace Magento\Core\Model\File\Storage;
-
 class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabase
 {
     /**
@@ -58,32 +53,40 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
     protected $_errors = array();
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
      * @var \Magento\Core\Model\File\Storage\Directory\DatabaseFactory
      */
     protected $_directoryFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @var \Magento\Core\Helper\File\Media
+     */
+    protected $_mediaHelper;
+
+    /**
+     * Class constructor
+     *
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb
+     * @param \Magento\Core\Helper\File\Media $mediaHelper
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\Core\Model\App $app
      * @param \Magento\Core\Model\Resource\File\Storage\Database $resource
-     * @param \Magento\Core\Model\File\Storage\Directory\DatabaseFactory $directoryFactory
+     * @param Directory\DatabaseFactory $directoryFactory
      * @param \Magento\Data\Collection\Db $resourceCollection
+     * @param string|null $connectionName
      * @param array $data
-     * @param string $connectionName
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb,
+        \Magento\Core\Helper\File\Media $mediaHelper,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\Date $dateModel,
@@ -91,12 +94,12 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
         \Magento\Core\Model\Resource\File\Storage\Database $resource,
         \Magento\Core\Model\File\Storage\Directory\DatabaseFactory $directoryFactory,
         \Magento\Data\Collection\Db $resourceCollection = null,
-        array $data = array(),
-        $connectionName = null
+        $connectionName = null,
+        array $data = array()
     ) {
-        $this->_init('Magento\Core\Model\Resource\File\Storage\Database');
         $this->_directoryFactory = $directoryFactory;
         $this->_logger = $logger;
+        $this->_mediaHelper = $mediaHelper;
         parent::__construct(
             $coreFileStorageDb,
             $context,
@@ -105,7 +108,10 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
             $app,
             $resource,
             $resourceCollection,
-            $data);
+            $connectionName,
+            $data
+        );
+        $this->_init(get_class($this->_resource));
     }
 
     /**
@@ -116,8 +122,7 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
     public function getDirectoryModel()
     {
         if (is_null($this->_directoryModel)) {
-            $arguments = array('connection' => $this->getConnectionName());
-            $this->_directoryModel = $this->_directoryFactory->create(array('connectionName' => $arguments));
+            $this->_directoryModel = $this->_directoryFactory->create(array('connectionName' => $this->getConnectionName()));
         }
 
         return $this->_directoryModel;
@@ -243,9 +248,8 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
 
             try {
                 $file['update_time'] = $dateSingleton->date();
-                $arguments = array('connection' => $this->getConnectionName());
                 $file['directory_id'] = (isset($file['directory']) && strlen($file['directory']))
-                    ? $this->_directoryFactory->create(array('connectionName' => $arguments))
+                    ? $this->_directoryFactory->create(array('connectionName' => $this->getConnectionName()))
                         ->loadByPath($file['directory'])->getId()
                     : null;
 
@@ -267,7 +271,7 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
      */
     public function saveFile($filename)
     {
-        $fileInfo = $this->collectFileInfo($filename);
+        $fileInfo = $this->_mediaHelper->collectFileInfo($this->getMediaBaseDirectory(), $filename);
         $filePath = $fileInfo['directory'];
 
         $directory = $this->_directoryFactory->create()->loadByPath($filePath);
diff --git a/app/code/Magento/Core/Model/File/Storage/Database/AbstractDatabase.php b/app/code/Magento/Core/Model/File/Storage/Database/AbstractDatabase.php
index 7ce82ac2e0b..bf6e7dc21f9 100644
--- a/app/code/Magento/Core/Model/File/Storage/Database/AbstractDatabase.php
+++ b/app/code/Magento/Core/Model/File/Storage/Database/AbstractDatabase.php
@@ -24,24 +24,42 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\File\Storage\Database;
 
 /**
- * Abstract database storage model class
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Class AbstractDatabase
  */
-namespace Magento\Core\Model\File\Storage\Database;
-
-abstract class AbstractDatabase extends \Magento\Core\Model\File\Storage\AbstractStorage
+abstract class AbstractDatabase extends \Magento\Core\Model\AbstractModel
 {
+    /**
+     * Store media base directory path
+     *
+     * @var string
+     */
+    protected $_mediaBaseDirectory = null;
+
+    /**
+     * Core file storage database
+     *
+     * @var \Magento\Core\Helper\File\Storage\Database
+     */
+    protected $_coreFileStorageDb = null;
+
+    /**
+     * Date model
+     *
+     * @var \Magento\Core\Model\Date
+     */
+    protected $_date;
+
     /**
      * @var \Magento\Core\Model\App
      */
     protected $_app;
 
     /**
+     * Class constructor
+     *
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -49,6 +67,7 @@ abstract class AbstractDatabase extends \Magento\Core\Model\File\Storage\Abstrac
      * @param \Magento\Core\Model\App $app
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
+     * @param string|null $connectionName
      * @param array $data
      */
     public function __construct(
@@ -59,15 +78,16 @@ abstract class AbstractDatabase extends \Magento\Core\Model\File\Storage\Abstrac
         \Magento\Core\Model\App $app,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
+        $connectionName = null,
         array $data = array()
     ) {
-        parent::__construct($coreFileStorageDb, $context, $registry, $dateModel, $resource, $resourceCollection, $data);
+        parent::__construct($context, $registry,  $resource, $resourceCollection, $data);
         $this->_app = $app;
-        $connectionName = (isset($data['connection'])) ? $data['connection'] : null;
-        if (empty($connectionName)) {
+        $this->_coreFileStorageDb = $coreFileStorageDb;
+        $this->_date = $dateModel;
+        if (!$connectionName) {
             $connectionName = $this->getConfigConnectionName();
         }
-
         $this->setConnectionName($connectionName);
     }
 
@@ -83,7 +103,6 @@ abstract class AbstractDatabase extends \Magento\Core\Model\File\Storage\Abstrac
         if (empty($connectionName)) {
             $connectionName = 'default_setup';
         }
-
         return $connectionName;
     }
 
diff --git a/app/code/Magento/Core/Model/File/Storage/Directory/Database.php b/app/code/Magento/Core/Model/File/Storage/Directory/Database.php
index 5b86cc1b01e..8da9f986e50 100644
--- a/app/code/Magento/Core/Model/File/Storage/Directory/Database.php
+++ b/app/code/Magento/Core/Model/File/Storage/Directory/Database.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\File\Storage\Directory;
 
 /**
- * Directory database storage model class
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Class Database
  */
-namespace Magento\Core\Model\File\Storage\Directory;
-
 class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabase
 {
     /**
@@ -56,7 +51,7 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
     protected $_directoryFactory;
 
     /**
-     * Class construct
+     * Class constructor
      *
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb
      * @param \Magento\Core\Model\Context $context
@@ -66,8 +61,8 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
      * @param \Magento\Core\Model\File\Storage\Directory\DatabaseFactory $directoryFactory
      * @param \Magento\Core\Model\Resource\File\Storage\Directory\Database $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
+     * @param string|null $connectionName
      * @param array $data
-     * @param null $connectionName
      */
     public function __construct(
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb,
@@ -76,18 +71,24 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
         \Magento\Core\Model\Date $dateModel,
         \Magento\Core\Model\App $app,
         \Magento\Core\Model\File\Storage\Directory\DatabaseFactory $directoryFactory,
-        \Magento\Core\Model\Resource\File\Storage\Directory\Database $resource = null,
+        \Magento\Core\Model\Resource\File\Storage\Directory\Database $resource,
         \Magento\Data\Collection\Db $resourceCollection = null,
-        array $data = array(),
-        $connectionName = null
+        $connectionName = null,
+        array $data = array()
     ) {
+        $this->_directoryFactory = $directoryFactory;
         parent::__construct(
-            $coreFileStorageDb, $context, $registry, $dateModel, $app, $resource, $resourceCollection,
+            $coreFileStorageDb,
+            $context,
+            $registry,
+            $dateModel,
+            $app,
+            $resource,
+            $resourceCollection,
+            $connectionName,
             $data
         );
-
-        $this->_directoryFactory = $directoryFactory;
-        $this->_init('Magento\Core\Model\Resource\File\Storage\Directory\Database');
+        $this->_init(get_class($this->_resource));
     }
 
     /**
@@ -185,8 +186,8 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
      */
     public function exportDirectories($offset = 0, $count = 100)
     {
-        $offset = ((int) $offset >= 0) ? (int) $offset : 0;
-        $count  = ((int) $count >= 1) ? (int) $count : 1;
+        $offset = ((int)$offset >= 0) ? (int)$offset : 0;
+        $count  = ((int)$count >= 1) ? (int)$count : 1;
 
         $result = $this->_getResource()->exportDirectories($offset, $count);
 
@@ -217,8 +218,7 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
             }
 
             try {
-                $arguments = array('connection' => $this->getConnectionName());
-                $directory = $this->_directoryFactory->create(array('connectionName' => $arguments));
+                $directory = $this->_directoryFactory->create(array('connectionName' => $this->getConnectionName()));
                 $directory->setPath($dir['path']);
 
                 $parentId = $directory->getParentId();
@@ -264,7 +264,7 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas
     /**
      * Delete directory from database
      *
-     * @param string $path
+     * @param string $dirPath
      * @return \Magento\Core\Model\File\Storage\Directory\Database
      */
     public function deleteDirectory($dirPath)
diff --git a/app/code/Magento/Core/Model/File/Storage/File.php b/app/code/Magento/Core/Model/File/Storage/File.php
index eea5d0782f4..4d2c6ed91e8 100644
--- a/app/code/Magento/Core/Model/File/Storage/File.php
+++ b/app/code/Magento/Core/Model/File/Storage/File.php
@@ -24,17 +24,12 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\File\Storage;
 
 /**
- * Abstract model class
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Class File
  */
-namespace Magento\Core\Model\File\Storage;
-
-class File extends \Magento\Core\Model\File\Storage\AbstractStorage
+class File
 {
     /**
      * Prefix of model events names
@@ -43,6 +38,25 @@ class File extends \Magento\Core\Model\File\Storage\AbstractStorage
      */
     protected $_eventPrefix = 'core_file_storage_file';
 
+    /**
+     * Store media base directory path
+     *
+     * @var string
+     */
+    protected $_mediaBaseDirectory = null;
+
+    /**
+     * Core file storage database
+     *
+     * @var \Magento\Core\Helper\File\Storage\Database
+     */
+    protected $_storageHelper = null;
+
+    /**
+     * @var \Magento\Core\Helper\File\Media
+     */
+    protected $_mediaHelper = null;
+
     /**
      * Data at storage
      *
@@ -58,33 +72,26 @@ class File extends \Magento\Core\Model\File\Storage\AbstractStorage
     protected $_errors = array();
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
-     * Class construct
-     *
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb
-     * @param \Magento\Core\Model\Context $context
-     * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Core\Model\Resource\File\Storage\File $resource
-     * @param \Magento\Data\Collection\Db|null $resourceCollection
-     * @param array $data
+     * @param \Magento\Logger $logger
+     * @param \Magento\Core\Helper\File\Storage\Database $storageHelper
+     * @param \Magento\Core\Helper\File\Media $mediaHelper
+     * @param \Magento\Core\Model\Resource\File\Storage\File $fileUtility
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb,
-        \Magento\Core\Model\Context $context,
-        \Magento\Core\Model\Registry $registry,
-        \Magento\Core\Model\Resource\File\Storage\File $resource,
-        \Magento\Data\Collection\Db $resourceCollection = null,
-        array $data = array()
+        \Magento\Logger $logger,
+        \Magento\Core\Helper\File\Storage\Database $storageHelper,
+        \Magento\Core\Helper\File\Media $mediaHelper,
+        \Magento\Core\Model\Resource\File\Storage\File $fileUtility
     ) {
-        parent::__construct($coreFileStorageDb, $context, $registry, $resource, $resourceCollection, $data);
-        $this->_setResourceModel('Magento\Core\Model\Resource\File\Storage\File');
-        $this->_logger = $logger;
+        $this->_fileUtility     = $fileUtility;
+        $this->_storageHelper   = $storageHelper;
+        $this->_logger          = $logger;
+        $this->_mediaHelper     = $mediaHelper;
     }
 
     /**
@@ -114,7 +121,7 @@ class File extends \Magento\Core\Model\File\Storage\AbstractStorage
      */
     public function getStorageData()
     {
-        return $this->_getResource()->getStorageData();
+        return $this->_fileUtility->getStorageData();
     }
 
     /**
@@ -134,7 +141,7 @@ class File extends \Magento\Core\Model\File\Storage\AbstractStorage
      */
     public function clear()
     {
-        $this->_getResource()->clear();
+        $this->_fileUtility->clear();
         return $this;
     }
 
@@ -155,16 +162,25 @@ class File extends \Magento\Core\Model\File\Storage\AbstractStorage
         $offset = ((int) $offset >= 0) ? (int) $offset : 0;
         $count  = ((int) $count >= 1) ? (int) $count : 1;
 
-        if (is_null($this->_data)) {
+        if (empty($this->_data)) {
             $this->_data = $this->getStorageData();
         }
 
-        $slice = array_slice($this->_data[$type], $offset, $count);
-        if (empty($slice)) {
+        if (!array_key_exists($type, $this->_data)) {
             return false;
         }
+        $slice = array_slice($this->_data[$type], $offset, $count);
+        return $slice ?: false;
+    }
 
-        return $slice;
+    /**
+     * Retrieve connection name saved at config
+     *
+     * @return null
+     */
+    public function getConfigConnectionName()
+    {
+        return null;
     }
 
     /**
@@ -197,7 +213,7 @@ class File extends \Magento\Core\Model\File\Storage\AbstractStorage
         $result = array();
         foreach ($slice as $fileName) {
             try {
-                $fileInfo = $this->collectFileInfo($fileName);
+                $fileInfo = $this->_mediaHelper->collectFileInfo($this->getMediaBaseDirectory(), $fileName);
             } catch (\Exception $e) {
                 $this->_logger->logException($e);
                 continue;
@@ -264,7 +280,7 @@ class File extends \Magento\Core\Model\File\Storage\AbstractStorage
      */
     public function saveDir($dir)
     {
-        return $this->_getResource()->saveDir($dir);
+        return $this->_fileUtility->saveDir($dir);
     }
 
     /**
@@ -285,7 +301,7 @@ class File extends \Magento\Core\Model\File\Storage\AbstractStorage
                     ? $file['directory'] . DS . $file['filename']
                     : $file['filename'];
 
-                return $this->_getResource()
+                return $this->_fileUtility
                     ->saveFile($filename, $file['content'], $overwrite);
             } catch (\Exception $e) {
                 $this->_logger->logException($e);
@@ -299,4 +315,17 @@ class File extends \Magento\Core\Model\File\Storage\AbstractStorage
 
         return false;
     }
+
+    /**
+     * Retrieve media base directory path
+     *
+     * @return string
+     */
+    public function getMediaBaseDirectory()
+    {
+        if (is_null($this->_mediaBaseDirectory)) {
+            $this->_mediaBaseDirectory = $this->_storageHelper->getMediaBaseDir();
+        }
+        return $this->_mediaBaseDirectory;
+    }
 }
diff --git a/app/code/Magento/Core/Model/File/Storage/Response.php b/app/code/Magento/Core/Model/File/Storage/Response.php
index f3d41fdeb2d..d168631566c 100644
--- a/app/code/Magento/Core/Model/File/Storage/Response.php
+++ b/app/code/Magento/Core/Model/File/Storage/Response.php
@@ -28,7 +28,7 @@ class Response
     /**
      * Application object manager
      *
-     * @var \Magento\Core\Model\ObjectManager
+     * @var \Magento\ObjectManager
      */
     protected $_objectManager;
 
diff --git a/app/code/Magento/Core/Model/File/Storage/Synchronization.php b/app/code/Magento/Core/Model/File/Storage/Synchronization.php
index f964cd1c792..b5067292b05 100644
--- a/app/code/Magento/Core/Model/File/Storage/Synchronization.php
+++ b/app/code/Magento/Core/Model/File/Storage/Synchronization.php
@@ -21,8 +21,12 @@
  * @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\File\Storage;
 
+/**
+ * Class Synchronization
+ */
 class Synchronization
 {
     /**
diff --git a/app/code/Magento/Core/Model/File/Validator/NotProtectedExtension.php b/app/code/Magento/Core/Model/File/Validator/NotProtectedExtension.php
index 8aceae9065f..aa1e5d5a1c2 100644
--- a/app/code/Magento/Core/Model/File/Validator/NotProtectedExtension.php
+++ b/app/code/Magento/Core/Model/File/Validator/NotProtectedExtension.php
@@ -24,20 +24,23 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\File\Validator;
 
 /**
  * Validator for check not protected file extensions
- *
- * @category   Magento
- * @package    Magento_Core
- * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Core\Model\File\Validator;
-
 class NotProtectedExtension extends \Zend_Validate_Abstract
 {
+    /**
+     * Protected extension message key
+     */
     const PROTECTED_EXTENSION = 'protectedExtension';
 
+    /**
+     * Protected files config path
+     */
+    const XML_PATH_PROTECTED_FILE_EXTENSIONS    = 'general/file/protected_extensions';
+
     /**
      * The file extension
      *
@@ -53,23 +56,20 @@ class NotProtectedExtension extends \Zend_Validate_Abstract
     protected $_protectedFileExtensions = array();
 
     /**
-     * Core data
+     * Core store config
      *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Core\Model\Store\Config
      */
-    protected $_coreData = null;
+    protected $_coreStoreConfig;
 
     /**
-     * Construct
+     * Init validator
      *
-     *
-     *
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      */
-    public function __construct(
-        \Magento\Core\Helper\Data $coreData
-    ) {
-        $this->_coreData = $coreData;
+    public function __construct(\Magento\Core\Model\Store\Config $coreStoreConfig)
+    {
+        $this->_coreStoreConfig = $coreStoreConfig;
         $this->_initMessageTemplates();
         $this->_initProtectedFileExtensions();
     }
@@ -97,9 +97,7 @@ class NotProtectedExtension extends \Zend_Validate_Abstract
     protected function _initProtectedFileExtensions()
     {
         if (!$this->_protectedFileExtensions) {
-            /** @var $helper \Magento\Core\Helper\Data */
-            $helper = $this->_coreData;
-            $extensions = $helper->getProtectedFileExtensions();
+            $extensions = $this->getProtectedFileExtensions();
             if (is_string($extensions)) {
                 $extensions = explode(',', $extensions);
             }
@@ -111,6 +109,16 @@ class NotProtectedExtension extends \Zend_Validate_Abstract
         return $this;
     }
 
+    /**
+     * Return list with protected file extensions
+     *
+     * @param \Magento\Core\Model\Store|string|int $store
+     * @return array
+     */
+    public function getProtectedFileExtensions($store = null)
+    {
+        return $this->_coreStoreConfig->getConfig(self::XML_PATH_PROTECTED_FILE_EXTENSIONS, $store);
+    }
 
     /**
      * Returns true if and only if $value meets the validation requirements
diff --git a/app/code/Magento/Core/Model/Input/Filter.php b/app/code/Magento/Core/Model/Input/Filter.php
index cf407109b19..6304f4b4883 100644
--- a/app/code/Magento/Core/Model/Input/Filter.php
+++ b/app/code/Magento/Core/Model/Input/Filter.php
@@ -106,17 +106,17 @@ class Filter implements \Zend_Filter_Interface
     protected $_helperFactory;
 
     /**
-     * @var \Magento\Core\Model\ObjectManager
+     * @var \Magento\ObjectManager
      */
     protected $_objectManager;
 
     /**
      * @param \Magento\Core\Model\Factory\Helper $helperFactory
-     * @param \Magento\Core\Model\ObjectManager $objectManager
+     * @param \Magento\ObjectManager $objectManager
      */
     function __construct(
         \Magento\Core\Model\Factory\Helper $helperFactory,
-        \Magento\Core\Model\ObjectManager $objectManager
+        \Magento\ObjectManager $objectManager
     ) {
         $this->_helperFactory = $helperFactory;
         $this->_objectManager = $objectManager;
diff --git a/app/code/Magento/Core/Model/Layout.php b/app/code/Magento/Core/Model/Layout.php
index e8d706d5671..6cbfd64d3b6 100644
--- a/app/code/Magento/Core/Model/Layout.php
+++ b/app/code/Magento/Core/Model/Layout.php
@@ -222,7 +222,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
     protected $_coreStoreConfig;
     
     /**
-     * @var \Magento\Core\Model\Logger $logger
+     * @var \Magento\Logger $logger
      */
     protected $_logger;
 
@@ -236,10 +236,15 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
      */
     protected $_themeFactory;
 
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
     /**
      * @param \Magento\View\Layout\ProcessorFactory $processorFactory
      * @param Resource\Theme\CollectionFactory $themeFactory
-     * @param Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param Factory\Helper $factoryHelper
      * @param \Magento\Core\Helper\Data $coreData
@@ -250,12 +255,13 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
      * @param Layout\ScheduledStructure $scheduledStructure
      * @param DataService\Graph $dataServiceGraph
      * @param Store\Config $coreStoreConfig
+     * @param \Magento\App\State $appState
      * @param string $area
      */
     public function __construct(
         \Magento\View\Layout\ProcessorFactory $processorFactory,
         \Magento\Core\Model\Resource\Theme\CollectionFactory $themeFactory,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Model\Factory\Helper $factoryHelper,
         \Magento\Core\Helper\Data $coreData,
@@ -266,6 +272,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
         \Magento\Core\Model\Layout\ScheduledStructure $scheduledStructure,
         \Magento\Core\Model\DataService\Graph $dataServiceGraph,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
+        \Magento\App\State $appState,
         $area = \Magento\View\DesignInterface::DEFAULT_AREA
     ) {
         $this->_eventManager = $eventManager;
@@ -274,6 +281,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_design = $design;
         $this->_blockFactory = $blockFactory;
+        $this->_appState = $appState;
         $this->_area = $area;
         $this->_structure = $structure;
         $this->_argumentProcessor = $argumentProcessor;
@@ -343,16 +351,18 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
     /**
      * Retrieve layout area
      *
+     * @deparecated
      * @return string
      */
     public function getArea()
     {
-        return $this->_area;
+        return $this->_appState->getAreaCode();
     }
 
     /**
      * Set area code
      *
+     * @deprecated
      * @param string $areaCode
      */
     public function setArea($areaCode)
diff --git a/app/code/Magento/Core/Model/Layout/Merge.php b/app/code/Magento/Core/Model/Layout/Merge.php
index 98b69109e8c..3e100449112 100644
--- a/app/code/Magento/Core/Model/Layout/Merge.php
+++ b/app/code/Magento/Core/Model/Layout/Merge.php
@@ -113,7 +113,7 @@ class Merge implements \Magento\View\Layout\ProcessorInterface
     protected $_layoutValidator;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -127,7 +127,7 @@ class Merge implements \Magento\View\Layout\ProcessorInterface
      * @param \Magento\App\State $appState
      * @param \Magento\Cache\FrontendInterface $cache
      * @param \Magento\Adminhtml\Model\LayoutUpdate\Validator $validator
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\View\Design\ThemeInterface $theme Non-injectable theme instance
      */
     public function __construct(
@@ -138,7 +138,7 @@ class Merge implements \Magento\View\Layout\ProcessorInterface
         \Magento\App\State $appState,
         \Magento\Cache\FrontendInterface $cache,
         \Magento\Adminhtml\Model\LayoutUpdate\Validator $validator,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\View\Design\ThemeInterface $theme = null
     ) {
         $this->_theme = $theme ?: $design->getDesignTheme();
@@ -374,7 +374,7 @@ class Merge implements \Magento\View\Layout\ProcessorInterface
                 $messages = $this->_layoutValidator->getMessages();
                 //Add first message to exception
                 $message = array_shift($messages);
-                $this->_logger->addStreamLog(\Magento\Core\Model\Logger::LOGGER_SYSTEM);
+                $this->_logger->addStreamLog(\Magento\Logger::LOGGER_SYSTEM);
                 $this->_logger->log('Cache file with merged layout: ' . $cacheId. ': ' . $message, \Zend_Log::ERR);
             }
         }
diff --git a/app/code/Magento/Core/Model/Layout/Update.php b/app/code/Magento/Core/Model/Layout/Update.php
index 617f4e13d01..02d5d95dba1 100644
--- a/app/code/Magento/Core/Model/Layout/Update.php
+++ b/app/code/Magento/Core/Model/Layout/Update.php
@@ -24,6 +24,8 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\Layout;
+
 /**
  * Layout Update model class
  *
@@ -39,10 +41,33 @@
  * @method \Magento\Core\Model\Layout\Update setUpdatedAt() setUpdatedAt(string $updateDateTime)
  * @method \Magento\Core\Model\Resource\Layout\Update\Collection getCollection()
  */
-namespace Magento\Core\Model\Layout;
-
 class Update extends \Magento\Core\Model\AbstractModel
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
+    /**
+     * @param \Magento\Core\Model\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Core\Model\Resource\AbstractResource $resource
+     * @param \Magento\Data\Collection\Db $resourceCollection
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Core\Model\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Stdlib\DateTime $dateTime,
+        \Magento\Core\Model\Resource\AbstractResource $resource = null,
+        \Magento\Data\Collection\Db $resourceCollection = null,
+        array $data = array()
+    ) {
+        $this->_dateTime = $dateTime;
+        parent::__construct($context, $registry, $resource, $resourceCollection, $data);
+    }
+
     /**
      * Layout Update model initialization
      */
@@ -58,7 +83,7 @@ class Update extends \Magento\Core\Model\AbstractModel
      */
     protected function _beforeSave()
     {
-        $this->setUpdatedAt($this->getResource()->formatDate(time()));
+        $this->setUpdatedAt($this->_dateTime->formatDate(time()));
         return parent::_beforeSave();
     }
 }
diff --git a/app/code/Magento/Core/Model/Locale.php b/app/code/Magento/Core/Model/Locale.php
index 3dfcfb390bc..99e4e097abd 100644
--- a/app/code/Magento/Core/Model/Locale.php
+++ b/app/code/Magento/Core/Model/Locale.php
@@ -24,13 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model;
+
 /**
  * Locale model
- *
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Core\Model;
-
 class Locale implements \Magento\Core\Model\LocaleInterface
 {
     /**
@@ -61,6 +59,9 @@ class Locale implements \Magento\Core\Model\LocaleInterface
      */
     protected $_emulatedLocales = array();
 
+    /**
+     * @var array
+     */
     protected static $_currencyCache = array();
 
     /**
@@ -102,6 +103,11 @@ class Locale implements \Magento\Core\Model\LocaleInterface
      */
     protected $_app;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Translate $translate
@@ -110,6 +116,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale\Config $config
      * @param \Magento\Core\Model\App $app
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param string $locale
      */
     public function __construct(
@@ -120,6 +127,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale\Config $config,
         \Magento\Core\Model\App $app,
+        \Magento\Stdlib\DateTime $dateTime,
         $locale = null
     ) {
         $this->_eventManager = $eventManager;
@@ -129,6 +137,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
         $this->_storeManager = $storeManager;
         $this->_config = $config;
         $this->_app = $app;
+        $this->dateTime = $dateTime;
         $this->setLocale($locale);
     }
 
@@ -241,7 +250,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
     }
 
     /**
-     * Get options array for locale dropdown in currunt locale
+     * Get options array for locale dropdown in current locale
      *
      * @return array
      */
@@ -266,7 +275,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
      * @param   bool $translatedName translation flag
      * @return  array
      */
-    protected function _getOptionLocales($translatedName=false)
+    protected function _getOptionLocales($translatedName = false)
     {
         $options    = array();
         $locales    = $this->getLocale()->getLocaleList();
@@ -274,7 +283,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
         $countries  = $this->getCountryTranslationList();
 
         $allowed    = $this->getAllowLocales();
-        foreach ($locales as $code=>$active) {
+        foreach (array_keys($locales) as $code) {
             if (strstr($code, '_')) {
                 if (!in_array($code, $allowed)) {
                     continue;
@@ -309,7 +318,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
         $options= array();
         $zones  = $this->getTranslationList('windowstotimezone');
         ksort($zones);
-        foreach ($zones as $code=>$name) {
+        foreach ($zones as $code => $name) {
             $name = trim($name);
             $options[] = array(
                'label' => empty($name) ? $code : $name . ' (' . $code . ')',
@@ -359,7 +368,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
     /**
      * Retrieve currency option list
      *
-     * @return unknown
+     * @return array
      */
     public function getOptionCurrencies()
     {
@@ -367,7 +376,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
         $options = array();
         $allowed = $this->getAllowCurrencies();
 
-        foreach ($currencies as $name=>$code) {
+        foreach ($currencies as $name => $code) {
             if (!in_array($code, $allowed)) {
                 continue;
             }
@@ -383,7 +392,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
     /**
      * Retrieve all currency option list
      *
-     * @return unknown
+     * @return array
      */
     public function getOptionAllCurrencies()
     {
@@ -398,6 +407,10 @@ class Locale implements \Magento\Core\Model\LocaleInterface
         return $this->_sortOptionArray($options);
     }
 
+    /**
+     * @param array $option
+     * @return array
+     */
     protected function _sortOptionArray($option)
     {
         $data = array();
@@ -428,12 +441,13 @@ class Locale implements \Magento\Core\Model\LocaleInterface
     /**
      * Retrieve array of allowed currencies
      *
-     * @return unknown
+     * @return array
      */
     public function getAllowCurrencies()
     {
         if ($this->_appState->isInstalled()) {
-            $data = $this->_storeManager->getStore()->getConfig(\Magento\Core\Model\LocaleInterface::XML_PATH_ALLOW_CURRENCIES_INSTALLED);
+            $data = $this->_storeManager->getStore()
+                ->getConfig(\Magento\Core\Model\LocaleInterface::XML_PATH_ALLOW_CURRENCIES_INSTALLED);
             return explode(',', $data);
         } else {
             $data = $this->_config->getAllowedCurrencies();
@@ -447,7 +461,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
      * @param   string $type
      * @return  string
      */
-    public function getDateFormat($type=null)
+    public function getDateFormat($type = null)
     {
         return $this->getTranslation($type, 'date');
     }
@@ -470,7 +484,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
      * @param   string $type
      * @return  string
      */
-    public function getTimeFormat($type=null)
+    public function getTimeFormat($type = null)
     {
         return $this->getTranslation($type, 'time');
     }
@@ -491,7 +505,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
      *
      * @param mixed              $date
      * @param string             $part
-     * @param string|Zend_Locale $locale
+     * @param string|\Zend_Locale $locale
      * @param bool               $useTimezone
      * @return \Zend_Date
      */
@@ -507,7 +521,9 @@ class Locale implements \Magento\Core\Model\LocaleInterface
         }
         $date = new \Zend_Date($date, $part, $locale);
         if ($useTimezone) {
-            if ($timezone = $this->_storeManager->getStore()->getConfig(\Magento\Core\Model\LocaleInterface::XML_PATH_DEFAULT_TIMEZONE)) {
+            $timezone = $this->_storeManager->getStore()
+                ->getConfig(\Magento\Core\Model\LocaleInterface::XML_PATH_DEFAULT_TIMEZONE);
+            if ($timezone) {
                 $date->setTimezone($timezone);
             }
         }
@@ -525,7 +541,8 @@ class Locale implements \Magento\Core\Model\LocaleInterface
      */
     public function storeDate($store=null, $date=null, $includeTime=false)
     {
-        $timezone = $this->_storeManager->getStore($store)->getConfig(\Magento\Core\Model\LocaleInterface::XML_PATH_DEFAULT_TIMEZONE);
+        $timezone = $this->_storeManager->getStore($store)
+            ->getConfig(\Magento\Core\Model\LocaleInterface::XML_PATH_DEFAULT_TIMEZONE);
         $date = new \Zend_Date($date, null, $this->getLocale());
         $date->setTimezone($timezone);
         if (!$includeTime) {
@@ -542,7 +559,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
      * or in format which was passed as parameter.
      *
      * @param mixed $store Information about store
-     * @param string|integer|Zend_Date|array|null $date date in store's timezone
+     * @param string|integer|\Zend_Date|array|null $date date in store's timezone
      * @param boolean $includeTime flag for including time to date
      * @param null|string $format
      * @return \Zend_Date
@@ -564,7 +581,8 @@ class Locale implements \Magento\Core\Model\LocaleInterface
      */
     public function storeTimeStamp($store=null)
     {
-        $timezone = $this->_storeManager->getStore($store)->getConfig(\Magento\Core\Model\LocaleInterface::XML_PATH_DEFAULT_TIMEZONE);
+        $timezone = $this->_storeManager->getStore($store)
+            ->getConfig(\Magento\Core\Model\LocaleInterface::XML_PATH_DEFAULT_TIMEZONE);
         $currentTimezone = @date_default_timezone_get();
         @date_default_timezone_set($timezone);
         $date = date('Y-m-d H:i:s');
@@ -681,7 +699,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
         if ($pos !== false){
             $requiredPrecision = strlen($t) - $pos - $totalPrecision;
         }
-        $group = 0;
+
         if (strrpos($format, ',') !== false) {
             $group = ($decimalPoint - strrpos($format, ',') - 1);
         } else {
@@ -718,7 +736,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface
             ));
             $this->_localeCode = $this->_locale->toString();
 
-            $this->_translate->initTranslate($this->_localeCode, \Magento\Core\Model\App\Area::AREA_FRONTEND, true);
+            $this->_translate->initTranslate($this->_localeCode, true);
         } else {
             $this->_emulatedLocales[] = false;
         }
@@ -726,7 +744,6 @@ class Locale implements \Magento\Core\Model\LocaleInterface
 
     /**
      * Get last locale, used before last emulation
-     *
      */
     public function revert()
     {
@@ -735,13 +752,13 @@ class Locale implements \Magento\Core\Model\LocaleInterface
             $this->_locale = $locale;
             $this->_localeCode = $this->_locale->toString();
 
-            $this->_translate->initTranslate($this->_localeCode, \Magento\Core\Model\App\Area::AREA_ADMINHTML, true);
+            $this->_translate->initTranslate($this->_localeCode, true);
         }
     }
 
     /**
      * Returns localized informations as array, supported are several
-     * types of informations.
+     * types of information.
      * For detailed information about the types look into the documentation
      *
      * @param  string             $path   (Optional) Type of information to return
@@ -810,8 +827,8 @@ class Locale implements \Magento\Core\Model\LocaleInterface
         }
 
         $result = false;
-        if (!is_empty_date($dateFrom) && $storeTimeStamp < $fromTimeStamp) {
-        } elseif (!is_empty_date($dateTo) && $storeTimeStamp > $toTimeStamp) {
+        if (!$this->dateTime->isEmptyDate($dateFrom) && $storeTimeStamp < $fromTimeStamp) {
+        } elseif (!$this->dateTime->isEmptyDate($dateTo) && $storeTimeStamp > $toTimeStamp) {
         } else {
             $result = true;
         }
diff --git a/app/code/Magento/Core/Model/Locale/Config.php b/app/code/Magento/Core/Model/Locale/Config.php
index d22e4c06161..6afb000941c 100644
--- a/app/code/Magento/Core/Model/Locale/Config.php
+++ b/app/code/Magento/Core/Model/Locale/Config.php
@@ -114,57 +114,38 @@ class Config
         'TRL' /*Old Turkish Lira*/,'XPF' /*CFP Franc*/
     );
 
-    /**
-     * @var \Magento\Core\Model\Config
-     */
-    protected $_coreConfig;
 
     /**
-     * Constructor
-     *
-     * @param \Magento\Core\Model\Config $coreConfig
+     * @param array $data
      */
-    public function __construct(
-        \Magento\Core\Model\Config $coreConfig
-    ) {
-        $this->_coreConfig = $coreConfig;
+    public function __construct(array $data = array())
+    {
+        if (isset($data['allowedLocales']) && is_array($data['allowedLocales'])) {
+            $this->_allowedLocales = array_merge($this->_allowedLocales, $data['allowedLocales']);
+        }
+
+        if (isset($data['allowedCurrencies']) && is_array($data['allowedCurrencies'])) {
+            $this->_allowedCurrencies = array_merge($this->_allowedCurrencies, $data['allowedCurrencies']);
+        }
     }
 
     /**
-     * Get list preconfigured allowed locales
+     * Get list pre-configured allowed locales
      *
      * @return array
      */
     public function getAllowedLocales()
     {
-        $configData = $this->_coreConfig->getNode(\Magento\Core\Model\LocaleInterface::XML_PATH_ALLOW_CODES);
-        if ($configData) {
-            $configData = $configData->asArray();
-        }
-        if ($configData) {
-            $configData = array_keys($configData);
-        } else {
-            $configData = array();
-        }
-        return array_merge($this->_allowedLocales, $configData);
+       return $this->_allowedLocales;
     }
 
     /**
-     * Get list preconfigured allowed currencies
+     * Get list pre-configured allowed currencies
      *
      * @return array
      */
     public function getAllowedCurrencies()
     {
-        $configData = $this->_coreConfig->getNode(\Magento\Core\Model\LocaleInterface::XML_PATH_ALLOW_CURRENCIES);
-        if ($configData) {
-            $configData = $configData->asArray();
-        }
-        if ($configData) {
-            $configData = array_keys($configData);
-        } else {
-            $configData = array();
-        }
-        return array_merge($this->_allowedCurrencies, $configData);
+      return $this->_allowedCurrencies;
     }
 }
diff --git a/app/code/Magento/Core/Model/Locale/Hierarchy/Config/SchemaLocator.php b/app/code/Magento/Core/Model/Locale/Hierarchy/Config/SchemaLocator.php
index 1b937f16941..6e9c8ce18eb 100644
--- a/app/code/Magento/Core/Model/Locale/Hierarchy/Config/SchemaLocator.php
+++ b/app/code/Magento/Core/Model/Locale/Hierarchy/Config/SchemaLocator.php
@@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Core') . DIRECTORY_SEPARATOR . 'locale.xsd';
     }
diff --git a/app/code/Magento/Core/Model/LocaleInterface.php b/app/code/Magento/Core/Model/LocaleInterface.php
index b62b376b5a1..8965efa8d1a 100644
--- a/app/code/Magento/Core/Model/LocaleInterface.php
+++ b/app/code/Magento/Core/Model/LocaleInterface.php
@@ -45,8 +45,6 @@ interface LocaleInterface
      */
     const XML_PATH_DEFAULT_LOCALE   = 'general/locale/code';
     const XML_PATH_DEFAULT_TIMEZONE = 'general/locale/timezone';
-    const XML_PATH_ALLOW_CODES      = 'global/locale/allow/codes';
-    const XML_PATH_ALLOW_CURRENCIES = 'global/locale/allow/currencies';
     const XML_PATH_ALLOW_CURRENCIES_INSTALLED = 'system/currency/installed';
 
     /**
diff --git a/app/code/Magento/Core/Model/Log/Adapter.php b/app/code/Magento/Core/Model/Log/Adapter.php
index 93c3e4d6ccf..c373aa73a94 100644
--- a/app/code/Magento/Core/Model/Log/Adapter.php
+++ b/app/code/Magento/Core/Model/Log/Adapter.php
@@ -58,17 +58,17 @@ class Adapter
     protected $_debugReplacePrivateDataKeys = array();
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
      * Set log file name
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param string $fileName
      */
-    public function __construct(\Magento\Core\Model\Logger $logger, $fileName)
+    public function __construct(\Magento\Logger $logger, $fileName)
     {
         $this->_logFileName = $fileName;
         $this->_logger = $logger;
diff --git a/app/code/Magento/Core/Model/ModuleManager.php b/app/code/Magento/Core/Model/ModuleManager.php
index 3aa3b8e9a28..1d81c896cda 100644
--- a/app/code/Magento/Core/Model/ModuleManager.php
+++ b/app/code/Magento/Core/Model/ModuleManager.php
@@ -40,7 +40,7 @@ class ModuleManager
     private $_storeConfig;
 
     /**
-     * @var \Magento\App\ModuleListInterface
+     * @var \Magento\Module\ModuleListInterface
      */
     private $_moduleList;
 
@@ -51,12 +51,12 @@ class ModuleManager
 
     /**
      * @param \Magento\Core\Model\Store\ConfigInterface $storeConfig
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\Module\ModuleListInterface $moduleList
      * @param array $outputConfigPaths
      */
     public function __construct(
         \Magento\Core\Model\Store\ConfigInterface $storeConfig,
-        \Magento\App\ModuleListInterface $moduleList,
+        \Magento\Module\ModuleListInterface $moduleList,
         array $outputConfigPaths = array()
     ) {
         $this->_storeConfig = $storeConfig;
diff --git a/app/code/Magento/Core/Model/ObjectManager.php b/app/code/Magento/Core/Model/ObjectManager.php
deleted file mode 100644
index b06155b6cf3..00000000000
--- a/app/code/Magento/Core/Model/ObjectManager.php
+++ /dev/null
@@ -1,181 +0,0 @@
-<?php
-/**
- * Magento application object manager. Configures and application application
- *
- * 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;
-
-/**
- * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
- */
-class ObjectManager extends \Magento\ObjectManager\ObjectManager
-{
-    /**
-     * @var \Magento\Core\Model\ObjectManager
-     */
-    protected static $_instance;
-
-    /**
-     * @var \Magento\ObjectManager\Relations
-     */
-    protected $_compiledRelations;
-
-    /**
-     * Retrieve object manager
-     *
-     * TODO: Temporary solution for serialization, should be removed when Serialization problem is resolved
-     *
-     * @deprecated
-     * @return \Magento\ObjectManager
-     * @throws \RuntimeException
-     */
-    public static function getInstance()
-    {
-        if (!self::$_instance instanceof \Magento\ObjectManager) {
-            throw new \RuntimeException('ObjectManager isn\'t initialized');
-        }
-        return self::$_instance;
-    }
-
-    /**
-     * Set object manager instance
-     *
-     * @param \Magento\ObjectManager $objectManager
-     * @throws \LogicException
-     */
-    public static function setInstance(\Magento\ObjectManager $objectManager)
-    {
-        self::$_instance = $objectManager;
-    }
-
-    /**
-     * @param \Magento\Core\Model\Config\Primary $primaryConfig
-     * @param \Magento\ObjectManager\Config $config
-     * @param array $sharedInstances
-     * @param \Magento\Core\Model\ObjectManager\ConfigLoader\Primary $primaryLoader
-     * @throws \Magento\BootstrapException
-     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
-     * @SuppressWarnings(PHPMD.NPathComplexity)
-     */
-    public function __construct(
-        \Magento\Core\Model\Config\Primary $primaryConfig,
-        \Magento\ObjectManager\Config $config = null,
-        $sharedInstances = array(),
-        \Magento\Core\Model\ObjectManager\ConfigLoader\Primary $primaryLoader = null
-    ) {
-        $definitionFactory = new \Magento\Core\Model\ObjectManager\DefinitionFactory($primaryConfig);
-        $definitions = $definitionFactory->createClassDefinition($primaryConfig);
-        $relations = $definitionFactory->createRelations();
-        $config = $config ?: new \Magento\ObjectManager\Config\Config(
-            $relations,
-            $definitions
-        );
-
-        $localConfig = new \Magento\Core\Model\Config\Local(new \Magento\Core\Model\Config\Loader\Local(
-            $primaryConfig->getDirectories()->getDir(\Magento\App\Dir::CONFIG),
-            $primaryConfig->getParam(\Magento\Core\Model\App::PARAM_CUSTOM_LOCAL_CONFIG),
-            $primaryConfig->getParam(\Magento\Core\Model\App::PARAM_CUSTOM_LOCAL_FILE)
-        ));
-        $appMode = $primaryConfig->getParam(\Magento\Core\Model\App::PARAM_MODE, \Magento\App\State::MODE_DEFAULT);
-        $factory = new \Magento\ObjectManager\Factory\Factory($config, $this, $definitions, array_replace(
-            $localConfig->getParams(),
-            $primaryConfig->getParams()
-        ));
-
-        $sharedInstances['Magento\Core\Model\Config\Local'] = $localConfig;
-        $sharedInstances['Magento\Core\Model\Config\Primary'] = $primaryConfig;
-        $sharedInstances['Magento\App\Dir'] = $primaryConfig->getDirectories();
-        $sharedInstances['Magento\Core\Model\ObjectManager'] = $this;
-
-        parent::__construct($factory, $config, $sharedInstances);
-        $primaryConfig->configure($this);
-        self::setInstance($this);
-
-        \Magento\Profiler::start('global_primary');
-        $primaryLoader = $primaryLoader ?: new \Magento\Core\Model\ObjectManager\ConfigLoader\Primary(
-            $primaryConfig->getDirectories(),
-            $appMode
-        );
-        try {
-            $configData = $primaryLoader->load();
-        } catch (\Exception $e) {
-            throw new \Magento\BootstrapException($e->getMessage());
-        }
-
-        if ($configData) {
-            $this->configure($configData);
-        }
-
-        if ($definitions instanceof \Magento\ObjectManager\Definition\Compiled) {
-            $interceptorGenerator = null;
-        } else {
-            $autoloader = new \Magento\Autoload\IncludePath();
-            $interceptorGenerator = new \Magento\Interception\CodeGenerator\CodeGenerator(new \Magento\Code\Generator(
-                null,
-                $autoloader,
-                new \Magento\Code\Generator\Io(
-                    new \Magento\Io\File(),
-                    $autoloader,
-                    $primaryConfig->getDirectories()->getDir(\Magento\App\Dir::GENERATION)
-                )
-            ));
-        }
-
-        \Magento\Profiler::stop('global_primary');
-        $verification = $this->get('Magento\App\Dir\Verification');
-        $verification->createAndVerifyDirectories();
-
-        $this->_config->setCache($this->get('Magento\Core\Model\ObjectManager\ConfigCache'));
-        $this->configure($this->get('Magento\Core\Model\ObjectManager\ConfigLoader')->load('global'));
-
-        $interceptionConfig = $this->create('Magento\Interception\Config\Config', array(
-            'relations' => $definitionFactory->createRelations(),
-            'omConfig' => $this->_config,
-            'codeGenerator' => $interceptorGenerator,
-            'classDefinitions' => $definitions instanceof \Magento\ObjectManager\Definition\Compiled
-                ? $definitions
-                : null,
-            'cacheId' => 'interception',
-        ));
-
-        $pluginList = $this->create('Magento\Interception\PluginList\PluginList', array(
-            'relations' => $definitionFactory->createRelations(),
-            'definitions' => $definitionFactory->createPluginDefinition(),
-            'omConfig' => $this->_config,
-            'classDefinitions' => $definitions instanceof \Magento\ObjectManager\Definition\Compiled
-                ? $definitions
-                : null,
-            'scopePriorityScheme' => array('global'),
-            'cacheId' => 'pluginlist',
-        ));
-        $this->_sharedInstances['Magento\Interception\PluginList\PluginList'] = $pluginList;
-        $this->_factory = $this->create('Magento\Interception\FactoryDecorator', array(
-            'factory' => $this->_factory,
-            'config' => $interceptionConfig,
-            'pluginList' => $pluginList
-        ));
-        $this->get('Magento\Core\Model\Resource')->setConfig($this->get('Magento\Core\Model\Config\Resource'));
-
-        self::setInstance($this);
-    }
-}
diff --git a/app/code/Magento/Core/Model/Observer.php b/app/code/Magento/Core/Model/Observer.php
index 468be6d48c0..0f27862cc22 100644
--- a/app/code/Magento/Core/Model/Observer.php
+++ b/app/code/Magento/Core/Model/Observer.php
@@ -64,7 +64,7 @@ class Observer
     protected  $_registration;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -75,7 +75,7 @@ class Observer
      * @param \Magento\Core\Model\ConfigInterface $config
      * @param \Magento\Core\Model\Page\Asset\PublicFileFactory $assetFileFactory
      * @param \Magento\Core\Model\Theme\Registration $registration
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */
     public function __construct(
         \Magento\Core\Model\Cache\Frontend\Pool $cacheFrontendPool,
@@ -84,7 +84,7 @@ class Observer
         \Magento\Core\Model\ConfigInterface $config,
         \Magento\Core\Model\Page\Asset\PublicFileFactory $assetFileFactory,
         \Magento\Core\Model\Theme\Registration $registration,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger
     ) {
         $this->_cacheFrontendPool = $cacheFrontendPool;
         $this->_currentTheme = $design->getDesignTheme();
diff --git a/app/code/Magento/Core/Model/Page/Asset/Merged.php b/app/code/Magento/Core/Model/Page/Asset/Merged.php
index 8224ff51ffd..923dba4dac4 100644
--- a/app/code/Magento/Core/Model/Page/Asset/Merged.php
+++ b/app/code/Magento/Core/Model/Page/Asset/Merged.php
@@ -40,7 +40,7 @@ class Merged implements \Iterator
     private $_objectManager;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     private $_logger;
 
@@ -68,15 +68,15 @@ class Merged implements \Iterator
 
     /**
      * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Core\Model\Logger $logger,
-     * @param \Magento\App\Dir $dirs,
+     * @param \Magento\Logger $logger
+     * @param \Magento\App\Dir $dirs
      * @param \Magento\Core\Model\Page\Asset\MergeStrategyInterface $mergeStrategy
      * @param array $assets
      * @throws \InvalidArgumentException
      */
     public function __construct(
         \Magento\ObjectManager $objectManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\App\Dir $dirs,
         \Magento\Core\Model\Page\Asset\MergeStrategyInterface $mergeStrategy,
         array $assets
diff --git a/app/code/Magento/Core/Model/Page/Asset/Minified.php b/app/code/Magento/Core/Model/Page/Asset/Minified.php
index 44594eefa74..038c2ac108c 100644
--- a/app/code/Magento/Core/Model/Page/Asset/Minified.php
+++ b/app/code/Magento/Core/Model/Page/Asset/Minified.php
@@ -56,7 +56,7 @@ class Minified implements \Magento\Core\Model\Page\Asset\MergeableInterface
     protected $_viewUrl;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -64,13 +64,13 @@ class Minified implements \Magento\Core\Model\Page\Asset\MergeableInterface
      * @param \Magento\Core\Model\Page\Asset\LocalInterface $asset
      * @param \Magento\Code\Minifier $minifier
      * @param \Magento\Core\Model\View\Url $viewUrl
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */
     public function __construct(
         \Magento\Core\Model\Page\Asset\LocalInterface $asset,
         \Magento\Code\Minifier $minifier,
         \Magento\Core\Model\View\Url $viewUrl,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger
     ) {
         $this->_originalAsset = $asset;
         $this->_minifier = $minifier;
diff --git a/app/code/Magento/Core/Model/Resource/AbstractResource.php b/app/code/Magento/Core/Model/Resource/AbstractResource.php
index f741acb5c33..a9244af25de 100644
--- a/app/code/Magento/Core/Model/Resource/AbstractResource.php
+++ b/app/code/Magento/Core/Model/Resource/AbstractResource.php
@@ -132,29 +132,6 @@ abstract class AbstractResource
         return $this;
     }
 
-    /**
-     * Format date to internal format
-     *
-     * @param string|Zend_Date $date
-     * @param bool $includeTime
-     * @return string
-     */
-    public function formatDate($date, $includeTime=true)
-    {
-         return \Magento\Date::formatDate($date, $includeTime);
-    }
-
-    /**
-     * Convert internal date to UNIX timestamp
-     *
-     * @param string $str
-     * @return int
-     */
-    public function mktime($str)
-    {
-        return \Magento\Date::toTimestamp($str);
-    }
-
     /**
      * Serialize specified field in an object
      *
@@ -240,7 +217,7 @@ abstract class AbstractResource
     {
         $type = strtolower($type);
         if ($type == 'decimal' || $type == 'numeric' || $type == 'float') {
-            $value = \Magento\Core\Model\ObjectManager::getInstance()->get('Magento\Core\Model\LocaleInterface')
+            $value = \Magento\App\ObjectManager::getInstance()->get('Magento\Core\Model\LocaleInterface')
                 ->getNumber($value);
         }
         return $value;
diff --git a/app/code/Magento/Core/Model/Resource/Config/Value/Collection/Scoped.php b/app/code/Magento/Core/Model/Resource/Config/Value/Collection/Scoped.php
index 6ff0dc81f5e..f42c681b907 100644
--- a/app/code/Magento/Core/Model/Resource/Config/Value/Collection/Scoped.php
+++ b/app/code/Magento/Core/Model/Resource/Config/Value/Collection/Scoped.php
@@ -43,7 +43,7 @@ class Scoped extends \Magento\Core\Model\Resource\Db\Collection\AbstractCollecti
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Config\Data $resource
@@ -52,7 +52,7 @@ class Scoped extends \Magento\Core\Model\Resource\Db\Collection\AbstractCollecti
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Config\Data $resource,
diff --git a/app/code/Magento/Core/Model/Resource/Db/AbstractDb.php b/app/code/Magento/Core/Model/Resource/Db/AbstractDb.php
index c7183640b2c..3d69a68fb81 100644
--- a/app/code/Magento/Core/Model/Resource/Db/AbstractDb.php
+++ b/app/code/Magento/Core/Model/Resource/Db/AbstractDb.php
@@ -39,7 +39,7 @@ abstract class AbstractDb extends \Magento\Core\Model\Resource\AbstractResource
     /**
      * Cached resources singleton
      *
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resources;
 
@@ -140,9 +140,9 @@ abstract class AbstractDb extends \Magento\Core\Model\Resource\AbstractResource
     /**
      * Class constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
-    public function __construct(\Magento\Core\Model\Resource $resource)
+    public function __construct(\Magento\App\Resource $resource)
     {
         $this->_resources = $resource;
         parent::__construct();
@@ -165,7 +165,7 @@ abstract class AbstractDb extends \Magento\Core\Model\Resource\AbstractResource
      */
     public function __wakeup()
     {
-        $this->_resources = \Magento\Core\Model\ObjectManager::getInstance()->get('Magento\Core\Model\Resource');
+        $this->_resources = \Magento\App\ObjectManager::getInstance()->get('Magento\App\Resource');
     }
 
     /**
diff --git a/app/code/Magento/Core/Model/Resource/Db/Collection/AbstractCollection.php b/app/code/Magento/Core/Model/Resource/Db/Collection/AbstractCollection.php
index 06108c61f90..5e672bc3e26 100644
--- a/app/code/Magento/Core/Model/Resource/Db/Collection/AbstractCollection.php
+++ b/app/code/Magento/Core/Model/Resource/Db/Collection/AbstractCollection.php
@@ -122,14 +122,14 @@ abstract class AbstractCollection extends \Magento\Data\Collection\Db
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
@@ -473,7 +473,7 @@ abstract class AbstractCollection extends \Magento\Data\Collection\Db
     public function getResource()
     {
         if (empty($this->_resource)) {
-            $this->_resource = \Magento\Core\Model\ObjectManager::getInstance()->create($this->getResourceModelName());
+            $this->_resource = \Magento\App\ObjectManager::getInstance()->create($this->getResourceModelName());
         }
         return $this->_resource;
     }
@@ -615,16 +615,4 @@ abstract class AbstractCollection extends \Magento\Data\Collection\Db
         }
         return $this;
     }
-
-    /**
-     * Format Date to internal database date format
-     *
-     * @param int|string|Zend_Date $date
-     * @param boolean $includeTime
-     * @return string
-     */
-    public function formatDate($date, $includeTime = true)
-    {
-        return \Magento\Date::formatDate($date, $includeTime);
-    }
 }
diff --git a/app/code/Magento/Core/Model/Resource/Design.php b/app/code/Magento/Core/Model/Resource/Design.php
index c55dcd97555..420ad076a6d 100644
--- a/app/code/Magento/Core/Model/Resource/Design.php
+++ b/app/code/Magento/Core/Model/Resource/Design.php
@@ -36,6 +36,23 @@ namespace Magento\Core\Model\Resource;
 
 class Design extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\App\Resource $resource
+     */
+    public function __construct(
+        \Magento\Stdlib\DateTime $dateTime,
+        \Magento\App\Resource $resource
+    ) {
+        $this->dateTime = $dateTime;
+        parent::__construct($resource);
+    }
+
     /**
      * Define main table and primary key
      *
@@ -55,20 +72,20 @@ class Design extends \Magento\Core\Model\Resource\Db\AbstractDb
     public function _beforeSave(\Magento\Core\Model\AbstractModel $object)
     {
         if ($date = $object->getDateFrom()) {
-            $object->setDateFrom($this->formatDate($date));
+            $object->setDateFrom($this->dateTime->formatDate($date));
         } else {
             $object->setDateFrom(null);
         }
 
         if ($date = $object->getDateTo()) {
-            $object->setDateTo($this->formatDate($date));
+            $object->setDateTo($this->dateTime->formatDate($date));
         } else {
             $object->setDateTo(null);
         }
 
         if (!is_null($object->getDateFrom())
             && !is_null($object->getDateTo())
-            && \Magento\Date::toTimestamp($object->getDateFrom()) > \Magento\Date::toTimestamp($object->getDateTo())) {
+            && $this->dateTime->toTimestamp($object->getDateFrom()) > $this->dateTime->toTimestamp($object->getDateTo())) {
             throw new \Magento\Core\Exception(__('Start date cannot be greater than end date.'));
         }
 
diff --git a/app/code/Magento/Core/Model/Resource/Design/Collection.php b/app/code/Magento/Core/Model/Resource/Design/Collection.php
index ba7e7d89945..5532e71c107 100644
--- a/app/code/Magento/Core/Model/Resource/Design/Collection.php
+++ b/app/code/Magento/Core/Model/Resource/Design/Collection.php
@@ -24,21 +24,40 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\Resource\Design;
 
 /**
  * Core Design resource collection
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Core\Model\Resource\Design;
-
 class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractCollection
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Event\ManagerInterface $eventManager
+     * @param \Magento\Logger $logger
+     * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
+     * @param \Magento\Core\Model\EntityFactory $entityFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
+     */
+    public function __construct(
+        \Magento\Event\ManagerInterface $eventManager,
+        \Magento\Logger $logger,
+        \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
+        \Magento\Core\Model\EntityFactory $entityFactory,
+        \Magento\Stdlib\DateTime $dateTime,
+        \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
+    ) {
+        $this->dateTime = $dateTime;
+        parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource);
+    }
+
     /**
      * Core Design resource collection
-     *
      */
     protected function _construct()
     {
@@ -53,9 +72,10 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     public function joinStore()
     {
          return $this->join(
-            array('cs' => 'core_store'),
-            'cs.store_id = main_table.store_id',
-            array('cs.name'));
+             array('cs' => 'core_store'),
+             'cs.store_id = main_table.store_id',
+             array('cs.name')
+         );
     }
 
     /**
@@ -67,9 +87,9 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     public function addDateFilter($date = null)
     {
         if (is_null($date)) {
-            $date = $this->formatDate(true);
+            $date = $this->dateTime->formatDate(true);
         } else {
-            $date = $this->formatDate($date);
+            $date = $this->dateTime->formatDate($date);
         }
 
         $this->addFieldToFilter('date_from', array('lteq' => $date));
diff --git a/app/code/Magento/Core/Model/Resource/Email/Template.php b/app/code/Magento/Core/Model/Resource/Email/Template.php
index 5d0c942f19c..dcc5f0ef537 100644
--- a/app/code/Magento/Core/Model/Resource/Email/Template.php
+++ b/app/code/Magento/Core/Model/Resource/Email/Template.php
@@ -36,6 +36,21 @@ namespace Magento\Core\Model\Resource\Email;
 
 class Template extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\App\Resource $resource
+     */
+    public function __construct(\Magento\Stdlib\DateTime $dateTime, \Magento\App\Resource $resource)
+    {
+        $this->dateTime = $dateTime;
+        parent::__construct($resource);
+    }
+
     /**
      * Initialize email template resource model
      *
@@ -97,15 +112,15 @@ class Template extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Set template type, added at and modified at time
      *
-     * @param \Magento\Core\Model\Email\Template $object
+     * @param \Magento\Core\Model\AbstractModel $object
      * @return \Magento\Core\Model\Resource\Email\Template
      */
     protected function _beforeSave(\Magento\Core\Model\AbstractModel $object)
     {
         if ($object->isObjectNew()) {
-            $object->setCreatedAt($this->formatDate(true));
+            $object->setCreatedAt($this->dateTime->formatDate(true));
         }
-        $object->setModifiedAt($this->formatDate(true));
+        $object->setModifiedAt($this->dateTime->formatDate(true));
         $object->setTemplateType((int)$object->getTemplateType());
 
         return parent::_beforeSave($object);
diff --git a/app/code/Magento/Core/Model/Resource/File/Storage/AbstractStorage.php b/app/code/Magento/Core/Model/Resource/File/Storage/AbstractStorage.php
index a5fbc55f93b..f1592f66166 100644
--- a/app/code/Magento/Core/Model/Resource/File/Storage/AbstractStorage.php
+++ b/app/code/Magento/Core/Model/Resource/File/Storage/AbstractStorage.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\Resource\File\Storage;
 
 /**
- * Abstract storage resource model
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Class AbstractStorage
  */
-namespace Magento\Core\Model\Resource\File\Storage;
-
 abstract class AbstractStorage extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
     /**
diff --git a/app/code/Magento/Core/Model/Resource/File/Storage/Database.php b/app/code/Magento/Core/Model/Resource/File/Storage/Database.php
index 4692784c198..b15d5cc14c7 100644
--- a/app/code/Magento/Core/Model/Resource/File/Storage/Database.php
+++ b/app/code/Magento/Core/Model/Resource/File/Storage/Database.php
@@ -24,30 +24,25 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\Resource\File\Storage;
 
 /**
- * File storage database resource resource model class
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Class Database
  */
-namespace Magento\Core\Model\Resource\File\Storage;
-
 class Database extends \Magento\Core\Model\Resource\File\Storage\AbstractStorage
 {
     /**
-     * @var \Magento\Core\Model\Resource\Helper\AbstractHelper
+     * @var \Magento\Core\Model\Resource\Helper
      */
     protected $_resourceHelper;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
-     * @param \Magento\Core\Model\Resource\Helper\AbstractHelper $resourceHelper
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Core\Model\Resource\Helper $resourceHelper
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
-        \Magento\Core\Model\Resource\Helper\AbstractHelper $resourceHelper
+        \Magento\App\Resource $resource,
+        \Magento\Core\Model\Resource\Helper $resourceHelper
     ) {
         parent::__construct($resource);
         $this->_resourceHelper = $resourceHelper;
diff --git a/app/code/Magento/Core/Model/Resource/File/Storage/Directory/Database.php b/app/code/Magento/Core/Model/Resource/File/Storage/Directory/Database.php
index e386a1c69b6..76e3a98c3a1 100644
--- a/app/code/Magento/Core/Model/Resource/File/Storage/Directory/Database.php
+++ b/app/code/Magento/Core/Model/Resource/File/Storage/Directory/Database.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\Resource\File\Storage\Directory;
 
 /**
- * \Directory storage database resource model class
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Class Database
  */
-namespace Magento\Core\Model\Resource\File\Storage\Directory;
-
 class Database extends \Magento\Core\Model\Resource\File\Storage\AbstractStorage
 {
     /**
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 ee13ca750ad..d65e2714edd 100644
--- a/app/code/Magento/Core/Model/Resource/File/Storage/File.php
+++ b/app/code/Magento/Core/Model/Resource/File/Storage/File.php
@@ -24,17 +24,12 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\Resource\File\Storage;
 
 /**
- * Model for synchronization from DB to filesystem
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Class File
  */
-namespace Magento\Core\Model\Resource\File\Storage;
-
-class File extends \Magento\Core\Model\Resource\AbstractResource
+class File
 {
     /**
      * Prefix of model events names
@@ -54,19 +49,19 @@ class File extends \Magento\Core\Model\Resource\AbstractResource
     protected $_dbHelper;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Helper\File\Storage\Database $dbHelper
-     * @param \Magento\Core\Model\Logger $log
+     * @param \Magento\Logger $log
      */
     public function __construct(
         \Magento\Filesystem $filesystem,
         \Magento\Core\Helper\File\Storage\Database $dbHelper,
-        \Magento\Core\Model\Logger $log
+        \Magento\Logger $log
     ) {
         $this->_dbHelper = $dbHelper;
         $this->_logger = $log;
@@ -202,30 +197,6 @@ class File extends \Magento\Core\Model\Resource\AbstractResource
         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/Helper.php b/app/code/Magento/Core/Model/Resource/Helper.php
index aafc6432f5d..4d6e02c0cc6 100644
--- a/app/code/Magento/Core/Model/Resource/Helper.php
+++ b/app/code/Magento/Core/Model/Resource/Helper.php
@@ -32,11 +32,11 @@ namespace Magento\Core\Model\Resource;
 class Helper extends \Magento\Core\Model\Resource\Helper\AbstractHelper
 {
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param string $modulePrefix
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         $modulePrefix = 'core'
     ) {
         parent::__construct($resource, $modulePrefix);
diff --git a/app/code/Magento/Core/Model/Resource/Helper/AbstractHelper.php b/app/code/Magento/Core/Model/Resource/Helper/AbstractHelper.php
index d9a5b32f501..8314fd89e20 100644
--- a/app/code/Magento/Core/Model/Resource/Helper/AbstractHelper.php
+++ b/app/code/Magento/Core/Model/Resource/Helper/AbstractHelper.php
@@ -53,18 +53,18 @@ abstract class AbstractHelper
     protected $_modulePrefix;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
     /**
      * Initialize resource helper instance
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param string $modulePrefix
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         $modulePrefix
     ) {
         $this->_resource = $resource;
diff --git a/app/code/Magento/Core/Model/Resource/Layout/Link/Collection.php b/app/code/Magento/Core/Model/Resource/Layout/Link/Collection.php
index c3ec9ea85c3..e4768e3007c 100644
--- a/app/code/Magento/Core/Model/Resource/Layout/Link/Collection.php
+++ b/app/code/Magento/Core/Model/Resource/Layout/Link/Collection.php
@@ -24,13 +24,38 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Core\Model\Resource\Layout\Link;
+
 /**
  * Layout update collection model
  */
-namespace Magento\Core\Model\Resource\Layout\Link;
-
 class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractCollection
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Event\ManagerInterface $eventManager
+     * @param \Magento\Logger $logger
+     * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
+     * @param \Magento\Core\Model\EntityFactory $entityFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
+     */
+    public function __construct(
+        \Magento\Event\ManagerInterface $eventManager,
+        \Magento\Logger $logger,
+        \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
+        \Magento\Core\Model\EntityFactory $entityFactory,
+        \Magento\Stdlib\DateTime $dateTime,
+        \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
+    ) {
+        $this->dateTime = $dateTime;
+        parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource);
+    }
+
     /**
      * Define resource model
      */
@@ -97,7 +122,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
         $datetime = new \DateTime();
         $storeInterval = new \DateInterval('P' . $days . 'D');
         $datetime->sub($storeInterval);
-        $formattedDate = $this->formatDate($datetime->getTimestamp());
+        $formattedDate = $this->dateTime->formatDate($datetime->getTimestamp());
 
         $this->_joinWithUpdate();
         $this->addFieldToFilter('update.updated_at', array('notnull' => true))
diff --git a/app/code/Magento/Core/Model/Resource/Layout/Update.php b/app/code/Magento/Core/Model/Resource/Layout/Update.php
index 37b921a5f41..543ba58a673 100644
--- a/app/code/Magento/Core/Model/Resource/Layout/Update.php
+++ b/app/code/Magento/Core/Model/Resource/Layout/Update.php
@@ -37,11 +37,11 @@ class Update extends \Magento\Core\Model\Resource\Db\AbstractDb
     private $_cache;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Cache\FrontendInterface $cache
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Cache\FrontendInterface $cache
     ) {
         parent::__construct($resource);
diff --git a/app/code/Magento/Core/Model/Resource/Layout/Update/Collection.php b/app/code/Magento/Core/Model/Resource/Layout/Update/Collection.php
index 3fcb63cfc74..849986844c8 100644
--- a/app/code/Magento/Core/Model/Resource/Layout/Update/Collection.php
+++ b/app/code/Magento/Core/Model/Resource/Layout/Update/Collection.php
@@ -45,6 +45,31 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     protected $_eventObject = 'layout_update_collection';
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Event\ManagerInterface $eventManager
+     * @param \Magento\Logger $logger
+     * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
+     * @param \Magento\Core\Model\EntityFactory $entityFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
+     */
+    public function __construct(
+        \Magento\Event\ManagerInterface $eventManager,
+        \Magento\Logger $logger,
+        \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
+        \Magento\Core\Model\EntityFactory $entityFactory,
+        \Magento\Stdlib\DateTime $dateTime,
+        \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
+    ) {
+        $this->dateTime = $dateTime;
+        parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource);
+    }
+
     /**
      * Define resource model
      */
@@ -139,7 +164,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
         $datetime = new \DateTime();
         $storeInterval = new \DateInterval('P' . $days . 'D');
         $datetime->sub($storeInterval);
-        $formattedDate = $this->formatDate($datetime->getTimestamp());
+        $formattedDate = $this->dateTime->formatDate($datetime->getTimestamp());
 
         $this->addFieldToFilter('main_table.updated_at', array('notnull' => true))
             ->addFieldToFilter('main_table.updated_at', array('lt' => $formattedDate));
diff --git a/app/code/Magento/Core/Model/Resource/Session.php b/app/code/Magento/Core/Model/Resource/Session.php
index 913c2fb12be..184ae7b992c 100644
--- a/app/code/Magento/Core/Model/Resource/Session.php
+++ b/app/code/Magento/Core/Model/Resource/Session.php
@@ -65,10 +65,10 @@ class Session implements \Zend_Session_SaveHandler_Interface
     /**
      * Constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\App\Dir $dir
      */
-    public function __construct(\Magento\Core\Model\Resource $resource, \Magento\App\Dir $dir)
+    public function __construct(\Magento\App\Resource $resource, \Magento\App\Dir $dir)
     {
         $this->_sessionTable = $resource->getTableName('core_session');
         $this->_write        = $resource->getConnection('core_write');
diff --git a/app/code/Magento/Core/Model/Resource/Setup.php b/app/code/Magento/Core/Model/Resource/Setup.php
index 1bdde6f9065..b9d8d40a136 100644
--- a/app/code/Magento/Core/Model/Resource/Setup.php
+++ b/app/code/Magento/Core/Model/Resource/Setup.php
@@ -25,7 +25,7 @@
  */
 namespace Magento\Core\Model\Resource;
 
-class Setup implements \Magento\App\Updater\SetupInterface
+class Setup implements \Magento\Module\Updater\SetupInterface
 {
     /**
      * Setup resource name
@@ -69,14 +69,14 @@ class Setup implements \Magento\App\Updater\SetupInterface
     /**
      * Modules configuration
      *
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resourceModel;
 
     /**
      * Modules configuration reader
      *
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_modulesReader;
 
@@ -86,7 +86,7 @@ class Setup implements \Magento\App\Updater\SetupInterface
     protected $_eventManager;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
diff --git a/app/code/Magento/Core/Model/Resource/Setup/Context.php b/app/code/Magento/Core/Model/Resource/Setup/Context.php
index d885f8dd82d..ec0d15c0c9f 100644
--- a/app/code/Magento/Core/Model/Resource/Setup/Context.php
+++ b/app/code/Magento/Core/Model/Resource/Setup/Context.php
@@ -26,7 +26,7 @@ namespace Magento\Core\Model\Resource\Setup;
 class Context implements \Magento\ObjectManager\ContextInterface
 {
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -36,17 +36,17 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_eventManager;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resourceModel;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_modulesReader;
 
     /**
-     * @var \Magento\App\ModuleListInterface
+     * @var \Magento\Module\ModuleListInterface
      */
     protected $_moduleList;
 
@@ -71,26 +71,33 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_themeFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @var \Magento\Encryption\EncryptorInterface
+     */
+    protected $_encryptor;
+
+    /**
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Resource $resource
-     * @param \Magento\Core\Model\Config\Modules\Reader $modulesReader
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Module\Dir\Reader $modulesReader
+     * @param \Magento\Module\ModuleListInterface $moduleList
      * @param \Magento\Core\Model\Resource\Resource $resourceResource
      * @param \Magento\Core\Model\Resource\Setup\MigrationFactory $migrationFactory
      * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $themeResourceFactory
      * @param \Magento\Core\Model\Theme\CollectionFactory $themeFactory
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Resource $resource,
-        \Magento\Core\Model\Config\Modules\Reader $modulesReader,
-        \Magento\App\ModuleListInterface $moduleList,
+        \Magento\App\Resource $resource,
+        \Magento\Module\Dir\Reader $modulesReader,
+        \Magento\Module\ModuleListInterface $moduleList,
         \Magento\Core\Model\Resource\Resource $resourceResource,
         \Magento\Core\Model\Resource\Setup\MigrationFactory $migrationFactory,
         \Magento\Core\Model\Resource\Theme\CollectionFactory $themeResourceFactory,
-        \Magento\Core\Model\Theme\CollectionFactory $themeFactory
+        \Magento\Core\Model\Theme\CollectionFactory $themeFactory,
+        \Magento\Encryption\EncryptorInterface $encryptor
     ) {
         $this->_logger = $logger;
         $this->_eventManager = $eventManager;
@@ -101,6 +108,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
         $this->_migrationFactory = $migrationFactory;
         $this->_themeResourceFactory = $themeResourceFactory;
         $this->_themeFactory = $themeFactory;
+        $this->_encryptor = $encryptor;
     }
 
     /**
@@ -112,7 +120,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Core\Model\Logger
+     * @return \Magento\Logger $logger
      */
     public function getLogger()
     {
@@ -120,7 +128,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\App\ModuleListInterface
+     * @return \Magento\Module\ModuleListInterface
      */
     public function getModuleList()
     {
@@ -128,7 +136,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Core\Model\Config\Modules\Reader
+     * @return \Magento\Module\Dir\Reader
      */
     public function getModulesReader()
     {
@@ -136,7 +144,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Core\Model\Resource
+     * @return \Magento\App\Resource
      */
     public function getResourceModel()
     {
@@ -174,4 +182,12 @@ class Context implements \Magento\ObjectManager\ContextInterface
     {
         return $this->_themeResourceFactory;
     }
+
+    /**
+     * @return \Magento\Encryption\EncryptorInterface
+     */
+    public function getEncryptor()
+    {
+        return $this->_encryptor;
+    }
 }
diff --git a/app/code/Magento/Core/Model/Resource/Translate.php b/app/code/Magento/Core/Model/Resource/Translate.php
index 215efc0aff9..e554b91bf26 100644
--- a/app/code/Magento/Core/Model/Resource/Translate.php
+++ b/app/code/Magento/Core/Model/Resource/Translate.php
@@ -47,12 +47,12 @@ class Translate extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_storeManager;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\App\State $appState
      * @param \Magento\Core\Model\StoreManager $storeManager
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\App\State $appState,
         \Magento\Core\Model\StoreManager $storeManager
     ) {
diff --git a/app/code/Magento/Core/Model/Resource/Translate/String.php b/app/code/Magento/Core/Model/Resource/Translate/String.php
index 9947009037f..121c84331cc 100644
--- a/app/code/Magento/Core/Model/Resource/Translate/String.php
+++ b/app/code/Magento/Core/Model/Resource/Translate/String.php
@@ -47,12 +47,12 @@ class String extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_storeManager;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Core\Model\StoreManager $storeManager
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Core\Model\StoreManager $storeManager
     ) {
diff --git a/app/code/Magento/Core/Model/Resource/Type/Db/Pdo/Mysql.php b/app/code/Magento/Core/Model/Resource/Type/Db/Pdo/Mysql.php
index b0540c2c950..fb2c95f9738 100644
--- a/app/code/Magento/Core/Model/Resource/Type/Db/Pdo/Mysql.php
+++ b/app/code/Magento/Core/Model/Resource/Type/Db/Pdo/Mysql.php
@@ -24,7 +24,7 @@
 namespace Magento\Core\Model\Resource\Type\Db\Pdo;
 
 class Mysql extends \Magento\Core\Model\Resource\Type\Db
-    implements \Magento\Core\Model\Resource\ConnectionAdapterInterface
+    implements \Magento\App\Resource\ConnectionAdapterInterface
 {
     /**
      * Dirs instance
@@ -33,6 +33,16 @@ class Mysql extends \Magento\Core\Model\Resource\Type\Db
      */
     protected $_dirs;
 
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @var array
      */
@@ -50,6 +60,8 @@ class Mysql extends \Magento\Core\Model\Resource\Type\Db
 
     /**
      * @param \Magento\App\Dir $dirs
+     * @param \Magento\Stdlib\String $string
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param string $host
      * @param string $username
      * @param string $password
@@ -61,6 +73,8 @@ class Mysql extends \Magento\Core\Model\Resource\Type\Db
      */
     public function __construct(
         \Magento\App\Dir $dirs,
+        \Magento\Stdlib\String $string,
+        \Magento\Stdlib\DateTime $dateTime,
         $host,
         $username,
         $password,
@@ -71,6 +85,8 @@ class Mysql extends \Magento\Core\Model\Resource\Type\Db
         $active = false
     ) {
         $this->_dirs = $dirs;
+        $this->string = $string;
+        $this->dateTime = $dateTime;
         $this->_connectionConfig = array(
             'host' => $host,
             'username' => $username,
@@ -120,7 +136,7 @@ class Mysql extends \Magento\Core\Model\Resource\Type\Db
     protected function _getDbAdapterInstance()
     {
         $className = $this->_getDbAdapterClassName();
-        $adapter = new $className($this->_dirs, $this->_connectionConfig);
+        $adapter = new $className($this->_dirs, $this->string, $this->dateTime, $this->_connectionConfig);
         return $adapter;
     }
 
diff --git a/app/code/Magento/Core/Model/Resource/Url/Rewrite/Collection.php b/app/code/Magento/Core/Model/Resource/Url/Rewrite/Collection.php
index 63d5e9da94e..9f8d128b745 100644
--- a/app/code/Magento/Core/Model/Resource/Url/Rewrite/Collection.php
+++ b/app/code/Magento/Core/Model/Resource/Url/Rewrite/Collection.php
@@ -43,7 +43,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\StoreManager $storeManager
@@ -51,7 +51,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\StoreManager $storeManager,
diff --git a/app/code/Magento/Core/Model/Route/Config.php b/app/code/Magento/Core/Model/Route/Config.php
deleted file mode 100644
index bcef10fa580..00000000000
--- a/app/code/Magento/Core/Model/Route/Config.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-/**
- * Routes configuration model
- *
- * 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\Route;
-
-class Config implements \Magento\Core\Model\Route\ConfigInterface
-{
-    /**
-     * @var \Magento\Core\Model\Route\Config\Reader
-     */
-    protected $_reader;
-
-    /**
-     * @var \Magento\Cache\FrontendInterface
-     */
-    protected $_cache;
-
-    /**
-     * @var string
-     */
-    protected $_cacheId;
-
-    /**
-     * @param \Magento\Core\Model\Route\Config\Reader $reader
-     * @param \Magento\Config\CacheInterface $cache
-     * @param string $cacheId
-     */
-    public function __construct(
-        \Magento\Core\Model\Route\Config\Reader $reader,
-        \Magento\Config\CacheInterface $cache,
-        $cacheId = 'RoutesConfig'
-    ) {
-        $this->_reader = $reader;
-        $this->_cache = $cache;
-        $this->_cacheId = $cacheId;
-    }
-
-    /**
-     * Fetch routes from configs by area code and router id
-     *
-     * @param string $areaCode
-     * @param string $routerId
-     * @return array
-     */
-    public function getRoutes($areaCode, $routerId)
-    {
-        $cacheId = $areaCode . '::'  . $this->_cacheId . '-' . $routerId;
-        $cachedRoutes = unserialize($this->_cache->load($cacheId));
-        if (is_array($cachedRoutes)) {
-            return $cachedRoutes;
-        }
-
-        $routes = array();
-        $areaConfig = $this->_reader->read($areaCode);
-        if (array_key_exists($routerId, $areaConfig)) {
-            $routes = $areaConfig[$routerId]['routes'];
-            $this->_cache->save(serialize($routes), $cacheId);
-        }
-
-        return $routes;
-    }
-}
diff --git a/app/code/Magento/Core/Model/Session.php b/app/code/Magento/Core/Model/Session.php
index d4ca885fc17..7dce363aafc 100644
--- a/app/code/Magento/Core/Model/Session.php
+++ b/app/code/Magento/Core/Model/Session.php
@@ -39,25 +39,24 @@ namespace Magento\Core\Model;
 class Session extends \Magento\Core\Model\Session\AbstractSession
 {
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Math\Random
      */
-    protected $_coreData;
+    protected $mathRandom;
 
     /**
      * @param \Magento\Core\Model\Session\Context $context
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Math\Random $mathRandom
      * @param array $data
      * @param string|null $sessionName
+     * @internal param \Magento\Core\Helper\Data $coreData
      */
     public function __construct(
         \Magento\Core\Model\Session\Context $context,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Math\Random $mathRandom,
         array $data = array(),
         $sessionName = null
     ) {
-        $this->_coreData = $coreData;
+        $this->mathRandom = $mathRandom;
         parent::__construct($context, $data);
         $this->init('core', $sessionName);
     }
@@ -70,7 +69,7 @@ class Session extends \Magento\Core\Model\Session\AbstractSession
     public function getFormKey()
     {
         if (!$this->getData('_form_key')) {
-            $this->setData('_form_key', $this->_coreData->getRandomString(16));
+            $this->setData('_form_key', $this->mathRandom->getRandomString(16));
         }
         return $this->getData('_form_key');
     }
diff --git a/app/code/Magento/Core/Model/Session/AbstractSession.php b/app/code/Magento/Core/Model/Session/AbstractSession.php
index 3760d5fd636..68190b051df 100644
--- a/app/code/Magento/Core/Model/Session/AbstractSession.php
+++ b/app/code/Magento/Core/Model/Session/AbstractSession.php
@@ -65,17 +65,10 @@ class AbstractSession extends \Magento\Object
     protected $_skipSessionIdFlag   = false;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
-    /**
-     * Core http
-     *
-     * @var \Magento\Core\Helper\Http
-     */
-    protected $_coreHttp = null;
-
     /**
      * Core event manager proxy
      *
@@ -169,7 +162,6 @@ class AbstractSession extends \Magento\Object
     ) {
         $this->_validator = $context->getValidator();
         $this->_eventManager = $context->getEventManager();
-        $this->_coreHttp = $context->getHttpHelper();
         $this->_logger = $context->getLogger();
         $this->_coreStoreConfig = $context->getStoreConfig();
         $this->_savePath = $this->_savePath ?: $context->getSavePath();
@@ -211,7 +203,7 @@ class AbstractSession extends \Magento\Object
             case 'db':
                 ini_set('session.save_handler', 'user');
                 /* @var $sessionResource \Magento\Core\Model\Resource\Session */
-                $sessionResource = \Magento\Core\Model\ObjectManager::getInstance()
+                $sessionResource = \Magento\App\ObjectManager::getInstance()
                     ->get('Magento\Core\Model\Resource\Session');
                 $sessionResource->setSaveHandler();
                 break;
diff --git a/app/code/Magento/Core/Model/Session/Context.php b/app/code/Magento/Core/Model/Session/Context.php
index 530e968a78f..8fd753c9204 100644
--- a/app/code/Magento/Core/Model/Session/Context.php
+++ b/app/code/Magento/Core/Model/Session/Context.php
@@ -33,7 +33,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_validator;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -42,11 +42,6 @@ class Context implements \Magento\ObjectManager\ContextInterface
      */
     protected $_eventManager;
 
-    /**
-     * @var \Magento\Core\Helper\Http
-     */
-    protected $_httpHelper;
-
     /**
      * @var \Magento\Core\Model\Store\Config
      */
@@ -122,9 +117,8 @@ class Context implements \Magento\ObjectManager\ContextInterface
 
     /**
      * @param \Magento\Core\Model\Session\Validator $validator
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\Message\CollectionFactory $messageFactory
      * @param \Magento\Core\Model\Message $message
@@ -141,9 +135,8 @@ class Context implements \Magento\ObjectManager\ContextInterface
      */
     public function __construct(
         \Magento\Core\Model\Session\Validator $validator,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\Message\CollectionFactory $messageFactory,
         \Magento\Core\Model\Message $message,
@@ -161,7 +154,6 @@ class Context implements \Magento\ObjectManager\ContextInterface
         $this->_validator = $validator;
         $this->_logger = $logger;
         $this->_eventManager = $eventManager;
-        $this->_httpHelper = $coreHttp;
         $this->_storeConfig = $coreStoreConfig;
         $this->_saveMethod = $saveMethod;
         $this->_savePath = $savePath;
@@ -186,15 +178,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Core\Helper\Http
-     */
-    public function getHttpHelper()
-    {
-        return $this->_httpHelper;
-    }
-
-    /**
-     * @return \Magento\Core\Model\Logger
+     * @return \\Magento\Logger
      */
     public function getLogger()
     {
diff --git a/app/code/Magento/Core/Model/Session/Validator.php b/app/code/Magento/Core/Model/Session/Validator.php
index 5bd36fba9c7..47f5e35ee94 100644
--- a/app/code/Magento/Core/Model/Session/Validator.php
+++ b/app/code/Magento/Core/Model/Session/Validator.php
@@ -42,9 +42,9 @@ class Validator
     protected $_storeConfig;
 
     /**
-     * @var \Magento\Core\Helper\Http
+     * @var \Magento\HTTP\PhpEnvironment\RemoteAddress
      */
-    protected $_helper;
+    protected $_remoteAddress;
 
     /**
      * @var array
@@ -53,16 +53,16 @@ class Validator
 
     /**
      * @param \Magento\Core\Model\Store\Config $storeConfig
-     * @param \Magento\Core\Helper\Http $helper
+     * @param \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress
      * @param array $skippedUserAgentList
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $storeConfig,
-        \Magento\Core\Helper\Http $helper,
+        \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress,
         array $skippedUserAgentList = array()
     ) {
         $this->_storeConfig = $storeConfig;
-        $this->_helper = $helper;
+        $this->_remoteAddress = $remoteAddress;
         $this->_skippedAgentList = $skippedUserAgentList;
     }
 
@@ -143,8 +143,8 @@ class Validator
         );
 
         // collect ip data
-        if ($this->_helper->getRemoteAddr()) {
-            $parts[self::VALIDATOR_REMOTE_ADDR_KEY] = $this->_helper->getRemoteAddr();
+        if ($this->_remoteAddress->getRemoteAddress()) {
+            $parts[self::VALIDATOR_REMOTE_ADDR_KEY] = $this->_remoteAddress->getRemoteAddress();
         }
         if (isset($_ENV['HTTP_VIA'])) {
             $parts[self::VALIDATOR_HTTP_VIA_KEY] = (string)$_ENV['HTTP_VIA'];
diff --git a/app/code/Magento/Core/Model/Store.php b/app/code/Magento/Core/Model/Store.php
index 990294d8f77..fef96aefcfd 100644
--- a/app/code/Magento/Core/Model/Store.php
+++ b/app/code/Magento/Core/Model/Store.php
@@ -287,7 +287,7 @@ class Store extends \Magento\Core\Model\AbstractModel
     /**
      * @var \Magento\Core\Model\Config
      */
-    protected $_coreConfig;
+    protected $_config;
 
     /**
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase
@@ -334,7 +334,7 @@ class Store extends \Magento\Core\Model\AbstractModel
         $this->_configDataResource = $configDataResource;
         $this->_isCustomEntryPoint = $isCustomEntryPoint;
         $this->_dir = $dir;
-        $this->_coreConfig = $coreConfig;
+        $this->_config = $coreConfig;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
         $this->_storeManager = $storeManager;
     }
@@ -358,15 +358,15 @@ class Store extends \Magento\Core\Model\AbstractModel
     public function __wakeup()
     {
         parent::__wakeup();
-        $this->_eventDispatcher = \Magento\Core\Model\ObjectManager::getInstance()
+        $this->_eventDispatcher = \Magento\App\ObjectManager::getInstance()
             ->get('Magento\Event\ManagerInterface');
-        $this->_cacheManager    = \Magento\Core\Model\ObjectManager::getInstance()
-            ->get('Magento\Core\Model\CacheInterface');
-        $this->_coreStoreConfig = \Magento\Core\Model\ObjectManager::getInstance()
+        $this->_cacheManager    = \Magento\App\ObjectManager::getInstance()
+            ->get('Magento\App\CacheInterface');
+        $this->_coreStoreConfig = \Magento\App\ObjectManager::getInstance()
             ->get('Magento\Core\Model\Store\Config');
-        $this->_coreConfig = \Magento\Core\Model\ObjectManager::getInstance()
+        $this->_config = \Magento\App\ObjectManager::getInstance()
             ->get('Magento\Core\Model\Config');
-        $this->_coreFileStorageDatabase = \Magento\Core\Model\ObjectManager::getInstance()
+        $this->_coreFileStorageDatabase = \Magento\App\ObjectManager::getInstance()
             ->get('Magento\Core\Helper\File\Storage\Database');
     }
 
@@ -386,7 +386,7 @@ class Store extends \Magento\Core\Model\AbstractModel
     protected function _getSession()
     {
         if (!$this->_session) {
-            $this->_session = \Magento\Core\Model\ObjectManager::getInstance()->create('Magento\Core\Model\Session')
+            $this->_session = \Magento\App\ObjectManager::getInstance()->create('Magento\Core\Model\Session')
                 ->init('store_'.$this->getCode());
         }
         return $this->_session;
@@ -452,15 +452,11 @@ class Store extends \Magento\Core\Model\AbstractModel
      */
     public function getConfig($path)
     {
-        $config = $this->_coreConfig;
-        $data = $config->getValue($path, 'store', $this->getCode());
+        $data = $this->_config->getValue($path, 'store', $this->getCode());
         if (!$data && !$this->_appState->isInstalled()) {
-            $data = $config->getValue($path, 'default');
+            $data = $this->_config->getValue($path, 'default');
         }
-        if ($data === false) {
-            return null;
-        }
-        return $data;
+        return ($data === false) ? null : $data;
     }
 
     /**
@@ -474,7 +470,7 @@ class Store extends \Magento\Core\Model\AbstractModel
      */
     public function setConfig($path, $value)
     {
-        $this->_coreConfig->setValue($path, $value, 'store', $this->getCode());
+        $this->_config->setValue($path, $value, 'store', $this->getCode());
         return $this;
     }
 
@@ -714,7 +710,7 @@ class Store extends \Magento\Core\Model\AbstractModel
     public function isAdminUrlSecure()
     {
         if ($this->_isAdminSecure === null) {
-            $this->_isAdminSecure = (boolean) (int) (string) $this->_coreConfig
+            $this->_isAdminSecure = (boolean) (int) (string) $this->_config
                 ->getValue(\Magento\Core\Model\Url::XML_PATH_SECURE_IN_ADMIN, 'default');
         }
         return $this->_isAdminSecure;
@@ -742,7 +738,7 @@ class Store extends \Magento\Core\Model\AbstractModel
     public function isCurrentlySecure()
     {
         $standardRule = !empty($_SERVER['HTTPS']) && ('off' != $_SERVER['HTTPS']);
-        $offloaderHeader = trim((string) $this->_coreConfig->getValue(self::XML_PATH_OFFLOADER_HEADER, 'default'));
+        $offloaderHeader = trim((string) $this->_config->getValue(self::XML_PATH_OFFLOADER_HEADER, 'default'));
 
         if ((!empty($offloaderHeader) && !empty($_SERVER[$offloaderHeader])) || $standardRule) {
             return true;
@@ -780,7 +776,7 @@ class Store extends \Magento\Core\Model\AbstractModel
     {
         $configValue = $this->getConfig(\Magento\Core\Model\Store::XML_PATH_PRICE_SCOPE);
         if ($configValue == \Magento\Core\Model\Store::PRICE_SCOPE_GLOBAL) {
-            return \Magento\Core\Model\ObjectManager::getInstance()
+            return \Magento\App\ObjectManager::getInstance()
                 ->get('Magento\Core\Model\App')->getBaseCurrencyCode();
         } else {
             return $this->getConfig(\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_BASE);
@@ -796,7 +792,7 @@ class Store extends \Magento\Core\Model\AbstractModel
     {
         $currency = $this->getData('base_currency');
         if (is_null($currency)) {
-            $currency = \Magento\Core\Model\ObjectManager::getInstance()->create('Magento\Directory\Model\Currency')
+            $currency = \Magento\App\ObjectManager::getInstance()->create('Magento\Directory\Model\Currency')
                 ->load($this->getBaseCurrencyCode());
             $this->setData('base_currency', $currency);
         }
@@ -823,7 +819,7 @@ class Store extends \Magento\Core\Model\AbstractModel
     {
         $currency = $this->getData('default_currency');
         if (is_null($currency)) {
-            $currency = \Magento\Core\Model\ObjectManager::getInstance()->create('Magento\Directory\Model\Currency')
+            $currency = \Magento\App\ObjectManager::getInstance()->create('Magento\Directory\Model\Currency')
                 ->load($this->getDefaultCurrencyCode());
             $this->setData('default_currency', $currency);
         }
@@ -842,10 +838,10 @@ class Store extends \Magento\Core\Model\AbstractModel
         if (in_array($code, $this->getAvailableCurrencyCodes())) {
             $this->_getSession()->setCurrencyCode($code);
             if ($code == $this->getDefaultCurrency()) {
-                \Magento\Core\Model\ObjectManager::getInstance()
+                \Magento\App\ObjectManager::getInstance()
                     ->get('Magento\Core\Model\App')->getCookie()->delete(self::COOKIE_CURRENCY, $code);
             } else {
-                \Magento\Core\Model\ObjectManager::getInstance()
+                \Magento\App\ObjectManager::getInstance()
                     ->get('Magento\Core\Model\App')->getCookie()->set(self::COOKIE_CURRENCY, $code);
             }
         }
@@ -924,7 +920,7 @@ class Store extends \Magento\Core\Model\AbstractModel
         $currency = $this->getData('current_currency');
 
         if (is_null($currency)) {
-            $currency = \Magento\Core\Model\ObjectManager::getInstance()->create('Magento\Directory\Model\Currency')
+            $currency = \Magento\App\ObjectManager::getInstance()->create('Magento\Directory\Model\Currency')
                 ->load($this->getCurrentCurrencyCode());
             $baseCurrency = $this->getBaseCurrency();
 
@@ -1107,7 +1103,7 @@ class Store extends \Magento\Core\Model\AbstractModel
     {
         $sidQueryParam = $this->_getSession()->getSessionIdQueryParam();
         $requestString = $this->getUrlModel()->escape(ltrim(
-            \Magento\Core\Model\ObjectManager::getInstance()
+            \Magento\App\ObjectManager::getInstance()
                 ->get('Magento\Core\Model\App')->getRequest()->getRequestString(),
             '/'
         ));
@@ -1183,7 +1179,7 @@ class Store extends \Magento\Core\Model\AbstractModel
     protected function _beforeDelete()
     {
         $this->_protectFromNonAdmin();
-        \Magento\Core\Model\ObjectManager::getInstance()->get('Magento\Index\Model\Indexer')
+        \Magento\App\ObjectManager::getInstance()->get('Magento\Index\Model\Indexer')
             ->logEvent($this, self::ENTITY, \Magento\Index\Model\Event::TYPE_DELETE);
         $this->_configDataResource->clearStoreData(array($this->getId()));
         return parent::_beforeDelete();
@@ -1209,7 +1205,7 @@ class Store extends \Magento\Core\Model\AbstractModel
     protected function _afterDeleteCommit()
     {
         parent::_afterDeleteCommit();
-        \Magento\Core\Model\ObjectManager::getInstance()->get('Magento\Index\Model\Indexer')
+        \Magento\App\ObjectManager::getInstance()->get('Magento\Index\Model\Indexer')
             ->indexEvents(self::ENTITY, \Magento\Index\Model\Event::TYPE_DELETE);
         return $this;
     }
@@ -1221,7 +1217,7 @@ class Store extends \Magento\Core\Model\AbstractModel
      */
     public function resetConfig()
     {
-        $this->_coreConfig->reinit();
+        $this->_config->reinit();
         $this->_dirCache        = array();
         $this->_baseUrlCache    = array();
         $this->_urlCache        = array();
diff --git a/app/code/Magento/Core/Model/Store/Config.php b/app/code/Magento/Core/Model/Store/Config.php
index c9906eea1e8..60c99949a22 100644
--- a/app/code/Magento/Core/Model/Store/Config.php
+++ b/app/code/Magento/Core/Model/Store/Config.php
@@ -33,13 +33,34 @@ class Config implements \Magento\Core\Model\Store\ConfigInterface
      */
     protected $_storeManager;
 
+    /**
+     * @var \Magento\Core\Model\ConfigInterface
+     */
+    protected $_config;
+
+    /**
+     * @var \Magento\Core\Model\Resource\Store\Collection
+     */
+    protected $_storeCollection;
+
+    /**
+     * @var \Magento\Core\Model\Resource\Store\CollectionFactory
+     */
+    protected $_factory;
+
     /**
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Core\Model\ConfigInterface $config
+     * @param \Magento\Core\Model\Resource\Store\CollectionFactory $factory
      */
     public function __construct(
-        \Magento\Core\Model\StoreManagerInterface $storeManager
+        \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Core\Model\ConfigInterface $config,
+        \Magento\Core\Model\Resource\Store\CollectionFactory $factory
     ) {
         $this->_storeManager = $storeManager;
+        $this->_config = $config;
+        $this->_factory = $factory;
     }
 
     /**
@@ -66,4 +87,51 @@ class Config implements \Magento\Core\Model\Store\ConfigInterface
         $flag = strtolower($this->getConfig($path, $store));
         return !empty($flag) && 'false' !== $flag;
     }
+
+    /**
+     * Retrieve store Ids for $path with checking
+     *
+     * if empty $allowValues then retrieve all stores values
+     *
+     * return array($storeId => $pathValue)
+     *
+     * @param string $path
+     * @param array $allowedValues
+     * @param string $keyAttribute
+     * @return array
+     * @throws \InvalidArgumentException
+     */
+    public function getStoresConfigByPath($path, $allowedValues = array(), $keyAttribute = 'id')
+    {
+        if (is_null($this->_storeCollection)) {
+            $this->_storeCollection = $this->_factory->create();
+            $this->_storeCollection->setLoadDefault(true);
+        }
+        $storeValues = array();
+        /** @var $store \Magento\Core\Model\Store */
+        foreach ($this->_storeCollection as $store) {
+            switch ($keyAttribute) {
+                case 'id':
+                    $key = $store->getId();
+                    break;
+                case 'code':
+                    $key = $store->getCode();
+                    break;
+                case 'name':
+                    $key = $store->getName();
+                    break;
+                default:
+                    throw new \InvalidArgumentException("'{$keyAttribute}' cannot be used as a key.");
+                    break;
+            }
+
+            $value = $this->_config->getValue($path, 'store', $store->getCode());
+            if (empty($allowedValues)) {
+                $storeValues[$key] = $value;
+            } elseif (in_array($value, $allowedValues)) {
+                $storeValues[$key] = $value;
+            }
+        }
+        return $storeValues;
+    }
 }
diff --git a/app/code/Magento/Core/Model/Store/Storage/Db.php b/app/code/Magento/Core/Model/Store/Storage/Db.php
index 48006d75d33..eaff6813981 100644
--- a/app/code/Magento/Core/Model/Store/Storage/Db.php
+++ b/app/code/Magento/Core/Model/Store/Storage/Db.php
@@ -25,7 +25,22 @@
  */
 namespace Magento\Core\Model\Store\Storage;
 
-class Db implements \Magento\Core\Model\Store\StorageInterface
+use Magento\Backend\Model\Url\Proxy;
+use Magento\Core\Exception;
+use Magento\App\State;
+use Magento\Core\Model\AppInterface;
+use Magento\Core\Model\Config;
+use Magento\Core\Model\Cookie;
+use Magento\Core\Model\Store;
+use Magento\Core\Model\Store\StorageInterface;
+use Magento\Core\Model\Store\Group;
+use Magento\Core\Model\Store\Exception as StoreException;
+use Magento\Core\Model\StoreFactory;
+use Magento\Core\Model\StoreManagerInterface;
+use Magento\Core\Model\Website;
+use Magento\Profiler;
+
+class Db implements StorageInterface
 {
     /**
      * Requested scope code
@@ -58,42 +73,42 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
     /**
      * Application store object
      *
-     * @var \Magento\Core\Model\Store
+     * @var Store
      */
     protected $_store;
 
     /**
      * Stores cache
      *
-     * @var \Magento\Core\Model\Store[]
+     * @var Store[]
      */
     protected $_stores = array();
 
     /**
      * Application website object
      *
-     * @var \Magento\Core\Model\Website
+     * @var Website
      */
     protected $_website;
 
     /**
      * Websites cache
      *
-     * @var \Magento\Core\Model\Website[]
+     * @var Website[]
      */
     protected $_websites = array();
 
     /**
      * Groups cache
      *
-     * @var \Magento\Core\Model\Store\Group[]
+     * @var Group
      */
     protected $_groups = array();
 
     /**
      * Config model
      *
-     * @var \Magento\Core\Model\Config
+     * @var Config
      */
     protected $_config;
 
@@ -107,55 +122,55 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
     /**
      * Store factory
      *
-     * @var \Magento\Core\Model\StoreFactory
+     * @var StoreFactory
      */
     protected $_storeFactory;
 
     /**
      * Website factory
      *
-     * @var \Magento\Core\Model\Website\Factory
+     * @var Website\Factory
      */
     protected $_websiteFactory;
 
     /**
      * Group factory
      *
-     * @var \Magento\Core\Model\Store\Group\Factory
+     * @var Group\Factory
      */
     protected $_groupFactory;
 
     /**
      * Cookie model
      *
-     * @var \Magento\Core\Model\Cookie
+     * @var Cookie
      */
     protected $_cookie;
 
     /**
      * Application state model
      *
-     * @var \Magento\App\State
+     * @var State
      */
     protected $_appState;
 
     /**
      * @var \Magento\Backend\Model\Url\Proxy
      */
-    protected $_proxy;
+    protected $_url;
 
     /**
-     * @param \Magento\Core\Model\StoreFactory $storeFactory
-     * @param \Magento\Core\Model\Website\Factory $websiteFactory
-     * @param \Magento\Core\Model\Store\Group\Factory $groupFactory
-     * @param \Magento\Core\Model\Config $config
-     * @param \Magento\Core\Model\Cookie $cookie
-     * @param \Magento\App\State $appState
-     * @param \Magento\Backend\Model\Url\Proxy $proxy
-     * @param bool $isSingleStoreAllowed
-     * @param string $scopeCode
-     * @param string $scopeType
-     * @param string $currentStore
+     * @param StoreFactory $storeFactory
+     * @param Website\Factory $websiteFactory
+     * @param Group\Factory $groupFactory
+     * @param Config $config
+     * @param Cookie $cookie
+     * @param State $appState
+     * @param \Magento\Backend\Model\Url $url
+     * @param $isSingleStoreAllowed
+     * @param $scopeCode
+     * @param $scopeType
+     * @param null $currentStore
      */
     public function __construct(
         \Magento\Core\Model\StoreFactory $storeFactory,
@@ -164,7 +179,7 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
         \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Cookie $cookie,
         \Magento\App\State $appState,
-        \Magento\Backend\Model\Url\Proxy $proxy,
+        \Magento\Backend\Model\Url $url,
         $isSingleStoreAllowed,
         $scopeCode,
         $scopeType,
@@ -174,12 +189,12 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
         $this->_websiteFactory = $websiteFactory;
         $this->_groupFactory = $groupFactory;
         $this->_scopeCode = $scopeCode;
-        $this->_scopeType = $scopeType ?: \Magento\Core\Model\StoreManagerInterface::SCOPE_TYPE_STORE;
+        $this->_scopeType = $scopeType ?: StoreManagerInterface::SCOPE_TYPE_STORE;
         $this->_config = $config;
         $this->_isSingleStoreAllowed = $isSingleStoreAllowed;
         $this->_appState = $appState;
         $this->_cookie = $cookie;
-        $this->_proxy = $proxy;
+        $this->_url = $url;
         if ($currentStore) {
             $this->_currentStore = $currentStore;
         }
@@ -188,14 +203,14 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
     /**
      * Get default store
      *
-     * @return \Magento\Core\Model\Store
+     * @return Store
      */
     protected function _getDefaultStore()
     {
         if (empty($this->_store)) {
             $this->_store = $this->_storeFactory->create()
-                ->setId(\Magento\Core\Model\AppInterface::DISTRO_STORE_ID)
-                ->setCode(\Magento\Core\Model\AppInterface::DISTRO_STORE_CODE);
+                ->setId(AppInterface::DISTRO_STORE_ID)
+                ->setCode(AppInterface::DISTRO_STORE_CODE);
         }
         return $this->_store;
     }
@@ -203,26 +218,26 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
     /**
      * Initialize currently ran store
      *
-     * @throws \Magento\Core\Model\Store\Exception
+     * @throws StoreException
      */
     public function initCurrentStore()
     {
-        \Magento\Profiler::start('init_stores');
+        Profiler::start('init_stores');
         $this->_initStores();
-        \Magento\Profiler::stop('init_stores');
+        Profiler::stop('init_stores');
 
         if (empty($this->_scopeCode) && false == is_null($this->_website)) {
             $this->_scopeCode = $this->_website->getCode();
-            $this->_scopeType = \Magento\Core\Model\StoreManagerInterface::SCOPE_TYPE_WEBSITE;
+            $this->_scopeType = StoreManagerInterface::SCOPE_TYPE_WEBSITE;
         }
         switch ($this->_scopeType) {
-            case \Magento\Core\Model\StoreManagerInterface::SCOPE_TYPE_STORE:
+            case StoreManagerInterface::SCOPE_TYPE_STORE:
                 $this->_currentStore = $this->_scopeCode;
                 break;
-            case \Magento\Core\Model\StoreManagerInterface::SCOPE_TYPE_GROUP:
+            case StoreManagerInterface::SCOPE_TYPE_GROUP:
                 $this->_currentStore = $this->_getStoreByGroup($this->_scopeCode);
                 break;
-            case \Magento\Core\Model\StoreManagerInterface::SCOPE_TYPE_WEBSITE:
+            case StoreManagerInterface::SCOPE_TYPE_WEBSITE:
                 $this->_currentStore = $this->_getStoreByWebsite($this->_scopeCode);
                 break;
             default:
@@ -276,9 +291,9 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
         if ($this->_currentStore == $store) {
             $store = $this->getStore($store);
             if ($store->getWebsite()->getDefaultStore()->getId() == $store->getId()) {
-                $this->_cookie->delete(\Magento\Core\Model\Store::COOKIE_NAME);
+                $this->_cookie->delete(Store::COOKIE_NAME);
             } else {
-                $this->_cookie->set(\Magento\Core\Model\Store::COOKIE_NAME, $this->_currentStore, true);
+                $this->_cookie->set(Store::COOKIE_NAME, $this->_currentStore, true);
             }
         }
         return;
@@ -295,7 +310,7 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
             return;
         }
 
-        $store = $this->_cookie->get(\Magento\Core\Model\Store::COOKIE_NAME);
+        $store = $this->_cookie->get(Store::COOKIE_NAME);
         if ($store && isset($this->_stores[$store])
             && $this->_stores[$store]->getId()
             && $this->_stores[$store]->getIsActive()
@@ -384,7 +399,7 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
         $groupStores   = array();
 
         foreach ($storeCollection as $store) {
-            /** @var $store \Magento\Core\Model\Store */
+            /** @var $store Store */
             $store->setWebsite($websiteCollection->getItemById($store->getWebsiteId()));
             $store->setGroup($groupCollection->getItemById($store->getGroupId()));
 
@@ -399,12 +414,12 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
             }
 
             if (0 == $store->getId()) {
-                $store->setUrlModel($this->_proxy);
+                $store->setUrlModel($this->_url);
             }
         }
 
         foreach ($groupCollection as $group) {
-            /* @var $group \Magento\Core\Model\Store\Group */
+            /* @var $group Group */
             if (!isset($groupStores[$group->getId()])) {
                 $groupStores[$group->getId()] = array();
             }
@@ -417,7 +432,7 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
         }
 
         foreach ($websiteCollection as $website) {
-            /* @var $website \Magento\Core\Model\Website */
+            /* @var $website Website */
             if (!isset($websiteGroups[$website->getId()])) {
                 $websiteGroups[$website->getId()] = array();
             }
@@ -458,9 +473,9 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
     /**
      * Retrieve application store object
      *
-     * @param null|string|bool|int|\Magento\Core\Model\Store $storeId
-     * @return \Magento\Core\Model\Store
-     * @throws \Magento\Core\Model\Store\Exception
+     * @param null|string|bool|int|Store $storeId
+     * @return Store
+     * @throws StoreException
      */
     public function getStore($storeId = null)
     {
@@ -475,7 +490,7 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
         if (!isset($storeId) || '' === $storeId || $storeId === true) {
             $storeId = $this->_currentStore;
         }
-        if ($storeId instanceof \Magento\Core\Model\Store) {
+        if ($storeId instanceof Store) {
             return $storeId;
         }
         if (!isset($storeId)) {
@@ -504,7 +519,7 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
      *
      * @param bool $withDefault
      * @param bool $codeKey
-     * @return \Magento\Core\Model\Store[]
+     * @return Store[]
      */
     public function getStores($withDefault = false, $codeKey = false)
     {
@@ -526,15 +541,15 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
     /**
      * Retrieve application website object
      *
-     * @param null|bool|int|string|\Magento\Core\Model\Website $websiteId
-     * @return \Magento\Core\Model\Website
-     * @throws \Magento\Core\Exception
+     * @param null|bool|int|string|Website $websiteId
+     * @return Website
+     * @throws Exception
      */
     public function getWebsite($websiteId = null)
     {
-        if (is_null($websiteId)) {
+        if ($websiteId === null || $websiteId === '') {
             $websiteId = $this->getStore()->getWebsiteId();
-        } elseif ($websiteId instanceof \Magento\Core\Model\Website) {
+        } elseif ($websiteId instanceof Website) {
             return $websiteId;
         } elseif ($websiteId === true) {
             return $this->_website;
@@ -545,7 +560,7 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
             // load method will load website by code if given ID is not a numeric value
             $website->load($websiteId);
             if (!$website->hasWebsiteId()) {
-                throw new \Magento\Core\Exception('Invalid website id/code requested.');
+                throw new Exception('Invalid website id/code requested.');
             }
             $this->_websites[$website->getWebsiteId()] = $website;
             $this->_websites[$website->getCode()] = $website;
@@ -558,7 +573,7 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
      *
      * @param bool $withDefault
      * @param bool|string $codeKey
-     * @return \Magento\Core\Model\Website[]
+     * @return Website[]
      */
     public function getWebsites($withDefault = false, $codeKey = false)
     {
@@ -581,15 +596,15 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
     /**
      * Retrieve application store group object
      *
-     * @param null|\Magento\Core\Model\Store\Group|string $groupId
-     * @return \Magento\Core\Model\Store\Group
-     * @throws \Magento\Core\Exception
+     * @param null|Group|string $groupId
+     * @return Group
+     * @throws Exception
      */
     public function getGroup($groupId = null)
     {
         if (is_null($groupId)) {
             $groupId = $this->getStore()->getGroupId();
-        } elseif ($groupId instanceof \Magento\Core\Model\Store\Group) {
+        } elseif ($groupId instanceof Group) {
             return $groupId;
         }
         if (empty($this->_groups[$groupId])) {
@@ -597,7 +612,7 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
             if (is_numeric($groupId)) {
                 $group->load($groupId);
                 if (!$group->hasGroupId()) {
-                    throw new \Magento\Core\Exception('Invalid store group id requested.');
+                    throw new Exception('Invalid store group id requested.');
                 }
             }
             $this->_groups[$group->getGroupId()] = $group;
@@ -612,14 +627,14 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
      *
      * @param bool $withDefault
      * @param bool $codeKey
-     * @return \Magento\Core\Model\Store\Group[]
+     * @return Group
      */
     public function getGroups($withDefault = false, $codeKey = false)
     {
         $groups = array();
         if (is_array($this->_groups)) {
             foreach ($this->_groups as $group) {
-                /** @var $group \Magento\Core\Model\Store\Group */
+                /** @var $group Group */
                 if (!$withDefault && $group->getId() == 0) {
                     continue;
                 }
@@ -644,12 +659,12 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
     /**
      * Retrieve default store for default group and website
      *
-     * @return \Magento\Core\Model\Store
+     * @return Store
      */
     public function getDefaultStoreView()
     {
         foreach ($this->getWebsites() as $_website) {
-            /** @var $_website \Magento\Core\Model\Website */
+            /** @var $_website Website */
             if ($_website->getIsDefault()) {
                 $_defaultStore = $this->getGroup($_website->getDefaultGroupId())->getDefaultStore();
                 if ($_defaultStore) {
@@ -663,13 +678,13 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
     /**
      *  Unset website by id from app cache
      *
-     * @param null|bool|int|string|\Magento\Core\Model\Website $websiteId
+     * @param null|bool|int|string|Website $websiteId
      */
     public function clearWebsiteCache($websiteId = null)
     {
         if (is_null($websiteId)) {
             $websiteId = $this->getStore()->getWebsiteId();
-        } elseif ($websiteId instanceof \Magento\Core\Model\Website) {
+        } elseif ($websiteId instanceof Website) {
             $websiteId = $websiteId->getId();
         } elseif ($websiteId === true) {
             $websiteId = $this->_website->getId();
@@ -686,7 +701,7 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
     /**
      * Get either default or any store view
      *
-     * @return \Magento\Core\Model\Store|null
+     * @return Store|null
      */
     public function getAnyStoreView()
     {
@@ -712,11 +727,11 @@ class Db implements \Magento\Core\Model\Store\StorageInterface
     }
 
     /**
-     * @throws \Magento\Core\Model\Store\Exception
+     * @throws StoreException
      */
     public function throwStoreException()
     {
-        throw new \Magento\Core\Model\Store\Exception('');
+        throw new StoreException('');
     }
 
     /**
diff --git a/app/code/Magento/Core/Model/Store/StorageFactory.php b/app/code/Magento/Core/Model/Store/StorageFactory.php
index 4abf47facef..e2c0285a87c 100644
--- a/app/code/Magento/Core/Model/Store/StorageFactory.php
+++ b/app/code/Magento/Core/Model/Store/StorageFactory.php
@@ -55,15 +55,10 @@ class StorageFactory
     protected $_eventManager;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_log;
 
-    /**
-     * @var \Magento\Core\Model\ConfigInterface
-     */
-    protected $_config;
-
     /**
      * @var \Magento\Core\Model\AppInterface
      */
@@ -74,34 +69,39 @@ class StorageFactory
      */
     protected $_appState;
 
+    /**
+     * @var string
+     */
+    protected $_writerModel;
+
     /**
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $log
-     * @param \Magento\Core\Model\ConfigInterface $config
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\AppInterface $app
      * @param \Magento\App\State $appState
      * @param string $defaultStorageClassName
      * @param string $installedStoreClassName
+     * @param string $writerModel
      */
     public function __construct(
         \Magento\ObjectManager $objectManager,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $log,
-        \Magento\Core\Model\ConfigInterface $config,
+        \Magento\Logger $logger,
         \Magento\Core\Model\AppInterface $app,
         \Magento\App\State $appState,
         $defaultStorageClassName = 'Magento\Core\Model\Store\Storage\DefaultStorage',
-        $installedStoreClassName = 'Magento\Core\Model\Store\Storage\Db'
+        $installedStoreClassName = 'Magento\Core\Model\Store\Storage\Db',
+        $writerModel = ''
     ) {
         $this->_objectManager = $objectManager;
         $this->_defaultStorageClassName = $defaultStorageClassName;
         $this->_installedStoreClassName = $installedStoreClassName;
         $this->_eventManager = $eventManager;
-        $this->_log = $log;
+        $this->_log = $logger;
         $this->_appState = $appState;
-        $this->_config = $config;
         $this->_app = $app;
+        $this->_writerModel = $writerModel;
     }
 
     /**
@@ -123,7 +123,7 @@ class StorageFactory
 
             if (false === ($instance instanceof \Magento\Core\Model\Store\StorageInterface)) {
                 throw new \InvalidArgumentException($className
-                        . ' doesn\'t implement \Magento\Core\Model\Store\StorageInterface'
+                    . ' doesn\'t implement \Magento\Core\Model\Store\StorageInterface'
                 );
             }
             $this->_cache[$className] = $instance;
@@ -135,7 +135,18 @@ class StorageFactory
 
                 $this->_eventManager->dispatch('core_app_init_current_store_after');
 
-                $this->_log->initForStore($instance->getStore(true), $this->_config);
+                $store = $instance->getStore(true);
+                if ($store->getConfig('dev/log/active')) {
+
+                    $this->_log->unsetLoggers();
+                    $this->_log->addStreamLog(
+                        \Magento\Logger::LOGGER_SYSTEM, $store->getConfig('dev/log/file'), $this->_writerModel);
+                    $this->_log->addStreamLog(
+                        \Magento\Logger::LOGGER_EXCEPTION,
+                        $store->getConfig('dev/log/exception_file'),
+                        $this->_writerModel
+                    );
+                }
             }
         }
         return $this->_cache[$className];
diff --git a/app/code/Magento/Core/Model/Theme.php b/app/code/Magento/Core/Model/Theme.php
index 38fc8e2c318..2bd65ac5151 100644
--- a/app/code/Magento/Core/Model/Theme.php
+++ b/app/code/Magento/Core/Model/Theme.php
@@ -49,7 +49,6 @@ namespace Magento\Core\Model;
  * @method \Magento\View\Design\ThemeInterface setThemeCode(string $themeCode)
  * @method \Magento\View\Design\ThemeInterface setThemePath(string $themePath)
  * @method \Magento\View\Design\ThemeInterface setThemeVersion(string $themeVersion)
- * @method \Magento\View\Design\ThemeInterface setArea(string $area)
  * @method \Magento\View\Design\ThemeInterface setThemeTitle(string $themeTitle)
  * @method \Magento\View\Design\ThemeInterface setType(int $type)
  * @method \Magento\View\Design\ThemeInterface setCode(string $code)
@@ -115,6 +114,11 @@ class Theme extends \Magento\Core\Model\AbstractModel implements \Magento\View\D
      */
     protected $_customFactory;
 
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
     /**
      * All possible types of a theme
      *
@@ -136,6 +140,7 @@ class Theme extends \Magento\Core\Model\AbstractModel implements \Magento\View\D
      * @param \Magento\Core\Model\Theme\ImageFactory $imageFactory
      * @param \Magento\Core\Model\Theme\Validator $validator
      * @param \Magento\Core\Model\Theme\CustomizationFactory $customizationFactory
+     * @param \Magento\App\State $appState
      * @param \Magento\Core\Model\Resource\Theme $resource
      * @param \Magento\Core\Model\Resource\Theme\Collection $resourceCollection
      * @param array $data
@@ -150,6 +155,7 @@ class Theme extends \Magento\Core\Model\AbstractModel implements \Magento\View\D
         \Magento\Core\Model\Theme\ImageFactory $imageFactory,
         \Magento\Core\Model\Theme\Validator $validator,
         \Magento\Core\Model\Theme\CustomizationFactory $customizationFactory,
+        \Magento\App\State $appState,
         \Magento\Core\Model\Resource\Theme $resource = null,
         \Magento\Core\Model\Resource\Theme\Collection $resourceCollection = null,
         array $data = array()
@@ -160,10 +166,10 @@ class Theme extends \Magento\Core\Model\AbstractModel implements \Magento\View\D
         $this->_imageFactory = $imageFactory;
         $this->_validator = $validator;
         $this->_customFactory = $customizationFactory;
+        $this->_appState = $appState;
 
         $this->addData(array(
-            'type' => self::TYPE_VIRTUAL,
-            'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND
+            'type' => self::TYPE_VIRTUAL
         ));
     }
 
@@ -297,10 +303,11 @@ class Theme extends \Magento\Core\Model\AbstractModel implements \Magento\View\D
 
     /**
      * {@inheritdoc}
+     * @deprecated
      */
     public function getArea()
     {
-        return $this->getData('area');
+        return $this->_appState->getAreaCode();
     }
 
     /**
diff --git a/app/code/Magento/Core/Model/Theme/Data.php b/app/code/Magento/Core/Model/Theme/Data.php
new file mode 100644
index 00000000000..539c2577d56
--- /dev/null
+++ b/app/code/Magento/Core/Model/Theme/Data.php
@@ -0,0 +1,43 @@
+<?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_Core
+ * @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\Theme;
+
+/**
+ * Data model for themes
+ *
+ * @method \Magento\View\Design\ThemeInterface setArea(string $area)
+ */
+class Data extends \Magento\Core\Model\Theme
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getArea()
+    {
+        return $this->getData('area');
+    }
+}
diff --git a/app/code/Magento/Core/Model/Theme/Domain/Virtual.php b/app/code/Magento/Core/Model/Theme/Domain/Virtual.php
index 491a5f07087..bf1579275a3 100644
--- a/app/code/Magento/Core/Model/Theme/Domain/Virtual.php
+++ b/app/code/Magento/Core/Model/Theme/Domain/Virtual.php
@@ -142,7 +142,6 @@ class Virtual
             'theme_title'          => sprintf('%s - Staging', $this->_theme->getThemeTitle()),
             'preview_image'        => $this->_theme->getPreviewImage(),
             'is_featured'          => $this->_theme->getIsFeatured(),
-            'area'                 => $this->_theme->getArea(),
             'type'                 => \Magento\Core\Model\Theme::TYPE_STAGING
         ));
         $stagingTheme->save();
diff --git a/app/code/Magento/Core/Model/Theme/Image.php b/app/code/Magento/Core/Model/Theme/Image.php
index 19c0909655e..648093074d6 100644
--- a/app/code/Magento/Core/Model/Theme/Image.php
+++ b/app/code/Magento/Core/Model/Theme/Image.php
@@ -52,7 +52,7 @@ class Image
     protected $_imageFactory;
 
     /**
-     * @var \Magento\Core\Model\Theme\Image\UploaderProxy
+     * @var \Magento\Core\Model\Theme\Image\Uploader
      */
     protected $_uploader;
 
@@ -62,7 +62,7 @@ class Image
     protected $_themeImagePath;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -78,7 +78,7 @@ class Image
      * @param \Magento\Core\Model\Image\Factory $imageFactory
      * @param \Magento\Core\Model\Theme\Image\Uploader $uploader
      * @param \Magento\Core\Model\Theme\Image\Path $themeImagePath
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\View\Design\ThemeInterface $theme
      */
     public function __construct(
@@ -86,7 +86,7 @@ class Image
         \Magento\Core\Model\Image\Factory $imageFactory,
         \Magento\Core\Model\Theme\Image\Uploader $uploader,
         \Magento\Core\Model\Theme\Image\Path $themeImagePath,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\View\Design\ThemeInterface $theme = null
     ) {
         $this->_filesystem = $filesystem;
diff --git a/app/code/Magento/Core/Model/Translate.php b/app/code/Magento/Core/Model/Translate.php
index ea8f4e757c7..d83df445b10 100644
--- a/app/code/Magento/Core/Model/Translate.php
+++ b/app/code/Magento/Core/Model/Translate.php
@@ -164,12 +164,12 @@ class Translate
     protected $_placeholderRender;
 
     /**
-     * @var \Magento\App\ModuleList
+     * @var \Magento\Module\ModuleList
      */
     protected $_moduleList;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_modulesReader;
 
@@ -188,6 +188,11 @@ class Translate
      */
     protected $_app;
 
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
     /**
      * @param \Magento\View\DesignInterface $viewDesign
      * @param \Magento\Core\Model\Locale\Hierarchy\Config $config
@@ -195,12 +200,13 @@ class Translate
      * @param \Magento\Cache\FrontendInterface $cache
      * @param \Magento\Core\Model\View\FileSystem $viewFileSystem
      * @param \Magento\Phrase\Renderer\Placeholder $placeholderRender
-     * @param \Magento\App\ModuleList $moduleList
-     * @param \Magento\Core\Model\Config\Modules\Reader $modulesReader
+     * @param \Magento\Module\ModuleList $moduleList
+     * @param \Magento\Module\Dir\Reader $modulesReader
      * @param \Magento\Core\Model\Config $coreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Resource\Translate $translate
      * @param \Magento\Core\Model\App $app
+     * @param \Magento\App\State $appState
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -211,12 +217,13 @@ class Translate
         \Magento\Cache\FrontendInterface $cache,
         \Magento\Core\Model\View\FileSystem $viewFileSystem,
         \Magento\Phrase\Renderer\Placeholder $placeholderRender,
-        \Magento\App\ModuleList $moduleList,
-        \Magento\Core\Model\Config\Modules\Reader $modulesReader,
+        \Magento\Module\ModuleList $moduleList,
+        \Magento\Module\Dir\Reader $modulesReader,
         \Magento\Core\Model\Config $coreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Resource\Translate $translate,
-        \Magento\Core\Model\App $app
+        \Magento\Core\Model\App $app,
+        \Magento\App\State $appState
     ) {
         $this->_viewDesign = $viewDesign;
         $this->_localeHierarchy = $config->getHierarchy();
@@ -230,6 +237,7 @@ class Translate
         $this->_storeManager = $storeManager;
         $this->_translateResource = $translate;
         $this->_app = $app;
+        $this->_appState = $appState;
     }
 
     /**
@@ -240,12 +248,13 @@ class Translate
      * @param bool $forceReload
      * @return \Magento\Core\Model\Translate
      */
-    public function init($area, $initParams = null, $forceReload = false)
+    public function init($area = null, $initParams = null, $forceReload = false)
     {
+        $area = isset($area) ? $area : $this->_appState->getAreaCode();
         $this->setConfig(array(self::CONFIG_KEY_AREA => $area));
 
         $this->_translateInline = $this->getInlineObject($initParams)->isAllowed(
-            $area == \Magento\Backend\Helper\Data::BACKEND_AREA_CODE ? 'admin' : null);
+            $area == \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ? 'admin' : null);
 
         if (!$forceReload) {
             $this->_data = $this->_loadCache();
diff --git a/app/code/Magento/Core/Model/Translate/Inline.php b/app/code/Magento/Core/Model/Translate/Inline.php
index ec89a025037..73c570bc992 100644
--- a/app/code/Magento/Core/Model/Translate/Inline.php
+++ b/app/code/Magento/Core/Model/Translate/Inline.php
@@ -84,6 +84,11 @@ class Inline implements \Magento\Core\Model\Translate\InlineInterface
      */
     protected $_coreStoreConfig;
 
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
     /**
      * Initialize inline translation model
      *
@@ -93,6 +98,7 @@ class Inline implements \Magento\Core\Model\Translate\InlineInterface
      * @param \Magento\Core\Model\Url $url
      * @param \Magento\View\LayoutInterface $layout
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
+     * @param \Magento\App\State $appState
      */
     public function __construct(
         \Magento\Core\Model\Translate\InlineParser $parser,
@@ -100,7 +106,8 @@ class Inline implements \Magento\Core\Model\Translate\InlineInterface
         \Magento\Backend\Model\Url $backendUrl,
         \Magento\Core\Model\Url $url,
         \Magento\View\LayoutInterface $layout,
-        \Magento\Core\Model\Store\Config $coreStoreConfig
+        \Magento\Core\Model\Store\Config $coreStoreConfig,
+        \Magento\App\State $appState
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_parser = $parser;
@@ -108,6 +115,7 @@ class Inline implements \Magento\Core\Model\Translate\InlineInterface
         $this->_backendUrl = $backendUrl;
         $this->_url = $url;
         $this->_layout = $layout;
+        $this->_appState = $appState;
     }
 
     /**
@@ -147,7 +155,7 @@ class Inline implements \Magento\Core\Model\Translate\InlineInterface
     {
         $this->_parser->setIsJson($isJson);
         if (!$this->isAllowed()) {
-            if ($this->_parser->getDesignPackage()->getArea() == \Magento\Backend\Helper\Data::BACKEND_AREA_CODE) {
+            if ($this->_appState->getAreaCode() == \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) {
                 $this->_stripInlineTranslations($body);
             }
             return $this;
@@ -188,7 +196,7 @@ class Inline implements \Magento\Core\Model\Translate\InlineInterface
 
         $store = $this->_parser->getStoreManager()->getStore();
         if ($store->isAdmin()) {
-            $urlPrefix = \Magento\Backend\Helper\Data::BACKEND_AREA_CODE;
+            $urlPrefix = \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE;
             $urlModel = $this->_backendUrl;
         } else {
             $urlPrefix = 'core';
diff --git a/app/code/Magento/Core/Model/Translate/InlineParser.php b/app/code/Magento/Core/Model/Translate/InlineParser.php
index 95911821938..1ad7a39f996 100644
--- a/app/code/Magento/Core/Model/Translate/InlineParser.php
+++ b/app/code/Magento/Core/Model/Translate/InlineParser.php
@@ -149,6 +149,11 @@ class InlineParser
      */
     protected $_inputFilter;
 
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
     /**
      * Initialize base inline translation model
      *
@@ -157,19 +162,22 @@ class InlineParser
      * @param \Magento\View\DesignInterface $design
      * @param \Magento\Core\Helper\Data $helper
      * @param \Zend_Filter_Interface $inputFilter
+     * @param \Magento\App\State $appState
      */
     public function __construct(
         \Magento\Core\Model\Resource\Translate\String $resource,
         \Magento\View\DesignInterface $design,
         \Magento\Core\Helper\Data $helper,
         \Magento\Core\Model\StoreManager $storeManager,
-        \Zend_Filter_Interface $inputFilter
+        \Zend_Filter_Interface $inputFilter,
+        \Magento\App\State $appState
     ) {
         $this->_resource = $resource;
         $this->_design = $design;
         $this->_helper = $helper;
         $this->_storeManager = $storeManager;
         $this->_inputFilter = $inputFilter;
+        $this->_appState = $appState;
     }
 
     /**
@@ -216,7 +224,7 @@ class InlineParser
         $validStoreId = $this->_storeManager->getStore()->getId();
 
         foreach ($translateParams as $param) {
-            if ($this->_design->getArea() == \Magento\Backend\Helper\Data::BACKEND_AREA_CODE) {
+            if ($this->_appState->getAreaCode() == \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) {
                 $storeId = 0;
             } else if (empty($param['perstore'])) {
                 $this->_resource->deleteTranslate($param['original'], null, false);
diff --git a/app/code/Magento/Core/Model/Url.php b/app/code/Magento/Core/Model/Url.php
index 6b458f92202..5fcfd9e4c6c 100644
--- a/app/code/Magento/Core/Model/Url.php
+++ b/app/code/Magento/Core/Model/Url.php
@@ -131,13 +131,6 @@ class Url extends \Magento\Object implements \Magento\UrlInterface
      */
     protected $_urlSecurityInfo;
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
-
     /**
      * @var \Magento\Core\Model\Store\Config
      */
@@ -159,42 +152,47 @@ class Url extends \Magento\Object implements \Magento\UrlInterface
     protected $_session;
 
     /**
-     * Router list
+     * Constructor
      *
-     * @var \Magento\App\RouterListInterface
+     * @var \Magento\App\Route\ConfigInterface
+     */
+    protected $_routeConfig;
+
+    /**
+     * @var string
      */
-    protected $_routerList;
+    protected $_areaCode;
 
     /**
-     * @param \Magento\App\RouterListInterface $routerList
+     * @param \Magento\App\Route\ConfigInterface $routeConfig
      * @param \Magento\App\RequestInterface $request
      * @param Url\SecurityInfoInterface $urlSecurityInfo
      * @param Store\Config $coreStoreConfig
-     * @param \Magento\Core\Helper\Data $coreData
      * @param App $app
      * @param StoreManager $storeManager
      * @param Session $session
+     * @param null $areaCode
      * @param array $data
      */
     public function __construct(
-        \Magento\App\RouterListInterface $routerList,
+        \Magento\App\Route\ConfigInterface $routeConfig,
         \Magento\App\RequestInterface $request,
         Url\SecurityInfoInterface $urlSecurityInfo,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\App $app,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Session $session,
+        $areaCode = null,
         array $data = array()
     ) {
         $this->_request = $request;
-        $this->_routerList = $routerList;
+        $this->_routeConfig = $routeConfig;
         $this->_urlSecurityInfo = $urlSecurityInfo;
         $this->_coreStoreConfig = $coreStoreConfig;
-        $this->_coreData = $coreData;
         $this->_app = $app;
         $this->_storeManager = $storeManager;
         $this->_session = $session;
+        $this->_areaCode = $areaCode;
         parent::__construct($data);
     }
 
@@ -596,10 +594,7 @@ class Url extends \Magento\Object implements \Magento\UrlInterface
     public function getRouteFrontName()
     {
         if (!$this->hasData('route_front_name')) {
-            $routeId = $this->getRouteName();
-            $router = $this->_routerList->getRouterByRoute($routeId);
-            $frontName = $router->getFrontNameByRoute($routeId);
-
+            $frontName = $this->_routeConfig->getRouteFrontName($this->getRouteName(), $this->_areaCode);
             $this->setRouteFrontName($frontName);
         }
 
@@ -834,10 +829,6 @@ class Url extends \Magento\Object implements \Magento\UrlInterface
             $session = $this->_session;
             if (!$session->isValidForHost($this->getHost())) {
                 if (!self::$_encryptedSessionId) {
-                    $helper = $this->_coreData;
-                    if (!$helper) {
-                        return $this;
-                    }
                     self::$_encryptedSessionId = $session->getEncryptedSessionId();
                 }
                 $this->setQueryParam($session->getSessionIdQueryParam(), self::$_encryptedSessionId);
@@ -854,10 +845,6 @@ class Url extends \Magento\Object implements \Magento\UrlInterface
     public function addSessionParam()
     {
         if (!self::$_encryptedSessionId) {
-            $helper = $this->_coreData;
-            if (!$helper) {
-                return $this;
-            }
             self::$_encryptedSessionId = $this->_session->getEncryptedSessionId();
         }
         $this->setQueryParam($this->_session->getSessionIdQueryParam(), self::$_encryptedSessionId);
diff --git a/app/code/Magento/Core/Model/Validator/Factory.php b/app/code/Magento/Core/Model/Validator/Factory.php
index 1d67c84c32b..c09108a60cb 100644
--- a/app/code/Magento/Core/Model/Validator/Factory.php
+++ b/app/code/Magento/Core/Model/Validator/Factory.php
@@ -48,12 +48,12 @@ class Factory
      * Initialize dependencies
      *
      * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      * @param \Magento\Core\Model\Translate $translator
      */
     public function __construct(
         \Magento\ObjectManager $objectManager,
-        \Magento\Core\Model\Config\Modules\Reader $moduleReader,
+        \Magento\Module\Dir\Reader $moduleReader,
         \Magento\Core\Model\Translate $translator
     ) {
         $this->_objectManager = $objectManager;
diff --git a/app/code/Magento/Core/Model/Variable.php b/app/code/Magento/Core/Model/Variable.php
index 71be28e2aab..4e798263e45 100644
--- a/app/code/Magento/Core/Model/Variable.php
+++ b/app/code/Magento/Core/Model/Variable.php
@@ -48,14 +48,12 @@ class Variable extends \Magento\Core\Model\AbstractModel
     protected $_storeId = 0;
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Escaper
      */
-    protected $_coreData = null;
+    protected $_escaper = null;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\Resource\Variable $resource
@@ -63,14 +61,14 @@ class Variable extends \Magento\Core\Model\AbstractModel
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\Resource\Variable $resource,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
+        $this->_escaper = $escaper;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -132,7 +130,7 @@ class Variable extends \Magento\Core\Model\AbstractModel
             $value = $this->getData('plain_value');
             //escape html if type is html, but html value is not defined
             if ($type == self::TYPE_HTML) {
-                $value = nl2br($this->_coreData->escapeHtml($value));
+                $value = nl2br($this->_escaper->escapeHtml($value));
             }
             return $value;
         }
diff --git a/app/code/Magento/Core/Model/View/Config.php b/app/code/Magento/Core/Model/View/Config.php
index 628d99c58c0..f847aed013c 100644
--- a/app/code/Magento/Core/Model/View/Config.php
+++ b/app/code/Magento/Core/Model/View/Config.php
@@ -41,7 +41,7 @@ class Config implements \Magento\View\ConfigInterface
     /**
      * Module configuration reader
      *
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_moduleReader;
 
@@ -65,13 +65,13 @@ class Config implements \Magento\View\ConfigInterface
     /**
      * View config model
      *
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Model\View\Service $viewService
      * @param \Magento\Core\Model\View\FileSystem $viewFileSystem
      */
     public function __construct(
-        \Magento\Core\Model\Config\Modules\Reader $moduleReader,
+        \Magento\Module\Dir\Reader $moduleReader,
         \Magento\Filesystem $filesystem,
         \Magento\Core\Model\View\Service $viewService,
         \Magento\Core\Model\View\FileSystem $viewFileSystem
diff --git a/app/code/Magento/Core/Model/View/Design.php b/app/code/Magento/Core/Model/View/Design.php
index 9ee5dafee23..7f924d65fb4 100644
--- a/app/code/Magento/Core/Model/View/Design.php
+++ b/app/code/Magento/Core/Model/View/Design.php
@@ -85,7 +85,7 @@ class Design implements \Magento\View\DesignInterface
     protected $_flyweightFactory;
 
     /**
-     * @var \Magento\Core\Model\Theme
+     * @var \Magento\Core\Model\ThemeFactory
      */
     protected $_themeFactory;
 
@@ -104,6 +104,11 @@ class Design implements \Magento\View\DesignInterface
      */
     protected $_app;
 
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
     /**
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Theme\FlyweightFactory $flyweightFactory
@@ -111,6 +116,7 @@ class Design implements \Magento\View\DesignInterface
      * @param \Magento\Core\Model\Store\ConfigInterface $storeConfig
      * @param \Magento\Core\Model\ThemeFactory $themeFactory
      * @param \Magento\Core\Model\App $app
+     * @param \Magento\App\State $appState
      * @param array $themes
      */
     public function __construct(
@@ -120,6 +126,7 @@ class Design implements \Magento\View\DesignInterface
         \Magento\Core\Model\Store\ConfigInterface $storeConfig,
         \Magento\Core\Model\ThemeFactory $themeFactory,
         \Magento\Core\Model\App $app,
+        \Magento\App\State $appState,
         array $themes
     ) {
         $this->_storeManager = $storeManager;
@@ -127,6 +134,7 @@ class Design implements \Magento\View\DesignInterface
         $this->_themeFactory = $themeFactory;
         $this->_config = $config;
         $this->_storeConfig = $storeConfig;
+        $this->_appState = $appState;
         $this->_themes = $themes;
         $this->_app = $app;
     }
@@ -134,6 +142,7 @@ class Design implements \Magento\View\DesignInterface
     /**
      * Set package area
      *
+     * @deprecated
      * @param string $area
      * @return \Magento\Core\Model\View\Design
      */
@@ -147,14 +156,12 @@ class Design implements \Magento\View\DesignInterface
     /**
      * Retrieve package area
      *
+     * @deprecated
      * @return string
      */
     public function getArea()
     {
-        if (is_null($this->_area)) {
-            $this->_area = self::DEFAULT_AREA;
-        }
-        return $this->_area;
+        return $this->_appState->getAreaCode();
     }
 
     /**
@@ -168,12 +175,14 @@ class Design implements \Magento\View\DesignInterface
     {
         if ($area) {
             $this->setArea($area);
+        } else {
+            $area = $this->getArea();
         }
 
         if ($theme instanceof \Magento\Core\Model\Theme) {
             $this->_theme = $theme;
         } else {
-            $this->_theme = $this->_flyweightFactory->create($theme, $this->getArea());
+            $this->_theme = $this->_flyweightFactory->create($theme, $area);
         }
 
         return $this;
@@ -278,7 +287,7 @@ class Design implements \Magento\View\DesignInterface
     public function getDesignParams()
     {
         $params = array(
-            'area'       => $this->getArea(),
+            'area'       => $this->_appState->getAreaCode(),
             'themeModel' => $this->getDesignTheme(),
             'locale'     => $this->_app->getLocale()->getLocaleCode()
         );
diff --git a/app/code/Magento/Core/Model/View/Design/Proxy.php b/app/code/Magento/Core/Model/View/Design/Proxy.php
index cae0f470c42..e671a390176 100644
--- a/app/code/Magento/Core/Model/View/Design/Proxy.php
+++ b/app/code/Magento/Core/Model/View/Design/Proxy.php
@@ -63,6 +63,7 @@ class Proxy implements \Magento\View\DesignInterface
     /**
      * Set package area
      *
+     * @deprecated
      * @param string $area
      * @return \Magento\View\DesignInterface
      */
@@ -74,6 +75,7 @@ class Proxy implements \Magento\View\DesignInterface
     /**
      * Retrieve package area
      *
+     * @deprecated
      * @return string
      */
     public function getArea()
diff --git a/app/code/Magento/Core/Model/View/Publisher.php b/app/code/Magento/Core/Model/View/Publisher.php
index 1385462c670..9bfa48b2abd 100644
--- a/app/code/Magento/Core/Model/View/Publisher.php
+++ b/app/code/Magento/Core/Model/View/Publisher.php
@@ -77,7 +77,7 @@ class Publisher implements \Magento\Core\Model\View\PublicFilesManagerInterface
     protected $_viewFileSystem;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -94,30 +94,30 @@ class Publisher implements \Magento\Core\Model\View\PublicFilesManagerInterface
     protected $_dir;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_modulesReader;
 
     /**
      * View files publisher model
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Helper\Css $cssHelper
      * @param \Magento\Core\Model\View\Service $viewService
      * @param \Magento\Core\Model\View\FileSystem $viewFileSystem
      * @param \Magento\App\Dir $dir
-     * @param \Magento\Core\Model\Config\Modules\Reader $modulesReader
+     * @param \Magento\Module\Dir\Reader $modulesReader
      * @param $allowFilesDuplication
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Filesystem $filesystem,
         \Magento\Core\Helper\Css $cssHelper,
         \Magento\Core\Model\View\Service $viewService,
         \Magento\Core\Model\View\FileSystem $viewFileSystem,
         \Magento\App\Dir $dir,
-        \Magento\Core\Model\Config\Modules\Reader $modulesReader,
+        \Magento\Module\Dir\Reader $modulesReader,
         $allowFilesDuplication
     ) {
         $this->_filesystem = $filesystem;
diff --git a/app/code/Magento/Core/Model/Website.php b/app/code/Magento/Core/Model/Website.php
index 0a61ef52f96..a67d2280841 100644
--- a/app/code/Magento/Core/Model/Website.php
+++ b/app/code/Magento/Core/Model/Website.php
@@ -526,7 +526,6 @@ class Website extends \Magento\Core\Model\AbstractModel
     {
         $this->_storeManager->clearWebsiteCache($this->getId());
         parent::_afterDelete();
-        $this->_coreConfig->removeCache();
         return $this;
     }
 
diff --git a/app/code/Magento/Core/etc/config.xml b/app/code/Magento/Core/etc/config.xml
index 95fa1fc257f..f79a59e1061 100644
--- a/app/code/Magento/Core/etc/config.xml
+++ b/app/code/Magento/Core/etc/config.xml
@@ -59,6 +59,9 @@
             </js>
         </dev>
         <system>
+            <filesystem>
+                <media>{{media_dir}}</media>
+            </filesystem>
             <smtp>
                 <disable>0</disable>
                 <host>localhost</host>
@@ -156,6 +159,8 @@
             <locale>
                 <firstday>0</firstday>
                 <weekend>0,6</weekend>
+                <code>en_US</code>
+                <timezone>America/Los_Angeles</timezone>
             </locale>
             <file>
                 <protected_extensions>
diff --git a/app/code/Magento/Core/etc/config.xsd b/app/code/Magento/Core/etc/config.xsd
new file mode 100644
index 00000000000..8642130de5e
--- /dev/null
+++ b/app/code/Magento/Core/etc/config.xsd
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * This schema must be used to validate config.xml files
+ *
+ * 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)
+ */
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    <xs:element name="config" type="configType" />
+    <xs:complexType name="configType" mixed="true">
+        <xs:choice maxOccurs="unbounded" minOccurs="0">
+            <xs:element name="default"  type="mixedDataType" />
+            <xs:element name="stores"   type="mixedDataType" />
+            <xs:element name="websites" type="mixedDataType" />
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="mixedDataType">
+        <xs:choice>
+            <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+        </xs:choice>
+    </xs:complexType>
+</xs:schema>
diff --git a/app/code/Magento/Core/etc/di.xml b/app/code/Magento/Core/etc/di.xml
index 4fbddcb7a2b..2d9f468fa86 100644
--- a/app/code/Magento/Core/etc/di.xml
+++ b/app/code/Magento/Core/etc/di.xml
@@ -25,8 +25,8 @@
 -->
 <config>
     <preference for="Magento\Acl\CacheInterface" type="Magento\Core\Model\Acl\Cache" />
-    <preference for="Magento\App\Updater\SetupInterface" type="Magento\Core\Model\Resource\Setup" />
-    <preference for="Magento\App\Module\ResourceResolverInterface" type="Magento\App\Module\ResourceResolver" />
+    <preference for="Magento\Module\Updater\SetupInterface" type="Magento\Core\Model\Resource\Setup" />
+    <preference for="Magento\Module\ResourceResolverInterface" type="Magento\Module\ResourceResolver" />
     <preference for="Magento\AuthorizationInterface" type="Magento\Authorization" />
     <preference for="Magento\Authorization\Policy" type="Magento\Authorization\Policy\DefaultPolicy" />
     <preference for="Magento\Authorization\RoleLocator" type="Magento\Authorization\RoleLocator\DefaultRoleLocator" />
@@ -43,15 +43,24 @@
     <preference for="Magento\Config\ConverterInterface" type="Magento\Config\Converter\Dom"/>
     <preference for="Magento\Phrase\RendererInterface" type="Magento\Phrase\Renderer\Composite" />
     <preference for="Magento\Core\Model\Url\SecurityInfoInterface" type="Magento\Core\Model\Url\SecurityInfo\Proxy" />
-    <type name="Magento\App\FrontController">
-        <plugin name="install" type="Magento\Core\App\FrontController\Plugin\Install" sortOrder="40"/>
-        <plugin name="requestPreprocessor" type="Magento\Core\App\FrontController\Plugin\RequestPreprocessor" sortOrder="50"/>
+    <preference for="Magento\App\DefaultPathInterface" type="Magento\App\DefaultPath\DefaultPath" />
+    <preference for="Magento\Encryption\EncryptorInterface" type="Magento\Encryption\Encryptor" />
+    <preference for="Magento\Filter\Encrypt\AdapterInterface" type=" Magento\Filter\Encrypt\Basic" />
+    <type name="Magento\App\DefaultPath\DefaultPath">
+        <param name="parts">
+            <value>
+                <module>core</module>
+                <controller>index</controller>
+                <action>index</action>
+            </value>
+        </param>
     </type>
     <type name="Magento\App\AreaList">
         <param name="areas">
             <value>
                 <frontend>
                     <frontName />
+                    <router>standard</router>
                 </frontend>
             </value>
         </param>
@@ -223,7 +232,7 @@
     </type>
     <type name="Magento\Core\Model\Theme\Image">
         <param name="uploader">
-            <instance type="Magento\Core\Model\Theme\Image\UploaderProxy" />
+            <instance type="Magento\Core\Model\Theme\Image\Uploader\Proxy" />
         </param>
     </type>
     <type name="Magento\Phrase\Renderer\Composite">
@@ -256,29 +265,7 @@
             <instance type="Magento\Core\Model\Config\SectionPool\Proxy" />
         </param>
     </type>
-    <type name="Magento\App\RouterList" shared="true">
-        <param name="routerList">
-            <value>
-                <standard>
-                    <instance>Magento\Core\Controller\Varien\Router\Base</instance>
-                    <disable type="bool">false</disable>
-                    <sortOrder>20</sortOrder>
-                </standard>
-                <default>
-                    <instance>Magento\App\Router\DefaultRouter</instance>
-                    <disable type="bool">false</disable>
-                    <sortOrder>100</sortOrder>
-                </default>
-            </value>
-        </param>
-    </type>
-    <type name="Magento\Core\Controller\Varien\Router\Base">
-        <param name="areaCode">
-            <value>frontend</value>
-        </param>
-        <param name="baseController">
-            <value>Magento\Core\Controller\Varien\Action</value>
-        </param>
+    <type name="Magento\Core\App\Router\Base">
         <param name="routerId">
             <value>standard</value>
         </param>
@@ -347,9 +334,6 @@
         </param>
     </type>
     <type name="Magento\Core\Helper\Data">
-        <param name="encryptor">
-            <instance type="Magento\Core\Model\Encryption" />
-        </param>
         <param name="locale">
             <instance type="Magento\Core\Model\Locale\Proxy" />
         </param>
@@ -362,9 +346,9 @@
             <value>app/etc/aliases_to_classes_map.json</value>
         </param>
     </type>
-    <type name="Magento\Core\Model\Encryption">
+    <type name="Magento\Encryption\Encryptor">
         <param name="cryptKey">
-            <value type="argument">Magento\Core\Model\Encryption::PARAM_CRYPT_KEY</value>
+            <value type="argument">Magento\Encryption\Encryptor::PARAM_CRYPT_KEY</value>
         </param>
     </type>
     <type name="Magento\Core\Model\Session\Context">
@@ -399,11 +383,6 @@
             <instance type="Magento\App\Request\Http\Proxy" />
         </param>
     </type>
-    <type name="Magento\Core\Helper\String">
-        <param name="locale">
-            <instance type="Magento\Core\Model\Locale\Proxy" />
-        </param>
-    </type>
     <type name="Magento\Core\Helper\File\Storage">
         <param name="storage">
             <instance type="Magento\Core\Model\File\Storage\Proxy" />
@@ -422,4 +401,17 @@
     <type name="Magento\View\TemplateEngineFactory">
         <plugin name="debug_hints" type="Magento\Core\Model\TemplateEngine\Plugin\DebugHints" sortOrder="10"/>
     </type>
+    <type name="Magento\Core\Model\Store\Storage\Db">
+        <param name="url">
+            <instance type="Magento\Backend\Model\Url\Proxy" />
+        </param>
+    </type>
+    <type name="Magento\Core\Model\App">
+        <param name="frontController">
+            <instance type="Magento\App\FrontController\Proxy" />
+        </param>
+    </type>
+    <type name="Magento\App\FrontController">
+        <plugin name="dispatchExceptionHandler" type="Magento\Core\App\FrontController\Plugin\DispatchExceptionHandler" sortOrder="30"/>
+    </type>
 </config>
diff --git a/app/code/Magento/Core/etc/frontend/di.xml b/app/code/Magento/Core/etc/frontend/di.xml
index c0321b6804c..e4378c51458 100644
--- a/app/code/Magento/Core/etc/frontend/di.xml
+++ b/app/code/Magento/Core/etc/frontend/di.xml
@@ -34,4 +34,24 @@
             <value>frontend</value>
         </param>
     </type>
+    <type name="Magento\App\FrontController">
+        <plugin name="requestPreprocessor" type="Magento\Core\App\FrontController\Plugin\RequestPreprocessor" sortOrder="50"/>
+        <plugin name="urlRewrite" type="Magento\Core\App\FrontController\Plugin\UrlRewrite" sortOrder="60"/>
+    </type>
+    <type name="Magento\App\RouterList" shared="true">
+        <param name="routerList">
+            <value>
+                <standard>
+                    <instance>Magento\Core\App\Router\Base</instance>
+                    <disable type="bool">false</disable>
+                    <sortOrder>20</sortOrder>
+                </standard>
+                <default>
+                    <instance>Magento\App\Router\DefaultRouter</instance>
+                    <disable type="bool">false</disable>
+                    <sortOrder>100</sortOrder>
+                </default>
+            </value>
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Core/etc/layouts.xsd b/app/code/Magento/Core/etc/layouts.xsd
index a4c8593c6b4..4a7a5d954c5 100644
--- a/app/code/Magento/Core/etc/layouts.xsd
+++ b/app/code/Magento/Core/etc/layouts.xsd
@@ -55,8 +55,6 @@
             <xs:element ref="move" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
         <xs:attribute type="xs:string" name="type"/>
-        <xs:attribute type="xs:string" name="parent"/>
-        <xs:attribute type="xs:string" name="owner"/>
         <xs:attribute type="xs:string" name="label"/>
     </xs:complexType>
 
diff --git a/app/code/Magento/Core/functions.php b/app/code/Magento/Core/functions.php
deleted file mode 100644
index c8264b4e4ed..00000000000
--- a/app/code/Magento/Core/functions.php
+++ /dev/null
@@ -1,309 +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_Core
- * @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)
- */
-
-/**
- * Object destructor
- *
- * @param mixed $object
- */
-function destruct($object)
-{
-    if (is_array($object)) {
-        foreach ($object as $obj) {
-            destruct($obj);
-        }
-    }
-    unset($object);
-}
-
-/**
- * Tiny function to enhance functionality of ucwords
- *
- * Will capitalize first letters and convert separators if needed
- *
- * @param string $str
- * @param string $destSep
- * @param string $srcSep
- * @return string
- */
-function uc_words($str, $destSep = '_', $srcSep = '_')
-{
-    return str_replace(' ', $destSep, ucwords(str_replace($srcSep, ' ', $str)));
-}
-
-/**
- * Simple sql format date
- *
- * @param bool $dayOnly
- * @return string
- */
-function now($dayOnly = false)
-{
-    return date($dayOnly ? 'Y-m-d' : 'Y-m-d H:i:s');
-}
-
-/**
- * Check whether sql date is empty
- *
- * @param string $date
- * @return boolean
- */
-function is_empty_date($date)
-{
-    return preg_replace('#[ 0:-]#', '', $date) === '';
-}
-
-/**
- * Custom error handler
- *
- * @param integer $errorNo
- * @param string $errorStr
- * @param string $errorFile
- * @param integer $errorLine
- * @return bool
- * @throws \Exception
- */
-function mageCoreErrorHandler($errorNo, $errorStr, $errorFile, $errorLine)
-{
-    if (strpos($errorStr, 'DateTimeZone::__construct') !== false) {
-        // there's no way to distinguish between caught system exceptions and warnings
-        return false;
-    }
-
-    $errorNo = $errorNo & error_reporting();
-    if ($errorNo == 0) {
-        return false;
-    }
-
-    // PEAR specific message handling
-    if (stripos($errorFile . $errorStr, 'pear') !== false) {
-         // ignore strict and deprecated notices
-        if (($errorNo == E_STRICT) || ($errorNo == E_DEPRECATED)) {
-            return true;
-        }
-        // ignore attempts to read system files when open_basedir is set
-        if ($errorNo == E_WARNING && stripos($errorStr, 'open_basedir') !== false) {
-            return true;
-        }
-    }
-
-    $errorMessage = '';
-
-    switch ($errorNo) {
-        case E_ERROR:
-            $errorMessage .= "Error";
-            break;
-        case E_WARNING:
-            $errorMessage .= "Warning";
-            break;
-        case E_PARSE:
-            $errorMessage .= "Parse Error";
-            break;
-        case E_NOTICE:
-            $errorMessage .= "Notice";
-            break;
-        case E_CORE_ERROR:
-            $errorMessage .= "Core Error";
-            break;
-        case E_CORE_WARNING:
-            $errorMessage .= "Core Warning";
-            break;
-        case E_COMPILE_ERROR:
-            $errorMessage .= "Compile Error";
-            break;
-        case E_COMPILE_WARNING:
-            $errorMessage .= "Compile Warning";
-            break;
-        case E_USER_ERROR:
-            $errorMessage .= "User Error";
-            break;
-        case E_USER_WARNING:
-            $errorMessage .= "User Warning";
-            break;
-        case E_USER_NOTICE:
-            $errorMessage .= "User Notice";
-            break;
-        case E_STRICT:
-            $errorMessage .= "Strict Notice";
-            break;
-        case E_RECOVERABLE_ERROR:
-            $errorMessage .= "Recoverable Error";
-            break;
-        case E_DEPRECATED:
-            $errorMessage .= "Deprecated functionality";
-            break;
-        default:
-            $errorMessage .= "Unknown error ($errorNo)";
-            break;
-    }
-
-    $errorMessage .= ": {$errorStr} in {$errorFile} on line {$errorLine}";
-    $exception = new \Exception($errorMessage);
-    $errorMessage .= $exception->getTraceAsString();
-    $appState = \Magento\Core\Model\ObjectManager::getInstance()->get('Magento\App\State');
-    if ($appState == \Magento\App\State::MODE_DEVELOPER) {
-        throw $exception;
-    } else {
-        $dirs = new \Magento\App\Dir('.');
-        $fileSystem = new \Magento\Io\File();
-        $logger = new \Magento\Core\Model\Logger($dirs, $fileSystem);
-        $logger->log($errorMessage, \Zend_Log::ERR);
-    }
-}
-
-/**
- * Pretty debug backtrace
- *
- * @param bool $return
- * @param bool $html
- * @param bool $showFirst
- * @return string
- */
-function mageDebugBacktrace($return = false, $html = true, $showFirst = false)
-{
-    $backTrace = debug_backtrace();
-    $out = '';
-    if ($html) {
-        $out .= "<pre>";
-    }
-
-    foreach ($backTrace as $index => $trace) {
-        if (!$showFirst && $index == 0) {
-            continue;
-        }
-        // sometimes there is undefined index 'file'
-        @$out .= "[$index] {$trace['file']}:{$trace['line']}\n";
-    }
-
-    if ($html) {
-        $out .= "</pre>";
-    }
-
-    if ($return) {
-        return $out;
-    } else {
-        echo $out;
-    }
-}
-
-/**
- * Delete folder recursively
- *
- * @param string $path
- */
-function mageDelTree($path)
-{
-    if (is_dir($path)) {
-        $entries = scandir($path);
-        foreach ($entries as $entry) {
-            if ($entry != '.' && $entry != '..') {
-                mageDelTree($path . DS . $entry);
-            }
-        }
-        @rmdir($path);
-    } else {
-        @unlink($path);
-    }
-}
-
-/**
- * Parse csv file
- *
- * @param string $string
- * @param string $delimiter
- * @param string $enclosure
- * @return array
- */
-function mageParseCsv($string, $delimiter = ",", $enclosure = '"')
-{
-    $elements = explode($delimiter, $string);
-    for ($i = 0; $i < count($elements); $i++) {
-        $nQuotes = substr_count($elements[$i], $enclosure);
-        if ($nQuotes %2 == 1) {
-            for ($j = $i+1; $j < count($elements); $j++) {
-                if (substr_count($elements[$j], $enclosure) > 0) {
-                    // Put the quoted string's pieces back together again
-                    array_splice($elements, $i, $j - $i + 1,
-                        implode($delimiter, array_slice($elements, $i, $j - $i + 1)));
-                    break;
-                }
-            }
-        }
-        if ($nQuotes > 0) {
-            // Remove first and last quotes, then merge pairs of quotes
-            $qStr =& $elements[$i];
-            $qStr = substr_replace($qStr, '', strpos($qStr, $enclosure), 1);
-            $qStr = substr_replace($qStr, '', strrpos($qStr, $enclosure), 1);
-            $qStr = str_replace($enclosure.$enclosure, $enclosure, $qStr);
-        }
-    }
-    return $elements;
-}
-
-/**
- * Check is directory writable or not
- *
- * @param string $dir
- * @return bool
- */
-function is_dir_writeable($dir)
-{
-    if (is_dir($dir) && is_writable($dir)) {
-        if (stripos(PHP_OS, 'win') === 0) {
-            $dir    = ltrim($dir, DIRECTORY_SEPARATOR);
-            $file   = $dir . DIRECTORY_SEPARATOR . uniqid(mt_rand()) . '.tmp';
-            $exist  = file_exists($file);
-            $fileResource = @fopen($file, 'a');
-            if ($fileResource === false) {
-                return false;
-            }
-            fclose($fileResource);
-            if (!$exist) {
-                unlink($file);
-            }
-        }
-        return true;
-    }
-    return false;
-}
-
-/**
- * Create value-object \Magento\Phrase
- *
- * @return string
- */
-function __()
-{
-    $argc = func_get_args();
-
-    /**
-     * Type casting to string is a workaround.
-     * Many places in client code at the moment are unable to handle the \Magento\Phrase object properly.
-     * The intended behavior is to use __toString(),
-     * so that rendering of the phrase happens only at the last moment when needed
-     */
-    return (string)new \Magento\Phrase(array_shift($argc), $argc);
-}
diff --git a/app/code/Magento/Core/i18n/de_DE.csv b/app/code/Magento/Core/i18n/de_DE.csv
index 62922555b1b..ac6e17a6ec9 100644
--- a/app/code/Magento/Core/i18n/de_DE.csv
+++ b/app/code/Magento/Core/i18n/de_DE.csv
@@ -163,8 +163,8 @@
 "Locale","Sprachumgebung"
 "Locale Options","locale Einstellungen"
 "Log Settings","Log-Einstellungen"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","Logging von \Magento\Core\Model\Logger befindet sich in {{base_dir}}/var/log"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","Logging von \Magento\Core\Model\Logger. Die Datei befinden sich in {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","Logging von \Magento\Logger befindet sich in {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","Logging von \Magento\Logger. Die Datei befinden sich in {{base_dir}}/var/log"
 "Login is Case Sensitive","Login ist Case Sensitive"
 "Logo Image","Logobild"
 "Logo Image Alt","Logo Alt"
diff --git a/app/code/Magento/Core/i18n/en_US.csv b/app/code/Magento/Core/i18n/en_US.csv
index 328cbccdc74..0c74a9ea88b 100644
--- a/app/code/Magento/Core/i18n/en_US.csv
+++ b/app/code/Magento/Core/i18n/en_US.csv
@@ -165,8 +165,8 @@
 "Locale","Locale"
 "Locale Options","Locale Options"
 "Log Settings","Log Settings"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","Logging from \Magento\Logger. File is located in {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","Logging from \Magento\Logger. File is located in {{base_dir}}/var/log"
 "Login is Case Sensitive","Login is Case Sensitive"
 "Logo Image","Logo Image"
 "Logo Image Alt","Logo Image Alt"
diff --git a/app/code/Magento/Core/i18n/es_ES.csv b/app/code/Magento/Core/i18n/es_ES.csv
index e22a2434edb..2afaec1031b 100644
--- a/app/code/Magento/Core/i18n/es_ES.csv
+++ b/app/code/Magento/Core/i18n/es_ES.csv
@@ -163,8 +163,8 @@
 "Locale","Configuración regional"
 "Locale Options","Opciones de configuración regional"
 "Log Settings","Configuración de registro"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","Registro desde \Magento\Core\Model\Logger. El archivo se encuentra ubicado en {{base_dir}}/var/log"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","Registro desde \Magento\Core\Model\Logger. El archivo se encuentra ubicado en {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","Registro desde \Magento\Logger. El archivo se encuentra ubicado en {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","Registro desde \Magento\Logger. El archivo se encuentra ubicado en {{base_dir}}/var/log"
 "Login is Case Sensitive","Se distinguen mayúsculas al iniciar sesión."
 "Logo Image","Imagen del Logo"
 "Logo Image Alt","Imagen del logotipo alternativa"
diff --git a/app/code/Magento/Core/i18n/fr_FR.csv b/app/code/Magento/Core/i18n/fr_FR.csv
index 9ef05bfa27f..2672553f605 100644
--- a/app/code/Magento/Core/i18n/fr_FR.csv
+++ b/app/code/Magento/Core/i18n/fr_FR.csv
@@ -163,8 +163,8 @@
 "Locale","Paramètres régionaux"
 "Locale Options","Options régionales"
 "Log Settings","Réglages de journalisation"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","En cours de journalisation de \Magento\Core\Model\Logger. Le fichier est situé à {{base_dir}}/var/log"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","En cours de journalisation de \Magento\Core\Model\Logger. Le fichier est situé à {{base_dir}}/var/log."
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","En cours de journalisation de \Magento\Logger. Le fichier est situé à {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","En cours de journalisation de \Magento\Logger. Le fichier est situé à {{base_dir}}/var/log."
 "Login is Case Sensitive","Le login est sensible à la casse."
 "Logo Image","Image du logo"
 "Logo Image Alt","Image logo alt"
diff --git a/app/code/Magento/Core/i18n/nl_NL.csv b/app/code/Magento/Core/i18n/nl_NL.csv
index 3578279fcd2..4c333825516 100644
--- a/app/code/Magento/Core/i18n/nl_NL.csv
+++ b/app/code/Magento/Core/i18n/nl_NL.csv
@@ -163,8 +163,8 @@
 "Locale","Lokaal"
 "Locale Options","Lokale Opties"
 "Log Settings","Log Instellingen"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","Logging van \Magento\Core\Model\Logger. Bestand bevindt zich in {{base_dir}}/var/log"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","Logging van \Magento\Core\Model\Logger. Bestand bevindt zich in {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","Logging van \Magento\Logger. Bestand bevindt zich in {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","Logging van \Magento\Logger. Bestand bevindt zich in {{base_dir}}/var/log"
 "Login is Case Sensitive","Inloggen is hoofdlettergevoelig"
 "Logo Image","Logo afbeelding"
 "Logo Image Alt","Logo afbeelding Alt"
diff --git a/app/code/Magento/Core/i18n/pt_BR.csv b/app/code/Magento/Core/i18n/pt_BR.csv
index 9ebd32b9926..76060da0892 100644
--- a/app/code/Magento/Core/i18n/pt_BR.csv
+++ b/app/code/Magento/Core/i18n/pt_BR.csv
@@ -165,8 +165,8 @@ local até que o processo de sincronização esteja completo."
 "Locale","Locale"
 "Locale Options","Opções Locais"
 "Log Settings","Configurações de Registro"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","Registro de \Magento\Core\Model\Logger. Arquivo está localizado em {{base_dir}}/var/log"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","Registro de \Magento\Core\Model\Logger. Arquivo está localizado em {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","Registro de \Magento\Logger. Arquivo está localizado em {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","Registro de \Magento\Logger. Arquivo está localizado em {{base_dir}}/var/log"
 "Login is Case Sensitive","Acesso (Login) Diferencia Maiúsculas e Minúsculas"
 "Logo Image","Imagem da Logo"
 "Logo Image Alt","Alt da Imagem do Logotipo"
diff --git a/app/code/Magento/Core/i18n/zh_CN.csv b/app/code/Magento/Core/i18n/zh_CN.csv
index d03ae800ecd..64a3e96fbac 100644
--- a/app/code/Magento/Core/i18n/zh_CN.csv
+++ b/app/code/Magento/Core/i18n/zh_CN.csv
@@ -163,8 +163,8 @@
 "Locale","区域"
 "Locale Options","区域选项"
 "Log Settings","日志设置"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","登录自 \Magento\Core\Model\Logger。文件位于 {{base_dir}}/var/log"
-"Logging from \Magento\Core\Model\Logger. File is located in {{base_dir}}/var/log","登录自 \Magento\Core\Model\Logger。文件位于 {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","登录自 \Magento\Logger。文件位于 {{base_dir}}/var/log"
+"Logging from \Magento\Logger. File is located in {{base_dir}}/var/log","登录自 \Magento\Logger。文件位于 {{base_dir}}/var/log"
 "Login is Case Sensitive","登录信息大小写敏感"
 "Logo Image","徽标图像"
 "Logo Image Alt","备选徽标图像"
diff --git a/app/code/Magento/Cron/App/Cron/Plugin/ApplicationInitializer.php b/app/code/Magento/Cron/App/Cron/Plugin/ApplicationInitializer.php
new file mode 100644
index 00000000000..0a35b6720fa
--- /dev/null
+++ b/app/code/Magento/Cron/App/Cron/Plugin/ApplicationInitializer.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Cron application plugin
+ *
+ * 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\Cron\App\Cron\Plugin;
+
+use \Magento\Core\Model\AppInterface;
+
+class ApplicationInitializer
+{
+    /**
+     * @var \Magento\Core\Model\AppInterface
+     */
+    protected $_application;
+
+    /**
+     * @param AppInterface $application
+     */
+    public function __construct(
+        AppInterface $application
+    ) {
+        $this->_application = $application;
+    }
+
+    /**
+     * Perform required checks before cron run
+     *
+     * @param array $methodArguments
+     * @return array
+     */
+    public function beforeExecute(array $methodArguments)
+    {
+        $this->_application->setUseSessionInUrl(false);
+        $this->_application->requireInstalledInstance();
+        return $methodArguments;
+    }
+}
+
diff --git a/app/code/Magento/Cron/Model/Config/Backend/Product/Alert.php b/app/code/Magento/Cron/Model/Config/Backend/Product/Alert.php
index bf631678ceb..6fc3b5ab9cf 100644
--- a/app/code/Magento/Cron/Model/Config/Backend/Product/Alert.php
+++ b/app/code/Magento/Cron/Model/Config/Backend/Product/Alert.php
@@ -50,6 +50,11 @@ class Alert extends \Magento\Core\Model\Config\Value
      */
     protected $_configValueFactory;
 
+    /**
+     * @var string
+     */
+    protected $_runModelPath = '';
+
     /**
      * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory
      * @param \Magento\Core\Model\Context $context
@@ -58,6 +63,7 @@ class Alert extends \Magento\Core\Model\Config\Value
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
+     * @param string $runModelPath
      * @param array $data
      */
     public function __construct(
@@ -68,8 +74,10 @@ class Alert extends \Magento\Core\Model\Config\Value
         \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
+        $runModelPath = '',
         array $data = array()
     ) {
+        $this->_runModelPath = $runModelPath;
         $this->_configValueFactory = $configValueFactory;
         parent::__construct($context, $registry, $storeManager, $config, $resource, $resourceCollection, $data);
     }
@@ -101,7 +109,7 @@ class Alert extends \Magento\Core\Model\Config\Value
                 ->save();
             $this->_configValueFactory->create()
                 ->load(self::CRON_MODEL_PATH, 'path')
-                ->setValue((string) $this->_config->getNode(self::CRON_MODEL_PATH))
+                ->setValue($this->_runModelPath)
                 ->setPath(self::CRON_MODEL_PATH)
                 ->save();
         } catch (\Exception $e) {
diff --git a/app/code/Magento/Cron/Model/Config/Backend/Sitemap.php b/app/code/Magento/Cron/Model/Config/Backend/Sitemap.php
index 7cc0db6ddd8..1b01472f331 100644
--- a/app/code/Magento/Cron/Model/Config/Backend/Sitemap.php
+++ b/app/code/Magento/Cron/Model/Config/Backend/Sitemap.php
@@ -50,6 +50,11 @@ class Sitemap extends \Magento\Core\Model\Config\Value
      */
     protected $_configValueFactory;
 
+    /**
+     * @var string
+     */
+    protected $_runModelPath = '';
+
     /**
      * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory
      * @param \Magento\Core\Model\Context $context
@@ -58,6 +63,7 @@ class Sitemap extends \Magento\Core\Model\Config\Value
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
+     * @param string $runModelPath
      * @param array $data
      */
     public function __construct(
@@ -68,8 +74,10 @@ class Sitemap extends \Magento\Core\Model\Config\Value
         \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
+        $runModelPath = '',
         array $data = array()
     ) {
+        $this->_runModelPath = $runModelPath;
         $this->_configValueFactory = $configValueFactory;
         parent::__construct($context, $registry, $storeManager, $config, $resource, $resourceCollection, $data);
     }
@@ -101,7 +109,7 @@ class Sitemap extends \Magento\Core\Model\Config\Value
                 ->save();
             $this->_configValueFactory->create()
                 ->load(self::CRON_MODEL_PATH, 'path')
-                ->setValue((string)$this->_config->getNode(self::CRON_MODEL_PATH))
+                ->setValue($this->_runModelPath)
                 ->setPath(self::CRON_MODEL_PATH)
                 ->save();
         } catch (\Exception $e) {
diff --git a/app/code/Magento/Cron/Model/Config/SchemaLocator.php b/app/code/Magento/Cron/Model/Config/SchemaLocator.php
index 850a5468fb3..d1d0b23e020 100644
--- a/app/code/Magento/Cron/Model/Config/SchemaLocator.php
+++ b/app/code/Magento/Cron/Model/Config/SchemaLocator.php
@@ -46,9 +46,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Cron') . '/' . 'crontab.xsd';
     }
diff --git a/app/code/Magento/Cron/Model/Observer.php b/app/code/Magento/Cron/Model/Observer.php
index fbea8b797fa..fae500f5393 100644
--- a/app/code/Magento/Cron/Model/Observer.php
+++ b/app/code/Magento/Cron/Model/Observer.php
@@ -60,7 +60,9 @@ class Observer
     /** @var \Magento\Cron\Model\ConfigInterface */
     protected $_config;
 
-    /** @var \Magento\Core\Model\ObjectManager */
+    /**
+     * @var \Magento\App\ObjectManager
+     */
     protected $_objectManager;
 
     /** @var \Magento\Core\Model\App */
diff --git a/app/code/Magento/Cron/etc/di.xml b/app/code/Magento/Cron/etc/di.xml
index 2a0f0c9f40e..f11d8c630fe 100644
--- a/app/code/Magento/Cron/etc/di.xml
+++ b/app/code/Magento/Cron/etc/di.xml
@@ -38,12 +38,7 @@
             <instance type="Magento\Cron\Model\Config\SchemaLocator" />
         </param>
     </type>
-    <type name="Magento\Cron\Model\Observer">
-        <param name="objectManager">
-            <instance type="Magento\Core\Model\ObjectManager" />
-        </param>
-        <param name="app">
-            <instance type="Magento\Core\Model\App" />
-        </param>
+    <type name="Magento\App\Cron">
+        <plugin name="application_initializer" type="Magento\Cron\App\Cron\Plugin\ApplicationInitializer" sortOrder="10"/>
     </type>
 </config>
diff --git a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php
index 000a9fb6a18..027aec65548 100644
--- a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php
+++ b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php
@@ -43,19 +43,19 @@ class Matrix extends \Magento\Backend\Block\Template
     protected $_adminSession;
 
     /**
-     * @var \Magento\Directory\Model\Currency\Factory
+     * @var \Magento\Directory\Model\CurrencyFactory
      */
     protected $_dirCurrencyFactory;
 
     /**
-     * @param \Magento\Directory\Model\Currency\Factory $dirCurrencyFactory
+     * @param \Magento\Directory\Model\CurrencyFactory $dirCurrencyFactory
      * @param \Magento\Backend\Model\Session $adminSession
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
      */
     public function __construct(
-        \Magento\Directory\Model\Currency\Factory $dirCurrencyFactory,
+        \Magento\Directory\Model\CurrencyFactory $dirCurrencyFactory,
         \Magento\Backend\Model\Session $adminSession,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
diff --git a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php
index eb36be1c003..4817b7b765e 100644
--- a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php
+++ b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php
@@ -36,18 +36,18 @@ namespace Magento\CurrencySymbol\Block\Adminhtml\System;
 class Currencysymbol extends \Magento\Backend\Block\Widget\Form
 {
     /**
-     * @var \Magento\CurrencySymbol\Model\System\Currencysymbol\Factory
+     * @var \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory
      */
     protected $_symbolSystemFactory;
 
     /**
-     * @param \Magento\CurrencySymbol\Model\System\Currencysymbol\Factory $symbolSystemFactory
+     * @param \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory $symbolSystemFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
      */
     public function __construct(
-        \Magento\CurrencySymbol\Model\System\Currencysymbol\Factory $symbolSystemFactory,
+        \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory $symbolSystemFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currencysymbol.php b/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currencysymbol.php
index 54665f5c2ec..10604df09c0 100644
--- a/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currencysymbol.php
+++ b/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currencysymbol.php
@@ -64,7 +64,9 @@ class Currencysymbol extends \Magento\Backend\Controller\Adminhtml\Action
         $symbolsDataArray = $this->getRequest()->getParam('custom_currency_symbol', null);
         if (is_array($symbolsDataArray)) {
             foreach ($symbolsDataArray as &$symbolsData) {
-                $symbolsData = $this->_objectManager->get('Magento\Adminhtml\Helper\Data')->stripTags($symbolsData);
+                /** @var $filterManager \Magento\Filter\FilterManager */
+                $filterManager = $this->_objectManager->get('Magento\Filter\FilterManager');
+                $symbolsData = $filterManager->stripTags($symbolsData);
             }
         }
 
diff --git a/app/code/Magento/CurrencySymbol/Helper/Data.php b/app/code/Magento/CurrencySymbol/Helper/Data.php
index 6bf93795882..414c06f31f1 100644
--- a/app/code/Magento/CurrencySymbol/Helper/Data.php
+++ b/app/code/Magento/CurrencySymbol/Helper/Data.php
@@ -36,42 +36,42 @@ namespace Magento\CurrencySymbol\Helper;
 class Data extends \Magento\Core\Helper\Data
 {
     /**
-     * @var \Magento\CurrencySymbol\Model\System\Currencysymbol\Factory
+     * @var \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory
      */
     protected $_symbolFactory;
 
     /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Encryption $encryptor
-     * @param \Magento\CurrencySymbol\Model\System\Currencysymbol\Factory $symbolFactory
+     * @param \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory $symbolFactory
      * @param bool $dbCompatibleMode
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\Core\Model\Date $dateModel,
         \Magento\App\State $appState,
-        \Magento\Core\Model\Encryption $encryptor,
-        \Magento\CurrencySymbol\Model\System\Currencysymbol\Factory $symbolFactory,
+        \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory $symbolFactory,
         $dbCompatibleMode = true
-    )
-    {
+    ) {
         $this->_symbolFactory = $symbolFactory;
-        parent::__construct($context, $eventManager, $coreHttp, $config, $coreStoreConfig, $storeManager,
-            $locale, $dateModel, $appState, $encryptor, $dbCompatibleMode
+        parent::__construct(
+            $context,
+            $eventManager,
+            $coreStoreConfig,
+            $storeManager,
+            $locale,
+            $dateModel,
+            $appState,
+            $dbCompatibleMode
         );
     }
 
@@ -85,7 +85,7 @@ class Data extends \Magento\Core\Helper\Data
     {
         $currencyOptions = array();
         $currencySymbol = $this->_symbolFactory->create();
-        if($currencySymbol) {
+        if ($currencySymbol) {
             $customCurrencySymbol = $currencySymbol->getCurrencySymbol($baseCode);
 
             if ($customCurrencySymbol) {
diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/grid.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/grid.phtml
index 658bb74ade6..bc5d9523390 100644
--- a/app/code/Magento/CurrencySymbol/view/adminhtml/grid.phtml
+++ b/app/code/Magento/CurrencySymbol/view/adminhtml/grid.phtml
@@ -52,8 +52,8 @@
                     </td>
                     <td class="col-symbol">
                         <div class="control">
-                            <input id="custom_currency_symbol<?php echo $code; ?>" class=" required-entry input-text" type="text" value="<?php echo $this->helper('Magento\Core\Helper\Data')->quoteEscape($data['displaySymbol']); ?>"<?php echo $data['inherited'] ? ' disabled="disabled"' : '';?> name="custom_currency_symbol[<?php echo $code; ?>]">
-                            <input id="custom_currency_symbol_inherit<?php echo $code; ?>" class="checkbox config-inherit" type="checkbox" onclick="toggleUseDefault(<?php echo '\'' . $code . '\',\'' . $this->helper('Magento\Core\Helper\Data')->quoteEscape($data['parentSymbol'], true) . '\''; ?>)"<?php echo $data['inherited'] ? ' checked="checked"' : ''; ?> value="1" name="inherit_custom_currency_symbol[<?php echo $code; ?>]">
+                            <input id="custom_currency_symbol<?php echo $code; ?>" class=" required-entry input-text" type="text" value="<?php echo $this->escapeQuote($data['displaySymbol']); ?>"<?php echo $data['inherited'] ? ' disabled="disabled"' : '';?> name="custom_currency_symbol[<?php echo $code; ?>]">
+                            <input id="custom_currency_symbol_inherit<?php echo $code; ?>" class="checkbox config-inherit" type="checkbox" onclick="toggleUseDefault(<?php echo '\'' . $code . '\',\'' . $this->escapeQuote($data['parentSymbol'], true) . '\''; ?>)"<?php echo $data['inherited'] ? ' checked="checked"' : ''; ?> value="1" name="inherit_custom_currency_symbol[<?php echo $code; ?>]">
                             <label class="label" for="custom_currency_symbol_inherit<?php echo $code; ?>"><?php echo $this->getInheritText(); ?></label>
                         </div>
                     </td>
diff --git a/app/code/Magento/Customer/Block/Address/Edit.php b/app/code/Magento/Customer/Block/Address/Edit.php
index c558fbf9c6b..aaf3d5da1f8 100644
--- a/app/code/Magento/Customer/Block/Address/Edit.php
+++ b/app/code/Magento/Customer/Block/Address/Edit.php
@@ -223,15 +223,6 @@ class Edit extends \Magento\Directory\Block\Data
         }
     }
 
-    /**
-     * @param string $path
-     * @return \Magento\Core\Model\Config\Element
-     */
-    public function getConfigNode($path)
-    {
-        return $this->_config->getNode($path);
-    }
-
     /**
      * Get config
      *
diff --git a/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php b/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php
index caaf308db85..562fe204b05 100644
--- a/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php
+++ b/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php
@@ -57,25 +57,33 @@ class DefaultRenderer
      */
     protected $_attrDataFactory;
 
+    /**
+     * @var \Magento\Filter\FilterManager
+     */
+    protected $_filterManager;
+
     /**
      * @param \Magento\Customer\Helper\Address $customerAddress
      * @param \Magento\Core\Block\Context $context
      * @param \Magento\Eav\Model\AttributeDataFactory $attrDataFactory
+     * @param \Magento\Filter\FilterManager $filterManager
      * @param array $data
      */
     public function __construct(
         \Magento\Customer\Helper\Address $customerAddress,
         \Magento\Core\Block\Context $context,
         \Magento\Eav\Model\AttributeDataFactory $attrDataFactory,
+        \Magento\Filter\FilterManager $filterManager,
         array $data = array()
     ) {
         $this->_customerAddress = $customerAddress;
         $this->_attrDataFactory = $attrDataFactory;
+        $this->_filterManager = $filterManager;
         parent::__construct($context, $data);
     }
 
     /**
-     * Retrive format type object
+     * Retrieve format type object
      *
      * @return \Magento\Object
      */
@@ -85,7 +93,7 @@ class DefaultRenderer
     }
 
     /**
-     * Retrive format type object
+     * Retrieve format type object
      *
      * @param  \Magento\Object $type
      * @return \Magento\Customer\Block\Address\Renderer\DefaultRenderer
@@ -128,7 +136,6 @@ class DefaultRenderer
                 break;
         }
 
-        $formater   = new \Magento\Filter\Template();
         $attributes = $this->_customerAddress->getAttributes();
 
         $data = array();
@@ -161,11 +168,8 @@ class DefaultRenderer
                 $data[$key] = $this->escapeHtml($value);
             }
         }
-
-        $formater->setVariables($data);
-
         $format = !is_null($format) ? $format : $this->getFormat($address);
 
-        return $formater->filter($format);
+        return $this->_filterManager->template($format, array('variables' => $data));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Customer.php b/app/code/Magento/Customer/Block/Adminhtml/Customer.php
similarity index 86%
rename from app/code/Magento/Adminhtml/Block/Customer.php
rename to app/code/Magento/Customer/Block/Adminhtml/Customer.php
index 246543c311e..a0cbb466196 100644
--- a/app/code/Magento/Adminhtml/Block/Customer.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Customer.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,18 +28,19 @@
  * Adminhtml customers list block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block;
+namespace Magento\Customer\Block\Adminhtml;
 
 class Customer extends \Magento\Adminhtml\Block\Widget\Grid\Container
 {
 
     protected function _construct()
     {
-        $this->_controller = 'customer';
+        $this->_controller = 'adminhtml';
+        $this->_blockGroup = 'Magento_Customer';
         $this->_headerText = __('Customers');
         $this->_addButtonLabel = __('Add New Customer');
         parent::_construct();
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit.php b/app/code/Magento/Customer/Block/Adminhtml/Edit.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit.php
index bbcbc7391ec..4f07cc0a83d 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Customer edit block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer;
+namespace Magento\Customer\Block\Adminhtml;
 
 class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 {
@@ -61,7 +61,8 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
     protected function _construct()
     {
         $this->_objectId = 'id';
-        $this->_controller = 'customer';
+        $this->_controller = 'adminhtml';
+        $this->_blockGroup = 'Magento_Customer';
 
         if ($this->getCustomerId() && $this->_authorization->isAllowed('Magento_Sales::create')) {
             $this->_addButton('order', array(
@@ -87,7 +88,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
         }
 
         if ($customer && $customer->getId()) {
-            $url = $this->getUrl('adminhtml/*/resetPassword', array('customer_id' => $customer->getId()));
+            $url = $this->getUrl('customer/index/resetPassword', array('customer_id' => $customer->getId()));
             $this->_addButton('reset_password', array(
                 'label' => __('Reset Password'),
                 'onclick' => 'setLocation(\'' . $url . '\')',
@@ -131,7 +132,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 
     public function getValidationUrl()
     {
-        return $this->getUrl('adminhtml/*/validate', array('_current' => true));
+        return $this->getUrl('customer/*/validate', array('_current' => true));
     }
 
     protected function _prepareLayout()
@@ -153,7 +154,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 
     protected function _getSaveAndContinueUrl()
     {
-        return $this->getUrl('adminhtml/*/save', array(
+        return $this->getUrl('customer/index/save', array(
             '_current'  => true,
             'back'      => 'edit',
             'tab'       => '{{tab_id}}'
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Form.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Form.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Form.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Form.php
index 0ba93d6db6f..0b41cfa26b4 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Form.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Form.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -27,7 +27,7 @@
 /**
  * Adminhtml customer edit form block
  */
-namespace Magento\Adminhtml\Block\Customer\Edit;
+namespace Magento\Customer\Block\Adminhtml\Edit;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
@@ -37,7 +37,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         $form = $this->_formFactory->create(array(
             'attributes' => array(
                 'id'        => 'edit_form',
-                'action'    => $this->getData('action'),
+                'action'    => $this->getUrl('customer/*/save'),
                 'method'    => 'post',
                 'enctype'   => 'multipart/form-data',
             ))
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Attribute/Group.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Attribute/Group.php
index 566fe76b6bd..33d966bacd7 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Attribute/Group.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,15 +28,15 @@
  * Renderer for customer group ID
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Renderer\Attribute;
+namespace Magento\Customer\Block\Adminhtml\Edit\Renderer\Attribute;
 
 class Group
     extends \Magento\Adminhtml\Block\Widget\Form\Renderer\Fieldset\Element
 {
-    protected $_template = 'customer/edit/tab/account/form/renderer/group.phtml';
+    protected $_template = 'edit/tab/account/form/renderer/group.phtml';
 
     /**
      * Customer address
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Newpass.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Newpass.php
index 3b5e65c4996..28f4ae9a884 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Newpass.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Customer new password field renderer
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Renderer;
+namespace Magento\Customer\Block\Adminhtml\Edit\Renderer;
 
 class Newpass
     extends \Magento\Backend\Block\AbstractBlock
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Renderer/Region.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Renderer/Region.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
index 33fc27b5d25..c95fd8e2ae3 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Renderer/Region.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -29,7 +29,7 @@
  *
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Renderer;
+namespace Magento\Customer\Block\Adminhtml\Edit\Renderer;
 
 class Region
     extends \Magento\Backend\Block\AbstractBlock
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Account.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Account.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php
index 2b1d1d9883f..fcacd7a0142 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Account.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,12 +28,12 @@
  * Customer account form block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  *
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab;
 
 /**
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
@@ -59,7 +59,7 @@ class Account extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Customer\Model\FormFactory $customerFactory
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -68,7 +68,7 @@ class Account extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Customer\Model\FormFactory $customerFactory,
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -81,7 +81,7 @@ class Account extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * Initialize form
      *
-     * @return \Magento\Adminhtml\Block\Customer\Edit\Tab\Account
+     * @return \Magento\Customer\Block\Adminhtml\Edit\Tab\Account
      */
     public function initForm()
     {
@@ -101,7 +101,7 @@ class Account extends \Magento\Backend\Block\Widget\Form\Generic
         $this->_setFieldset($attributes, $fieldset, array(self::DISABLE_ATTRIBUTE_NAME));
 
         $form->getElement('group_id')->setRenderer($this->getLayout()
-            ->createBlock('Magento\Adminhtml\Block\Customer\Edit\Renderer\Attribute\Group')
+            ->createBlock('Magento\Customer\Block\Adminhtml\Edit\Renderer\Attribute\Group')
             ->setDisableAutoGroupChangeAttribute($customerForm->getAttribute(self::DISABLE_ATTRIBUTE_NAME))
             ->setDisableAutoGroupChangeAttributeValue($customer->getData(self::DISABLE_ATTRIBUTE_NAME))
         );
@@ -166,9 +166,9 @@ class Account extends \Magento\Backend\Block\Widget\Form\Generic
     protected function _getAdditionalElementTypes()
     {
         return array(
-            'file'      => 'Magento\Adminhtml\Block\Customer\Form\Element\File',
-            'image'     => 'Magento\Adminhtml\Block\Customer\Form\Element\Image',
-            'boolean'   => 'Magento\Adminhtml\Block\Customer\Form\Element\Boolean',
+            'file'      => 'Magento\Customer\Block\Adminhtml\Form\Element\File',
+            'image'     => 'Magento\Customer\Block\Adminhtml\Form\Element\Image',
+            'boolean'   => 'Magento\Customer\Block\Adminhtml\Form\Element\Boolean',
         );
     }
 
@@ -402,7 +402,7 @@ class Account extends \Magento\Backend\Block\Widget\Form\Generic
             )
         );
         $field->setRenderer(
-            $this->getLayout()->createBlock('Magento\Adminhtml\Block\Customer\Edit\Renderer\Newpass')
+            $this->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Edit\Renderer\Newpass')
         );
     }
 
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Addresses.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Addresses.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php
index 52da8910596..00ae692a355 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Addresses.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,14 +28,14 @@
  * Customer addresses forms
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab;
 
 class Addresses extends \Magento\Backend\Block\Widget\Form\Generic
 {
-    protected $_template = 'customer/tab/addresses.phtml';
+    protected $_template = 'tab/addresses.phtml';
 
     /**
      * Adminhtml addresses
@@ -45,11 +45,11 @@ class Addresses extends \Magento\Backend\Block\Widget\Form\Generic
     protected $_adminhtmlAddresses = null;
 
     /**
-     * @param \Magento\Adminhtml\Model\Customer\Renderer\RegionFactory $regionFactory
+     * @param \Magento\Customer\Model\Renderer\RegionFactory $regionFactory
      * @param \Magento\Customer\Model\AddressFactory $addressFactory
      * @param \Magento\Customer\Model\FormFactory $customerFactory
      * @param \Magento\Core\Model\System\Store $systemStore
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
@@ -57,11 +57,11 @@ class Addresses extends \Magento\Backend\Block\Widget\Form\Generic
      * @param array $data
      */
     public function __construct(
-        \Magento\Adminhtml\Model\Customer\Renderer\RegionFactory $regionFactory,
+        \Magento\Customer\Model\Renderer\RegionFactory $regionFactory,
         \Magento\Customer\Model\AddressFactory $addressFactory,
         \Magento\Customer\Model\FormFactory $customerFactory,
         \Magento\Core\Model\System\Store $systemStore,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
@@ -128,7 +128,7 @@ class Addresses extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * Initialize form object
      *
-     * @return \Magento\Adminhtml\Block\Customer\Edit\Tab\Addresses
+     * @return \Magento\Customer\Block\Adminhtml\Edit\Tab\Addresses
      */
     public function initForm()
     {
@@ -253,9 +253,9 @@ class Addresses extends \Magento\Backend\Block\Widget\Form\Generic
     protected function _getAdditionalElementTypes()
     {
         return array(
-            'file'      => 'Magento\Adminhtml\Block\Customer\Form\Element\File',
-            'image'     => 'Magento\Adminhtml\Block\Customer\Form\Element\Image',
-            'boolean'   => 'Magento\Adminhtml\Block\Customer\Form\Element\Boolean',
+            'file'      => 'Magento\Customer\Block\Adminhtml\Form\Element\File',
+            'image'     => 'Magento\Customer\Block\Adminhtml\Form\Element\Image',
+            'boolean'   => 'Magento\Customer\Block\Adminhtml\Form\Element\Boolean',
         );
     }
 
@@ -282,7 +282,7 @@ class Addresses extends \Magento\Backend\Block\Widget\Form\Generic
      * Add specified values to name prefix element values
      *
      * @param string|int|array $values
-     * @return \Magento\Adminhtml\Block\Customer\Edit\Tab\Addresses
+     * @return \Magento\Customer\Block\Adminhtml\Edit\Tab\Addresses
      */
     public function addValuesToNamePrefixElement($values)
     {
@@ -296,7 +296,7 @@ class Addresses extends \Magento\Backend\Block\Widget\Form\Generic
      * Add specified values to name suffix element values
      *
      * @param string|int|array $values
-     * @return \Magento\Adminhtml\Block\Customer\Edit\Tab\Addresses
+     * @return \Magento\Customer\Block\Adminhtml\Edit\Tab\Addresses
      */
     public function addValuesToNameSuffixElement($values)
     {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Cart.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Cart.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php
index 75c47ece9df..6a45dccbf8d 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Cart.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customer orders grid block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab;
 
 /**
  * @SuppressWarnings(PHPMD.LongVariable)
@@ -86,7 +86,7 @@ class Cart extends \Magento\Adminhtml\Block\Widget\Grid
         parent::_construct();
         $this->setUseAjax(true);
         $this->_parentTemplate = $this->getTemplate();
-        $this->setTemplate('customer/tab/cart.phtml');
+        $this->setTemplate('tab/cart.phtml');
     }
 
     /**
@@ -136,7 +136,7 @@ class Cart extends \Magento\Adminhtml\Block\Widget\Grid
         $this->addColumn('name', array(
             'header'    => __('Product'),
             'index'     => 'name',
-            'renderer'  => 'Magento\Adminhtml\Block\Customer\Edit\Tab\View\Grid\Renderer\Item'
+            'renderer'  => 'Magento\Customer\Block\Adminhtml\Edit\Tab\View\Grid\Renderer\Item'
         ));
 
         $this->addColumn('sku', array(
@@ -169,7 +169,7 @@ class Cart extends \Magento\Adminhtml\Block\Widget\Grid
         $this->addColumn('action', array(
             'header'    => __('Action'),
             'index'     => 'quote_item_id',
-            'renderer'  => 'Magento\Adminhtml\Block\Customer\Grid\Renderer\Multiaction',
+            'renderer'  => 'Magento\Customer\Block\Adminhtml\Grid\Renderer\Multiaction',
             'filter'    => false,
             'sortable'  => false,
             'actions'   => array(
@@ -205,7 +205,7 @@ class Cart extends \Magento\Adminhtml\Block\Widget\Grid
      */
     public function getGridUrl()
     {
-        return $this->getUrl('adminhtml/*/cart', array('_current'=>true, 'website_id' => $this->getWebsiteId()));
+        return $this->getUrl('customer/*/cart', array('_current'=>true, 'website_id' => $this->getWebsiteId()));
     }
 
     /**
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Carts.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Carts.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Carts.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Carts.php
index de68dc5f202..cb7d707b769 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Carts.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Carts.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,7 +28,7 @@
  * Obtain all carts contents for specified client
  *
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab;
 
 class Carts extends \Magento\Backend\Block\Template
 {
@@ -58,7 +58,7 @@ class Carts extends \Magento\Backend\Block\Template
     /**
      * Add shopping cart grid of each website
      *
-     * @return \Magento\Adminhtml\Block\Customer\Edit\Tab\Carts
+     * @return \Magento\Customer\Block\Adminhtml\Edit\Tab\Carts
      */
     protected function _prepareLayout()
     {
@@ -66,7 +66,7 @@ class Carts extends \Magento\Backend\Block\Template
         $isShared = count($sharedWebsiteIds) > 1;
         foreach ($sharedWebsiteIds as $websiteId) {
             $blockName = 'customer_cart_' . $websiteId;
-            $block = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Customer\Edit\Tab\Cart',
+            $block = $this->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Edit\Tab\Cart',
                 $blockName, array('data' => array('website_id' => $websiteId)));
             if ($isShared) {
                 $websiteName = $this->_storeManager->getWebsite($websiteId)->getName();
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php
index 654d502d6d6..12724484f5e 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,14 +28,14 @@
  * Customer account form block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab;
 
 class Newsletter extends \Magento\Backend\Block\Widget\Form\Generic
 {
-    protected $_template = 'customer/tab/newsletter.phtml';
+    protected $_template = 'tab/newsletter.phtml';
 
     /**
      * @var \Magento\Newsletter\Model\SubscriberFactory
@@ -45,7 +45,7 @@ class Newsletter extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -53,7 +53,7 @@ class Newsletter extends \Magento\Backend\Block\Widget\Form\Generic
     public function __construct(
         \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -115,7 +115,7 @@ class Newsletter extends \Magento\Backend\Block\Widget\Form\Generic
     {
         $this->setChild('grid',
             $this->getLayout()
-                ->createBlock('Magento\Adminhtml\Block\Customer\Edit\Tab\Newsletter\Grid', 'newsletter.grid')
+                ->createBlock('Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter\Grid', 'newsletter.grid')
         );
         return parent::_prepareLayout();
     }
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid.php
index 657d4f8a46d..810b8a4c727 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml newsletter queue grid block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\Newsletter;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter;
 
 class Grid extends \Magento\Adminhtml\Block\Widget\Grid
 {
@@ -85,7 +85,7 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
 
     public function getGridUrl()
     {
-        return $this->getUrl('adminhtml/*/newsletter', array('_current' => true));
+        return $this->getUrl('customer/*/newsletter', array('_current' => true));
     }
 
     protected function _prepareCollection()
@@ -144,9 +144,9 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
          $this->addColumn('status', array(
             'header'    =>  __('Status'),
             'align'     =>  'center',
-            'filter'    =>  'Magento\Adminhtml\Block\Customer\Edit\Tab\Newsletter\Grid\Filter\Status',
+            'filter'    =>  'Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter\Grid\Filter\Status',
             'index'     => 'queue_status',
-            'renderer'  =>  'Magento\Adminhtml\Block\Customer\Edit\Tab\Newsletter\Grid\Renderer\Status'
+            'renderer'  =>  'Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter\Grid\Renderer\Status'
         ));
 
         $this->addColumn('action', array(
@@ -154,7 +154,7 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
             'align'     =>  'center',
             'filter'    =>  false,
             'sortable'  =>  false,
-            'renderer'  =>  'Magento\Adminhtml\Block\Customer\Edit\Tab\Newsletter\Grid\Renderer\Action'
+            'renderer'  =>  'Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter\Grid\Renderer\Action'
         ));
 
         return parent::_prepareColumns();
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid/Filter/Status.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid/Filter/Status.php
index 7e6ca92b18f..1595d4fc3e8 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid/Filter/Status.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml newsletter subscribers grid website filter
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\Newsletter\Grid\Filter;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter\Grid\Filter;
 
 class Status extends \Magento\Adminhtml\Block\Widget\Grid\Column\Filter\Select
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid/Renderer/Action.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid/Renderer/Action.php
index c783cb637ec..07d33b4df09 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid/Renderer/Action.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml newsletter queue grid block action item renderer
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\Newsletter\Grid\Renderer;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter\Grid\Renderer;
 
 class Action extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid/Renderer/Status.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid/Renderer/Status.php
index 4a964f393f5..0c59248c495 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid/Renderer/Status.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml newsletter queue grid block status item renderer
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\Newsletter\Grid\Renderer;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter\Grid\Renderer;
 
 class Status extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Orders.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Orders.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders.php
index fa531814ee7..e93d4db5440 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Orders.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customer orders grid block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab;
 
 class Orders extends \Magento\Adminhtml\Block\Widget\Grid
 {
@@ -167,6 +167,6 @@ class Orders extends \Magento\Adminhtml\Block\Widget\Grid
 
     public function getGridUrl()
     {
-        return $this->getUrl('adminhtml/*/orders', array('_current' => true));
+        return $this->getUrl('customer/*/orders', array('_current' => true));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Reviews.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Reviews.php
similarity index 83%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Reviews.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Reviews.php
index e2c8d11d831..4408372a057 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Reviews.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Reviews.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,17 +28,17 @@
  * Adminhtml customer orders grid block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab;
 
 class Reviews extends \Magento\Adminhtml\Block\Review\Grid
 {
     /**
      * Hide grid mass action elements
      *
-     * @return \Magento\Adminhtml\Block\Customer\Edit\Tab\Reviews
+     * @return \Magento\Customer\Block\Adminhtml\Edit\Tab\Reviews
      */
     protected function _prepareMassaction()
     {
@@ -52,6 +52,6 @@ class Reviews extends \Magento\Adminhtml\Block\Review\Grid
      */
     public function getGridUrl()
     {
-        return $this->getUrl('adminhtml/*/productReviews', array('_current' => true));
+        return $this->getUrl('customer/*/productReviews', array('_current' => true));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View.php
similarity index 84%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View.php
index ba95384527a..713dc37aa9b 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View.php
@@ -19,26 +19,28 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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\Customer\Block\Adminhtml\Edit\Tab;
+
 /**
  * Customer account form block
- *
- * @category   Magento
- * @package    Magento_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab;
-
 class View
     extends \Magento\Adminhtml\Block\Template
     implements \Magento\Adminhtml\Block\Widget\Tab\TabInterface
 {
+    /**
+     * @var \Magento\Log\Model\Customer
+     */
     protected $_customer;
 
+    /**
+     * @var \Magento\Log\Model\Customer
+     */
     protected $_customerLog;
 
     /**
@@ -46,7 +48,7 @@ class View
      *
      * @var \Magento\Core\Model\Registry
      */
-    protected $_coreRegistry = null;
+    protected $_coreRegistry;
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
@@ -64,6 +66,11 @@ class View
      */
     protected $_logFactory;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\Customer\Model\GroupFactory $groupFactory
      * @param \Magento\Log\Model\CustomerFactory $logFactory
@@ -71,6 +78,7 @@ class View
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Log\Model\Visitor $modelVisitor
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param array $data
      */
     public function __construct(
@@ -80,15 +88,20 @@ class View
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Log\Model\Visitor $modelVisitor,
+        \Magento\Stdlib\DateTime $dateTime,
         array $data = array()
     ) {
         $this->_coreRegistry = $registry;
         $this->_modelVisitor = $modelVisitor;
         $this->_groupFactory = $groupFactory;
         $this->_logFactory = $logFactory;
+        $this->dateTime = $dateTime;
         parent::__construct($coreData, $context, $data);
     }
 
+    /**
+     * @return \Magento\Log\Model\Customer
+     */
     public function getCustomer()
     {
         if (!$this->_customer) {
@@ -97,6 +110,9 @@ class View
         return $this->_customer;
     }
 
+    /**
+     * @return int
+     */
     public function getGroupName()
     {
         $groupId = $this->getCustomer()->getGroupId();
@@ -135,6 +151,9 @@ class View
         );
     }
 
+    /**
+     * @return string
+     */
     public function getStoreCreateDate()
     {
         $date = $this->_locale->storeDate(
@@ -145,6 +164,9 @@ class View
         return $this->formatDate($date, \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_MEDIUM, true);
     }
 
+    /**
+     * @return string
+     */
     public function getStoreCreateDateTimezone()
     {
         return $this->_storeConfig->getConfig(
@@ -171,6 +193,9 @@ class View
         return __('Never');
     }
 
+    /**
+     * @return string
+     */
     public function getStoreLastLoginDate()
     {
         $date = $this->getCustomerLog()->getLoginAtTimestamp();
@@ -185,6 +210,9 @@ class View
         return __('Never');
     }
 
+    /**
+     * @return string
+     */
     public function getStoreLastLoginDateTimezone()
     {
         return $this->_storeConfig->getConfig(
@@ -193,16 +221,24 @@ class View
         );
     }
 
+    /**
+     * @return string
+     */
     public function getCurrentStatus()
     {
         $log = $this->getCustomerLog();
         $interval = $this->_modelVisitor->getOnlineMinutesInterval();
-        if ($log->getLogoutAt() || (strtotime(now()) - strtotime($log->getLastVisitAt()) > $interval * 60)) {
+        if ($log->getLogoutAt()
+            || (strtotime($this->dateTime->now()) - strtotime($log->getLastVisitAt()) > $interval * 60)
+        ) {
             return __('Offline');
         }
         return __('Online');
     }
 
+    /**
+     * @return string
+     */
     public function getIsConfirmedStatus()
     {
         $this->getCustomer();
@@ -215,11 +251,17 @@ class View
         return __('Not confirmed, can login');
     }
 
+    /**
+     * @return null|string
+     */
     public function getCreatedInStore()
     {
         return $this->_storeManager->getStore($this->getCustomer()->getStoreId())->getName();
     }
 
+    /**
+     * @return int
+     */
     public function getStoreId()
     {
         return $this->getCustomer()->getStoreId();
@@ -227,32 +269,48 @@ class View
 
     public function getBillingAddressHtml()
     {
-        if ($address = $this->getCustomer()->getPrimaryBillingAddress()) {
+        $address = $this->getCustomer()->getPrimaryBillingAddress();
+        if ($address) {
             return $address->format('html');
         }
         return __('The customer does not have default billing address.');
     }
 
+    /**
+     * @return string
+     */
     public function getAccordionHtml()
     {
         return $this->getChildHtml('accordion');
     }
 
+    /**
+     * @return string
+     */
     public function getSalesHtml()
     {
         return $this->getChildHtml('sales');
     }
 
+    /**
+     * @return string
+     */
     public function getTabLabel()
     {
         return __('Customer View');
     }
 
+    /**
+     * @return string
+     */
     public function getTabTitle()
     {
         return __('Customer View');
     }
 
+    /**
+     * @return bool
+     */
     public function canShowTab()
     {
         if ($this->_coreRegistry->registry('current_customer')->getId()) {
@@ -261,6 +319,9 @@ class View
         return false;
     }
 
+    /**
+     * @return bool
+     */
     public function isHidden()
     {
         if ($this->_coreRegistry->registry('current_customer')->getId()) {
@@ -268,4 +329,4 @@ class View
         }
         return true;
     }
-}
+}
\ No newline at end of file
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Accordion.php
similarity index 90%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Accordion.php
index 8017c6dda98..cf6dc2ce021 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Accordion.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customer recent orders grid block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\View;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\View;
 
 class Accordion extends \Magento\Adminhtml\Block\Widget\Accordion
 {
@@ -83,7 +83,7 @@ class Accordion extends \Magento\Adminhtml\Block\Widget\Accordion
         $this->addItem('lastOrders', array(
             'title'       => __('Recent Orders'),
             'ajax'        => true,
-            'content_url' => $this->getUrl('adminhtml/*/lastOrders', array('_current' => true)),
+            'content_url' => $this->getUrl('customer/*/lastOrders', array('_current' => true)),
         ));
 
         // add shopping cart block of each website
@@ -106,7 +106,7 @@ class Accordion extends \Magento\Adminhtml\Block\Widget\Accordion
             $this->addItem('shopingCart' . $websiteId, array(
                 'title'   => $title,
                 'ajax'    => true,
-                'content_url' => $this->getUrl('adminhtml/*/viewCart', array('_current' => true, 'website_id' => $websiteId)),
+                'content_url' => $this->getUrl('customer/*/viewCart', array('_current' => true, 'website_id' => $websiteId)),
             ));
         }
 
@@ -119,7 +119,7 @@ class Accordion extends \Magento\Adminhtml\Block\Widget\Accordion
         $this->addItem('wishlist', array(
             'title' => __('Wishlist - %1 item(s)', $wishlistCount),
             'ajax'  => true,
-            'content_url' => $this->getUrl('adminhtml/*/viewWishlist', array('_current' => true)),
+            'content_url' => $this->getUrl('customer/*/viewWishlist', array('_current' => true)),
         ));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Cart.php
similarity index 97%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Cart.php
index 1cc671b6a28..e785014f58d 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Cart.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customer cart items grid block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\View;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\View;
 
 /**
  * @SuppressWarnings(PHPMD.LongVariable)
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/Item.php
similarity index 97%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/Item.php
index e6534cb099c..518579ba1d3 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/Item.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customers wishlist grid item renderer for name/options cell
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\View\Grid\Renderer;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\View\Grid\Renderer;
 
 class Item
     extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Orders.php
similarity index 97%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Orders.php
index a48e4e0793e..316a4266648 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Orders.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customer recent orders grid block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\View;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\View;
 
 class Orders extends \Magento\Adminhtml\Block\Widget\Grid
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Sales.php
similarity index 97%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Sales.php
index d7910489841..ede7c61b4cd 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Sales.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customer view wishlist block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\View;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\View;
 
 class Sales extends \Magento\Backend\Block\Template
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Wishlist.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Wishlist.php
index ab0edd74ef9..194d03ab15e 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Wishlist.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customer view wishlist block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\View;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\View;
 
 class Wishlist extends \Magento\Adminhtml\Block\Widget\Grid
 {
@@ -88,7 +88,7 @@ class Wishlist extends \Magento\Adminhtml\Block\Widget\Grid
     /**
      * Prepare collection
      *
-     * @return \Magento\Adminhtml\Block\Customer\Edit\Tab\View\Wishlist
+     * @return \Magento\Customer\Block\Adminhtml\Edit\Tab\View\Wishlist
      */
     protected function _prepareCollection()
     {
@@ -106,7 +106,7 @@ class Wishlist extends \Magento\Adminhtml\Block\Widget\Grid
     /**
      * Prepare columns
      *
-     * @return \Magento\Adminhtml\Block\Customer\Edit\Tab\View\Wishlist
+     * @return \Magento\Customer\Block\Adminhtml\Edit\Tab\View\Wishlist
      */
     protected function _prepareColumns()
     {
@@ -120,7 +120,7 @@ class Wishlist extends \Magento\Adminhtml\Block\Widget\Grid
         $this->addColumn('product_name', array(
             'header'    => __('Product'),
             'index'     => 'product_name',
-            'renderer'  => 'Magento\Adminhtml\Block\Customer\Edit\Tab\View\Grid\Renderer\Item'
+            'renderer'  => 'Magento\Customer\Block\Adminhtml\Edit\Tab\View\Grid\Renderer\Item'
         ));
 
         if (!$this->_storeManager->isSingleStoreMode()) {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Wishlist/Grid/Renderer/Description.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Wishlist/Grid/Renderer/Description.php
index 559d75ae542..c80dc646ccd 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Wishlist/Grid/Renderer/Description.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customers wishlist grid item renderer for item visibility
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\Wishlist\Grid\Renderer;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\Wishlist\Grid\Renderer;
 
 class Description extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tabs.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tabs.php
similarity index 85%
rename from app/code/Magento/Adminhtml/Block/Customer/Edit/Tabs.php
rename to app/code/Magento/Customer/Block/Adminhtml/Edit/Tabs.php
index bdf731ee312..b59cacd8419 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Edit/Tabs.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tabs.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -27,7 +27,7 @@
 /**
  * Admin customer left menu
  */
-namespace Magento\Adminhtml\Block\Customer\Edit;
+namespace Magento\Customer\Block\Adminhtml\Edit;
 
 class Tabs extends \Magento\Backend\Block\Widget\Tabs
 {
@@ -71,14 +71,14 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs
         $this->addTab('account', array(
             'label'     => __('Account Information'),
             'content'   => $this->getLayout()
-                ->createBlock('Magento\Adminhtml\Block\Customer\Edit\Tab\Account')->initForm()->toHtml(),
+                ->createBlock('Magento\Customer\Block\Adminhtml\Edit\Tab\Account')->initForm()->toHtml(),
             'active'    => $this->_coreRegistry->registry('current_customer')->getId() ? false : true
         ));
 
         $this->addTab('addresses', array(
             'label'     => __('Addresses'),
             'content'   => $this->getLayout()
-                ->createBlock('Magento\Adminhtml\Block\Customer\Edit\Tab\Addresses')->initForm()->toHtml(),
+                ->createBlock('Magento\Customer\Block\Adminhtml\Edit\Tab\Addresses')->initForm()->toHtml(),
         ));
 
 
@@ -90,27 +90,27 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs
                 $this->addTab('orders', array(
                     'label'     => __('Orders'),
                     'class'     => 'ajax',
-                    'url'       => $this->getUrl('adminhtml/*/orders', array('_current' => true)),
+                    'url'       => $this->getUrl('customer/*/orders', array('_current' => true)),
                  ));
             }
 
             $this->addTab('cart', array(
                 'label'     => __('Shopping Cart'),
                 'class'     => 'ajax',
-                'url'       => $this->getUrl('adminhtml/*/carts', array('_current' => true)),
+                'url'       => $this->getUrl('customer/*/carts', array('_current' => true)),
             ));
 
             $this->addTab('wishlist', array(
                 'label'     => __('Wishlist'),
                 'class'     => 'ajax',
-                'url'       => $this->getUrl('adminhtml/*/wishlist', array('_current' => true)),
+                'url'       => $this->getUrl('customer/*/wishlist', array('_current' => true)),
             ));
 
             if ($this->_authorization->isAllowed('Magento_Newsletter::subscriber')) {
                 $this->addTab('newsletter', array(
                     'label'     => __('Newsletter'),
                     'content'   => $this->getLayout()
-                        ->createBlock('Magento\Adminhtml\Block\Customer\Edit\Tab\Newsletter')->initForm()->toHtml()
+                        ->createBlock('Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter')->initForm()->toHtml()
                 ));
             }
 
@@ -118,7 +118,7 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs
                 $this->addTab('reviews', array(
                     'label'     => __('Product Reviews'),
                     'class'     => 'ajax',
-                    'url'       => $this->getUrl('adminhtml/*/productReviews', array('_current' => true)),
+                    'url'       => $this->getUrl('customer/*/productReviews', array('_current' => true)),
                 ));
             }
         }
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Form/Element/Boolean.php b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/Customer/Form/Element/Boolean.php
rename to app/code/Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php
index 65c08f8b683..db1ad2106f4 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Form/Element/Boolean.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Boolean.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -29,10 +29,10 @@
  * Customer Widget Form Boolean Element Block
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Form\Element;
+namespace Magento\Customer\Block\Adminhtml\Form\Element;
 
 class Boolean extends \Magento\Data\Form\Element\Select
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Form/Element/File.php b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Block/Customer/Form/Element/File.php
rename to app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php
index 375b441e449..d2fed16e56d 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Form/Element/File.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -29,10 +29,10 @@
  * Customer Widget Form File Element Block
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Form\Element;
+namespace Magento\Customer\Block\Adminhtml\Form\Element;
 
 class File extends \Magento\Data\Form\Element\AbstractElement
 {
@@ -49,15 +49,15 @@ class File extends \Magento\Data\Form\Element\AbstractElement
     protected $_adminhtmlData = null;
 
     /**
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Helper\Data $adminhtmlData
      * @param \Magento\Core\Model\View\Url $viewUrl
      * @param array $attributes
      */
     public  function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\Backend\Helper\Data $adminhtmlData,
@@ -66,7 +66,7 @@ class File extends \Magento\Data\Form\Element\AbstractElement
     ) {
         $this->_adminhtmlData = $adminhtmlData;
         $this->_viewUrl = $viewUrl;
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('file');
     }
 
@@ -193,8 +193,8 @@ class File extends \Magento\Data\Form\Element\AbstractElement
      */
     protected function _getPreviewUrl()
     {
-        return $this->_adminhtmlData->getUrl('adminhtml/customer/viewfile', array(
-            'file' => $this->_coreData->urlEncode($this->getValue()),
+        return $this->_adminhtmlData->getUrl('customer/index/viewfile', array(
+            'file' => $this->_escaper->urlEncode($this->getValue()),
         ));
     }
 
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Form/Element/Image.php b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Image.php
similarity index 88%
rename from app/code/Magento/Adminhtml/Block/Customer/Form/Element/Image.php
rename to app/code/Magento/Customer/Block/Adminhtml/Form/Element/Image.php
index a0287245b7b..1104a228a65 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Form/Element/Image.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/Image.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -29,12 +29,12 @@
  * Customer Widget Form Image File Element Block
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Form\Element;
+namespace Magento\Customer\Block\Adminhtml\Form\Element;
 
-class Image extends \Magento\Adminhtml\Block\Customer\Form\Element\File
+class Image extends \Magento\Customer\Block\Adminhtml\Form\Element\File
 {
     /**
      * Return Delete CheckBox Label
@@ -99,8 +99,8 @@ class Image extends \Magento\Adminhtml\Block\Customer\Form\Element\File
         if (is_array($this->getValue())) {
             return false;
         }
-        return $this->_adminhtmlData->getUrl('adminhtml/customer/viewfile', array(
-            'image'      => $this->_coreData->urlEncode($this->getValue()),
+        return $this->_adminhtmlData->getUrl('customer/index/viewfile', array(
+            'image'      => $this->_escaper->urlEncode($this->getValue()),
         ));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Grid.php b/app/code/Magento/Customer/Block/Adminhtml/Grid.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Customer/Grid.php
rename to app/code/Magento/Customer/Block/Adminhtml/Grid.php
index 23ca6f10cfb..8a747d6eaf4 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Grid.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Grid.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customer grid block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer;
+namespace Magento\Customer\Block\Adminhtml;
 
 class Grid extends \Magento\Adminhtml\Block\Widget\Grid
 {
@@ -217,18 +217,18 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
 
         $this->getMassactionBlock()->addItem('delete', array(
              'label'    => __('Delete'),
-             'url'      => $this->getUrl('adminhtml/*/massDelete'),
+             'url'      => $this->getUrl('customer/*/massDelete'),
              'confirm'  => __('Are you sure?')
         ));
 
         $this->getMassactionBlock()->addItem('newsletter_subscribe', array(
              'label'    => __('Subscribe to Newsletter'),
-             'url'      => $this->getUrl('adminhtml/*/massSubscribe')
+             'url'      => $this->getUrl('customer/*/massSubscribe')
         ));
 
         $this->getMassactionBlock()->addItem('newsletter_unsubscribe', array(
              'label'    => __('Unsubscribe from Newsletter'),
-             'url'      => $this->getUrl('adminhtml/*/massUnsubscribe')
+             'url'      => $this->getUrl('customer/*/massUnsubscribe')
         ));
 
         $groups = $this->helper('Magento\Customer\Helper\Data')->getGroups()->toOptionArray();
@@ -236,7 +236,7 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
         array_unshift($groups, array('label'=> '', 'value'=> ''));
         $this->getMassactionBlock()->addItem('assign_group', array(
              'label'        => __('Assign a Customer Group'),
-             'url'          => $this->getUrl('adminhtml/*/massAssignGroup'),
+             'url'          => $this->getUrl('customer/*/massAssignGroup'),
              'additional'   => array(
                 'visibility'    => array(
                      'name'     => 'group',
@@ -253,11 +253,11 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
 
     public function getGridUrl()
     {
-        return $this->getUrl('adminhtml/*/grid', array('_current'=> true));
+        return $this->getUrl('customer/*/grid', array('_current'=> true));
     }
 
     public function getRowUrl($row)
     {
-        return $this->getUrl('adminhtml/*/edit', array('id'=>$row->getId()));
+        return $this->getUrl('customer/*/edit', array('id'=>$row->getId()));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Grid/Filter/Country.php b/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Customer/Grid/Filter/Country.php
rename to app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php
index 984cf311800..a42bd8e7d62 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Grid/Filter/Country.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Country customer grid column filter
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Grid\Filter;
+namespace Magento\Customer\Block\Adminhtml\Grid\Filter;
 
 class Country
     extends \Magento\Adminhtml\Block\Widget\Grid\Column\Filter\Select
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php b/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php
rename to app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
index 002fc5b855c..57c4c46fd90 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customers wishlist grid item action renderer for few action controls in one cell
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Grid\Renderer;
+namespace Magento\Customer\Block\Adminhtml\Grid\Renderer;
 
 class Multiaction
     extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Action
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Group.php b/app/code/Magento/Customer/Block/Adminhtml/Group.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Block/Customer/Group.php
rename to app/code/Magento/Customer/Block/Adminhtml/Group.php
index 0736cc7f87d..a56c5b90b82 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Group.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Group.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customers group page content block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer;
+namespace Magento\Customer\Block\Adminhtml;
 
 class Group extends \Magento\Adminhtml\Block\Widget\Grid\Container
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Group/Edit.php b/app/code/Magento/Customer/Block/Adminhtml/Group/Edit.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Block/Customer/Group/Edit.php
rename to app/code/Magento/Customer/Block/Adminhtml/Group/Edit.php
index aa4eaf4a34c..563b3f50394 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Group/Edit.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Group/Edit.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -27,7 +27,7 @@
 /**
  * Customer group edit block
  */
-namespace Magento\Adminhtml\Block\Customer\Group;
+namespace Magento\Customer\Block\Adminhtml\Group;
 
 class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 {
@@ -59,7 +59,8 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
         parent::_construct();
 
         $this->_objectId = 'id';
-        $this->_controller = 'customer_group';
+        $this->_controller = 'adminhtml_group';
+        $this->_blockGroup = 'Magento_Customer';
 
         $this->_updateButton('save', 'label', __('Save Customer Group'));
         $this->_updateButton('delete', 'label', __('Delete Customer Group'));
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Group/Edit/Form.php b/app/code/Magento/Customer/Block/Adminhtml/Group/Edit/Form.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Block/Customer/Group/Edit/Form.php
rename to app/code/Magento/Customer/Block/Adminhtml/Group/Edit/Form.php
index fa5d750aca0..3d88b7277de 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Group/Edit/Form.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Group/Edit/Form.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customer groups edit form
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Group\Edit;
+namespace Magento\Customer\Block\Adminhtml\Group\Edit;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
@@ -49,7 +49,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Backend\Model\Session $backendSession
      * @param \Magento\Tax\Model\TaxClass\Source\Customer $taxCustomer
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -58,7 +58,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Backend\Model\Session $backendSession,
         \Magento\Tax\Model\TaxClass\Source\Customer $taxCustomer,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -130,7 +130,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
 
         $form->setUseContainer(true);
         $form->setId('edit_form');
-        $form->setAction($this->getUrl('adminhtml/*/save'));
+        $form->setAction($this->getUrl('customer/*/save'));
         $this->setForm($form);
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Online.php b/app/code/Magento/Customer/Block/Adminhtml/Online.php
similarity index 85%
rename from app/code/Magento/Adminhtml/Block/Customer/Online.php
rename to app/code/Magento/Customer/Block/Adminhtml/Online.php
index d20d9649859..14387d81d18 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Online.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Online.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,15 +28,15 @@
  * Adminhtml online customers page content block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer;
+namespace Magento\Customer\Block\Adminhtml;
 
 class Online extends \Magento\Adminhtml\Block\Template
 {
 
-    protected $_template = 'customer/online.phtml';
+    protected $_template = 'online.phtml';
 
     public function _beforeToHtml()
     {
@@ -45,7 +45,7 @@ class Online extends \Magento\Adminhtml\Block\Template
 
     protected function _prepareLayout()
     {
-        $this->addChild('filterForm', 'Magento\Adminhtml\Block\Customer\Online\Filter');
+        $this->addChild('filterForm', 'Magento\Customer\Block\Adminhtml\Online\Filter');
         return parent::_prepareLayout();
     }
 
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Online/Filter.php b/app/code/Magento/Customer/Block/Adminhtml/Online/Filter.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/Customer/Online/Filter.php
rename to app/code/Magento/Customer/Block/Adminhtml/Online/Filter.php
index bcbc1df163e..d140899710b 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Online/Filter.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Online/Filter.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,11 +28,11 @@
  * Adminhtml customers online filter
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\Customer\Online;
+namespace Magento\Customer\Block\Adminhtml\Online;
 
 class Filter extends \Magento\Backend\Block\Widget\Form\Generic
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php b/app/code/Magento/Customer/Block/Adminhtml/Online/Grid/Renderer/Ip.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php
rename to app/code/Magento/Customer/Block/Adminhtml/Online/Grid/Renderer/Ip.php
index 8d145363add..f836a2c3861 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Online/Grid/Renderer/Ip.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customers online grid block item renderer by ip.
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Online\Grid\Renderer;
+namespace Magento\Customer\Block\Adminhtml\Online\Grid\Renderer;
 
 class Ip extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php b/app/code/Magento/Customer/Block/Adminhtml/Online/Grid/Renderer/Type.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php
rename to app/code/Magento/Customer/Block/Adminhtml/Online/Grid/Renderer/Type.php
index 0000f469e1d..3c735d69368 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Online/Grid/Renderer/Type.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml customers online grid renderer for customer type.
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Online\Grid\Renderer;
+namespace Magento\Customer\Block\Adminhtml\Online\Grid\Renderer;
 
 class Type extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php b/app/code/Magento/Customer/Block/Adminhtml/Online/Grid/Renderer/Url.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php
rename to app/code/Magento/Customer/Block/Adminhtml/Online/Grid/Renderer/Url.php
index e9082c4ab6d..45616587846 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Online/Grid/Renderer/Url.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -29,10 +29,10 @@
  * Adminhtml Online Customer last URL renderer
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Online\Grid\Renderer;
+namespace Magento\Customer\Block\Adminhtml\Online\Grid\Renderer;
 
 class Url extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
 {
diff --git a/app/code/Magento/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php b/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php
rename to app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php
index 9bea9ff6bca..ebe4612fb86 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * VAT ID element renderer
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\Sales\Order\Address\Form\Renderer;
+namespace Magento\Customer\Block\Adminhtml\Sales\Order\Address\Form\Renderer;
 
 class Vat
     extends \Magento\Adminhtml\Block\Widget\Form\Renderer\Fieldset\Element
@@ -43,7 +43,7 @@ class Vat
      */
     protected $_validateButton = null;
 
-    protected $_template = 'customer/sales/order/create/address/form/renderer/vat.phtml';
+    protected $_template = 'sales/order/create/address/form/renderer/vat.phtml';
 
     /**
      * Retrieve validate button block
@@ -59,7 +59,7 @@ class Vat
             $vatElementId = $this->_element->getHtmlId();
 
             $countryElementId = $form->getElement('country_id')->getHtmlId();
-            $validateUrl = $this->_urlBuilder->getUrl('adminhtml/customer_system_config_validatevat/validateAdvanced');
+            $validateUrl = $this->_urlBuilder->getUrl('customer/system_config_validatevat/validateAdvanced');
 
             $groupMessage = __('The customer is currently assigned to Customer Group %s.')
                 . ' ' . __('Would you like to change the Customer Group for this order?');
diff --git a/app/code/Magento/Adminhtml/Block/Customer/System/Config/Validatevat.php b/app/code/Magento/Customer/Block/Adminhtml/System/Config/Validatevat.php
similarity index 87%
rename from app/code/Magento/Adminhtml/Block/Customer/System/Config/Validatevat.php
rename to app/code/Magento/Customer/Block/Adminhtml/System/Config/Validatevat.php
index e924e1a4ac2..3b745432970 100644
--- a/app/code/Magento/Adminhtml/Block/Customer/System/Config/Validatevat.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/System/Config/Validatevat.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Adminhtml VAT ID validation block
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Customer\System\Config;
+namespace Magento\Customer\Block\Adminhtml\System\Config;
 
 class Validatevat extends \Magento\Backend\Block\System\Config\Form\Field
 {
@@ -60,7 +60,7 @@ class Validatevat extends \Magento\Backend\Block\System\Config\Form\Field
      * Set Merchant Country Field Name
      *
      * @param string $countryField
-     * @return \Magento\Adminhtml\Block\Customer\System\Config\Validatevat
+     * @return \Magento\Customer\Block\Adminhtml\System\Config\Validatevat
      */
     public function setMerchantCountryField($countryField)
     {
@@ -82,7 +82,7 @@ class Validatevat extends \Magento\Backend\Block\System\Config\Form\Field
      * Set Merchant VAT Number Field
      *
      * @param string $vatNumberField
-     * @return \Magento\Adminhtml\Block\Customer\System\Config\Validatevat
+     * @return \Magento\Customer\Block\Adminhtml\System\Config\Validatevat
      */
     public function setMerchantVatNumberField($vatNumberField)
     {
@@ -104,7 +104,7 @@ class Validatevat extends \Magento\Backend\Block\System\Config\Form\Field
      * Set Validate VAT Button Label
      *
      * @param string $vatButtonLabel
-     * @return \Magento\Adminhtml\Block\Customer\System\Config\Validatevat
+     * @return \Magento\Customer\Block\Adminhtml\System\Config\Validatevat
      */
     public function setVatButtonLabel($vatButtonLabel)
     {
@@ -115,13 +115,13 @@ class Validatevat extends \Magento\Backend\Block\System\Config\Form\Field
     /**
      * Set template to itself
      *
-     * @return \Magento\Adminhtml\Block\Customer\System\Config\Validatevat
+     * @return \Magento\Customer\Block\Adminhtml\System\Config\Validatevat
      */
     protected function _prepareLayout()
     {
         parent::_prepareLayout();
         if (!$this->getTemplate()) {
-            $this->setTemplate('customer/system/config/validatevat.phtml');
+            $this->setTemplate('system/config/validatevat.phtml');
         }
         return $this;
     }
@@ -151,7 +151,7 @@ class Validatevat extends \Magento\Backend\Block\System\Config\Form\Field
         $this->addData(array(
             'button_label' => __($buttonLabel),
             'html_id' => $element->getHtmlId(),
-            'ajax_url' => $this->_urlBuilder->getUrl('adminhtml/customer_system_config_validatevat/validate')
+            'ajax_url' => $this->_urlBuilder->getUrl('customer/system_config_validatevat/validate')
         ));
 
         return $this->_toHtml();
diff --git a/app/code/Magento/Customer/Controller/Account.php b/app/code/Magento/Customer/Controller/Account.php
index 703d1481dd3..56ac5c3f4bb 100644
--- a/app/code/Magento/Customer/Controller/Account.php
+++ b/app/code/Magento/Customer/Controller/Account.php
@@ -24,11 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Customer\Controller;
+
 /**
  * Customer account controller
  */
-namespace Magento\Customer\Controller;
-
 class Account extends \Magento\Core\Controller\Front\Action
 {
     /**
@@ -63,7 +63,7 @@ class Account extends \Magento\Core\Controller\Front\Action
      *
      * @var \Magento\Core\Model\Registry
      */
-    protected $_coreRegistry = null;
+    protected $_coreRegistry;
 
     /**
      * @var \Magento\Customer\Model\Session
@@ -95,6 +95,13 @@ class Account extends \Magento\Core\Controller\Front\Action
      */
     protected $_addressFactory;
 
+    /**
+     * Magento string lib
+     *
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
     /**
      * @param \Magento\Core\Controller\Varien\Action\Context $context
      * @param \Magento\Core\Model\Registry $coreRegistry
@@ -104,6 +111,7 @@ class Account extends \Magento\Core\Controller\Front\Action
      * @param \Magento\Customer\Model\CustomerFactory $customerFactory
      * @param \Magento\Customer\Model\FormFactory $formFactory
      * @param \Magento\Customer\Model\AddressFactory $addressFactory
+     * @param \Magento\Stdlib\String $string
      */
     public function __construct(
         \Magento\Core\Controller\Varien\Action\Context $context,
@@ -113,7 +121,8 @@ class Account extends \Magento\Core\Controller\Front\Action
         \Magento\Core\Model\UrlFactory $urlFactory,
         \Magento\Customer\Model\CustomerFactory $customerFactory,
         \Magento\Customer\Model\FormFactory $formFactory,
-        \Magento\Customer\Model\AddressFactory $addressFactory
+        \Magento\Customer\Model\AddressFactory $addressFactory,
+        \Magento\Stdlib\String $string
     ) {
         $this->_coreRegistry = $coreRegistry;
         $this->_customerSession = $customerSession;
@@ -122,6 +131,7 @@ class Account extends \Magento\Core\Controller\Front\Action
         $this->_customerFactory = $customerFactory;
         $this->_formFactory = $formFactory;
         $this->_addressFactory = $addressFactory;
+        $this->string = $string;
         parent::__construct($context);
     }
 
@@ -252,7 +262,7 @@ class Account extends \Magento\Core\Controller\Front\Action
                     $session->addError($message);
                     $session->setUsername($login['username']);
                 } catch (\Exception $e) {
-                    // $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e); // PA DSS violation: this exception log can disclose customer password
+                    // $this->_objectManager->get('Magento\Logger')->logException($e); // PA DSS violation: this exception log can disclose customer password
                 }
             } else {
                 $session->addError(__('Login and password are required.'));
@@ -695,7 +705,7 @@ class Account extends \Magento\Core\Controller\Front\Action
                     return;
                 }
             }
-            $email = $this->_objectManager->get('Magento\Customer\Helper\Data')->escapeHtml($email);
+            $email = $this->_objectManager->get('Magento\Escaper')->escapeHtml($email);
             $this->_getSession()->addSuccess(
                 __('If there is an account associated with %1 you will receive an email with a link to reset your password.', $email)
             );
@@ -902,7 +912,7 @@ class Account extends \Magento\Core\Controller\Front\Action
                 $confPass   = $this->getRequest()->getPost('confirmation');
 
                 $oldPass = $this->_getSession()->getCustomer()->getPasswordHash();
-                if ($this->_objectManager->get('Magento\Core\Helper\String')->strpos($oldPass, ':')) {
+                if ($this->string->strpos($oldPass, ':')) {
                     list(, $salt) = explode(':', $oldPass);
                 } else {
                     $salt = false;
diff --git a/app/code/Magento/Adminhtml/Controller/Customer/Cart/Product/Composite/Cart.php b/app/code/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/Cart.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Controller/Customer/Cart/Product/Composite/Cart.php
rename to app/code/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/Cart.php
index 3bae3f19558..17b77204ed4 100644
--- a/app/code/Magento/Adminhtml/Controller/Customer/Cart/Product/Composite/Cart.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/Cart.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Catalog composite product configuration controller
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\Customer\Cart\Product\Composite;
+namespace Magento\Customer\Controller\Adminhtml\Cart\Product\Composite;
 
 class Cart extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -59,7 +59,7 @@ class Cart extends \Magento\Backend\Controller\Adminhtml\Action
     /**
      * Loads customer, quote and quote item by request params
      *
-     * @return \Magento\Adminhtml\Controller\Customer\Cart\Product\Composite\Cart
+     * @return \Magento\Customer\Controller\Adminhtml\Cart\Product\Composite\Cart
      */
     protected function _initData()
     {
@@ -89,7 +89,7 @@ class Cart extends \Magento\Backend\Controller\Adminhtml\Action
     /**
      * Ajax handler to response configuration fieldset of composite product in customer's cart
      *
-     * @return \Magento\Adminhtml\Controller\Customer\Cart\Product\Composite\Cart
+     * @return \Magento\Customer\Controller\Adminhtml\Cart\Product\Composite\Cart
      */
     public function configureAction()
     {
@@ -123,7 +123,7 @@ class Cart extends \Magento\Backend\Controller\Adminhtml\Action
     /**
      * IFrame handler for submitted configuration for quote item
      *
-     * @return \Magento\Adminhtml\Controller\Customer\Cart\Product\Composite\Cart
+     * @return \Magento\Customer\Controller\Adminhtml\Cart\Product\Composite\Cart
      */
     public function updateAction()
     {
@@ -144,7 +144,7 @@ class Cart extends \Magento\Backend\Controller\Adminhtml\Action
 
         $updateResult->setJsVarName($this->getRequest()->getParam('as_js_varname'));
         $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setCompositeProductResult($updateResult);
-        $this->_redirect('adminhtml/product/showUpdateResult');
+        $this->_redirect('catalog/product/showUpdateResult');
 
         return $this;
     }
diff --git a/app/code/Magento/Adminhtml/Controller/Customer/Group.php b/app/code/Magento/Customer/Controller/Adminhtml/Group.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Controller/Customer/Group.php
rename to app/code/Magento/Customer/Controller/Adminhtml/Group.php
index 0f42f85803d..029e27d87ae 100644
--- a/app/code/Magento/Adminhtml/Controller/Customer/Group.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Group.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Customer groups controller
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\Customer;
+namespace Magento\Customer\Controller\Adminhtml;
 
 class Group extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -89,7 +89,7 @@ class Group extends \Magento\Backend\Controller\Adminhtml\Action
         $this->loadLayout();
         $this->_setActiveMenu('Magento_Customer::customer_group');
         $this->_addBreadcrumb(__('Customers'), __('Customers'));
-        $this->_addBreadcrumb(__('Customer Groups'), __('Customer Groups'), $this->getUrl('adminhtml/customer_group'));
+        $this->_addBreadcrumb(__('Customer Groups'), __('Customer Groups'), $this->getUrl('customer/group'));
 
         $currentGroup = $this->_coreRegistry->registry('current_group');
 
@@ -101,7 +101,7 @@ class Group extends \Magento\Backend\Controller\Adminhtml\Action
 
         $this->_title($currentGroup->getId() ? $currentGroup->getCode() : __('New Customer Group'));
 
-        $this->getLayout()->addBlock('Magento\Adminhtml\Block\Customer\Group\Edit', 'group', 'content')
+        $this->getLayout()->addBlock('Magento\Customer\Block\Adminhtml\Group\Edit', 'group', 'content')
             ->setEditMode((bool)$this->_coreRegistry->registry('current_group')->getId());
 
         $this->renderLayout();
@@ -138,12 +138,12 @@ class Group extends \Magento\Backend\Controller\Adminhtml\Action
 
                 $customerGroup->setTaxClassId($taxClass)->save();
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addSuccess(__('The customer group has been saved.'));
-                $this->getResponse()->setRedirect($this->getUrl('adminhtml/customer_group'));
+                $this->getResponse()->setRedirect($this->getUrl('customer/group'));
                 return;
             } catch (\Exception $e) {
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError($e->getMessage());
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setCustomerGroupData($customerGroup->getData());
-                $this->getResponse()->setRedirect($this->getUrl('adminhtml/customer_group/edit', array('id' => $id)));
+                $this->getResponse()->setRedirect($this->getUrl('customer/group/edit', array('id' => $id)));
                 return;
             }
         } else {
@@ -161,22 +161,22 @@ class Group extends \Magento\Backend\Controller\Adminhtml\Action
             $customerGroup = $this->_objectManager->create('Magento\Customer\Model\Group')->load($id);
             if (!$customerGroup->getId()) {
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(__('The customer group no longer exists.'));
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('customer/*/');
                 return;
             }
             try {
                 $customerGroup->delete();
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addSuccess(__('The customer group has been deleted.'));
-                $this->getResponse()->setRedirect($this->getUrl('adminhtml/customer_group'));
+                $this->getResponse()->setRedirect($this->getUrl('customer/group'));
                 return;
             } catch (\Exception $e) {
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError($e->getMessage());
-                $this->getResponse()->setRedirect($this->getUrl('adminhtml/customer_group/edit', array('id' => $id)));
+                $this->getResponse()->setRedirect($this->getUrl('customer/group/edit', array('id' => $id)));
                 return;
             }
         }
 
-        $this->_redirect('adminhtml/customer_group');
+        $this->_redirect('customer/group');
     }
 
     protected function _isAllowed()
diff --git a/app/code/Magento/Adminhtml/Controller/Customer.php b/app/code/Magento/Customer/Controller/Adminhtml/Index.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Controller/Customer.php
rename to app/code/Magento/Customer/Controller/Adminhtml/Index.php
index e02d5b1dd5a..7b478c7ca27 100644
--- a/app/code/Magento/Adminhtml/Controller/Customer.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Index.php
@@ -23,9 +23,9 @@
  * @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\Adminhtml\Controller;
+namespace Magento\Customer\Controller\Adminhtml;
 
-class Customer extends \Magento\Backend\Controller\Adminhtml\Action
+class Index extends \Magento\Backend\Controller\Adminhtml\Action
 {
     /**
      * @var \Magento\Validator
@@ -55,7 +55,7 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
      * Customer initialization
      *
      * @param string $idFieldName
-     * @return \Magento\Adminhtml\Controller\Customer
+     * @return \Magento\Customer\Controller\Adminhtml\Index
      */
     protected function _initCustomer($idFieldName = 'id')
     {
@@ -94,7 +94,7 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
          * Append customers block to content
          */
         $this->_addContent(
-            $this->getLayout()->createBlock('Magento\Adminhtml\Block\Customer', 'customer')
+            $this->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Customer', 'customer')
         );
 
         /**
@@ -212,7 +212,7 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_getSession()->addError($exception->getMessage());
             }
         }
-        $this->_redirect('adminhtml/customer');
+        $this->_redirect('customer/index');
     }
 
     /**
@@ -285,12 +285,12 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
 
         if ($returnToEdit) {
             if ($customerId) {
-                $this->_redirect('adminhtml/*/edit', array('id' => $customerId, '_current' => true));
+                $this->_redirect('customer/*/edit', array('id' => $customerId, '_current' => true));
             } else {
-                $this->_redirect('adminhtml/*/new', array('_current' => true));
+                $this->_redirect('customer/*/new', array('_current' => true));
             }
         } else {
-            $this->_redirect('adminhtml/customer');
+            $this->_redirect('customer/index');
         }
     }
 
@@ -301,14 +301,14 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
     {
         $customerId = (int)$this->getRequest()->getParam('customer_id', 0);
         if (!$customerId) {
-            return $this->_redirect('adminhtml/customer');
+            return $this->_redirect('customer/index');
         }
 
         /** @var \Magento\Customer\Model\Customer $customer */
         $customer = $this->_objectManager->create('Magento\Customer\Model\Customer');
         $customer->load($customerId);
         if (!$customer->getId()) {
-            return $this->_redirect('adminhtml/customer');
+            return $this->_redirect('customer/index');
         }
 
         try {
@@ -334,7 +334,7 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
                 __('An error occurred while resetting customer password.'));
         }
 
-        $this->_redirect('adminhtml/*/edit', array('id' => $customerId, '_current' => true));
+        $this->_redirect('customer/*/edit', array('id' => $customerId, '_current' => true));
     }
 
     /**
@@ -461,7 +461,7 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
     public function exportCsvAction()
     {
         $fileName = 'customers.csv';
-        $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Customer\Grid')->getCsvFile();
+        $content = $this->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Grid')->getCsvFile();
 
         $this->_prepareDownloadResponse($fileName, $content);
     }
@@ -472,7 +472,7 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
     public function exportXmlAction()
     {
         $fileName = 'customers.xml';
-        $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Customer\Grid')->getExcelFile();
+        $content = $this->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Grid')->getExcelFile();
         $this->_prepareDownloadResponse($fileName, $content);
     }
 
@@ -519,7 +519,7 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_objectManager->create('Magento\Wishlist\Model\Item')->load($itemId)
                     ->delete();
             } catch (\Exception $exception) {
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($exception);
+                $this->_objectManager->get('Magento\Logger')->logException($exception);
             }
         }
 
@@ -744,7 +744,7 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError($exception->getMessage());
             }
         }
-        $this->_redirect('adminhtml/*/index');
+        $this->_redirect('customer/*/index');
     }
 
     /**
@@ -770,7 +770,7 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
             }
         }
 
-        $this->_redirect('adminhtml/*/index');
+        $this->_redirect('customer/*/index');
     }
 
     /**
@@ -797,7 +797,7 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
             }
         }
 
-        $this->_redirect('adminhtml/*/index');
+        $this->_redirect('customer/*/index');
     }
 
     /**
@@ -823,7 +823,7 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action
             }
         }
 
-        $this->_redirect('adminhtml/*/index');
+        $this->_redirect('customer/*/index');
     }
 
     /**
diff --git a/app/code/Magento/Adminhtml/Controller/Customer/Online.php b/app/code/Magento/Customer/Controller/Adminhtml/Online.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Controller/Customer/Online.php
rename to app/code/Magento/Customer/Controller/Adminhtml/Online.php
index 5d5df1a8092..d280b1a46b3 100644
--- a/app/code/Magento/Adminhtml/Controller/Customer/Online.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Online.php
@@ -19,11 +19,11 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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\Adminhtml\Controller\Customer;
+namespace Magento\Customer\Controller\Adminhtml;
 
 class Online extends \Magento\Backend\Controller\Adminhtml\Action
 {
diff --git a/app/code/Magento/Adminhtml/Controller/Customer/System/Config/Validatevat.php b/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Controller/Customer/System/Config/Validatevat.php
rename to app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php
index 155112daa12..a75b70f5826 100644
--- a/app/code/Magento/Adminhtml/Controller/Customer/System/Config/Validatevat.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * VAT validation controller
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\Customer\System\Config;
+namespace Magento\Customer\Controller\Adminhtml\System\Config;
 
 class Validatevat extends \Magento\Backend\Controller\Adminhtml\Action
 {
diff --git a/app/code/Magento/Adminhtml/Controller/Customer/Wishlist/Product/Composite/Wishlist.php b/app/code/Magento/Customer/Controller/Adminhtml/Wishlist/Product/Composite/Wishlist.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Controller/Customer/Wishlist/Product/Composite/Wishlist.php
rename to app/code/Magento/Customer/Controller/Adminhtml/Wishlist/Product/Composite/Wishlist.php
index 29b77cb3347..594955b9a05 100644
--- a/app/code/Magento/Adminhtml/Controller/Customer/Wishlist/Product/Composite/Wishlist.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Wishlist/Product/Composite/Wishlist.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * Catalog composite product configuration controller
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Controller\Customer\Wishlist\Product\Composite;
+namespace Magento\Customer\Controller\Adminhtml\Wishlist\Product\Composite;
 
 class Wishlist
     extends \Magento\Backend\Controller\Adminhtml\Action
@@ -53,7 +53,7 @@ class Wishlist
     /**
      * Loads wishlist and wishlist item
      *
-     * @return \Magento\Adminhtml\Controller\Customer\Wishlist\Product\Composite\Wishlist
+     * @return \Magento\Customer\Controller\Adminhtml\Wishlist\Product\Composite\Wishlist
      */
     protected function _initData()
     {
@@ -81,7 +81,7 @@ class Wishlist
     /**
      * Ajax handler to response configuration fieldset of composite product in customer's wishlist
      *
-     * @return \Magento\Adminhtml\Controller\Customer\Wishlist\Product\Composite\Wishlist
+     * @return \Magento\Customer\Controller\Adminhtml\Wishlist\Product\Composite\Wishlist
      */
     public function configureAction()
     {
@@ -131,7 +131,7 @@ class Wishlist
         }
         $updateResult->setJsVarName($this->getRequest()->getParam('as_js_varname'));
         $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setCompositeProductResult($updateResult);
-        $this->_redirect('adminhtml/product/showUpdateResult');
+        $this->_redirect('catalog/product/showUpdateResult');
 
         return false;
     }
diff --git a/app/code/Magento/Customer/Helper/Data.php b/app/code/Magento/Customer/Helper/Data.php
index 9d2360c4f79..d8d8ee9016c 100644
--- a/app/code/Magento/Customer/Helper/Data.php
+++ b/app/code/Magento/Customer/Helper/Data.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Customer\Helper;
 
 /**
  * Customer Data Helper
- *
- * @category   Magento
- * @package    Magento_Customer
- * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Customer\Helper;
-
 class Data extends \Magento\Core\Helper\AbstractHelper
 {
     /**
@@ -80,6 +75,21 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     const XML_PATH_CUSTOMER_RESET_PASSWORD_LINK_EXPIRATION_PERIOD = 'customer/password/reset_link_expiration_period';
 
+    /**
+     * Configuration path to merchant country id
+     */
+    const XML_PATH_MERCHANT_COUNTRY_CODE = 'general/store_information/country_id';
+
+    /**
+     * Config path to merchant VAT number
+     */
+    const XML_PATH_MERCHANT_VAT_NUMBER = 'general/store_information/merchant_vat_number';
+
+    /**
+     * Config path to UE country list
+     */
+    const XML_PATH_EU_COUNTRIES_LIST = 'general/country/eu_countries';
+
     /**
      * VAT class constants
      */
@@ -100,7 +110,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      *
      * @var \Magento\Core\Helper\Data
      */
-    protected $_coreData = null;
+    protected $_coreData;
 
     /**
      * Customer address
@@ -132,7 +142,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      * @var \Magento\Customer\Model\Session
      */
     protected $_customerSession;
-    
+
     /**
      * @var \Magento\Customer\Model\GroupFactory
      */
@@ -143,6 +153,16 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     protected $_formFactory;
 
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Customer\Helper\Address $customerAddress
@@ -153,6 +173,8 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Customer\Model\GroupFactory $groupFactory
      * @param \Magento\Customer\Model\FormFactory $formFactory
+     * @param \Magento\Escaper $escaper
+     * @param \Magento\Math\Random $mathRandom
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
@@ -163,7 +185,9 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         \Magento\Core\Model\Config $coreConfig,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Customer\Model\GroupFactory $groupFactory,
-        \Magento\Customer\Model\FormFactory $formFactory
+        \Magento\Customer\Model\FormFactory $formFactory,
+        \Magento\Escaper $escaper,
+        \Magento\Math\Random $mathRandom
     ) {
         $this->_eventManager = $eventManager;
         $this->_customerAddress = $customerAddress;
@@ -173,9 +197,46 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         $this->_customerSession = $customerSession;
         $this->_groupFactory = $groupFactory;
         $this->_formFactory = $formFactory;
+        $this->_escaper = $escaper;
+        $this->mathRandom = $mathRandom;
         parent::__construct($context);
     }
 
+    /**
+     * Retrieve merchant country code
+     *
+     * @param \Magento\Core\Model\Store|string|int|null $store
+     * @return string
+     */
+    public function getMerchantCountryCode($store = null)
+    {
+        return (string) $this->_coreStoreConfig->getConfig(self::XML_PATH_MERCHANT_COUNTRY_CODE, $store);
+    }
+
+    /**
+     * Retrieve merchant VAT number
+     *
+     * @param \Magento\Core\Model\Store|string|int|null $store
+     * @return string
+     */
+    public function getMerchantVatNumber($store = null)
+    {
+        return (string) $this->_coreStoreConfig->getConfig(self::XML_PATH_MERCHANT_VAT_NUMBER, $store);
+    }
+
+    /**
+     * Check whether specified country is in EU countries list
+     *
+     * @param string $countryCode
+     * @param null|int $storeId
+     * @return bool
+     */
+    public function isCountryInEU($countryCode, $storeId = null)
+    {
+        $euCountries = explode(',', $this->_coreStoreConfig->getConfig(self::XML_PATH_EU_COUNTRIES_LIST, $storeId));
+        return in_array($countryCode, $euCountries);
+    }
+
     /**
      * Check customer is logged in
      *
@@ -413,6 +474,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     /**
      * Retrieve name prefix dropdown options
      *
+     * @param null $store
      * @return array|bool
      */
     public function getNamePrefixOptions($store = null)
@@ -425,6 +487,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     /**
      * Retrieve name suffix dropdown options
      *
+     * @param null $store
      * @return array|bool
      */
     public function getNameSuffixOptions($store = null)
@@ -449,7 +512,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         $result = array();
         $options = explode(';', $options);
         foreach ($options as $value) {
-            $value = $this->escapeHtml(trim($value));
+            $value = $this->_escaper->escapeHtml(trim($value));
             $result[$value] = $value;
         }
         return $result;
@@ -462,7 +525,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function generateResetPasswordLinkToken()
     {
-        return $this->_coreData->uniqHash();
+        return $this->mathRandom->getUniqueHash();
     }
 
     /**
@@ -584,19 +647,16 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     public function canCheckVatNumber($countryCode, $vatNumber, $requesterCountryCode, $requesterVatNumber)
     {
         $result = true;
-        /** @var $coreHelper \Magento\Core\Helper\Data */
-        $coreHelper = $this->_coreData;
-
         if (!is_string($countryCode)
             || !is_string($vatNumber)
             || !is_string($requesterCountryCode)
             || !is_string($requesterVatNumber)
             || empty($countryCode)
-            || !$coreHelper->isCountryInEU($countryCode)
+            || !$this->isCountryInEU($countryCode)
             || empty($vatNumber)
             || (empty($requesterCountryCode) && !empty($requesterVatNumber))
             || (!empty($requesterCountryCode) && empty($requesterVatNumber))
-            || (!empty($requesterCountryCode) && !$coreHelper->isCountryInEU($requesterCountryCode))
+            || (!empty($requesterCountryCode) && !$this->isCountryInEU($requesterCountryCode))
         ) {
             $result = false;
         }
@@ -620,7 +680,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
 
         if (is_string($customerCountryCode)
             && !empty($customerCountryCode)
-            && $customerCountryCode === $this->_coreData->getMerchantCountryCode($store)
+            && $customerCountryCode === $this->getMerchantCountryCode($store)
             && $isVatNumberValid
         ) {
             $vatClass = self::VAT_CLASS_DOMESTIC;
@@ -667,7 +727,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         } else if ($validationResult->getRequestSuccess()) {
             $message = sprintf(
                 __('The VAT ID entered (%s) is not a valid VAT ID.') . ' ',
-                $this->escapeHtml($customerAddress->getVatId())
+                $this->_escaper->escapeHtml($customerAddress->getVatId())
             );
             if (!$groupAutoAssignDisabled && !$customerGroupAutoAssignDisabled) {
                 $message .= $willChargeTaxMessage;
diff --git a/app/code/Magento/Customer/Model/Address/Config/SchemaLocator.php b/app/code/Magento/Customer/Model/Address/Config/SchemaLocator.php
index da4f6b0d443..3eb52014d82 100644
--- a/app/code/Magento/Customer/Model/Address/Config/SchemaLocator.php
+++ b/app/code/Magento/Customer/Model/Address/Config/SchemaLocator.php
@@ -35,9 +35,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     private $_schema;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Customer') . '/address_formats.xsd';
     }
diff --git a/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php b/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php
index 81b5b955116..0fd970c61fd 100644
--- a/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php
+++ b/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php
@@ -53,14 +53,14 @@ class Postcode extends \Magento\Eav\Model\Attribute\Data\Text
 
     /**
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Helper\String $stringHelper
+     * @param \Magento\Logger $logger
+     * @param \Magento\Stdlib\String $stringHelper
      * @param \Magento\Directory\Helper\Data $directoryData
      */
     public function __construct(
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Helper\String $stringHelper,
+        \Magento\Logger $logger,
+        \Magento\Stdlib\String $stringHelper,
         \Magento\Directory\Helper\Data $directoryData
     ) {
         $this->_directoryData = $directoryData;
diff --git a/app/code/Magento/Customer/Model/Customer.php b/app/code/Magento/Customer/Model/Customer.php
index 8869c0f9162..903c3de16fc 100644
--- a/app/code/Magento/Customer/Model/Customer.php
+++ b/app/code/Magento/Customer/Model/Customer.php
@@ -24,20 +24,16 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Customer\Model;
+
 /**
  * Customer model
  *
- * @category    Magento
- * @package     Magento_Customer
- * @author      Magento Core Team <core@magentocommerce.com>
- *
  * @method int getWebsiteId() getWebsiteId()
  * @method int getStoreId() getStoreId()
  * @method string getEmail() getEmail()
  * @method \Magento\Customer\Model\Resource\Customer _getResource()
  */
-namespace Magento\Customer\Model;
-
 class Customer extends \Magento\Core\Model\AbstractModel
 {
     /**
@@ -133,13 +129,6 @@ class Customer extends \Magento\Core\Model\AbstractModel
     /** @var \Magento\Eav\Model\Config */
     protected $_config;
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
-
     /**
      * Customer data
      *
@@ -155,11 +144,6 @@ class Customer extends \Magento\Core\Model\AbstractModel
     protected $_eventManager = null;
 
     /**
-     * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Customer\Helper\Data $customerData
-     * @param \Magento\Core\Helper\Data $coreData
-     * Core store config
-     *
      * @var \Magento\Core\Model\Store\Config
      */
     protected $_coreStoreConfig;
@@ -199,10 +183,24 @@ class Customer extends \Magento\Core\Model\AbstractModel
      */
     protected $_attributeFactory;
 
+    /**
+     * @var \Magento\Encryption\EncryptorInterface
+     */
+    protected $_encryptor;
+
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Customer\Helper\Data $customerData
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\Sender $sender
@@ -217,13 +215,15 @@ class Customer extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Core\Model\Email\InfoFactory $emailInfoFactory
      * @param \Magento\Customer\Model\GroupFactory $groupFactory
      * @param \Magento\Customer\Model\AttributeFactory $attributeFactory
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
+     * @param \Magento\Math\Random $mathRandom
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Data\Collection\Db|null $resourceCollection
      * @param array $data
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Customer\Helper\Data $customerData,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\Sender $sender,
@@ -238,12 +238,14 @@ class Customer extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\Email\InfoFactory $emailInfoFactory,
         \Magento\Customer\Model\GroupFactory $groupFactory,
         \Magento\Customer\Model\AttributeFactory $attributeFactory,
+        \Magento\Encryption\EncryptorInterface $encryptor,
+        \Magento\Math\Random $mathRandom,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         $this->_eventManager = $eventManager;
         $this->_customerData = $customerData;
-        $this->_coreData = $coreData;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_sender = $sender;
         $this->_storeManager = $storeManager;
@@ -255,6 +257,9 @@ class Customer extends \Magento\Core\Model\AbstractModel
         $this->_emailInfoFactory = $emailInfoFactory;
         $this->_groupFactory = $groupFactory;
         $this->_attributeFactory = $attributeFactory;
+        $this->_encryptor = $encryptor;
+        $this->mathRandom = $mathRandom;
+        $this->dateTime = $dateTime;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -496,7 +501,7 @@ class Customer extends \Magento\Core\Model\AbstractModel
      */
     public function hashPassword($password, $salt = null)
     {
-        return $this->_coreData->getHash($password, !is_null($salt) ? $salt : 2);
+        return $this->_encryptor->getHash($password, !is_null($salt) ? $salt : 2);
     }
 
     /**
@@ -507,7 +512,7 @@ class Customer extends \Magento\Core\Model\AbstractModel
      */
     public function generatePassword($length = 6)
     {
-        return $this->_coreData->getRandomString($length);
+        return $this->mathRandom->getRandomString($length);
     }
 
     /**
@@ -522,7 +527,7 @@ class Customer extends \Magento\Core\Model\AbstractModel
         if (!$hash) {
             return false;
         }
-        return $this->_coreData->validateHash($password, $hash);
+        return $this->_encryptor->validateHash($password, $hash);
     }
 
 
@@ -534,7 +539,7 @@ class Customer extends \Magento\Core\Model\AbstractModel
      */
     public function encryptPassword($password)
     {
-        return $this->_coreData->encrypt($password);
+        return $this->_encryptor->encrypt($password);
     }
 
     /**
@@ -545,7 +550,7 @@ class Customer extends \Magento\Core\Model\AbstractModel
      */
     public function decryptPassword($password)
     {
-        return $this->_coreData->decrypt($password);
+        return $this->_encryptor->decrypt($password);
     }
 
     /**
@@ -1050,7 +1055,7 @@ class Customer extends \Magento\Core\Model\AbstractModel
     {
         $date = $this->getCreatedAt();
         if ($date) {
-            return \Magento\Date::toTimestamp($date);
+            return $this->dateTime->toTimestamp($date);
         }
         return null;
     }
@@ -1217,9 +1222,8 @@ class Customer extends \Magento\Core\Model\AbstractModel
 
         $expirationPeriod = $this->_customerData->getResetPasswordLinkExpirationPeriod();
 
-        $currentDate = \Magento\Date::now();
-        $currentTimestamp = \Magento\Date::toTimestamp($currentDate);
-        $tokenTimestamp = \Magento\Date::toTimestamp($linkTokenCreatedAt);
+        $currentTimestamp = $this->dateTime->toTimestamp($this->dateTime->now());
+        $tokenTimestamp = $this->dateTime->toTimestamp($linkTokenCreatedAt);
         if ($tokenTimestamp > $currentTimestamp) {
             return true;
         }
diff --git a/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php b/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php
index 06d8a286141..82f56eb7553 100644
--- a/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php
+++ b/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php
@@ -24,36 +24,34 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Customer\Model\Customer\Attribute\Backend;
+
 /**
  * Customer password attribute backend
- *
- * @category   Magento
- * @package    Magento_Customer
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Customer\Model\Customer\Attribute\Backend;
-
-class Password
-    extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
+class Password extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
 {
+    /**
+     * Min password length
+     */
     const MIN_PASSWORD_LENGTH = 6;
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
+     * @param \Magento\Stdlib\String $string
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger,
+        \Magento\Stdlib\String $string
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct($logger);
     }
 
@@ -67,10 +65,8 @@ class Password
     public function beforeSave($object)
     {
         $password = $object->getPassword();
-        /** @var \Magento\Core\Helper\String $stringHelper */
-        $stringHelper = $this->_coreString;
 
-        $length = $stringHelper->strlen($password);
+        $length = $this->string->strlen($password);
         if ($length > 0) {
             if ($length < self::MIN_PASSWORD_LENGTH) {
                 throw new \Magento\Core\Exception(
@@ -78,8 +74,8 @@ class Password
                 );
             }
 
-            if ($stringHelper->substr($password, 0, 1) == ' ' ||
-                $stringHelper->substr($password, $length - 1, 1) == ' ') {
+            if ($this->string->substr($password, 0, 1) == ' ' ||
+                $this->string->substr($password, $length - 1, 1) == ' ') {
                 throw new \Magento\Core\Exception(__('The password can not begin or end with a space.'));
             }
 
@@ -93,13 +89,11 @@ class Password
      */
     public function validate($object)
     {
-        if ($password = $object->getPassword()) {
-            if ($password == $object->getPasswordConfirm()) {
-                return true;
-            }
+        $password = $object->getPassword();
+        if ($password && $password == $object->getPasswordConfirm()) {
+            return true;
         }
 
         return parent::validate($object);
     }
-
 }
diff --git a/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Store.php b/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Store.php
index 58a237c918b..fd68950af4c 100644
--- a/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Store.php
+++ b/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Store.php
@@ -42,17 +42,15 @@ class Store
     protected $_storeManager;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\StoreManagerInterface $storeManager,
-        array $data = array()
+        \Magento\Logger $logger,
+        \Magento\Core\Model\StoreManagerInterface $storeManager
     ) {
         $this->_storeManager = $storeManager;
-        parent::__construct($logger, $data);
+        parent::__construct($logger);
     }
 
     /**
diff --git a/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Website.php b/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Website.php
index 77e17c3ac69..fc908a0ad1c 100644
--- a/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Website.php
+++ b/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Website.php
@@ -42,17 +42,15 @@ class Website
     protected $_storeManager;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\StoreManagerInterface $storeManager,
-        array $data = array()
+        \Magento\Logger $logger,
+        \Magento\Core\Model\StoreManagerInterface $storeManager
     ) {
         $this->_storeManager = $storeManager;
-        parent::__construct($logger, $data);
+        parent::__construct($logger);
     }
 
     /**
diff --git a/app/code/Magento/Customer/Model/Group.php b/app/code/Magento/Customer/Model/Group.php
index f38958526f0..af33c22c0bd 100644
--- a/app/code/Magento/Customer/Model/Group.php
+++ b/app/code/Magento/Customer/Model/Group.php
@@ -72,9 +72,9 @@ class Group extends \Magento\Core\Model\AbstractModel
     protected static $_taxClassIds = array();
 
     /**
-     * @var \Magento\Core\Model\Config
+     * @var \Magento\Core\Model\Store\Config
      */
-    protected $_coreConfig;
+    protected $_storeConfig;
 
     /**
      * @var \Magento\Index\Model\Indexer
@@ -86,7 +86,7 @@ class Group extends \Magento\Core\Model\AbstractModel
      *
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Core\Model\Config $coreConfig
+     * @param \Magento\Core\Model\Store\Config $storeConfig
      * @param \Magento\Index\Model\Indexer $indexer
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -95,13 +95,13 @@ class Group extends \Magento\Core\Model\AbstractModel
     public function __construct(
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Core\Model\Config $coreConfig,
+        \Magento\Core\Model\Store\Config $storeConfig,
         \Magento\Index\Model\Indexer $indexer,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreConfig = $coreConfig;
+        $this->_storeConfig = $storeConfig;
         $this->_indexer = $indexer;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
@@ -146,7 +146,7 @@ class Group extends \Magento\Core\Model\AbstractModel
 
     public function usesAsDefault()
     {
-        $data = $this->_coreConfig->getStoresConfigByPath(self::XML_PATH_DEFAULT_ID);
+        $data = $this->_storeConfig->getStoresConfigByPath(self::XML_PATH_DEFAULT_ID);
         if (in_array($this->getId(), $data)) {
             return true;
         }
diff --git a/app/code/Magento/Customer/Model/Observer.php b/app/code/Magento/Customer/Model/Observer.php
index e02831d4ebe..1cef82c3403 100644
--- a/app/code/Magento/Customer/Model/Observer.php
+++ b/app/code/Magento/Customer/Model/Observer.php
@@ -53,21 +53,14 @@ class Observer
      *
      * @var \Magento\Core\Model\Registry
      */
-    protected $_coreRegistry = null;
-    
+    protected $_coreRegistry;
+
     /**
      * Customer data
      *
      * @var \Magento\Customer\Helper\Data
      */
-    protected $_customerData = null;
-
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
+    protected $_customerData;
 
     /**
      * @var \Magento\Core\Model\StoreManager
@@ -80,7 +73,6 @@ class Observer
     protected $_customerSession;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Customer\Helper\Data $customerData
      * @param \Magento\Customer\Helper\Address $customerAddress
      * @param \Magento\Core\Model\Registry $coreRegistry
@@ -88,14 +80,12 @@ class Observer
      * @param \Magento\Customer\Model\Session $customerSession
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Customer\Helper\Data $customerData,
         \Magento\Customer\Helper\Address $customerAddress,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Customer\Model\Session $customerSession
     ) {
-        $this->_coreData = $coreData;
         $this->_customerData = $customerData;
         $this->_customerAddress = $customerAddress;
         $this->_coreRegistry = $coreRegistry;
@@ -204,7 +194,7 @@ class Observer
             $customerHelper = $this->_customerData;
 
             if ($customerAddress->getVatId() == ''
-                || !$this->_coreData->isCountryInEU($customerAddress->getCountry()))
+                || !$this->_customerData->isCountryInEU($customerAddress->getCountry()))
             {
                 $defaultGroupId = $customerHelper->getDefaultCustomerGroupId($customer->getStore());
 
diff --git a/app/code/Magento/Adminhtml/Model/Customer/Renderer/Region.php b/app/code/Magento/Customer/Model/Renderer/Region.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Model/Customer/Renderer/Region.php
rename to app/code/Magento/Customer/Model/Renderer/Region.php
index 6d945714839..c3eaf57c2a3 100644
--- a/app/code/Magento/Adminhtml/Model/Customer/Renderer/Region.php
+++ b/app/code/Magento/Customer/Model/Renderer/Region.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @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)
  */
@@ -28,10 +28,10 @@
  * REgion field renderer
  *
  * @category   Magento
- * @package    Magento_Adminhtml
+ * @package    Magento_Customer
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Model\Customer\Renderer;
+namespace Magento\Customer\Model\Renderer;
 
 class Region implements \Magento\Data\Form\Element\Renderer\RendererInterface
 {
@@ -49,9 +49,9 @@ class Region implements \Magento\Data\Form\Element\Renderer\RendererInterface
     /**
      * Adminhtml data
      *
-     * @var \Magento\Adminhtml\Helper\Data
+     * @var \Magento\Escaper
      */
-    protected $_adminhtmlData = null;
+    protected $_escaper = null;
 
     /**
      * @var \Magento\Directory\Model\CountryFactory
@@ -60,14 +60,14 @@ class Region implements \Magento\Data\Form\Element\Renderer\RendererInterface
 
     /**
      * @param \Magento\Directory\Model\CountryFactory $countryFactory
-     * @param \Magento\Adminhtml\Helper\Data $adminhtmlData
+     * @param \Magento\Escaper $escaper
      */
     public function __construct(
         \Magento\Directory\Model\CountryFactory $countryFactory,
-        \Magento\Adminhtml\Helper\Data $adminhtmlData
+        \Magento\Escaper $escaper
     ) {
         $this->_countryFactory = $countryFactory;
-        $this->_adminhtmlData = $adminhtmlData;
+        $this->_escaper = $escaper;
     }
 
     public function render(\Magento\Data\Form\Element\AbstractElement $element)
@@ -121,7 +121,7 @@ class Region implements \Magento\Data\Form\Element\Renderer\RendererInterface
                 $selected = ($regionId==$region['value']) ? ' selected="selected"' : '';
                 $regionVal = (0 == $region['value']) ? '' : (int)$region['value'];
                 $html.= '<option value="' . $regionVal . '"' . $selected . '>'
-                    . $this->_adminhtmlData->escapeHtml(__($region['label']))
+                    . $this->_escaper->escapeHtml(__($region['label']))
                     . '</option>';
             }
             $html.= '</select>' . "\n";
diff --git a/app/code/Magento/Customer/Model/Resource/Address.php b/app/code/Magento/Customer/Model/Resource/Address.php
index 00b27ba4f2d..bd7e14858bc 100644
--- a/app/code/Magento/Customer/Model/Resource/Address.php
+++ b/app/code/Magento/Customer/Model/Resource/Address.php
@@ -38,7 +38,7 @@ class Address extends \Magento\Eav\Model\Entity\AbstractEntity
     protected $_customerFactory;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -49,7 +49,7 @@ class Address extends \Magento\Eav\Model\Entity\AbstractEntity
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity,
         \Magento\Core\Model\LocaleInterface $locale,
diff --git a/app/code/Magento/Customer/Model/Resource/Address/Attribute/Backend/Region.php b/app/code/Magento/Customer/Model/Resource/Address/Attribute/Backend/Region.php
index c28cf56fdd1..86e3f11fc50 100644
--- a/app/code/Magento/Customer/Model/Resource/Address/Attribute/Backend/Region.php
+++ b/app/code/Magento/Customer/Model/Resource/Address/Attribute/Backend/Region.php
@@ -43,17 +43,15 @@ class Region
     protected $_regionFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Directory\Model\RegionFactory $regionFactory
-     * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Directory\Model\RegionFactory $regionFactory,
-        array $data = array()
+        \Magento\Logger $logger,
+        \Magento\Directory\Model\RegionFactory $regionFactory
     ) {
         $this->_regionFactory = $regionFactory;
-        parent::__construct($logger, $data);
+        parent::__construct($logger);
     }
 
     /**
diff --git a/app/code/Magento/Customer/Model/Resource/Customer.php b/app/code/Magento/Customer/Model/Resource/Customer.php
index 69a6d961487..7d1c1e59d7f 100644
--- a/app/code/Magento/Customer/Model/Resource/Customer.php
+++ b/app/code/Magento/Customer/Model/Resource/Customer.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Customer entity resource model
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -23,8 +21,12 @@
  * @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\Model\Resource;
 
+/**
+ * Customer entity resource model
+ */
 class Customer extends \Magento\Eav\Model\Entity\AbstractEntity
 {
     /**
@@ -40,7 +42,12 @@ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity
     protected $_coreStoreConfig;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -48,10 +55,11 @@ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\Validator\Factory $validatorFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity,
         \Magento\Core\Model\LocaleInterface $locale,
@@ -59,6 +67,7 @@ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\Validator\Factory $validatorFactory,
+        \Magento\Stdlib\DateTime $dateTime,
         $data = array()
     ) {
         parent::__construct(
@@ -72,6 +81,7 @@ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity
         );
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_validatorFactory = $validatorFactory;
+        $this->dateTime = $dateTime;
         $this->setType('customer');
         $this->setConnection('customer_read', 'customer_write');
     }
@@ -381,8 +391,7 @@ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity
     {
         if (is_string($passwordLinkToken) && !empty($passwordLinkToken)) {
             $customer->setRpToken($passwordLinkToken);
-            $currentDate = \Magento\Date::now();
-            $customer->setRpTokenCreatedAt($currentDate);
+            $customer->setRpTokenCreatedAt($this->dateTime->now());
             $this->saveAttribute($customer, 'rp_token');
             $this->saveAttribute($customer, 'rp_token_created_at');
         }
diff --git a/app/code/Magento/Customer/Model/Resource/Customer/Collection.php b/app/code/Magento/Customer/Model/Resource/Customer/Collection.php
index 7a3c6a46f84..3e6573f1a87 100644
--- a/app/code/Magento/Customer/Model/Resource/Customer/Collection.php
+++ b/app/code/Magento/Customer/Model/Resource/Customer/Collection.php
@@ -43,11 +43,11 @@ class Collection extends \Magento\Eav\Model\Entity\Collection\AbstractCollection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Eav\Model\Resource\Helper $resourceHelper
      * @param \Magento\Validator\UniversalFactory $universalFactory
@@ -55,11 +55,11 @@ class Collection extends \Magento\Eav\Model\Entity\Collection\AbstractCollection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Eav\Model\Resource\Helper $resourceHelper,
         \Magento\Validator\UniversalFactory $universalFactory,
diff --git a/app/code/Magento/Customer/Model/Resource/Group.php b/app/code/Magento/Customer/Model/Resource/Group.php
index 52e44f8dba5..046003dc517 100644
--- a/app/code/Magento/Customer/Model/Resource/Group.php
+++ b/app/code/Magento/Customer/Model/Resource/Group.php
@@ -52,12 +52,12 @@ class Group extends \Magento\Core\Model\Resource\Db\AbstractDb
      * Class constructor
      *
      * @param \Magento\Customer\Helper\Data $customerData
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Customer\Model\Resource\Customer\CollectionFactory $customersFactory
      */
     public function __construct(
         \Magento\Customer\Helper\Data $customerData,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Customer\Model\Resource\Customer\CollectionFactory $customersFactory
     ) {
         $this->_customerData = $customerData;
diff --git a/app/code/Magento/Customer/Model/Resource/Setup.php b/app/code/Magento/Customer/Model/Resource/Setup.php
index 2b954e1e5b7..b8025a63bc8 100644
--- a/app/code/Magento/Customer/Model/Resource/Setup.php
+++ b/app/code/Magento/Customer/Model/Resource/Setup.php
@@ -43,16 +43,16 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
 
     /**
      * @param \Magento\Core\Model\Resource\Setup\Context $context
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\CacheInterface $resourceName
+     * @param \Magento\App\CacheInterface $resourceName
      * @param string $moduleName
      * @param string $connectionName
      */
     public function __construct(
         \Magento\Core\Model\Resource\Setup\Context $context,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
         \Magento\Eav\Model\Config $eavConfig,
         $resourceName,
diff --git a/app/code/Magento/Customer/etc/adminhtml/menu.xml b/app/code/Magento/Customer/etc/adminhtml/menu.xml
index bdf0d7480fe..dcdecec3c07 100644
--- a/app/code/Magento/Customer/etc/adminhtml/menu.xml
+++ b/app/code/Magento/Customer/etc/adminhtml/menu.xml
@@ -28,8 +28,8 @@
 <config>
     <menu>
         <add id="Magento_Customer::customer" title="Customers" module="Magento_Customer" sortOrder="30" resource="Magento_Customer::customer"/>
-        <add id="Magento_Customer::customer_manage" title="All Customers" module="Magento_Customer" sortOrder="10" parent="Magento_Customer::customer" action="adminhtml/customer/" resource="Magento_Customer::manage"/>
-        <add id="Magento_Customer::customer_group" title="Customer Groups" module="Magento_Customer" sortOrder="10" parent="Magento_Adminhtml::other_settings" action="adminhtml/customer_group/" resource="Magento_Customer::group"/>
-        <add id="Magento_Customer::customer_online" title="Now Online" module="Magento_Customer" sortOrder="30" parent="Magento_Customer::customer" action="adminhtml/customer_online/" resource="Magento_Customer::online"/>
+        <add id="Magento_Customer::customer_manage" title="All Customers" module="Magento_Customer" sortOrder="10" parent="Magento_Customer::customer" action="customer/index/" resource="Magento_Customer::manage"/>
+        <add id="Magento_Customer::customer_group" title="Customer Groups" module="Magento_Customer" sortOrder="10" parent="Magento_Adminhtml::other_settings" action="customer/group" resource="Magento_Customer::group"/>
+        <add id="Magento_Customer::customer_online" title="Now Online" module="Magento_Customer" sortOrder="30" parent="Magento_Customer::customer" action="customer/online" resource="Magento_Customer::online"/>
     </menu>
 </config>
diff --git a/app/code/Magento/Customer/etc/adminhtml/routes.xml b/app/code/Magento/Customer/etc/adminhtml/routes.xml
new file mode 100644
index 00000000000..fa9f180f406
--- /dev/null
+++ b/app/code/Magento/Customer/etc/adminhtml/routes.xml
@@ -0,0 +1,32 @@
+<?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>
+    <router id="admin">
+        <route id="customer" frontName="customer">
+            <module name="Magento_Customer" />
+        </route>
+    </router>
+</config>
\ No newline at end of file
diff --git a/app/code/Magento/Customer/etc/adminhtml/system.xml b/app/code/Magento/Customer/etc/adminhtml/system.xml
index 599d70daadc..4b9e8874a4c 100644
--- a/app/code/Magento/Customer/etc/adminhtml/system.xml
+++ b/app/code/Magento/Customer/etc/adminhtml/system.xml
@@ -247,7 +247,7 @@
             <group id="store_information">
                 <field id="validate_vat_number" translate="button_label" sortOrder="62" showInDefault="1" showInWebsite="1" showInStore="0">
                     <button_label>Validate VAT Number</button_label>
-                    <frontend_model>Magento\Adminhtml\Block\Customer\System\Config\Validatevat</frontend_model>
+                    <frontend_model>Magento\Customer\Block\Adminhtml\System\Config\Validatevat</frontend_model>
                 </field>
             </group>
         </section>
diff --git a/app/code/Magento/Customer/etc/di.xml b/app/code/Magento/Customer/etc/di.xml
index 4932fb7b9cc..5a3fef8c872 100644
--- a/app/code/Magento/Customer/etc/di.xml
+++ b/app/code/Magento/Customer/etc/di.xml
@@ -35,7 +35,7 @@
             <instance type="Magento\Customer\Model\Resource\Customer\Proxy" />
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <customer_setup>Magento\Customer\Model\Resource\Setup</customer_setup>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/customer/edit/js.phtml b/app/code/Magento/Customer/view/adminhtml/edit/js.phtml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/customer/edit/js.phtml
rename to app/code/Magento/Customer/view/adminhtml/edit/js.phtml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/customer/edit/tab/account/form/renderer/group.phtml b/app/code/Magento/Customer/view/adminhtml/edit/tab/account/form/renderer/group.phtml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/customer/edit/tab/account/form/renderer/group.phtml
rename to app/code/Magento/Customer/view/adminhtml/edit/tab/account/form/renderer/group.phtml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/customer/edit/tab/js/addresses.js b/app/code/Magento/Customer/view/adminhtml/edit/tab/js/addresses.js
similarity index 96%
rename from app/code/Magento/Adminhtml/view/adminhtml/customer/edit/tab/js/addresses.js
rename to app/code/Magento/Customer/view/adminhtml/edit/tab/js/addresses.js
index 03ee76bd5fd..275106cc1d3 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/customer/edit/tab/js/addresses.js
+++ b/app/code/Magento/Customer/view/adminhtml/edit/tab/js/addresses.js
@@ -18,7 +18,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Mage
- * @package     Magento_Adminhtml
+ * @package     Magento_Customer
  * @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)
  */
@@ -39,13 +39,13 @@
             tabAddressTemplateSelector: '[data-template="tab-address-content"]',
             formsSelector: '[data-container="address-forms"]',
             addAddressSelector: '[data-container="add-address"]',
-            formFirstNameSelector: ':input[data-ui-id="customer-edit-tab-addresses-fieldset-element-text-address-template-firstname"]',
-            accountFirstNameSelector: ':input[data-ui-id="customer-edit-tab-account-fieldset-element-text-account-firstname"]',
-            formLastNameSelector: ':input[data-ui-id="customer-edit-tab-addresses-fieldset-element-text-address-template-lastname"]',
-            accountLastNameSelector: ':input[data-ui-id="customer-edit-tab-account-fieldset-element-text-account-lastname"]',
+            formFirstNameSelector: ':input[data-ui-id="adminhtml-edit-tab-addresses-fieldset-element-text-address-template-firstname"]',
+            accountFirstNameSelector: ':input[data-ui-id="adminhtml-edit-tab-account-fieldset-element-text-account-firstname"]',
+            formLastNameSelector: ':input[data-ui-id="adminhtml-edit-tab-addresses-fieldset-element-text-address-template-lastname"]',
+            accountLastNameSelector: ':input[data-ui-id="adminhtml-edit-tab-account-fieldset-element-text-account-lastname"]',
             accountWebsiteIdSelector: ':input[data-ui-id="store-switcher-form-renderer-fieldset-element-select-account-website-id"]',
             formCountrySelector: 'customer-edit-tab-addresses-fieldset-element-form-field-country-id',
-            addAddressButtonSelector: ':button[data-ui-id="customer-edit-tab-addresses-add-address-button"]'
+            addAddressButtonSelector: ':button[data-ui-id="adminhtml-edit-tab-addresses-add-address-button"]'
         },
 
         /**
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_group_index.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_group_index.xml
similarity index 97%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_group_index.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_group_index.xml
index 8fd72e0ec4e..c9242041904 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_group_index.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_group_index.xml
@@ -25,7 +25,7 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Customer\Group" name="adminhtml.block.customer.group.grid.container">
+        <block class="Magento\Customer\Block\Adminhtml\Group" name="adminhtml.block.customer.group.grid.container">
             <block class="Magento\Backend\Block\Widget\Grid" name="adminhtml.block.customer.group.grid" as="grid">
                 <arguments>
                     <argument name="id" xsi:type="string">customerGroupGrid</argument>
@@ -37,7 +37,7 @@
                 <block class="Magento\Backend\Block\Widget\Grid\ColumnSet" as="grid.columnSet" name="adminhtml.customer.group.grid.columnSet">
                     <arguments>
                         <argument name="rowUrl" xsi:type="array">
-                            <item name="path" xsi:type="string">adminhtml/*/edit</item>
+                            <item name="path" xsi:type="string">customer/*/edit</item>
                             <item name="extraParamsTemplate" xsi:type="array">
                                 <item name="id" xsi:type="string">getId</item>
                             </item>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_cart.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_cart.xml
similarity index 94%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_cart.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_index_cart.xml
index 5fd068b88fe..6dd7a49dfa1 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_cart.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_cart.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <container name="root" label="Root" output="1">
-        <block class="Magento\Adminhtml\Block\Customer\Edit\Tab\Cart" name="admin.customer.view.edit.cart"/>
+        <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\Cart" name="admin.customer.view.edit.cart"/>
     </container>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_carts.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_carts.xml
similarity index 94%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_carts.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_index_carts.xml
index 4cc0596c43a..13f49ed5b24 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_carts.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_carts.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <container name="root" label="Root" output="1">
-        <block class="Magento\Adminhtml\Block\Customer\Edit\Tab\Carts" name="admin.customer.carts"/>
+        <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\Carts" name="admin.customer.carts"/>
     </container>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_edit.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_edit.xml
similarity index 84%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_edit.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_index_edit.xml
index c28a3b842c7..befdce1ccfd 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_edit.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_edit.xml
@@ -25,7 +25,7 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Customer\Edit" name="customer_edit"/>
+        <block class="Magento\Customer\Block\Adminhtml\Edit" name="customer_edit"/>
     </referenceContainer>
     <referenceBlock name="head">
         <block class="Magento\Adminhtml\Block\Template" name="optional_zip_countries" as="optional_zip_countries" template="Magento_Directory::js/optional_zip_countries.phtml"/>
@@ -41,15 +41,15 @@
         </block>
         <block class="Magento\Page\Block\Html\Head\Script" name="magento-adminhtml-customer-edit-tab-js-addresses.js">
             <arguments>
-                <argument name="file" xsi:type="string">Magento_Adminhtml::customer/edit/tab/js/addresses.js</argument>
+                <argument name="file" xsi:type="string">Magento_Customer::edit/tab/js/addresses.js</argument>
             </arguments>
         </block>
     </referenceBlock>
     <referenceContainer name="left">
-        <block class="Magento\Adminhtml\Block\Customer\Edit\Tabs" name="customer_edit_tabs">
-            <block class="Magento\Adminhtml\Block\Customer\Edit\Tab\View" name="customer_edit_tab_view" template="customer/tab/view.phtml">
-                <block class="Magento\Adminhtml\Block\Customer\Edit\Tab\View\Sales" name="sales" template="customer/tab/view/sales.phtml" before="-"/>
-                <block class="Magento\Adminhtml\Block\Customer\Edit\Tab\View\Accordion" name="accordion"/>
+        <block class="Magento\Customer\Block\Adminhtml\Edit\Tabs" name="customer_edit_tabs">
+            <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\View" name="customer_edit_tab_view" template="tab/view.phtml">
+                <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\View\Sales" name="sales" template="tab/view/sales.phtml" before="-"/>
+                <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\View\Accordion" name="accordion"/>
             </block>
             <action method="addTab">
                 <argument name="name" xsi:type="string">customer_edit_tab_view</argument>
@@ -58,7 +58,7 @@
         </block>
     </referenceContainer>
     <referenceContainer name="js">
-        <block class="Magento\Adminhtml\Block\Template" template="customer/edit/js.phtml" name="customer.edit.js" as="customer_edit_js"/>
+        <block class="Magento\Adminhtml\Block\Template" template="Magento_Customer::edit/js.phtml" name="customer.edit.js" as="customer_edit_js"/>
     </referenceContainer>
     <referenceBlock name="customer_edit_tabs">
         <action method="addTab">
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_grid.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_grid.xml
similarity index 94%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_grid.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_index_grid.xml
index 2db519626c3..8b1e74cf176 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_grid.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_grid.xml
@@ -26,6 +26,6 @@
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <update handle="formkey"/>
     <container name="root" label="Root" output="1">
-        <block class="Magento\Adminhtml\Block\Customer\Grid" name="admin.customer.grid"/>
+        <block class="Magento\Customer\Block\Adminhtml\Grid" name="admin.customer.grid"/>
     </container>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_lastorders.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_lastorders.xml
similarity index 94%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_lastorders.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_index_lastorders.xml
index 2ad856b4fe4..2a2a1eea178 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_lastorders.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_lastorders.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <container name="root" label="Root" output="1">
-        <block class="Magento\Adminhtml\Block\Customer\Edit\Tab\View\Orders" name="admin.customer.lastorders"/>
+        <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\View\Orders" name="admin.customer.lastorders"/>
     </container>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_newsletter.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_newsletter.xml
similarity index 94%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_newsletter.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_index_newsletter.xml
index 264212eefc5..34948361db1 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_newsletter.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_newsletter.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <container name="root" label="Root" output="1">
-        <block class="Magento\Adminhtml\Block\Customer\Edit\Tab\Newsletter\Grid" name="admin.customer.newsletter.grid"/>
+        <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter\Grid" name="admin.customer.newsletter.grid"/>
     </container>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_orders.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_orders.xml
similarity index 94%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_orders.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_index_orders.xml
index 37aa99de7f8..64e7b61acf1 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_orders.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_orders.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <container name="root" label="Root" output="1">
-        <block class="Magento\Adminhtml\Block\Customer\Edit\Tab\Orders" name="adminhtml.customer.edit.tab.orders"/>
+        <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\Orders" name="adminhtml.customer.edit.tab.orders"/>
     </container>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_productreviews.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_productreviews.xml
similarity index 94%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_productreviews.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_index_productreviews.xml
index d94d986c549..eb136ef1497 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_productreviews.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_productreviews.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <container name="root" label="Root" output="1">
-        <block class="Magento\Adminhtml\Block\Customer\Edit\Tab\Reviews" name="admin.customer.reviews"/>
+        <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\Reviews" name="admin.customer.reviews"/>
     </container>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_viewcart.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_viewcart.xml
similarity index 94%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_viewcart.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_index_viewcart.xml
index 52126364a8f..76ef15681eb 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_viewcart.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_viewcart.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <container name="root" label="Root" output="1">
-        <block class="Magento\Adminhtml\Block\Customer\Edit\Tab\View\Cart" name="admin.customer.view.cart"/>
+        <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\View\Cart" name="admin.customer.view.cart"/>
     </container>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_viewwishlist.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_viewwishlist.xml
similarity index 94%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_viewwishlist.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_index_viewwishlist.xml
index d9c54cf3dc5..423477efb1d 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_viewwishlist.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_index_viewwishlist.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <container name="root" label="Root" output="1">
-        <block class="Magento\Adminhtml\Block\Customer\Edit\Tab\View\Wishlist" name="admin.customer.view.wishlist"/>
+        <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\View\Wishlist" name="admin.customer.view.wishlist"/>
     </container>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_online_index.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_online_index.xml
similarity index 97%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_online_index.xml
rename to app/code/Magento/Customer/view/adminhtml/layout/customer_online_index.xml
index 6b172871def..a2e19321076 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_customer_online_index.xml
+++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_online_index.xml
@@ -25,7 +25,7 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Customer\Online" name="adminhtml.block.customer.online.grid.container">
+        <block class="Magento\Customer\Block\Adminhtml\Online" name="adminhtml.block.customer.online.grid.container">
             <block class="Magento\Backend\Block\Widget\Grid" name="adminhtml.block.customer.online.grid" as="grid">
                 <arguments>
                     <argument name="id" xsi:type="string">onlineGrid</argument>
@@ -38,7 +38,7 @@
                     <arguments>
                         <argument name="rowUrl" xsi:type="array">
                             <item name="generatorClass" xsi:type="string">Magento\Log\Model\Resource\Visitor\Online\Grid\Row\UrlGenerator</item>
-                            <item name="path" xsi:type="string">adminhtml/customer/edit</item>
+                            <item name="path" xsi:type="string">customer/index/edit</item>
                             <item name="extraParamsTemplate" xsi:type="array">
                                 <item name="id" xsi:type="string">getCustomerId</item>
                             </item>
@@ -80,7 +80,7 @@
                             <argument name="header" xsi:type="string" translate="true">IP Address</argument>
                             <argument name="default" xsi:type="string">n/a</argument>
                             <argument name="filter" xsi:type="string">0</argument>
-                            <argument name="renderer" xsi:type="string">Magento\Adminhtml\Block\Customer\Online\Grid\Renderer\Ip</argument>
+                            <argument name="renderer" xsi:type="string">Magento\Customer\Block\Adminhtml\Online\Grid\Renderer\Ip</argument>
                             <argument name="index" xsi:type="string">remote_addr</argument>
                         </arguments>
                     </block>
@@ -119,7 +119,7 @@
                             <argument name="linelength" xsi:type="string">60</argument>
                             <argument name="type" xsi:type="string">wrapline</argument>
                             <argument name="index" xsi:type="string">last_url</argument>
-                            <argument name="renderer" xsi:type="string">Magento\Adminhtml\Block\Customer\Online\Grid\Renderer\Url</argument>
+                            <argument name="renderer" xsi:type="string">Magento\Customer\Block\Adminhtml\Online\Grid\Renderer\Url</argument>
                         </arguments>
                     </block>
                 </block>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/customer/online.phtml b/app/code/Magento/Customer/view/adminhtml/online.phtml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/customer/online.phtml
rename to app/code/Magento/Customer/view/adminhtml/online.phtml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/customer/sales/order/create/address/form/renderer/vat.phtml b/app/code/Magento/Customer/view/adminhtml/sales/order/create/address/form/renderer/vat.phtml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/customer/sales/order/create/address/form/renderer/vat.phtml
rename to app/code/Magento/Customer/view/adminhtml/sales/order/create/address/form/renderer/vat.phtml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/customer/system/config/validatevat.phtml b/app/code/Magento/Customer/view/adminhtml/system/config/validatevat.phtml
similarity index 97%
rename from app/code/Magento/Adminhtml/view/adminhtml/customer/system/config/validatevat.phtml
rename to app/code/Magento/Customer/view/adminhtml/system/config/validatevat.phtml
index c6461d763c6..804072cfa8f 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/customer/system/config/validatevat.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/system/config/validatevat.phtml
@@ -26,7 +26,7 @@
 ?>
 <?php
 /**
- * @see \Magento\Adminhtml\Block\Customer\System\Config\Validatevat
+ * @see \Magento\Customer\Block\Adminhtml\System\Config\Validatevat
  */
 ?>
 <script type="text/javascript">
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/customer/tab/addresses.phtml b/app/code/Magento/Customer/view/adminhtml/tab/addresses.phtml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/customer/tab/addresses.phtml
rename to app/code/Magento/Customer/view/adminhtml/tab/addresses.phtml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/customer/tab/cart.phtml b/app/code/Magento/Customer/view/adminhtml/tab/cart.phtml
similarity index 81%
rename from app/code/Magento/Adminhtml/view/adminhtml/customer/tab/cart.phtml
rename to app/code/Magento/Customer/view/adminhtml/tab/cart.phtml
index 75f1efbed0e..f78315ff712 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/customer/tab/cart.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/tab/cart.phtml
@@ -24,7 +24,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 ?>
-<?php /* @var $this \Magento\Adminhtml\Block\Customer\Edit\Tab\Cart */ ?>
+<?php /* @var $this \Magento\Customer\Block\Adminhtml\Edit\Tab\Cart */ ?>
 <?php if($this->getCartHeader()): ?>
 <div class="content-header skip-header">
     <table cellspacing="0">
@@ -65,10 +65,10 @@
 
     removeItem: function (itemId) {
         if (!itemId) {
-            alert('<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('No item specified.')) ?>');
+            alert('<?php echo $this->escapeJsQuote(__('No item specified.')) ?>');
             return false;
         }
-        if(!confirm('<?php echo $this->helper('Magento\Customer\Helper\Data')->jsQuoteEscape(__('Are you sure that you want to remove this item?')) ?>')) {
+        if(!confirm('<?php echo $this->escapeJsQuote(__('Are you sure that you want to remove this item?')) ?>')) {
             return false;
         }
 
@@ -87,8 +87,8 @@ $params = array(
 productConfigure.addListType(
     '<?php echo $listType ?>',
     {
-        urlFetch: '<?php echo $this->getUrl('adminhtml/customer_cart_product_composite_cart/configure', $params) ?>',
-        urlConfirm: '<?php echo $this->getUrl('adminhtml/customer_cart_product_composite_cart/update', $params) ?>'
+        urlFetch: '<?php echo $this->getUrl('customer/cart_product_composite_cart/configure', $params) ?>',
+        urlConfirm: '<?php echo $this->getUrl('customer/cart_product_composite_cart/update', $params) ?>'
     }
 );
 </script>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/customer/tab/newsletter.phtml b/app/code/Magento/Customer/view/adminhtml/tab/newsletter.phtml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/customer/tab/newsletter.phtml
rename to app/code/Magento/Customer/view/adminhtml/tab/newsletter.phtml
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/customer/tab/view.phtml b/app/code/Magento/Customer/view/adminhtml/tab/view.phtml
similarity index 98%
rename from app/code/Magento/Adminhtml/view/adminhtml/customer/tab/view.phtml
rename to app/code/Magento/Customer/view/adminhtml/tab/view.phtml
index 3ab8de29c2d..e2d82d4fa43 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/customer/tab/view.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/tab/view.phtml
@@ -26,7 +26,7 @@
 ?>
 <?php
 /**
- * Template for block \Magento\Adminhtml\Block\Customer\Edit\Tab\View
+ * Template for block \Magento\Customer\Block\Adminhtml\Edit\Tab\View
  */
 ?>
 <?php
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/customer/tab/view/sales.phtml b/app/code/Magento/Customer/view/adminhtml/tab/view/sales.phtml
similarity index 98%
rename from app/code/Magento/Adminhtml/view/adminhtml/customer/tab/view/sales.phtml
rename to app/code/Magento/Customer/view/adminhtml/tab/view/sales.phtml
index 518107b0314..8f3148a0cc8 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/customer/tab/view/sales.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/tab/view/sales.phtml
@@ -24,7 +24,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 ?>
-<?php /** @var $this \Magento\Adminhtml\Block\Customer\Edit\Tab\View\Sales */ ?>
+<?php /** @var $this \Magento\Customer\Block\Adminhtml\Edit\Tab\View\Sales */ ?>
 <?php $singleStoreMode = $this->isSingleStoreMode(); ?>
 <div class="entry-edit fieldset-wrapper">
 
diff --git a/app/code/Magento/Customer/view/frontend/address/edit.phtml b/app/code/Magento/Customer/view/frontend/address/edit.phtml
index 7b91429fad5..e726d3a6e2a 100644
--- a/app/code/Magento/Customer/view/frontend/address/edit.phtml
+++ b/app/code/Magento/Customer/view/frontend/address/edit.phtml
@@ -105,10 +105,10 @@
                 <div class="field">
                     <label for="region_id" class="required"><em>*</em><?php echo __('State/Province') ?></label>
                     <div class="input-box">
-                        <select id="region_id" name="region_id" title="<?php echo __('State/Province') ?>" class="validate-select" style="display:none;" <?php if ($this->getConfigNode('general/region/display_all') === 0) { ?>disabled="disabled"<?php } ?>>
+                        <select id="region_id" name="region_id" title="<?php echo __('State/Province') ?>" class="validate-select" style="display:none;" <?php if (!$this->getConfig('general/region/display_all')) { ?>disabled="disabled"<?php } ?>>
                            <option value=""><?php echo __('Please select region, state or province') ?></option>
                         </select>
-                        <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>"  title="<?php echo __('State/Province') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>"  <?php if ($this->getConfigNode('general/region/display_all') === 0) { ?>disabled="disabled"<?php } ?>/>
+                        <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>"  title="<?php echo __('State/Province') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>"  <?php if (!$this->getConfig('general/region/display_all')) { ?>disabled="disabled"<?php } ?>/>
                     </div>
                 </div>
             </li>
diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Element/Composite/AbstractComposite.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Element/Composite/AbstractComposite.php
index b5ef0df1d2f..69e5010302b 100644
--- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Element/Composite/AbstractComposite.php
+++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Element/Composite/AbstractComposite.php
@@ -70,7 +70,7 @@ abstract class AbstractComposite
     protected $_elementsFactory;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form\Element\Factory $elementsFactory
@@ -78,7 +78,7 @@ abstract class AbstractComposite
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form\Element\Factory $elementsFactory,
@@ -88,7 +88,7 @@ abstract class AbstractComposite
         $this->_elementsFactory = $elementsFactory;
         $this->_rendererFactory = $rendererFactory;
 
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
     }
 
     /**
diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php
index 7b459b7adcc..2b02e142b4e 100644
--- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php
+++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php
@@ -181,7 +181,7 @@ class Edit
         $sourceChange = $this->_changeFactory->create();
         $sourceChange->loadByThemeId($this->_themeContext->getEditableTheme()->getId());
         $dateMessage = $this->_localeModel
-            ->date($sourceChange->getChangeTime(), \Magento\Date::DATETIME_INTERNAL_FORMAT)->toString();
+            ->date($sourceChange->getChangeTime(), \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)->toString();
         $message = __('Do you want to restore the version saved at %1?', $dateMessage);
 
         $data = array(
@@ -194,7 +194,7 @@ class Edit
                 )
             )
         );
-        return $this->helper('Magento\Backend\Helper\Data')->escapeHtml(json_encode($data));
+        return $this->escapeHtml(json_encode($data));
     }
 
     /**
@@ -215,7 +215,7 @@ class Edit
                 )
             )
         );
-        return $this->helper('Magento\Backend\Helper\Data')->escapeHtml(json_encode($data));
+        return $this->escapeHtml(json_encode($data));
     }
 
     /**
diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Save.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Save.php
index 651b99b56f0..f721b508849 100644
--- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Save.php
+++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Save.php
@@ -33,8 +33,7 @@
  */
 namespace Magento\DesignEditor\Block\Adminhtml\Editor\Toolbar\Buttons;
 
-class Save
-    extends \Magento\Backend\Block\Widget\Button\SplitButton
+class Save extends \Magento\Backend\Block\Widget\Button\SplitButton
 {
     /**
      * Current theme used for preview
@@ -301,6 +300,6 @@ class Save
      */
     protected function _encode($data)
     {
-        return $this->helper('Magento\Backend\Helper\Data')->escapeHtml(json_encode($data));
+        return $this->escapeHtml(json_encode($data));
     }
 }
diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Custom.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Custom.php
index 8f87707be62..4e0c8fe9823 100644
--- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Custom.php
+++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Custom.php
@@ -45,7 +45,7 @@ class Custom extends \Magento\Backend\Block\Widget\Form\Generic
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\DesignEditor\Model\Theme\Context $themeContext
@@ -53,7 +53,7 @@ class Custom extends \Magento\Backend\Block\Widget\Form\Generic
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\DesignEditor\Model\Theme\Context $themeContext,
diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/ImageSizing.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/ImageSizing.php
index ffcabe79c5d..a1553ee7043 100644
--- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/ImageSizing.php
+++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/ImageSizing.php
@@ -50,7 +50,7 @@ class ImageSizing extends \Magento\Backend\Block\Widget\Form\Generic
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Eav\Model\Config $eavConfig
@@ -60,7 +60,7 @@ class ImageSizing extends \Magento\Backend\Block\Widget\Form\Generic
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Eav\Model\Config $eavConfig,
@@ -170,7 +170,7 @@ class ImageSizing extends \Magento\Backend\Block\Widget\Form\Generic
                 'name'  => 'save_image_sizing',
                 'title' => __('Update'),
                 'value' => __('Update'),
-                'data-mage-init' => $this->helper('Magento\Backend\Helper\Data')->escapeHtml(json_encode(array(
+                'data-mage-init' => $this->escapeHtml(json_encode(array(
                     'button' => array(
                         'event'  => 'saveForm',
                         'target' => 'body'
@@ -364,7 +364,7 @@ class ImageSizing extends \Magento\Backend\Block\Widget\Form\Generic
             'title' => __('Reset to Original'),
             'value' => __('Reset to Original'),
             'class' => 'action-reset',
-            'data-mage-init' => $this->helper('Magento\Backend\Helper\Data')->escapeHtml(json_encode(array(
+            'data-mage-init' => $this->escapeHtml(json_encode(array(
                 'button' => array(
                     'event'     => 'restoreDefaultData',
                     'target'    => 'body',
diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Js.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Js.php
index 64d7886d5aa..df05cf2a656 100644
--- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Js.php
+++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Js.php
@@ -45,7 +45,7 @@ class Js extends \Magento\Backend\Block\Widget\Form\Generic
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Theme\Model\Config\Customization $customizationConfig
@@ -54,7 +54,7 @@ class Js extends \Magento\Backend\Block\Widget\Form\Generic
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Theme\Model\Config\Customization $customizationConfig,
diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Button.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Button.php
index cc2e4bec63d..162196bd6ae 100644
--- a/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Button.php
+++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Button.php
@@ -91,11 +91,10 @@ class Button extends \Magento\Core\Block\Template
      */
     protected function _attributesToHtml($attributes)
     {
-        $helper = $this->helper('Magento\Backend\Helper\Data');
         $html = '';
         foreach ($attributes as $attributeKey => $attributeValue) {
             if ($attributeValue !== null && $attributeValue !== '') {
-                $html .= $attributeKey . '="' . $helper->escapeHtml($attributeValue) . '" ';
+                $html .= $attributeKey . '="' . $this->escapeHtml($attributeValue) . '" ';
             }
         }
         return $html;
diff --git a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php
index 2000b054019..f4de4068626 100644
--- a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php
+++ b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php
@@ -95,7 +95,7 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action
 
             $response = array('content' => $this->getLayout()->getOutput());
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $response = array('error' => __('Sorry, but we can\'t load the theme list.'));
         }
         $this->getResponse()->setBody($coreHelper->jsonEncode($response));
@@ -140,12 +140,12 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action
             $this->renderLayout();
         } catch (\Magento\Core\Exception $e) {
             $this->_getSession()->addException($e, $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_redirect('adminhtml/*/');
             return;
         } catch (\Exception $e) {
             $this->_getSession()->addException($e, __('Sorry, there was an unknown error.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_redirect('adminhtml/*/');
             return;
         }
@@ -185,7 +185,7 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action
                 'themeId' => $themeCustomization->getId()
             );
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->getResponse()->setBody($coreHelper->jsonEncode(
                 array('error' => __('This theme is not assigned.'))
             ));
@@ -218,9 +218,9 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action
             $response = array('success' => true);
         } catch (\Magento\Core\Exception $e) {
             $response = array('error' => true, 'message' => $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $response = array('error' => true, 'message' => __('This theme is not saved.'));
         }
         $this->getResponse()->setBody($coreHelper->jsonEncode($response));
@@ -255,7 +255,7 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action
             }
             $response = array('message' =>  $message);
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $response = array('error' => true, 'message' => __('Sorry, there was an unknown error.'));
         }
 
@@ -290,9 +290,9 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action
             );
         } catch (\Magento\Core\Exception $e) {
             $this->_getSession()->addError($e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_getSession()->addError(__('You cannot duplicate this theme.'));
         }
         $this->_redirectUrl($this->_getRefererUrl());
@@ -339,7 +339,7 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action
             }
             $response = array('message' => $message);
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $response = array('error' => true, 'message' => __('Unknown error'));
         }
         /** @var $coreHelper \Magento\Core\Helper\Data */
@@ -501,7 +501,7 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Exception $e) {
             $this->_getSession()->addError(__('We can\'t load the list of themes.'));
             $this->_redirectUrl($this->_getRefererUrl());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
     }
 
diff --git a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Files.php b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Files.php
index a444d787175..e343e66fc63 100644
--- a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Files.php
+++ b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Files.php
@@ -44,7 +44,7 @@ class Files
                     ->getTreeJson($this->_getStorage()->getTreeArray())
             );
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode(array()));
         }
     }
diff --git a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools.php b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools.php
index fa3939438d0..19fdb2007d3 100644
--- a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools.php
+++ b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools.php
@@ -72,10 +72,10 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
             );
         } catch (\Magento\Core\Exception $e) {
             $response = array('error' => true, 'message' => $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
             $response = array('error' => true, 'message' => __('We cannot upload the CSS file.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($response));
     }
@@ -102,10 +102,10 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
             );
         } catch (\Magento\Core\Exception $e) {
             $response = array('error' => true, 'message' => $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
             $response = array('error' => true, 'message' => __('We can\'t save the custom css file.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($response));
     }
@@ -123,7 +123,7 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
             $result = array('error' => false, 'files' => $customization->generateFileInfo($customJsFiles));
             $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
     }
 
@@ -149,10 +149,10 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
             return;
         } catch (\Magento\Core\Exception $e) {
             $response = array('error' => true, 'message' => $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
             $response = array('error' => true, 'message' => __('We cannot upload the JS file.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($response));
     }
@@ -170,7 +170,7 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
             $this->_forward('jsList');
         } catch (\Exception $e) {
             $this->_redirectUrl($this->_getRefererUrl());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
     }
 
@@ -189,10 +189,10 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
             $result = array('success' => true);
         } catch (\Magento\Core\Exception $e) {
             $result = array('error' => true, 'message' => $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
             $result = array('error' => true, 'message' => __('We cannot upload the CSS file.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
     }
@@ -221,10 +221,10 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
             $result = array('success' => true, 'message' => __('We saved the image sizes.'));
         } catch (\Magento\Core\Exception $e) {
             $result = array('error' => true, 'message' => $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
             $result = array('error' => true, 'message' => __('We can\'t save image sizes.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
 
@@ -257,12 +257,12 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Magento\Core\Exception $e) {
             $this->_session->addError($e->getMessage());
             $response = array('error' => true, 'message' => $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
             $errorMessage = __('Something went wrong uploading the image.' .
                 ' Please check the file format and try again (JPEG, GIF, or PNG).');
             $response = array('error' => true, 'message' => $errorMessage);
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($response));
     }
@@ -296,12 +296,12 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
             $response = array('error' => false, 'content' => $result);
         } catch (\Magento\Core\Exception $e) {
             $response = array('error' => true, 'message' => $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
             $errorMessage = __('Something went wrong uploading the image.' .
                 ' Please check the file format and try again (JPEG, GIF, or PNG).');
             $response = array('error' => true, 'message' => $errorMessage);
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($response));
     }
@@ -341,12 +341,12 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
             $response = array('error' => false, 'content' => array('name' => basename($storeLogo->getValue())));
         } catch (\Magento\Core\Exception $e) {
             $response = array('error' => true, 'message' => $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
             $errorMessage = __('Something went wrong uploading the image.' .
                 ' Please check the file format and try again (JPEG, GIF, or PNG).');
             $response = array('error' => true, 'message' => $errorMessage);
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($response));
     }
@@ -386,12 +386,12 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
             $response = array('error' => false, 'content' => array());
         } catch (\Magento\Core\Exception $e) {
             $response = array('error' => true, 'message' => $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
             $errorMessage = __('Something went wrong uploading the image.' .
                 ' Please check the file format and try again (JPEG, GIF, or PNG).');
             $response = array('error' => true, 'message' => $errorMessage);
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($response));
     }
@@ -416,12 +416,12 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action
             $response = array('success' => true);
         } catch (\Magento\Core\Exception $e) {
             $response = array('error' => true, 'message' => $e->getMessage());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         } catch (\Exception $e) {
             $errorMessage = __('Something went wrong uploading the image.' .
                 ' Please check the file format and try again (JPEG, GIF, or PNG).');
             $response = array('error' => true, 'message' => $errorMessage);
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($response));
     }
diff --git a/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php b/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php
index db0afa6961d..e944632dbb6 100644
--- a/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php
+++ b/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php
@@ -27,7 +27,7 @@ namespace Magento\DesignEditor\Controller\Varien\Router;
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-class Standard extends \Magento\Core\Controller\Varien\Router\Base
+class Standard extends \Magento\Core\App\Router\Base
 {
     /**
      * @var \Magento\ObjectManager
@@ -54,55 +54,38 @@ class Standard extends \Magento\Core\Controller\Varien\Router\Base
     protected $_urlRewriteService;
 
     /**
+     * @param \Magento\App\ActionFactory $actionFactory
+     * @param \Magento\App\DefaultPathInterface $defaultPath
+     * @param \Magento\App\ResponseFactory $responseFactory
+     * @param \Magento\App\Route\Config $routeConfig
+     * @param \Magento\App\State $appState
+     * @param \Magento\UrlInterface $url
+     * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Core\Model\Store\Config $storeConfig
+     * @param \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo
      * @param \Magento\App\RouterListInterface $routerList
-     * @param \Magento\App\ActionFactory $controllerFactory
      * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Filesystem $filesystem
-     * @param \Magento\Core\Model\App $app
-     * @param \Magento\Core\Model\Route\Config $routeConfig
-     * @param \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo
-     * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Core\Model\Config $config
-     * @param \Magento\Core\Model\Url $url
-     * @param \Magento\Core\Model\StoreManager $storeManager
-     * @param \Magento\App\State $appState
      * @param \Magento\Core\App\Request\RewriteService $urlRewriteService
-     * @param string $areaCode
-     * @param string $baseController
-     * @param string $routerId
+     * @param $routerId
      */
     public function __construct(
+        \Magento\App\ActionFactory $actionFactory,
+        \Magento\App\DefaultPathInterface $defaultPath,
+        \Magento\App\ResponseFactory $responseFactory,
+        \Magento\App\Route\Config $routeConfig,
+        \Magento\App\State $appState,
+        \Magento\UrlInterface $url,
+        \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Core\Model\Store\Config $storeConfig,
+        \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo,
         \Magento\App\RouterListInterface $routerList,
-        \Magento\App\ActionFactory $controllerFactory,
         \Magento\ObjectManager $objectManager,
-        \Magento\Filesystem $filesystem,
-        \Magento\Core\Model\App $app,
-        \Magento\Core\Model\Route\Config $routeConfig,
-        \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo,
-        \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Core\Model\Config $config,
-        \Magento\Core\Model\Url $url,
-        \Magento\Core\Model\StoreManager $storeManager,
-        \Magento\App\State $appState,
         \Magento\Core\App\Request\RewriteService $urlRewriteService,
-        $areaCode,
-        $baseController,
         $routerId
     ) {
         parent::__construct(
-            $controllerFactory,
-            $filesystem,
-            $app,
-            $coreStoreConfig,
-            $routeConfig,
-            $securityInfo,
-            $config,
-            $url,
-            $storeManager,
-            $appState,
-            $areaCode,
-            $baseController,
-            $routerId
+            $actionFactory, $defaultPath, $responseFactory, $routeConfig, $appState, $url, $storeManager, $storeConfig,
+            $urlSecurityInfo, $routerId
         );
         $this->_urlRewriteService = $urlRewriteService;
         $this->_objectManager = $objectManager;
@@ -127,9 +110,6 @@ class Standard extends \Magento\Core\Controller\Varien\Router\Base
             return null;
         }
 
-        // override VDE configuration
-        $this->_overrideConfiguration();
-
         // prepare request to imitate
         $this->_prepareVdeRequest($request);
 
@@ -145,7 +125,7 @@ class Standard extends \Magento\Core\Controller\Varien\Router\Base
             $controller = $router->match($request);
             if ($controller) {
                 $this->_objectManager->get('Magento\DesignEditor\Model\State')
-                    ->update($this->_areaCode, $request, $controller);
+                    ->update(\Magento\Core\Model\App\Area::AREA_FRONTEND, $request);
                 break;
             }
         }
@@ -188,17 +168,4 @@ class Standard extends \Magento\Core\Controller\Varien\Router\Base
         }
         return $routers;
     }
-
-    /**
-     * Override frontend configuration with VDE area data
-     */
-    protected function _overrideConfiguration()
-    {
-        $vdeNode = $this->_objectManager->get('Magento\Core\Model\Config')
-            ->getNode(\Magento\DesignEditor\Model\Area::AREA_VDE);
-        if ($vdeNode) {
-            $this->_objectManager->get('Magento\Core\Model\Config')->getNode(\Magento\Core\Model\App\Area::AREA_FRONTEND)
-                ->extend($vdeNode, true);
-        }
-    }
 }
diff --git a/app/code/Magento/DesignEditor/Model/Config/Control/ImageSizing.php b/app/code/Magento/DesignEditor/Model/Config/Control/ImageSizing.php
index e36864889c0..af23b4e7d12 100644
--- a/app/code/Magento/DesignEditor/Model/Config/Control/ImageSizing.php
+++ b/app/code/Magento/DesignEditor/Model/Config/Control/ImageSizing.php
@@ -39,15 +39,15 @@ class ImageSizing extends \Magento\DesignEditor\Model\Config\Control\AbstractCon
     protected $_controlAttributes = array('title');
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_moduleReader;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      * @param array $configFiles
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader, array $configFiles)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader, array $configFiles)
     {
         $this->_moduleReader = $moduleReader;
         parent::__construct($configFiles);
diff --git a/app/code/Magento/DesignEditor/Model/Config/Control/QuickStyles.php b/app/code/Magento/DesignEditor/Model/Config/Control/QuickStyles.php
index 8dce76049df..d7a4c9d8e76 100644
--- a/app/code/Magento/DesignEditor/Model/Config/Control/QuickStyles.php
+++ b/app/code/Magento/DesignEditor/Model/Config/Control/QuickStyles.php
@@ -39,15 +39,15 @@ class QuickStyles extends \Magento\DesignEditor\Model\Config\Control\AbstractCon
     protected $_controlAttributes = array('title', 'tab', 'column');
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_moduleReader;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      * @param array $configFiles
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader, array $configFiles)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader, array $configFiles)
     {
         $this->_moduleReader = $moduleReader;
         parent::__construct($configFiles);
diff --git a/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Form/Builder.php b/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Form/Builder.php
index 77e8ce7b7e3..d622780ec6c 100644
--- a/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Form/Builder.php
+++ b/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/Form/Builder.php
@@ -32,7 +32,7 @@ namespace Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form;
 class Builder
 {
     /**
-     * @var \Magento\Data\Form\Factory
+     * @var \Magento\Data\FormFactory
      */
     protected $_formFactory;
 
@@ -59,13 +59,13 @@ class Builder
     /**
      * Constructor
      *
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\DesignEditor\Model\Editor\Tools\Controls\Factory $configFactory
      * @param \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form\Renderer\Factory $rendererFactory
      * @param \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form\Element\Factory $elementsFactory
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\DesignEditor\Model\Editor\Tools\Controls\Factory $configFactory,
         \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form\Renderer\Factory $rendererFactory,
         \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form\Element\Factory $elementsFactory
diff --git a/app/code/Magento/DesignEditor/Model/Theme/Resource/Change.php b/app/code/Magento/DesignEditor/Model/Theme/Resource/Change.php
index 3b31bcc0464..184d8c7dc27 100644
--- a/app/code/Magento/DesignEditor/Model/Theme/Resource/Change.php
+++ b/app/code/Magento/DesignEditor/Model/Theme/Resource/Change.php
@@ -31,6 +31,21 @@ namespace Magento\DesignEditor\Model\Theme\Resource;
 
 class Change extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\App\Resource $resource
+     */
+    public function __construct(\Magento\Stdlib\DateTime $dateTime, \Magento\App\Resource $resource)
+    {
+        $this->dateTime = $dateTime;
+        parent::__construct($resource);
+    }
+
     /**
      * Resource initialization
      */
@@ -48,7 +63,7 @@ class Change extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected function _beforeSave(\Magento\Core\Model\AbstractModel $change)
     {
         if (!$change->getChangeTime()) {
-            $change->setChangeTime($this->formatDate(true));
+            $change->setChangeTime($this->dateTime->formatDate(true));
         }
         return $this;
     }
diff --git a/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php b/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php
index a318c32563b..dd79bfd35af 100644
--- a/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php
+++ b/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php
@@ -53,27 +53,27 @@ class NavigationMode extends \Magento\Core\Model\Url
     protected $_themeId;
 
     /**
-     * @param \Magento\App\RouterListInterface $routerList
+     * @param \Magento\App\Route\ConfigInterface $routeConfig
      * @param \Magento\App\RequestInterface $request
      * @param \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo
      * @param \Magento\DesignEditor\Helper\Data $helper
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @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 string $areaCode
      * @param array $data
      */
     public function __construct(
-        \Magento\App\RouterListInterface $routerList,
+        \Magento\App\Route\ConfigInterface $routeConfig,
         \Magento\App\RequestInterface $request,
         \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo,
         \Magento\DesignEditor\Helper\Data $helper,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\App $app,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Session $session,
+        $areaCode,
         array $data = array()
     ) {
         $this->_helper = $helper;
@@ -85,7 +85,7 @@ class NavigationMode extends \Magento\Core\Model\Url
             $this->_themeId = $data['themeId'];
         }
         parent::__construct(
-            $routerList, $request, $securityInfo, $coreStoreConfig, $coreData, $app, $storeManager, $session, $data
+            $routeConfig, $request, $securityInfo, $coreStoreConfig, $app, $storeManager, $session, $areaCode, $data
         );
     }
 
diff --git a/app/code/Magento/DesignEditor/etc/di.xml b/app/code/Magento/DesignEditor/etc/di.xml
index 6ee998169cc..a9748f13bb7 100644
--- a/app/code/Magento/DesignEditor/etc/di.xml
+++ b/app/code/Magento/DesignEditor/etc/di.xml
@@ -24,24 +24,7 @@
  */
 -->
 <config>
-    <type name="Magento\App\RouterList">
-        <param name="routerList">
-            <value>
-                <vde>
-                    <instance>Magento\DesignEditor\Controller\Varien\Router\Standard</instance>
-                    <disable type="bool">false</disable>
-                    <sortOrder>40</sortOrder>
-                </vde>
-            </value>
-        </param>
-    </type>
     <type name="Magento\DesignEditor\Controller\Varien\Router\Standard">
-        <param name="areaCode">
-            <value>frontend</value>
-        </param>
-        <param name="baseController">
-            <value>Magento\Core\Controller\Varien\Action</value>
-        </param>
         <param name="routerId">
             <value>vde</value>
         </param>
diff --git a/app/code/Magento/Rss/etc/frontend/di.xml b/app/code/Magento/DesignEditor/etc/frontend/di.xml
similarity index 76%
rename from app/code/Magento/Rss/etc/frontend/di.xml
rename to app/code/Magento/DesignEditor/etc/frontend/di.xml
index e9c6712ed23..c2ccf31fbaf 100644
--- a/app/code/Magento/Rss/etc/frontend/di.xml
+++ b/app/code/Magento/DesignEditor/etc/frontend/di.xml
@@ -24,12 +24,14 @@
  */
 -->
 <config>
-    <type name="Magento\Core\Model\Url\SecurityInfo">
-        <param name="secureUrlList">
+    <type name="Magento\App\RouterList">
+        <param name="routerList">
             <value>
-                <rss_catalog_review>/rss/catalog/review</rss_catalog_review>
-                <rss_order_new>/rss/order/new</rss_order_new>
-                <rss_catalog_notifystock>/rss/catalog/notifystock</rss_catalog_notifystock>
+                <vde>
+                    <instance>Magento\DesignEditor\Controller\Varien\Router\Standard</instance>
+                    <disable type="bool">false</disable>
+                    <sortOrder>40</sortOrder>
+                </vde>
             </value>
         </param>
     </type>
diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/custom.phtml b/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/custom.phtml
index 3aa0bfeb600..a860dd95df1 100644
--- a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/custom.phtml
+++ b/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/custom.phtml
@@ -75,7 +75,7 @@
                 '<?php echo $this->getMediaBrowserUrl('custom_code', \Magento\Theme\Model\Wysiwyg\Storage::TYPE_FONT) ?>',
                 null,
                 null,
-                '<?php echo $this->quoteEscape(__('Font Assets'), true); ?>'
+                '<?php echo $this->escapeQuote(__('Font Assets'), true); ?>'
             );
         });
         $('[data-manage="images"]').on('click', function() {
@@ -83,7 +83,7 @@
                 '<?php echo $this->getMediaBrowserUrl('custom_code', \Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE) ?>',
                 null,
                 null,
-                '<?php echo $this->quoteEscape(__('Image Assets'), true); ?>'
+                '<?php echo $this->escapeQuote(__('Image Assets'), true); ?>'
             );
         });
         $('#vde-tab-custom').customCssPanel({
diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/tree.phtml b/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/tree.phtml
index d087de6d5ac..165737bf2c5 100644
--- a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/tree.phtml
+++ b/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/tree.phtml
@@ -28,7 +28,7 @@
 /**
  * Directories tree template
  *
- * @see \Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Tree
+ * @see \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Tree
  */
 ?>
 
diff --git a/app/code/Magento/DesignEditor/view/adminhtml/theme/customized.phtml b/app/code/Magento/DesignEditor/view/adminhtml/theme/customized.phtml
index 88f384deff3..68b47ce8753 100644
--- a/app/code/Magento/DesignEditor/view/adminhtml/theme/customized.phtml
+++ b/app/code/Magento/DesignEditor/view/adminhtml/theme/customized.phtml
@@ -27,7 +27,7 @@
 
 <?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Theme */?>
 <?php
-    $themeTitle = $this->quoteEscape($this->getTheme()->getThemeTitle());
+    $themeTitle = $this->escapeQuote($this->getTheme()->getThemeTitle());
 ?>
 
 <li class="theme" id="theme-id-<?php echo $this->getTheme()->getId() ?>" data-widget-options="<?php echo $this->escapeHtml($this->getOptionsJson()); ?>">
diff --git a/app/code/Magento/DesignEditor/view/frontend/translate_inline.phtml b/app/code/Magento/DesignEditor/view/frontend/translate_inline.phtml
index 93e3afb6b59..badd77b3fc0 100644
--- a/app/code/Magento/DesignEditor/view/frontend/translate_inline.phtml
+++ b/app/code/Magento/DesignEditor/view/frontend/translate_inline.phtml
@@ -49,7 +49,7 @@
 </script>
 
 <div id="translate-dialog" data-role="translate-dialog"
-     data-mage-init="{loader: {icon: '<?php echo $this->getViewFileUrl('images/ajax-loader-tr.gif', array('area' => 'adminhtml')) ?>'}}">
+     data-mage-init="{loader: {icon: '<?php echo $this->getViewFileUrl('images/ajax-loader-tr.gif', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)) ?>'}}">
  </div>
 
 <script type="text/javascript">
diff --git a/app/code/Magento/Directory/Model/Resource/Country/Collection.php b/app/code/Magento/Directory/Model/Resource/Country/Collection.php
index ccb1254e921..39ee33d7089 100644
--- a/app/code/Magento/Directory/Model/Resource/Country/Collection.php
+++ b/app/code/Magento/Directory/Model/Resource/Country/Collection.php
@@ -31,13 +31,6 @@ namespace Magento\Directory\Model\Resource\Country;
 
 class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractCollection
 {
-    /**
-     * String helper
-     *
-     * @var \Magento\Core\Helper\String
-     */
-    protected $_stringHelper;
-
     /**
      * Locale model
      *
@@ -58,32 +51,39 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     protected $_countryFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * Array utils object
+     *
+     * @var \Magento\Stdlib\ArrayUtils
+     */
+    protected $_arrayUtils;
+
+    /**
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\String $stringHelper
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Directory\Model\Resource\CountryFactory $countryFactory
+     * @param \Magento\Stdlib\ArrayUtils $arrayUtils
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\String $stringHelper,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Directory\Model\Resource\CountryFactory $countryFactory,
+        \Magento\Stdlib\ArrayUtils $arrayUtils,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
     ) {
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource);
         $this->_coreStoreConfig = $coreStoreConfig;
-        $this->_stringHelper = $stringHelper;
         $this->_locale = $locale;
         $this->_countryFactory = $countryFactory;
+        $this->_arrayUtils = $arrayUtils;
     }
     /**
      * Foreground countries
@@ -205,7 +205,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
                 $sort[$name] = $data['value'];
             }
         }
-        $this->_stringHelper->ksortMultibyte($sort);
+        $this->_arrayUtils->ksortMultibyte($sort, $this->_locale->getLocaleCode());
         foreach (array_reverse($this->_foregroundCountries) as $foregroundCountry) {
             $name = array_search($foregroundCountry, $sort);
             unset($sort[$name]);
diff --git a/app/code/Magento/Directory/Model/Resource/Region.php b/app/code/Magento/Directory/Model/Resource/Region.php
index f59603b2f59..1fe108acd66 100644
--- a/app/code/Magento/Directory/Model/Resource/Region.php
+++ b/app/code/Magento/Directory/Model/Resource/Region.php
@@ -44,11 +44,11 @@ class Region extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_locale;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\LocaleInterface $locale
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\LocaleInterface $locale
     ) {
         parent::__construct($resource);
diff --git a/app/code/Magento/Directory/Model/Resource/Region/Collection.php b/app/code/Magento/Directory/Model/Resource/Region/Collection.php
index a5551a69e8b..ce4b6dd1736 100644
--- a/app/code/Magento/Directory/Model/Resource/Region/Collection.php
+++ b/app/code/Magento/Directory/Model/Resource/Region/Collection.php
@@ -52,7 +52,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -60,7 +60,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\LocaleInterface $locale,
diff --git a/app/code/Magento/Directory/etc/di.xml b/app/code/Magento/Directory/etc/di.xml
index c22053d60be..a0adf00d5f4 100644
--- a/app/code/Magento/Directory/etc/di.xml
+++ b/app/code/Magento/Directory/etc/di.xml
@@ -35,7 +35,7 @@
             </value>
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <directory_setup>Magento\Directory\Model\Resource\Setup</directory_setup>
diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php
index fad3f209c3c..89d68ca440a 100644
--- a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php
+++ b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Downloadable\Block\Adminhtml\Sales\Items\Column\Downloadable;
 
 /**
  * Sales Order downloadable items name column renderer
- *
- * @category   Magento
- * @package    Magento_Downloadable
- * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Downloadable\Block\Adminhtml\Sales\Items\Column\Downloadable;
-
 class Name extends \Magento\Sales\Block\Adminhtml\Items\Column\Name
 {
     protected $_purchased = null;
@@ -49,26 +44,27 @@ class Name extends \Magento\Sales\Block\Adminhtml\Items\Column\Name
     protected $_itemsFactory;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
      * @param \Magento\Catalog\Model\Product\OptionFactory $optionFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
+     * @param \Magento\Filter\FilterManager $filter
      * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory
      * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory
      * @param array $data
+     * @internal param \Magento\Core\Helper\String $coreString
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
         \Magento\Catalog\Model\Product\OptionFactory $optionFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
+        \Magento\Filter\FilterManager $filter,
         \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory,
         \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory,
         array $data = array()
     ) {
         $this->_purchasedFactory = $purchasedFactory;
         $this->_itemsFactory = $itemsFactory;
-        parent::__construct($coreString, $optionFactory, $coreData, $context, $data);
+        parent::__construct($optionFactory, $coreData, $context, $filter, $data);
     }
 
     public function getLinks()
diff --git a/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php b/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php
index 1485d193019..4042c7e90cd 100644
--- a/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php
+++ b/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php
@@ -24,15 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Downloadable\Block\Sales\Order\Item\Renderer;
+
 /**
  * Downloadable order item render block
- *
- * @category    Magento
- * @package     Magento_Downloadable
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Downloadable\Block\Sales\Order\Item\Renderer;
-
 class Downloadable extends \Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer
 {
     /**
@@ -51,33 +47,30 @@ class Downloadable extends \Magento\Sales\Block\Order\Item\Renderer\DefaultRende
     protected $_itemsFactory;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Block\Template\Context $context
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory
+     * @param \Magento\Filter\FilterManager $filter
      * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory
      * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Block\Template\Context $context,
+        \Magento\Stdlib\String $string,
         \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory,
+        \Magento\Filter\FilterManager $filter,
         \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory,
         \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory,
         array $data = array()
     ) {
         $this->_purchasedFactory = $purchasedFactory;
         $this->_itemsFactory = $itemsFactory;
-        parent::__construct($coreString, $coreData, $context, $productOptionFactory, $data);
+        parent::__construct($coreData, $context, $string, $productOptionFactory, $filter, $data);
     }
 
-    /**
-     * Enter description here...
-     *
-     * @return unknown
-     */
     public function getLinks()
     {
         $this->_purchasedLinks = $this->_purchasedFactory->create()
@@ -89,6 +82,9 @@ class Downloadable extends \Magento\Sales\Block\Order\Item\Renderer\DefaultRende
         return $this->_purchasedLinks;
     }
 
+    /**
+     * @return string
+     */
     public function getLinksTitle()
     {
         if ($this->_purchasedLinks->getLinkSectionTitle()) {
@@ -96,5 +92,4 @@ class Downloadable extends \Magento\Sales\Block\Order\Item\Renderer\DefaultRende
         }
         return $this->_storeConfig->getConfig(\Magento\Downloadable\Model\Link::XML_PATH_LINKS_TITLE);
     }
-
 }
diff --git a/app/code/Magento/Downloadable/Helper/Download.php b/app/code/Magento/Downloadable/Helper/Download.php
index a8ab22f10a9..2262d1e2aea 100644
--- a/app/code/Magento/Downloadable/Helper/Download.php
+++ b/app/code/Magento/Downloadable/Helper/Download.php
@@ -24,20 +24,26 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Downloadable\Helper;
+
 /**
  * Downloadable Products Download Helper
- *
- * @category    Magento
- * @package     Magento_Downloadable
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Downloadable\Helper;
-
 class Download extends \Magento\Core\Helper\AbstractHelper
 {
+    /**
+     * Link type url
+     */
     const LINK_TYPE_URL         = 'url';
+
+    /**
+     * Link type file
+     */
     const LINK_TYPE_FILE        = 'file';
 
+    /**
+     * Config path to content disposition
+     */
     const XML_PATH_CONTENT_DISPOSITION  = 'catalog/downloadable/content_disposition';
 
     /**
@@ -87,21 +93,21 @@ class Download extends \Magento\Core\Helper\AbstractHelper
      *
      * @var \Magento\Core\Helper\File\Storage\Database
      */
-    protected $_coreFileStorageDb = null;
+    protected $_coreFileStorageDb;
 
     /**
      * Downloadable file
      *
      * @var \Magento\Downloadable\Helper\File
      */
-    protected $_downloadableFile = null;
+    protected $_downloadableFile;
 
     /**
      * Core data
      *
      * @var \Magento\Core\Helper\Data
      */
-    protected $_coreData = null;
+    protected $_coreData;
 
     /**
      * Core store config
@@ -120,6 +126,11 @@ class Download extends \Magento\Core\Helper\AbstractHelper
      */
     protected $_dirModel;
 
+    /**
+     * @var \Magento\Filesystem
+     */
+    protected $_filesystem;
+
     /**
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Downloadable\Helper\File $downloadableFile
@@ -128,6 +139,7 @@ class Download extends \Magento\Core\Helper\AbstractHelper
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\App $app
      * @param \Magento\App\Dir $dirModel
+     * @param \Magento\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
@@ -136,7 +148,8 @@ class Download extends \Magento\Core\Helper\AbstractHelper
         \Magento\Core\Helper\Context $context,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\App $app,
-        \Magento\App\Dir $dirModel
+        \Magento\App\Dir $dirModel,
+        \Magento\Filesystem $filesystem
     ) {
         $this->_coreData = $coreData;
         $this->_downloadableFile = $downloadableFile;
@@ -144,6 +157,7 @@ class Download extends \Magento\Core\Helper\AbstractHelper
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_app = $app;
         $this->_dirModel = $dirModel;
+        $this->_filesystem = $filesystem;
         parent::__construct($context);
     }
 
@@ -151,6 +165,7 @@ class Download extends \Magento\Core\Helper\AbstractHelper
      * Retrieve Resource file handle (socket, file pointer etc)
      *
      * @return resource
+     * @throws \Magento\Core\Exception|\Exception
      */
     protected function _getHandle()
     {
@@ -189,16 +204,14 @@ class Download extends \Magento\Core\Helper\AbstractHelper
 
                 try {
                     $this->_handle = fsockopen($hostname, $port, $errno, $errstr);
-                }
-                catch (\Exception $e) {
+                } catch (\Exception $e) {
                     throw $e;
                 }
 
                 if ($this->_handle === false) {
                     throw new \Magento\Core\Exception(
-                        __('Something went wrong connecting to the host. Error: %1.', $errstr)
+                        __('Something went wrong connecting to the host. Error#%1 - %2.', $errno, $errstr)
                     );
-
                 }
 
                 $headers = 'GET ' . $path . $query . ' HTTP/1.0' . "\r\n"
@@ -218,12 +231,10 @@ class Download extends \Magento\Core\Helper\AbstractHelper
                         $k = strtolower($match[1]);
                         if ($k == 'set-cookie') {
                             continue;
-                        }
-                        else {
+                        } else {
                             $this->_urlHeaders[$k] = trim($match[2]);
                         }
-                    }
-                    elseif (preg_match('#^HTTP/[0-9\.]+ (\d+) (.*)\s$#', $str, $match)) {
+                    } elseif (preg_match('#^HTTP/[0-9\.]+ (\d+) (.*)\s$#', $str, $match)) {
                         $this->_urlHeaders['code'] = $match[1];
                         $this->_urlHeaders['code-string'] = trim($match[2]);
                     }
@@ -231,10 +242,8 @@ class Download extends \Magento\Core\Helper\AbstractHelper
 
                 if (!isset($this->_urlHeaders['code']) || $this->_urlHeaders['code'] != 200) {
                     throw new \Magento\Core\Exception(__('Something went wrong while getting the requested content.'));
-
                 }
-            }
-            elseif ($this->_linkType == self::LINK_TYPE_FILE) {
+            } elseif ($this->_linkType == self::LINK_TYPE_FILE) {
                 $this->_handle = new \Magento\Io\File();
                 if (!is_file($this->_resourceFile)) {
                     $this->_coreFileStorageDb->saveFileToFilesystem($this->_resourceFile);
@@ -244,8 +253,7 @@ class Download extends \Magento\Core\Helper\AbstractHelper
                     throw new \Magento\Core\Exception(__("We can't find this file."));
                 }
                 $this->_handle->streamOpen($this->_resourceFile, 'r');
-            }
-            else {
+            } else {
                 throw new \Magento\Core\Exception(__('Invalid download link type.'));
             }
         }
@@ -260,8 +268,7 @@ class Download extends \Magento\Core\Helper\AbstractHelper
         $handle = $this->_getHandle();
         if ($this->_linkType == self::LINK_TYPE_FILE) {
             return $handle->streamStat('size');
-        }
-        elseif ($this->_linkType == self::LINK_TYPE_URL) {
+        } elseif ($this->_linkType == self::LINK_TYPE_URL) {
             if (isset($this->_urlHeaders['content-length'])) {
                 return $this->_urlHeaders['content-length'];
             }
@@ -269,17 +276,19 @@ class Download extends \Magento\Core\Helper\AbstractHelper
         return null;
     }
 
+    /**
+     * @return string
+     */
     public function getContentType()
     {
-        $handle = $this->_getHandle();
+        $this->_getHandle();
         if ($this->_linkType == self::LINK_TYPE_FILE) {
             if (function_exists('mime_content_type') && ($contentType = mime_content_type($this->_resourceFile))) {
                 return $contentType;
             } else {
                 return $this->_downloadableFile->getFileType($this->_resourceFile);
             }
-        }
-        elseif ($this->_linkType == self::LINK_TYPE_URL) {
+        } elseif ($this->_linkType == self::LINK_TYPE_URL) {
             if (isset($this->_urlHeaders['content-type'])) {
                 $contentType = explode('; ', $this->_urlHeaders['content-type']);
                 return $contentType[0];
@@ -288,20 +297,23 @@ class Download extends \Magento\Core\Helper\AbstractHelper
         return $this->_contentType;
     }
 
+    /**
+     * @return string
+     */
     public function getFilename()
     {
-        $handle = $this->_getHandle();
+        $this->_getHandle();
         if ($this->_linkType == self::LINK_TYPE_FILE) {
             return pathinfo($this->_resourceFile, PATHINFO_BASENAME);
-        }
-        elseif ($this->_linkType == self::LINK_TYPE_URL) {
+        } elseif ($this->_linkType == self::LINK_TYPE_URL) {
             if (isset($this->_urlHeaders['content-disposition'])) {
                 $contentDisposition = explode('; ', $this->_urlHeaders['content-disposition']);
                 if (!empty($contentDisposition[1]) && strpos($contentDisposition[1], 'filename=') !== false) {
                     return substr($contentDisposition[1], 9);
                 }
             }
-            if ($fileName = @pathinfo($this->_resourceFile, PATHINFO_BASENAME)) {
+            $fileName = @pathinfo($this->_resourceFile, PATHINFO_BASENAME);
+            if ($fileName) {
                 return $fileName;
             }
         }
@@ -319,9 +331,7 @@ class Download extends \Magento\Core\Helper\AbstractHelper
     {
         if (self::LINK_TYPE_FILE == $linkType) {
             //check LFI protection
-            /** @var $helper \Magento\Core\Helper\Data */
-            $helper = $this->_coreData;
-            $helper->checkLfiProtection($resourceFile);
+            $this->_filesystem->checkLfiProtection($resourceFile);
         }
 
         $this->_resourceFile    = $resourceFile;
@@ -354,11 +364,10 @@ class Download extends \Magento\Core\Helper\AbstractHelper
     {
         $handle = $this->_getHandle();
         if ($this->_linkType == self::LINK_TYPE_FILE) {
-            while ($buffer = $handle->streamRead()) {
+            while (true == ($buffer = $handle->streamRead())) {
                 print $buffer;
             }
-        }
-        elseif ($this->_linkType == self::LINK_TYPE_URL) {
+        } elseif ($this->_linkType == self::LINK_TYPE_URL) {
             while (!feof($handle)) {
                 print fgets($handle, 1024);
             }
diff --git a/app/code/Magento/Downloadable/Helper/File.php b/app/code/Magento/Downloadable/Helper/File.php
index c2391d12c50..6fb282a610d 100644
--- a/app/code/Magento/Downloadable/Helper/File.php
+++ b/app/code/Magento/Downloadable/Helper/File.php
@@ -45,19 +45,17 @@ class File extends \Magento\Core\Helper\AbstractHelper
     /**
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase
      * @param \Magento\Core\Helper\Context $context
-     * @param \Magento\Core\Model\Config $config
+     * @param array $mimeTypes
      */
     public function __construct(
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase,
         \Magento\Core\Helper\Context $context,
-        \Magento\Core\Model\Config $config
+        array $mimeTypes = array()
     ) {
         $this->_coreFileStorageDatabase = $coreFileStorageDatabase;
         parent::__construct($context);
-        $nodes = $config->getNode('global/mime/types');
-        if ($nodes) {
-            $nodes = (array)$nodes;
-            foreach ($nodes as $key => $value) {
+        if (!empty($mimeTypes)) {
+            foreach ($mimeTypes as $key => $value) {
                 self::$_mimeTypes[$key] = $value;
             }
         }
@@ -65,11 +63,11 @@ class File extends \Magento\Core\Helper\AbstractHelper
 
     /**
      * Checking file for moving and move it
-     *
-     * @param string $baseTmpPath
+     * @param  string $baseTmpPath
      * @param string $basePath
-     * @param array $file
+     * @param string $file
      * @return string
+     * @throws \Magento\Core\Exception
      */
     public function moveFileFromTmp($baseTmpPath, $basePath, $file)
     {
diff --git a/app/code/Magento/Downloadable/Model/Product/Type.php b/app/code/Magento/Downloadable/Model/Product/Type.php
index b2c8757af3a..149fa860773 100644
--- a/app/code/Magento/Downloadable/Model/Product/Type.php
+++ b/app/code/Magento/Downloadable/Model/Product/Type.php
@@ -55,7 +55,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual
     protected $_linkResource;
 
     /**
-     * @var \Magento\Downloadable\Model\Resource\Link\Collection\Factory
+     * @var \Magento\Downloadable\Model\Resource\Link\CollectionFactory
      */
     protected $_linksFactory;
 
@@ -87,10 +87,10 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Core\Model\Registry $coreRegistry
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Downloadable\Model\Resource\SampleFactory $sampleResFactory
      * @param \Magento\Downloadable\Model\Resource\Link $linkResource
-     * @param \Magento\Downloadable\Model\Resource\Link\Collection\Factory $linksFactory
+     * @param \Magento\Downloadable\Model\Resource\Link\CollectionFactory $linksFactory
      * @param \Magento\Downloadable\Model\Resource\Sample\CollectionFactory $samplesFactory
      * @param \Magento\Downloadable\Model\SampleFactory $sampleFactory
      * @param \Magento\Downloadable\Model\LinkFactory $linkFactory
@@ -107,10 +107,10 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
         \Magento\Filesystem $filesystem,
         \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Downloadable\Model\Resource\SampleFactory $sampleResFactory,
         \Magento\Downloadable\Model\Resource\Link $linkResource,
-        \Magento\Downloadable\Model\Resource\Link\Collection\Factory $linksFactory,
+        \Magento\Downloadable\Model\Resource\Link\CollectionFactory $linksFactory,
         \Magento\Downloadable\Model\Resource\Sample\CollectionFactory $samplesFactory,
         \Magento\Downloadable\Model\SampleFactory $sampleFactory,
         \Magento\Downloadable\Model\LinkFactory $linkFactory,
diff --git a/app/code/Magento/Downloadable/Model/Resource/Link.php b/app/code/Magento/Downloadable/Model/Resource/Link.php
index 897ab0deca4..2f57c1213e9 100644
--- a/app/code/Magento/Downloadable/Model/Resource/Link.php
+++ b/app/code/Magento/Downloadable/Model/Resource/Link.php
@@ -60,14 +60,14 @@ class Link extends \Magento\Core\Model\Resource\Db\AbstractDb
 
     /**
      * @param \Magento\Catalog\Helper\Data $catalogData
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\App $app
      * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      */
     public function __construct(
         \Magento\Catalog\Helper\Data $catalogData,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\App $app,
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager
diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php
index a1e3651a476..7bb18f64e44 100644
--- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php
+++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php
@@ -33,12 +33,12 @@ class Creditmemo
     extends \Magento\Downloadable\Model\Sales\Order\Pdf\Items\AbstractItems
 {
     /**
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_stringHelper;
+    protected $string;
 
     /**
-     * @param \Magento\Core\Helper\String $helper
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -51,7 +51,7 @@ class Creditmemo
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $helper,
+        \Magento\Stdlib\String $string,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
@@ -63,7 +63,7 @@ class Creditmemo
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_stringHelper = $helper;
+        $this->string = $string;
         parent::__construct(
             $taxData,
             $context,
@@ -92,13 +92,13 @@ class Creditmemo
 
         // draw Product name
         $lines[0] = array(array(
-            'text' => $this->_stringHelper->strSplit($item->getName(), 35, true, true),
+            'text' => $this->string->split($item->getName(), 35, true, true),
             'feed' => 35,
         ));
 
         // draw SKU
         $lines[0][] = array(
-            'text'  => $this->_stringHelper->strSplit($this->getSku($item), 17),
+            'text'  => $this->string->split($this->getSku($item), 17),
             'feed'  => 255,
             'align' => 'right'
         );
@@ -151,7 +151,7 @@ class Creditmemo
             foreach ($options as $option) {
                 // draw options label
                 $lines[][] = array(
-                    'text' => $this->_stringHelper->strSplit(strip_tags($option['label']), 40, true, true),
+                    'text' => $this->string->split(strip_tags($option['label']), 40, true, true),
                     'font' => 'italic',
                     'feed' => 35
                 );
@@ -159,7 +159,7 @@ class Creditmemo
                 // draw options value
                 $_printValue = isset($option['print_value']) ? $option['print_value'] : strip_tags($option['value']);
                 $lines[][] = array(
-                    'text' => $this->_stringHelper->strSplit($_printValue, 30, true, true),
+                    'text' => $this->string->split($_printValue, 30, true, true),
                     'feed' => 40
                 );
             }
@@ -170,7 +170,7 @@ class Creditmemo
 
         // draw Links title
         $lines[][] = array(
-            'text' => $this->_stringHelper->strSplit($this->getLinksTitle(), 70, true, true),
+            'text' => $this->string->split($this->getLinksTitle(), 70, true, true),
             'font' => 'italic',
             'feed' => 35
         );
@@ -178,7 +178,7 @@ class Creditmemo
         // draw Links
         foreach ($_purchasedItems as $_link) {
             $lines[][] = array(
-                'text' => $this->_stringHelper->strSplit($_link->getLinkTitle(), 50, true, true),
+                'text' => $this->string->split($_link->getLinkTitle(), 50, true, true),
                 'feed' => 40
             );
         }
diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php
index 16c5f1f2f97..7263a9511a6 100644
--- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php
+++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php
@@ -38,14 +38,12 @@ class Invoice
     extends \Magento\Downloadable\Model\Sales\Order\Pdf\Items\AbstractItems
 {
     /**
-     * Core string
-     *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -58,7 +56,7 @@ class Invoice
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
@@ -70,7 +68,7 @@ class Invoice
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct(
             $taxData,
             $context,
@@ -98,15 +96,14 @@ class Invoice
         $lines  = array();
 
         // draw Product name
-        $stringHelper = $this->_coreString;
         $lines[0] = array(array(
-            'text' => $stringHelper->strSplit($item->getName(), 35, true, true),
+            'text' => $this->string->split($item->getName(), 35, true, true),
             'feed' => 35,
         ));
 
         // draw SKU
         $lines[0][] = array(
-            'text'  => $stringHelper->strSplit($this->getSku($item), 17),
+            'text'  => $this->string->split($this->getSku($item), 17),
             'feed'  => 290,
             'align' => 'right'
         );
@@ -170,7 +167,7 @@ class Invoice
             foreach ($options as $option) {
                 // draw options label
                 $lines[][] = array(
-                    'text' => $stringHelper->strSplit(strip_tags($option['label']), 40, true, true),
+                    'text' => $this->string->split(strip_tags($option['label']), 40, true, true),
                     'font' => 'italic',
                     'feed' => 35
                 );
@@ -184,7 +181,7 @@ class Invoice
                     $values = explode(', ', $_printValue);
                     foreach ($values as $value) {
                         $lines[][] = array(
-                            'text' => $stringHelper->strSplit($value, 30, true, true),
+                            'text' => $this->string->split($value, 30, true, true),
                             'feed' => 40
                         );
                     }
@@ -197,7 +194,7 @@ class Invoice
 
         // draw Links title
         $lines[][] = array(
-            'text' => $stringHelper->strSplit($this->getLinksTitle(), 70, true, true),
+            'text' => $this->string->split($this->getLinksTitle(), 70, true, true),
             'font' => 'italic',
             'feed' => 35
         );
@@ -205,7 +202,7 @@ class Invoice
         // draw Links
         foreach ($_purchasedItems as $_link) {
             $lines[][] = array(
-                'text' => $stringHelper->strSplit($_link->getLinkTitle(), 50, true, true),
+                'text' => $this->string->split($_link->getLinkTitle(), 50, true, true),
                 'feed' => 40
             );
         }
diff --git a/app/code/Magento/Downloadable/etc/di.xml b/app/code/Magento/Downloadable/etc/di.xml
index 57276d1bee8..b441b22d71d 100644
--- a/app/code/Magento/Downloadable/etc/di.xml
+++ b/app/code/Magento/Downloadable/etc/di.xml
@@ -26,12 +26,7 @@
 <config>
     <type name="Magento\Downloadable\Helper\Download">
         <param name="coreFileStorageDb">
-            <instance type="Magento\Core\Helper\File\Storage\DatabaseProxy" />
-        </param>
-    </type>
-    <type name="Magento\Downloadable\Model\Sales\Order\Pdf\Items\Creditmemo">
-        <param name="helper">
-            <instance type="Magento\Core\Helper\StringProxy" />
+            <instance type="Magento\Core\Helper\File\Storage\Database\Proxy" />
         </param>
     </type>
     <type name="Magento\Catalog\Helper\Product">
@@ -39,7 +34,7 @@
             <value>Virtual / Downloadable</value>
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <downloadable_setup>Magento\Catalog\Model\Resource\Setup</downloadable_setup>
diff --git a/app/code/Magento/Downloadable/etc/product_types.xml b/app/code/Magento/Downloadable/etc/product_types.xml
index f79fa967b72..cafbb6d8a6b 100644
--- a/app/code/Magento/Downloadable/etc/product_types.xml
+++ b/app/code/Magento/Downloadable/etc/product_types.xml
@@ -24,7 +24,7 @@
  */
 -->
 <config>
-    <type name="downloadable" label="Downloadable Product" modelInstance="Magento\Downloadable\Model\Product\Type" composite='false' isQty="true" canUseQtyDecimals="true">
+    <type name="downloadable" label="Downloadable Product" modelInstance="Magento\Downloadable\Model\Product\Type" composite="false" isQty="true" canUseQtyDecimals="false">
         <priceModel instance="Magento\Downloadable\Model\Product\Price" />
         <indexerModel instance="Magento\Downloadable\Model\Resource\Indexer\Price" />
     </type>
diff --git a/app/code/Magento/Downloadable/view/adminhtml/layout/adminhtml_customer_wishlist.xml b/app/code/Magento/Downloadable/view/adminhtml/layout/customer_index_wishlist.xml
similarity index 100%
rename from app/code/Magento/Downloadable/view/adminhtml/layout/adminhtml_customer_wishlist.xml
rename to app/code/Magento/Downloadable/view/adminhtml/layout/customer_index_wishlist.xml
diff --git a/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/creditmemo/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/creditmemo/name.phtml
index 272cb41478d..066a6c7e3b9 100644
--- a/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/creditmemo/name.phtml
+++ b/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/creditmemo/name.phtml
@@ -36,7 +36,7 @@
             <?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
                 <?php echo $_option['value'];?>
             <?php else: ?>
-                <?php echo $this->helper('Magento\Core\Helper\String')->truncate($_option['value'], 55, '', $_remainder);?>
+                <?php echo $this->truncateString($_option['value'], 55, '', $_remainder);?>
                 <?php if ($_remainder):?>
                     ... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
                     <script type="text/javascript">
diff --git a/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/invoice/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/invoice/name.phtml
index 889e369fa2c..54b43bd0baf 100644
--- a/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/invoice/name.phtml
+++ b/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/invoice/name.phtml
@@ -36,7 +36,7 @@
             <?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
                 <?php echo $_option['value'];?>
             <?php else: ?>
-                <?php echo $this->helper('Magento\Core\Helper\String')->truncate($_option['value'], 55, '', $_remainder);?>
+                <?php echo $this->truncateString($_option['value'], 55, '', $_remainder);?>
                 <?php if ($_remainder):?>
                     ... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
                     <script type="text/javascript">
diff --git a/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/name.phtml
index 2026f6f719e..b8a5fa9adee 100644
--- a/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/name.phtml
+++ b/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/name.phtml
@@ -36,7 +36,7 @@
             <?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
                 <?php echo $_option['value'];?>
             <?php else: ?>
-                <?php echo $this->helper('Magento\Core\Helper\String')->truncate($_option['value'], 55, '', $_remainder);?>
+                <?php echo $this->truncateString($_option['value'], 55, '', $_remainder);?>
                 <?php if ($_remainder):?>
                     ... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
                     <script type="text/javascript">
diff --git a/app/code/Magento/Downloadable/view/frontend/sales/order/creditmemo/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/sales/order/creditmemo/items/renderer/downloadable.phtml
index 42161ff4294..738e4d15f49 100644
--- a/app/code/Magento/Downloadable/view/frontend/sales/order/creditmemo/items/renderer/downloadable.phtml
+++ b/app/code/Magento/Downloadable/view/frontend/sales/order/creditmemo/items/renderer/downloadable.phtml
@@ -23,6 +23,8 @@
  * @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)
  */
+
+/** @var $this \Magento\Downloadable\Block\Sales\Order\Item\Renderer\Downloadable */
 ?>
 <?php $_item = $this->getItem() ?>
 <?php $_order = $this->getItem()->getOrderItem()->getOrder() ?>
@@ -67,7 +69,7 @@
             <br/><a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" aria-controls="order-item-gift-message-<?php echo $_item->getId()?>" data-item-id="<?php echo $_item->getId() ?>"><?php echo __('Gift Message') ?></a>
         <?php endif; ?>
     </td>
-    <td><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="a-right nowrap">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax()): ?>
             <span class="price-excl-tax">
diff --git a/app/code/Magento/Downloadable/view/frontend/sales/order/invoice/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/sales/order/invoice/items/renderer/downloadable.phtml
index 020bb838350..9da5814e059 100644
--- a/app/code/Magento/Downloadable/view/frontend/sales/order/invoice/items/renderer/downloadable.phtml
+++ b/app/code/Magento/Downloadable/view/frontend/sales/order/invoice/items/renderer/downloadable.phtml
@@ -23,6 +23,8 @@
  * @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)
  */
+
+/** @var $this \Magento\Downloadable\Block\Sales\Order\Item\Renderer\Downloadable */
 ?>
 <?php $_item = $this->getItem() ?>
 <?php $_order = $this->getItem()->getOrderItem()->getOrder() ?>
@@ -68,7 +70,7 @@
             <br/><a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" aria-controls="order-item-gift-message-<?php echo $_item->getId()?>" data-item-id="<?php echo $_item->getId() ?>"><?php echo __('Gift Message') ?></a>
         <?php endif; ?>
     </td>
-    <td><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="a-right nowrap">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax()): ?>
             <span class="price-excl-tax">
diff --git a/app/code/Magento/Downloadable/view/frontend/sales/order/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/sales/order/items/renderer/downloadable.phtml
index ce466a53d52..81aa14f43a9 100644
--- a/app/code/Magento/Downloadable/view/frontend/sales/order/items/renderer/downloadable.phtml
+++ b/app/code/Magento/Downloadable/view/frontend/sales/order/items/renderer/downloadable.phtml
@@ -23,6 +23,8 @@
  * @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)
  */
+
+/** @var $this \Magento\Downloadable\Block\Sales\Order\Item\Renderer\Downloadable */
 ?>
 <?php $_item = $this->getItem() ?>
 <tr class="border" id="order-item-row-<?php echo $_item->getId() ?>">
@@ -67,7 +69,7 @@
             <br/><a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" aria-controls="order-item-gift-message-<?php echo $_item->getId()?>" data-item-id="<?php echo $_item->getId() ?>"><?php echo __('Gift Message') ?></a>
         <?php endif; ?>
     </td>
-    <td><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="a-right nowrap">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax()): ?>
             <span class="price-excl-tax">
diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php
index 290f285e0d5..28404ad8839 100644
--- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php
+++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php
@@ -68,7 +68,7 @@ abstract class AbstractMain
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Eav\Helper\Data $eavData
@@ -80,7 +80,7 @@ abstract class AbstractMain
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Eav\Helper\Data $eavData,
diff --git a/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php b/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php
index 2fbd942534b..1b2b23263d9 100644
--- a/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php
+++ b/app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php
@@ -92,7 +92,7 @@ abstract class AbstractData
     protected $_locale;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -100,11 +100,11 @@ abstract class AbstractData
      * Constructor
      *
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */    
     public function __construct(
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger
     ) {
         $this->_locale = $locale;
         $this->_logger = $logger;
@@ -465,7 +465,7 @@ abstract class AbstractData
                     }
                     break;
                 case 'date':
-                    $validator = new \Zend_Validate_Date(\Magento\Date::DATE_INTERNAL_FORMAT);
+                    $validator = new \Zend_Validate_Date(\Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT);
                     $validator->setMessage(
                         __('"%1" invalid type entered.', $label),
                         \Zend_Validate_Date::INVALID
diff --git a/app/code/Magento/Eav/Model/Attribute/Data/File.php b/app/code/Magento/Eav/Model/Attribute/Data/File.php
index c82f6124290..297c13b2692 100644
--- a/app/code/Magento/Eav/Model/Attribute/Data/File.php
+++ b/app/code/Magento/Eav/Model/Attribute/Data/File.php
@@ -61,14 +61,14 @@ class File extends \Magento\Eav\Model\Attribute\Data\AbstractData
 
     /**
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\File\Validator\NotProtectedExtension $fileValidator
      * @param \Magento\App\Dir $coreDir
      */
     public function __construct(
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\File\Validator\NotProtectedExtension $fileValidator,
         \Magento\App\Dir $coreDir
diff --git a/app/code/Magento/Eav/Model/Attribute/Data/Text.php b/app/code/Magento/Eav/Model/Attribute/Data/Text.php
index 7fa5fce942c..313b1d54a16 100644
--- a/app/code/Magento/Eav/Model/Attribute/Data/Text.php
+++ b/app/code/Magento/Eav/Model/Attribute/Data/Text.php
@@ -39,20 +39,20 @@ class Text extends \Magento\Eav\Model\Attribute\Data\AbstractData
     /**
      * @var \Magento\Core\Helper\String
      */
-    protected $_stringHelper;
+    protected $_string;
 
     /**
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Helper\String $stringHelper
+     * @param \Magento\Logger $logger
+     * @param \Magento\Stdlib\String $stringHelper
      */
     public function __construct(
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Helper\String $stringHelper
+        \Magento\Logger $logger,
+        \Magento\Stdlib\String $stringHelper
     ) {
         parent::__construct($locale, $logger);
-        $this->_stringHelper = $stringHelper;
+        $this->_string = $stringHelper;
     }
 
     /**
@@ -94,7 +94,7 @@ class Text extends \Magento\Eav\Model\Attribute\Data\AbstractData
         }
 
         // validate length
-        $length = $this->_stringHelper->strlen(trim($value));
+        $length = $this->_string->strlen(trim($value));
 
         $validateRules = $attribute->getValidateRules();
         if (!empty($validateRules['min_text_length']) && $length < $validateRules['min_text_length']) {
diff --git a/app/code/Magento/Eav/Model/AttributeDataFactory.php b/app/code/Magento/Eav/Model/AttributeDataFactory.php
index e72be9cfbea..04e7572e7f8 100644
--- a/app/code/Magento/Eav/Model/AttributeDataFactory.php
+++ b/app/code/Magento/Eav/Model/AttributeDataFactory.php
@@ -55,12 +55,19 @@ class AttributeDataFactory
      */
     protected $_objectManager;
 
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
     /**
      * @param \Magento\ObjectManager $objectManager
+     * @param \Magento\Stdlib\String $string
      */
-    public function __construct(\Magento\ObjectManager $objectManager)
+    public function __construct(\Magento\ObjectManager $objectManager, \Magento\Stdlib\String $string)
     {
         $this->_objectManager = $objectManager;
+        $this->string = $string;
     }
 
     /**
@@ -86,7 +93,7 @@ class AttributeDataFactory
             if (empty($this->_dataModels[$attribute->getFrontendInput()])) {
                 $dataModelClass = sprintf(
                     'Magento\Eav\Model\Attribute\Data\%s',
-                    uc_words($attribute->getFrontendInput())
+                    $this->string->upperCaseWords($attribute->getFrontendInput())
                 );
                 $dataModel = $this->_objectManager->create($dataModelClass);
                 $this->_dataModels[$attribute->getFrontendInput()] = $dataModel;
diff --git a/app/code/Magento/Eav/Model/Entity.php b/app/code/Magento/Eav/Model/Entity.php
index 4cf3184d5d2..49aae351f09 100644
--- a/app/code/Magento/Eav/Model/Entity.php
+++ b/app/code/Magento/Eav/Model/Entity.php
@@ -45,23 +45,23 @@ class Entity extends \Magento\Eav\Model\Entity\AbstractEntity
     const DEFAULT_ENTITY_ID_FIELD   = 'entity_id';
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Eav\Model\Resource\Helper $resourceHelper
      * @param \Magento\Validator\UniversalFactory $universalFactory
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Eav\Model\Resource\Helper $resourceHelper,
         \Magento\Validator\UniversalFactory $universalFactory,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         $data = array()
     ) {
         parent::__construct(
diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php
index ca5f5991097..4602cbe313a 100644
--- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php
+++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php
@@ -179,7 +179,7 @@ abstract class AbstractEntity extends \Magento\Core\Model\Resource\AbstractResou
     protected static $_attributeBackendTables   = array();
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
@@ -209,7 +209,7 @@ abstract class AbstractEntity extends \Magento\Core\Model\Resource\AbstractResou
     protected $_universalFactory;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -218,7 +218,7 @@ abstract class AbstractEntity extends \Magento\Core\Model\Resource\AbstractResou
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Eav\Model\Entity\Attribute\Set $attrSetEntity,
         \Magento\Core\Model\LocaleInterface $locale,
@@ -973,8 +973,8 @@ abstract class AbstractEntity extends \Magento\Core\Model\Resource\AbstractResou
         } else {
             $value = $object->getData($attribute->getAttributeCode());
             if ($attribute->getBackend()->getType() == 'datetime') {
-                $date  = new \Zend_Date($value, \Magento\Date::DATE_INTERNAL_FORMAT);
-                $value = $date->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT);
+                $date  = new \Zend_Date($value, \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT);
+                $value = $date->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
             }
             $bind = array(
                 'entity_type_id' => $this->getTypeId(),
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php
index 40fe66b5056..bae1ed1d6d0 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php
@@ -80,16 +80,15 @@ abstract class AbstractBackend
     protected $_defaultValue = null;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */
-    public function __construct(
-        \Magento\Core\Model\Logger $logger
-    ) {
+    public function __construct(\Magento\Logger $logger)
+    {
         $this->_logger = $logger;
     }
 
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php
index 1254de181d9..306af90b60a 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php
@@ -34,11 +34,11 @@ class Datetime extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBacke
     protected $_locale;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\LocaleInterface $locale
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\LocaleInterface $locale
     ) {
         $this->_locale = $locale;
@@ -109,6 +109,6 @@ class Datetime extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBacke
                 false
             );
         }
-        return $date->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT);
+        return $date->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
     }
 }
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php
index eb873293fbc..8d23498430b 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php
@@ -33,11 +33,11 @@ class Store extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
     protected $_storeManager;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\StoreManager $storeManager
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\StoreManager $storeManager
     ) {
         $this->_storeManager = $storeManager;
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Created.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Created.php
index 463fb061b8b..7c9021273da 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Created.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Created.php
@@ -24,17 +24,30 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Eav\Model\Entity\Attribute\Backend\Time;
+
 /**
  * Entity/Attribute/Model - attribute backend default
- *
- * @category   Magento
- * @package    Magento_Eav
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Eav\Model\Entity\Attribute\Backend\Time;
-
 class Created extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Logger $logger
+     * @param \Magento\Stdlib\DateTime $dateTime
+     */
+    public function __construct(
+        \Magento\Logger $logger,
+        \Magento\Stdlib\DateTime $dateTime
+    ) {
+        $this->dateTime = $dateTime;
+        parent::__construct($logger);
+    }
+
     /**
      * Set created date
      *
@@ -45,7 +58,7 @@ class Created extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBacken
     {
         $attributeCode = $this->getAttribute()->getAttributeCode();
         if ($object->isObjectNew() && is_null($object->getData($attributeCode))) {
-            $object->setData($attributeCode, \Magento\Date::now());
+            $object->setData($attributeCode, $this->dateTime->now());
         }
 
         return $this;
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Updated.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Updated.php
index c508d5ec024..bd97e596c45 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Updated.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Time/Updated.php
@@ -24,17 +24,31 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Eav\Model\Entity\Attribute\Backend\Time;
+
 /**
  * Entity/Attribute/Model - attribute backend default
- *
- * @category   Magento
- * @package    Magento_Eav
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Eav\Model\Entity\Attribute\Backend\Time;
-
 class Updated extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Logger $logger
+     * @param \Magento\Stdlib\DateTime $dateTime
+     */
+    public function __construct(
+        \Magento\Logger $logger,
+        \Magento\Stdlib\DateTime $dateTime
+    ) {
+        $this->dateTime = $dateTime;
+        parent::__construct($logger);
+    }
+
+
     /**
      * Set modified date
      *
@@ -43,7 +57,7 @@ class Updated extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBacken
      */
     public function beforeSave($object)
     {
-        $object->setData($this->getAttribute()->getAttributeCode(), \Magento\Date::now());
+        $object->setData($this->getAttribute()->getAttributeCode(), $this->dateTime->now());
         return $this;
     }
 }
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Config/SchemaLocator.php b/app/code/Magento/Eav/Model/Entity/Attribute/Config/SchemaLocator.php
index 06136cc0d46..c5d9d94caa1 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/Config/SchemaLocator.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/Config/SchemaLocator.php
@@ -35,9 +35,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_schema;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Eav') . DIRECTORY_SEPARATOR . 'eav_attributes.xsd';
     }
diff --git a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php
index dcf4bb40492..2c8aef9576e 100644
--- a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php
+++ b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php
@@ -116,7 +116,7 @@ abstract class AbstractCollection extends \Magento\Data\Collection\Db
     protected $_eavConfig;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
@@ -137,22 +137,22 @@ abstract class AbstractCollection extends \Magento\Data\Collection\Db
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Eav\Model\Resource\Helper $resourceHelper
      * @param \Magento\Validator\UniversalFactory $universalFactory
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Eav\Model\Resource\Helper $resourceHelper,
         \Magento\Validator\UniversalFactory $universalFactory
diff --git a/app/code/Magento/Eav/Model/Entity/Setup.php b/app/code/Magento/Eav/Model/Entity/Setup.php
index f8ae12566ff..a9a5b613483 100644
--- a/app/code/Magento/Eav/Model/Entity/Setup.php
+++ b/app/code/Magento/Eav/Model/Entity/Setup.php
@@ -37,7 +37,7 @@ namespace Magento\Eav\Model\Entity;
 class Setup extends \Magento\Core\Model\Resource\Setup
 {
     /**
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cache;
 
@@ -48,7 +48,7 @@ class Setup extends \Magento\Core\Model\Resource\Setup
 
     /**
      * @param \Magento\Core\Model\Resource\Setup\Context $context
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
      * @param string $resourceName
      * @param string $moduleName
@@ -56,7 +56,7 @@ class Setup extends \Magento\Core\Model\Resource\Setup
      */
     public function __construct(
         \Magento\Core\Model\Resource\Setup\Context $context,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
         $resourceName,
         $moduleName = 'Magento_Eav',
diff --git a/app/code/Magento/Eav/Model/Form.php b/app/code/Magento/Eav/Model/Form.php
index 2a956d65520..5758d078baa 100644
--- a/app/code/Magento/Eav/Model/Form.php
+++ b/app/code/Magento/Eav/Model/Form.php
@@ -135,7 +135,7 @@ abstract class Form
     protected $_eavConfig;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_modulesReader;
 
@@ -162,7 +162,7 @@ abstract class Form
     /**
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Config\Modules\Reader $modulesReader
+     * @param \Magento\Module\Dir\Reader $modulesReader
      * @param \Magento\Eav\Model\AttributeDataFactory $attrDataFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\App\RequestInterface $httpRequest
@@ -173,7 +173,7 @@ abstract class Form
     public function __construct(
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Config\Modules\Reader $modulesReader,
+        \Magento\Module\Dir\Reader $modulesReader,
         \Magento\Eav\Model\AttributeDataFactory $attrDataFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\App\RequestInterface $httpRequest,
diff --git a/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php b/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php
index cd9824f73c1..5cb5da43e9d 100644
--- a/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php
+++ b/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php
@@ -68,7 +68,7 @@ abstract class Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
@@ -77,7 +77,7 @@ abstract class Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php
index ff6e8527c65..4271128a247 100644
--- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php
+++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute.php
@@ -63,13 +63,13 @@ class Attribute extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Class constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\App $app
      * @param \Magento\Eav\Model\Resource\Entity\Type $eavEntityType
      * @param array $arguments
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\App $app,
         \Magento\Eav\Model\Resource\Entity\Type $eavEntityType,
         array $arguments = array()
diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php
index 82f846a28e0..5015f1291c6 100644
--- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php
+++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php
@@ -43,7 +43,7 @@ class Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Registry $registryManager
@@ -51,7 +51,7 @@ class Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Registry $registryManager,
diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php
index d75e0043fd3..452f1fdada3 100644
--- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php
+++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php
@@ -44,7 +44,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     protected $_optionValueTable;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_coreResource;
 
@@ -55,19 +55,19 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
     ) {
diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set.php
index e4a5bfac829..5a123d40142 100644
--- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set.php
+++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Set.php
@@ -42,11 +42,11 @@ class Set extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_attrGroupFactory;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\GroupFactory $attrGroupFactory
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\Resource\Entity\Attribute\GroupFactory $attrGroupFactory
     ) {
         parent::__construct($resource);
diff --git a/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php b/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php
index 60d32a352a5..3f7f54a7ada 100644
--- a/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php
+++ b/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php
@@ -76,7 +76,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
@@ -85,7 +85,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
diff --git a/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php b/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php
index f3ccdab233a..2d9ae3a424b 100644
--- a/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php
+++ b/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php
@@ -50,7 +50,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\StoreManager $storeManager
@@ -58,7 +58,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\StoreManager $storeManager,
diff --git a/app/code/Magento/Eav/Model/Resource/Helper.php b/app/code/Magento/Eav/Model/Resource/Helper.php
index 43e4db227ed..6269822a324 100644
--- a/app/code/Magento/Eav/Model/Resource/Helper.php
+++ b/app/code/Magento/Eav/Model/Resource/Helper.php
@@ -39,10 +39,10 @@ class Helper extends \Magento\Core\Model\Resource\Helper
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param string $modulePrefix
      */
-    public function __construct(\Magento\Core\Model\Resource $resource, $modulePrefix = 'Magento_Eav')
+    public function __construct(\Magento\App\Resource $resource, $modulePrefix = 'Magento_Eav')
     {
         parent::__construct($resource, $modulePrefix);
     }
diff --git a/app/code/Magento/Eav/etc/di.xml b/app/code/Magento/Eav/etc/di.xml
index 230dd2cffd6..0697c19e535 100644
--- a/app/code/Magento/Eav/etc/di.xml
+++ b/app/code/Magento/Eav/etc/di.xml
@@ -29,7 +29,7 @@
             <value>eav</value>
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <eav_setup>Magento\Eav\Model\Entity\Setup</eav_setup>
diff --git a/app/code/Magento/GiftMessage/Block/Adminhtml/Product/Helper/Form/Config.php b/app/code/Magento/GiftMessage/Block/Adminhtml/Product/Helper/Form/Config.php
index bd589ddfec4..a66753612c8 100644
--- a/app/code/Magento/GiftMessage/Block/Adminhtml/Product/Helper/Form/Config.php
+++ b/app/code/Magento/GiftMessage/Block/Adminhtml/Product/Helper/Form/Config.php
@@ -44,21 +44,21 @@ class Config
     protected $_coreStoreConfig;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         $attributes = array()
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
     }
 
     /**
diff --git a/app/code/Magento/GiftMessage/Helper/Message.php b/app/code/Magento/GiftMessage/Helper/Message.php
index cf2cf73ac3c..665038955cc 100644
--- a/app/code/Magento/GiftMessage/Helper/Message.php
+++ b/app/code/Magento/GiftMessage/Helper/Message.php
@@ -23,24 +23,19 @@
  * @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\GiftMessage\Helper;
 
 /**
  * Gift Message helper
- *
- * @category   Magento
- * @package    Magento_GiftMessage
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\GiftMessage\Helper;
-
 class Message extends \Magento\Core\Helper\Data
 {
     /**
-     * Giftmessages allow section in configuration
+     * Gift messages allow section in configuration
      *
      */
     const XPATH_CONFIG_GIFT_MESSAGE_ALLOW_ITEMS = 'sales/gift_options/allow_items';
+
     const XPATH_CONFIG_GIFT_MESSAGE_ALLOW_ORDER = 'sales/gift_options/allow_order';
 
     /**
@@ -72,43 +67,52 @@ class Message extends \Magento\Core\Helper\Data
      */
     protected $_giftMessageFactory;
 
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
     /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Encryption $encryptor
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\View\LayoutFactory $layoutFactory
      * @param \Magento\GiftMessage\Model\MessageFactory $giftMessageFactory
+     * @param \Magento\Escaper $escaper
      * @param bool $dbCompatibleMode
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\Core\Model\Date $dateModel,
         \Magento\App\State $appState,
-        \Magento\Core\Model\Encryption $encryptor,
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\View\LayoutFactory $layoutFactory,
         \Magento\GiftMessage\Model\MessageFactory $giftMessageFactory,
+        \Magento\Escaper $escaper,
         $dbCompatibleMode = true
     ) {
+        $this->_escaper = $escaper;
         $this->_productFactory = $productFactory;
         $this->_layoutFactory = $layoutFactory;
         $this->_giftMessageFactory = $giftMessageFactory;
-        parent::__construct($context, $eventManager, $coreHttp, $config, $coreStoreConfig, $storeManager,
-            $locale, $dateModel, $appState, $encryptor, $dbCompatibleMode
+        parent::__construct(
+            $context,
+            $eventManager,
+            $coreStoreConfig,
+            $storeManager,
+            $locale,
+            $dateModel,
+            $appState,
+            $dbCompatibleMode
         );
     }
 
@@ -120,14 +124,13 @@ class Message extends \Magento\Core\Helper\Data
      * @param boolean $dontDisplayContainer
      * @return string
      */
-    public function getInline($type, \Magento\Object $entity, $dontDisplayContainer=false)
+    public function getInline($type, \Magento\Object $entity, $dontDisplayContainer = false)
     {
-        if (!in_array($type, array('onepage_checkout','multishipping_address'))
+        if (!in_array($type, array('onepage_checkout', 'multishipping_address'))
             && !$this->isMessagesAvailable($type, $entity)
         ) {
             return '';
         }
-
         return $this->_layoutFactory->create()->createBlock('Magento\GiftMessage\Block\Message\Inline')
             ->setId('giftmessage_form_' . $this->_nextId++)
             ->setDontDisplayContainer($dontDisplayContainer)
@@ -147,16 +150,14 @@ class Message extends \Magento\Core\Helper\Data
     {
         if ($type == 'items') {
             $items = $entity->getAllItems();
-            if(!is_array($items) || empty($items)) {
+            if (!is_array($items) || empty($items)) {
                 return $this->_coreStoreConfig->getConfig(self::XPATH_CONFIG_GIFT_MESSAGE_ALLOW_ITEMS, $store);
             }
-            if($entity instanceof \Magento\Sales\Model\Quote) {
+            if ($entity instanceof \Magento\Sales\Model\Quote) {
                 $_type = $entity->getIsMultiShipping() ? 'address_item' : 'item';
-            }
-            else {
+            } else {
                 $_type = 'order_item';
             }
-
             foreach ($items as $item) {
                 if ($item->getParentItem()) {
                     continue;
@@ -177,7 +178,6 @@ class Message extends \Magento\Core\Helper\Data
             );
         } elseif ($type == 'address_item') {
             $storeId = is_numeric($store) ? $store : $this->_storeManager->getStore($store)->getId();
-
             if (!$this->isCached('address_item_' . $entity->getProductId())) {
                 $this->setCached(
                     'address_item_' . $entity->getProductId(),
@@ -194,7 +194,6 @@ class Message extends \Magento\Core\Helper\Data
         } else {
             return $this->_coreStoreConfig->getConfig(self::XPATH_CONFIG_GIFT_MESSAGE_ALLOW_ORDER, $store);
         }
-
         return false;
     }
 
@@ -205,7 +204,7 @@ class Message extends \Magento\Core\Helper\Data
      * @param \Magento\Core\Model\Store|integer $store
      * @return boolean
      */
-    protected function _getDependenceFromStoreConfig($productGiftMessageAllow, $store=null)
+    protected function _getDependenceFromStoreConfig($productGiftMessageAllow, $store = null)
     {
         $result = $this->_coreStoreConfig->getConfig(self::XPATH_CONFIG_GIFT_MESSAGE_ALLOW_ITEMS, $store);
         if ($productGiftMessageAllow === '' || is_null($productGiftMessageAllow)) {
@@ -223,7 +222,7 @@ class Message extends \Magento\Core\Helper\Data
      * @param \Magento\Core\Model\Store|integer $store
      * @return boolen
      */
-    public function getIsMessagesAvailable($type, \Magento\Object $entity, $store=null)
+    public function getIsMessagesAvailable($type, \Magento\Object $entity, $store = null)
     {
         return $this->isMessagesAvailable($type, $entity, $store);
     }
@@ -238,7 +237,7 @@ class Message extends \Magento\Core\Helper\Data
     {
         $message = $this->getGiftMessageForEntity($entity);
         if ($message) {
-            return nl2br($this->escapeHtml($message->getMessage()));
+            return nl2br($this->_escaper->escapeHtml($message->getMessage()));
         }
         return null;
     }
@@ -251,7 +250,7 @@ class Message extends \Magento\Core\Helper\Data
      */
     public function getGiftMessageForEntity(\Magento\Object $entity)
     {
-        if($entity->getGiftMessageId() && !$entity->getGiftMessage()) {
+        if ($entity->getGiftMessageId() && !$entity->getGiftMessage()) {
             $message = $this->getGiftMessage($entity->getGiftMessageId());
             $entity->setGiftMessage($message);
         }
@@ -268,10 +267,9 @@ class Message extends \Magento\Core\Helper\Data
      */
     public function getCached($key)
     {
-        if($this->isCached($key)) {
+        if ($this->isCached($key)) {
             return $this->_innerCache[$key];
         }
-
         return null;
     }
 
@@ -306,14 +304,13 @@ class Message extends \Magento\Core\Helper\Data
      * @param \Magento\Core\Model\Store|integer $store
      * @return boolen
      */
-    public function getAvailableForQuoteItems($quote, $store=null)
+    public function getAvailableForQuoteItems($quote, $store = null)
     {
-        foreach($quote->getAllItems() as $item) {
-            if($this->isMessagesAvailable('item', $item, $store)) {
+        foreach ($quote->getAllItems() as $item) {
+            if ($this->isMessagesAvailable('item', $item, $store)) {
                 return true;
             }
         }
-
         return false;
     }
 
@@ -324,10 +321,10 @@ class Message extends \Magento\Core\Helper\Data
      * @param \Magento\Core\Model\Store|integer $store
      * @return boolen
      */
-    public function getAvailableForAddressItems($items, $store=null)
+    public function getAvailableForAddressItems($items, $store = null)
     {
-        foreach($items as $item) {
-            if($this->isMessagesAvailable('address_item', $item, $store)) {
+        foreach ($items as $item) {
+            if ($this->isMessagesAvailable('address_item', $item, $store)) {
                 return true;
             }
         }
@@ -340,14 +337,12 @@ class Message extends \Magento\Core\Helper\Data
      * @param integer $messageId
      * @return \Magento\GiftMessage\Model\Message
      */
-    public function getGiftMessage($messageId=null)
+    public function getGiftMessage($messageId = null)
     {
         $message = $this->_giftMessageFactory->create();
-        if(!is_null($messageId)) {
+        if (!is_null($messageId)) {
             $message->load($messageId);
         }
-
         return $message;
     }
-
 }
diff --git a/app/code/Magento/GiftMessage/Model/Resource/Setup.php b/app/code/Magento/GiftMessage/Model/Resource/Setup.php
index 2d8fec03450..65b8e12b325 100644
--- a/app/code/Magento/GiftMessage/Model/Resource/Setup.php
+++ b/app/code/Magento/GiftMessage/Model/Resource/Setup.php
@@ -41,17 +41,15 @@ class Setup extends \Magento\Sales\Model\Resource\Setup
      * @param $resourceName
      * @param string $moduleName
      * @param string $connectionName
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
-     * @param \Magento\Core\Helper\Data $coreHelper
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Catalog\Model\Resource\SetupFactory $catalogSetupFactory
      */
     public function __construct(
         \Magento\Core\Model\Resource\Setup\Context $context,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
-        \Magento\Core\Helper\Data $coreHelper,
         \Magento\Core\Model\Config $config,
         \Magento\Catalog\Model\Resource\SetupFactory $catalogSetupFactory,
         $resourceName,
@@ -60,7 +58,7 @@ class Setup extends \Magento\Sales\Model\Resource\Setup
     ) {
         $this->_catalogSetupFactory = $catalogSetupFactory;
         parent::__construct(
-            $context, $cache, $attrGrCollFactory, $coreHelper, $config, $resourceName, $moduleName, $connectionName
+            $context, $cache, $attrGrCollFactory, $config, $resourceName, $moduleName, $connectionName
         );
     }
 
diff --git a/app/code/Magento/GiftMessage/etc/di.xml b/app/code/Magento/GiftMessage/etc/di.xml
index 5849ad45bb0..58279142709 100644
--- a/app/code/Magento/GiftMessage/etc/di.xml
+++ b/app/code/Magento/GiftMessage/etc/di.xml
@@ -24,7 +24,7 @@
  */
 -->
 <config>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <giftmessage_setup>Magento\GiftMessage\Model\Resource\Setup</giftmessage_setup>
diff --git a/app/code/Magento/GoogleAdwords/Model/Validator/Factory.php b/app/code/Magento/GoogleAdwords/Model/Validator/Factory.php
index 1ee03f40803..adb74703e14 100644
--- a/app/code/Magento/GoogleAdwords/Model/Validator/Factory.php
+++ b/app/code/Magento/GoogleAdwords/Model/Validator/Factory.php
@@ -1,7 +1,4 @@
 <?php
-
-namespace Magento\GoogleAdwords\Model\Validator;
-
 /**
  * Google AdWords Validator Factory
  *
@@ -27,17 +24,23 @@ namespace Magento\GoogleAdwords\Model\Validator;
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  * @SuppressWarnings(PHPMD.LongVariable)
  */
+namespace Magento\GoogleAdwords\Model\Validator;
+
+use Magento\Validator\Int;
+use Magento\Validator\Regex;
+use Magento\Validator\UniversalFactory;
+
 class Factory
 {
     /**
-     * @var \Magento\Validator\UniversalFactory
+     * @var UniversalFactory
      */
     protected $_validatorBuilderFactory;
 
     /**
-     * @param \Magento\Validator\UniversalFactory $validatorBuilderFactory
+     * @param UniversalFactory $validatorBuilderFactory
      */
-    public function __construct(\Magento\Validator\UniversalFactory $validatorBuilderFactory)
+    public function __construct(UniversalFactory $validatorBuilderFactory)
     {
         $this->_validatorBuilderFactory = $validatorBuilderFactory;
     }
@@ -53,21 +56,23 @@ class Factory
         $message = __('Conversion Color value is not valid "%1". Please set hexadecimal 6-digit value.',
             $currentColor);
         /** @var \Magento\Validator\Builder $builder */
-        $builder = $this->_validatorBuilderFactory->create(array(
+        $builder = $this->_validatorBuilderFactory->create('Magento\Validator\Builder', array(
             'constraints' => array(
                 array(
                     'alias' => 'Regex',
                     'type' => '',
                     'class' => 'Magento\Validator\Regex',
                     'options' => array(
-                        'arguments' => array('/^[0-9a-f]{6}$/i'),
+                        'arguments' => array(
+                            'pattern' => ('/^[0-9a-f]{6}$/i')
+                        ),
                         'methods' => array(
                             array(
                                 'method' => 'setMessages',
                                 'arguments' => array(
                                     array(
-                                        \Magento\Validator\Regex::NOT_MATCH => $message,
-                                        \Magento\Validator\Regex::INVALID => $message,
+                                        Regex::NOT_MATCH => $message,
+                                        Regex::INVALID => $message,
                                     ),
                                 ),
                             ),
@@ -90,7 +95,7 @@ class Factory
         $message = __('Conversion Id value is not valid "%1". Conversion Id should be an integer.',
             $currentId);
         /** @var \Magento\Validator\Builder $builder */
-        $builder = $this->_validatorBuilderFactory->create(array(
+        $builder = $this->_validatorBuilderFactory->create('Magento\Validator\Builder', array(
             'constraints' => array(
                 array(
                     'alias' => 'Int',
@@ -102,8 +107,8 @@ class Factory
                                 'method' => 'setMessages',
                                 'arguments' => array(
                                     array(
-                                        \Magento\Validator\Int::NOT_INT => $message,
-                                        \Magento\Validator\Int::INVALID => $message,
+                                        Int::NOT_INT => $message,
+                                        Int::INVALID => $message,
                                     ),
                                 ),
                             ),
diff --git a/app/code/Magento/GoogleAnalytics/Block/Ga.php b/app/code/Magento/GoogleAnalytics/Block/Ga.php
index 6a61ed66657..49ac1a50985 100644
--- a/app/code/Magento/GoogleAnalytics/Block/Ga.php
+++ b/app/code/Magento/GoogleAnalytics/Block/Ga.php
@@ -110,10 +110,10 @@ class Ga extends \Magento\Core\Block\Template
         $pageName   = trim($this->getPageName());
         $optPageURL = '';
         if ($pageName && preg_match('/^\/.*/i', $pageName)) {
-            $optPageURL = ", '{$this->jsQuoteEscape($pageName)}'";
+            $optPageURL = ", '{$this->escapeJsQuote($pageName)}'";
         }
         return "
-_gaq.push(['_setAccount', '{$this->jsQuoteEscape($accountId)}']);
+_gaq.push(['_setAccount', '{$this->escapeJsQuote($accountId)}']);
 _gaq.push(['_trackPageview'{$optPageURL}]);
 ";
     }
@@ -142,18 +142,18 @@ _gaq.push(['_trackPageview'{$optPageURL}]);
             }
             $result[] = sprintf("_gaq.push(['_addTrans', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s']);",
                 $order->getIncrementId(),
-                $this->jsQuoteEscape($this->_storeManager->getStore()->getFrontendName()),
+                $this->escapeJsQuote($this->_storeManager->getStore()->getFrontendName()),
                 $order->getBaseGrandTotal(),
                 $order->getBaseTaxAmount(),
                 $order->getBaseShippingAmount(),
-                $this->jsQuoteEscape($this->_coreData->escapeHtml($address->getCity())),
-                $this->jsQuoteEscape($this->_coreData->escapeHtml($address->getRegion())),
-                $this->jsQuoteEscape($this->_coreData->escapeHtml($address->getCountry()))
+                $this->escapeJsQuote($this->escapeHtml($address->getCity())),
+                $this->escapeJsQuote($this->escapeHtml($address->getRegion())),
+                $this->escapeJsQuote($this->escapeHtml($address->getCountry()))
             );
             foreach ($order->getAllVisibleItems() as $item) {
                 $result[] = sprintf("_gaq.push(['_addItem', '%s', '%s', '%s', '%s', '%s', '%s']);",
                     $order->getIncrementId(),
-                    $this->jsQuoteEscape($item->getSku()), $this->jsQuoteEscape($item->getName()),
+                    $this->escapeJsQuote($item->getSku()), $this->escapeJsQuote($item->getName()),
                     null, // there is no "category" defined for the order item
                     $item->getBasePrice(), $item->getQtyOrdered()
                 );
diff --git a/app/code/Magento/GoogleCheckout/Model/Api.php b/app/code/Magento/GoogleCheckout/Model/Api.php
index d9a42fa732a..ad60c073d08 100644
--- a/app/code/Magento/GoogleCheckout/Model/Api.php
+++ b/app/code/Magento/GoogleCheckout/Model/Api.php
@@ -54,28 +54,37 @@ class Api extends \Magento\Object
      */
     protected $objectManager;
 
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
     /**
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
+     * @param \Magento\Stdlib\String $string
      * @param array $data
      */
     public function __construct(
         \Magento\ObjectManager $objectManager,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
+        \Magento\Stdlib\String $string,
         array $data = array()
     ) {
         $this->objectManager = $objectManager;
         $this->_eventManager = $eventManager;
         $this->_coreStoreConfig = $coreStoreConfig;
+        $this->string = $string;
         parent::__construct($data);
     }
 
     protected function _getApi($area)
     {
-        $api = $this->objectManager->create('Magento\GoogleCheckout\Model\Api\Xml\\' . uc_words($area))
-            ->setStoreId($this->getStoreId());
+        $api = $this->objectManager->create(
+            'Magento\GoogleCheckout\Model\Api\Xml\\' . $this->string->upperCaseWords($area)
+        )->setStoreId($this->getStoreId());
         $api->setApi($this);
         return $api;
     }
diff --git a/app/code/Magento/GoogleCheckout/Model/Api/Xml/Callback.php b/app/code/Magento/GoogleCheckout/Model/Api/Xml/Callback.php
index db7d6de4e20..2c3a829d33f 100644
--- a/app/code/Magento/GoogleCheckout/Model/Api/Xml/Callback.php
+++ b/app/code/Magento/GoogleCheckout/Model/Api/Xml/Callback.php
@@ -58,6 +58,11 @@ class Callback extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
      */
     protected $_eventManager = null;
 
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
@@ -66,6 +71,7 @@ class Callback extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\Core\Model\Translate $translator
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
+     * @param \Magento\Stdlib\String $string
      * @param array $data
      */
     public function __construct(
@@ -76,12 +82,14 @@ class Callback extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
         \Magento\ObjectManager $objectManager,
         \Magento\Core\Model\Translate $translator,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
+        \Magento\Stdlib\String $string,
         array $data = array()
     ) {
         $this->_eventManager = $eventManager;
         $this->_coreData = $coreData;
         $this->_googleCheckoutData = $googleCheckoutData;
         $this->_taxData = $taxData;
+        $this->string = $string;
         parent::__construct($objectManager, $translator, $coreStoreConfig, $data);
     }
 
@@ -137,7 +145,7 @@ class Callback extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
             $notification->startProcess();
         }
 
-        $method = '_response' . uc_words($root, '', '-');
+        $method = '_response' . $this->string->upperCaseWords($root, '-', '');
         if (method_exists($this, $method)) {
             ob_start();
 
@@ -1046,12 +1054,14 @@ class Callback extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
             ->addStatusToHistory($this->getOrder()->getStatus(), $msg)
             ->save();
 
-        $method = '_orderStateChangeFinancial' . uc_words(strtolower($newFinancial), '', '_');
+        $method = '_orderStateChangeFinancial'
+            . $this->string->upperCaseWords(strtolower($newFinancial), '_', '');
         if (method_exists($this, $method)) {
             $this->$method();
         }
 
-        $method = '_orderStateChangeFulfillment' . uc_words(strtolower($newFulfillment), '', '_');
+        $method = '_orderStateChangeFulfillment'
+            . $this->string->upperCaseWords(strtolower($newFulfillment), '_', '');
         if (method_exists($this, $method)) {
             $this->$method();
         }
diff --git a/app/code/Magento/GoogleCheckout/Model/Resource/Notification.php b/app/code/Magento/GoogleCheckout/Model/Resource/Notification.php
index f7540cf76a5..80bf3fad1cf 100644
--- a/app/code/Magento/GoogleCheckout/Model/Resource/Notification.php
+++ b/app/code/Magento/GoogleCheckout/Model/Resource/Notification.php
@@ -24,22 +24,33 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\GoogleCheckout\Model\Resource;
 
 /**
  * Google Checkout resource notification model
- *
- * @category    Magento
- * @package     Magento_GoogleCheckout
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\GoogleCheckout\Model\Resource;
-
 class Notification extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
     /**
-     * Intialize resource model.
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
+     */
+    public function __construct(
+        \Magento\App\Resource $resource,
+        \Magento\Stdlib\DateTime $dateTime
+    ) {
+        $this->dateTime = $dateTime;
+        parent::__construct($resource);
+    }
+
+    /**
+     * Initialize resource model.
      * Set main entity table name and primary key field name.
-     *
      */
     protected function _construct()
     {
@@ -71,7 +82,7 @@ class Notification extends \Magento\Core\Model\Resource\Db\AbstractDb
     {
         $data = array(
             'serial_number' => $serialNumber,
-            'started_at'    => \Magento\Date::now(),
+            'started_at'    => $this->dateTime->now(),
             'status'        => \Magento\GoogleCheckout\Model\Notification::STATUS_INPROCESS
         );
         $this->_getWriteAdapter()->insert($this->getMainTable(), $data);
@@ -102,7 +113,7 @@ class Notification extends \Magento\Core\Model\Resource\Db\AbstractDb
     public function updateProcess($serialNumber)
     {
         $this->_getWriteAdapter()->update($this->getMainTable(),
-            array('started_at' => \Magento\Date::now()),
+            array('started_at' => $this->dateTime->now()),
             array('serial_number = ?' => $serialNumber)
         );
 
diff --git a/app/code/Magento/GoogleCheckout/etc/di.xml b/app/code/Magento/GoogleCheckout/etc/di.xml
index 9a41af1b6f0..62bf17da63e 100644
--- a/app/code/Magento/GoogleCheckout/etc/di.xml
+++ b/app/code/Magento/GoogleCheckout/etc/di.xml
@@ -24,7 +24,7 @@
  */
 -->
 <config>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <googlecheckout_setup>Magento\Catalog\Model\Resource\Setup</googlecheckout_setup>
diff --git a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/AbstractTab.php b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/AbstractTab.php
index 1d6bf9fc703..e231365284d 100644
--- a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/AbstractTab.php
+++ b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/AbstractTab.php
@@ -55,7 +55,7 @@ abstract class AbstractTab
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\GoogleOptimizer\Helper\Code $codeHelper
      * @param \Magento\GoogleOptimizer\Helper\Form $formHelper
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param array $data
      */
     public function __construct(
@@ -65,7 +65,7 @@ abstract class AbstractTab
         \Magento\Core\Model\Registry $registry,
         \Magento\GoogleOptimizer\Helper\Code $codeHelper,
         \Magento\GoogleOptimizer\Helper\Form $formHelper,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         array $data = array()
     ) {
         parent::__construct($coreData, $context, $data);
diff --git a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php
index 58e78b918e4..95ff1139a02 100644
--- a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php
+++ b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php
@@ -45,7 +45,7 @@ class Googleoptimizer
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\GoogleOptimizer\Helper\Code $codeHelper
@@ -54,7 +54,7 @@ class Googleoptimizer
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\GoogleOptimizer\Helper\Code $codeHelper,
diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php
index 947ebb6c9b7..663b9036c91 100644
--- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php
+++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php
@@ -202,7 +202,7 @@ class Attributes
         foreach ($attributes as $attribute) {
             /* @var $attribute \Magento\Catalog\Model\Resource\Eav\Attribute */
             $result[$attribute->getAttributeId()] = $escapeJsQuotes
-                ? $this->jsQuoteEscape($attribute->getFrontendLabel())
+                ? $this->escapeJsQuote($attribute->getFrontendLabel())
                 : $attribute->getFrontendLabel();
         }
         return $result;
diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php
index 98f84db3b08..dd2fa9a326a 100644
--- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php
+++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php
@@ -43,7 +43,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     protected $_elementFactory;
 
     /**
-     * @var \Magento\Data\Form\Factory
+     * @var \Magento\Data\FormFactory
      */
     protected $_formFactory;
 
@@ -87,7 +87,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavCollectionFactory
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\GoogleShopping\Model\Config $config
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Data\Form\Element\Factory $elementFactory
      * @param \Magento\GoogleShopping\Helper\Category $googleShoppingCategory
      * @param \Magento\Core\Helper\Data $coreData
@@ -100,7 +100,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavCollectionFactory,
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\GoogleShopping\Model\Config $config,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Data\Form\Element\Factory $elementFactory,
         \Magento\GoogleShopping\Helper\Category $googleShoppingCategory,
         \Magento\Core\Helper\Data $coreData,
diff --git a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items.php b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items.php
index cac7b2f22e4..2506da12f33 100644
--- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items.php
+++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items.php
@@ -156,7 +156,7 @@ class Items extends \Magento\Backend\Controller\Adminhtml\Action
                 __('An error has occurred while adding products to google shopping account.'),
                 $e->getMessage()
             );
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             return;
         }
 
@@ -196,7 +196,7 @@ class Items extends \Magento\Backend\Controller\Adminhtml\Action
                 __('An error has occurred while deleting products from google shopping account.'),
                 __('One or more products were not deleted from google shopping account. Refer to the log file for details.')
             );
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             return;
         }
 
@@ -236,7 +236,7 @@ class Items extends \Magento\Backend\Controller\Adminhtml\Action
                 __('An error has occurred while deleting products from google shopping account.'),
                 __('One or more products were not deleted from google shopping account. Refer to the log file for details.')
             );
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             return;
         }
 
@@ -269,7 +269,7 @@ class Items extends \Magento\Backend\Controller\Adminhtml\Action
                     ->parseGdataExceptionMessage($e->getMessage())
             );
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_getSession()->addError(__('Something went wrong during Captcha confirmation.'));
         }
 
diff --git a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types.php b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types.php
index 15b5a068b38..17a9648d2f6 100644
--- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types.php
+++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types.php
@@ -130,7 +130,7 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action
                 ->_addContent($this->getLayout()->createBlock('Magento\GoogleShopping\Block\Adminhtml\Types\Edit'))
                 ->renderLayout();
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_getSession()->addError(__("We can't create Attribute Set Mapping."));
             $this->_redirect('adminhtml/*/index', array('store' => $this->_getStore()->getId()));
         }
@@ -165,7 +165,7 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action
                 ->_addContent($this->getLayout()->createBlock('Magento\GoogleShopping\Block\Adminhtml\Types\Edit'))
                 ->renderLayout();
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_getSession()->addError(__("We can't edit Attribute Set Mapping."));
             $this->_redirect('adminhtml/*/index');
         }
@@ -224,7 +224,7 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action
                     ->addSuccess($this->_objectManager->get('Magento\GoogleShopping\Helper\Category')->getMessage());
             }
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_objectManager->get('Magento\Adminhtml\Model\Session')
                 ->addError(__("We can't save Attribute Set Mapping."));
         }
@@ -245,7 +245,7 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action
             }
             $this->_getSession()->addSuccess(__('Attribute set mapping was deleted'));
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_getSession()->addError(__("We can't delete Attribute Set Mapping."));
         }
         $this->_redirect('adminhtml/*/index', array('store' => $this->_getStore()->getId()));
@@ -265,7 +265,7 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action
                 ->toHtml()
             );
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             // just need to output text with error
             $this->_getSession()->addError(__("We can't load attributes."));
         }
@@ -283,7 +283,7 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action
                     ->toHtml()
             );
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             // just need to output text with error
             $this->_getSession()->addError(__("We can't load attribute sets."));
         }
diff --git a/app/code/Magento/GoogleShopping/Helper/Data.php b/app/code/Magento/GoogleShopping/Helper/Data.php
index 5980e592fb2..f4f195fc36c 100644
--- a/app/code/Magento/GoogleShopping/Helper/Data.php
+++ b/app/code/Magento/GoogleShopping/Helper/Data.php
@@ -36,9 +36,11 @@ namespace Magento\GoogleShopping\Helper;
 class Data extends \Magento\Core\Helper\AbstractHelper
 {
     /**
-     * @var \Magento\Core\Helper\String|null
+     * Magento string lib
+     *
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
      * Store manager
@@ -48,16 +50,16 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     protected $_storeManager;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Helper\Context $context
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Helper\Context $context
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         $this->_storeManager = $storeManager;
         parent::__construct($context);
     }
@@ -85,8 +87,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function cleanAtomAttribute($string)
     {
-        return $this->_coreString
-            ->substr(preg_replace('/[\pC¢€•—™°½]|shipping/ui', '', $string), 0, 3500);
+        return $this->string->substr(preg_replace('/[\pC¢€•—™°½]|shipping/ui', '', $string), 0, 3500);
     }
 
     /**
diff --git a/app/code/Magento/GoogleShopping/Model/AttributeFactory.php b/app/code/Magento/GoogleShopping/Model/AttributeFactory.php
index f47296a4d50..c0bc1b9e4c7 100644
--- a/app/code/Magento/GoogleShopping/Model/AttributeFactory.php
+++ b/app/code/Magento/GoogleShopping/Model/AttributeFactory.php
@@ -49,14 +49,24 @@ class AttributeFactory
      */
     protected $_gsData;
 
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $_string;
+
     /**
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\GoogleShopping\Helper\Data $gsData
+     * @param \Magento\Stdlib\String $string
      */
-    public function __construct(\Magento\ObjectManager $objectManager, \Magento\GoogleShopping\Helper\Data $gsData)
-    {
+    public function __construct(
+        \Magento\ObjectManager $objectManager,
+        \Magento\GoogleShopping\Helper\Data $gsData,
+        \Magento\Stdlib\String $string
+    ) {
         $this->_objectManager = $objectManager;
         $this->_gsData = $gsData;
+        $this->_string = $string;
     }
 
     /**
@@ -67,7 +77,8 @@ class AttributeFactory
      */
     public function createAttribute($name)
     {
-        $modelName = 'Magento\GoogleShopping\Model\Attribute\\' . uc_words($this->_gsData->normalizeName($name));
+        $modelName = 'Magento\GoogleShopping\Model\Attribute\\'
+            . $this->_string->upperCaseWords($this->_gsData->normalizeName($name));
         try {
             /** @var \Magento\GoogleShopping\Model\Attribute\DefaultAttribute $attributeModel */
             $attributeModel = $this->_objectManager->create($modelName);
diff --git a/app/code/Magento/GoogleShopping/Model/Config.php b/app/code/Magento/GoogleShopping/Model/Config.php
index ef2af955e1e..373568ce32b 100644
--- a/app/code/Magento/GoogleShopping/Model/Config.php
+++ b/app/code/Magento/GoogleShopping/Model/Config.php
@@ -42,11 +42,6 @@ class Config extends \Magento\Object
      */
     protected $_config = array();
 
-    /**
-     * @var \Magento\Core\Helper\Data|null
-     */
-    protected $_coreData = null;
-
     /**
      * Core store config
      *
@@ -62,21 +57,25 @@ class Config extends \Magento\Object
     protected $_storeManager;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
-     *
+     * @var \Magento\Encryption\EncryptorInterface
+     */
+    protected $_encryptor;
+
+    /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Encryption\EncryptorInterface $encryptor,
         array $data = array()
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
-        $this->_coreData = $coreData;
         $this->_storeManager = $storeManager;
+        $this->_encryptor = $encryptor;
         parent::__construct($data);
     }
 
@@ -126,7 +125,7 @@ class Config extends \Magento\Object
      */
     public function getAccountPassword($storeId = null)
     {
-        return $this->_coreData->decrypt($this->getConfigData('password', $storeId));
+        return $this->_encryptor->decrypt($this->getConfigData('password', $storeId));
     }
 
     /**
diff --git a/app/code/Magento/GoogleShopping/Model/MassOperations.php b/app/code/Magento/GoogleShopping/Model/MassOperations.php
index 1ed6d0c469a..ed55eedab92 100644
--- a/app/code/Magento/GoogleShopping/Model/MassOperations.php
+++ b/app/code/Magento/GoogleShopping/Model/MassOperations.php
@@ -86,7 +86,7 @@ class MassOperations
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\AdminNotification\Model\InboxFactory $inboxFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\GoogleShopping\Helper\Data $gleShoppingData
      * @param \Magento\GoogleShopping\Helper\Category $gleShoppingCategory
      * @param array $data
@@ -97,7 +97,7 @@ class MassOperations
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\AdminNotification\Model\InboxFactory $inboxFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\GoogleShopping\Helper\Data $gleShoppingData,
         \Magento\GoogleShopping\Helper\Category $gleShoppingCategory,
         array $data = array()
@@ -134,7 +134,7 @@ class MassOperations
     protected $_flag;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
diff --git a/app/code/Magento/GoogleShopping/Model/Resource/Item/Collection.php b/app/code/Magento/GoogleShopping/Model/Resource/Item/Collection.php
index 3691bb7700b..f098c361504 100644
--- a/app/code/Magento/GoogleShopping/Model/Resource/Item/Collection.php
+++ b/app/code/Magento/GoogleShopping/Model/Resource/Item/Collection.php
@@ -53,7 +53,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      * @param \Magento\Core\Model\Resource\Helper $resourceHelper
      * @param \Magento\Eav\Model\Config $config
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
@@ -62,7 +62,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
         \Magento\Core\Model\Resource\Helper $resourceHelper,
         \Magento\Eav\Model\Config $config,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
diff --git a/app/code/Magento/GoogleShopping/etc/di.xml b/app/code/Magento/GoogleShopping/etc/di.xml
index f456df2403c..04b68a3edb3 100644
--- a/app/code/Magento/GoogleShopping/etc/di.xml
+++ b/app/code/Magento/GoogleShopping/etc/di.xml
@@ -34,7 +34,7 @@
             <instance type="Magento\GoogleShopping\Model\Resource\Helper" />
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <googleshopping_setup>Magento\GoogleShopping\Model\Resource\Setup</googleshopping_setup>
diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Edit/Form.php b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Edit/Form.php
index bf142951f05..f587142e923 100644
--- a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Edit/Form.php
+++ b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Edit/Form.php
@@ -47,7 +47,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\ImportExport\Model\Source\Export\EntityFactory $entityFactory
@@ -56,7 +56,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\ImportExport\Model\Source\Export\EntityFactory $entityFactory,
diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php
index 992fb0d3e38..a9b4ef4c74c 100644
--- a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php
+++ b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php
@@ -118,8 +118,8 @@ class Filter extends \Magento\Adminhtml\Block\Widget\Grid
         $fromValue = null;
         $toValue   = null;
         if (is_array($value) && count($value) == 2) {
-            $fromValue = $this->_helper->escapeHtml(reset($value));
-            $toValue   = $this->_helper->escapeHtml(next($value));
+            $fromValue = $this->escapeHtml(reset($value));
+            $toValue   = $this->escapeHtml(next($value));
         }
 
         return '<strong>' . __('From') . ':</strong>&nbsp;'
@@ -140,7 +140,7 @@ class Filter extends \Magento\Adminhtml\Block\Widget\Grid
         $html = '<input type="text" name="' . $this->getFilterElementName($attribute->getAttributeCode())
              . '" class="input-text input-text-export-filter"';
         if ($value) {
-            $html .= ' value="' . $this->_helper->escapeHtml($value) . '"';
+            $html .= ' value="' . $this->escapeHtml($value) . '"';
         }
         return $html . ' />';
     }
@@ -198,8 +198,8 @@ class Filter extends \Magento\Adminhtml\Block\Widget\Grid
         $toValue = null;
         $name = $this->getFilterElementName($attribute->getAttributeCode());
         if (is_array($value) && count($value) == 2) {
-            $fromValue = $this->_helper->escapeHtml(reset($value));
-            $toValue   = $this->_helper->escapeHtml(next($value));
+            $fromValue = $this->escapeHtml(reset($value));
+            $toValue   = $this->escapeHtml(next($value));
         }
 
         return '<strong>' . __('From') . ':</strong>&nbsp;'
diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Form.php b/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Form.php
index 0f8cacae83a..d0defb28848 100644
--- a/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Form.php
+++ b/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Form.php
@@ -54,7 +54,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\ImportExport\Model\Import $importModel
@@ -64,7 +64,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\ImportExport\Model\Import $importModel,
diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php
index 85b12aa26a7..bd10028a2cf 100644
--- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php
+++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php
@@ -80,7 +80,7 @@ class Export extends \Magento\Backend\Controller\Adminhtml\Action
             } catch (\Magento\Core\Exception $e) {
                 $this->_getSession()->addError($e->getMessage());
             } catch (\Exception $e) {
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
                 $this->_getSession()->addError(__('Please correct the data sent.'));
             }
         } else {
diff --git a/app/code/Magento/ImportExport/Helper/Data.php b/app/code/Magento/ImportExport/Helper/Data.php
index c28dc46c609..1edcb6dc8ab 100644
--- a/app/code/Magento/ImportExport/Helper/Data.php
+++ b/app/code/Magento/ImportExport/Helper/Data.php
@@ -50,35 +50,35 @@ class Data extends \Magento\Core\Helper\Data
     /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Encryption $encryptor
      * @param \Magento\File\Size $fileSize
      * @param bool $dbCompatibleMode
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\Core\Model\Date $dateModel,
         \Magento\App\State $appState,
-        \Magento\Core\Model\Encryption $encryptor,
         \Magento\File\Size $fileSize,
         $dbCompatibleMode = true
-    )
-    {
+    ) {
         $this->_fileSize = $fileSize;
-        parent::__construct($context, $eventManager, $coreHttp, $config, $coreStoreConfig, $storeManager,
-            $locale, $dateModel, $appState, $encryptor, $dbCompatibleMode
+        parent::__construct(
+            $context,
+            $eventManager,
+            $coreStoreConfig,
+            $storeManager,
+            $locale,
+            $dateModel,
+            $appState,
+            $dbCompatibleMode
         );
     }
 
diff --git a/app/code/Magento/ImportExport/Model/AbstractModel.php b/app/code/Magento/ImportExport/Model/AbstractModel.php
index a749ad4b64f..babc37bf781 100644
--- a/app/code/Magento/ImportExport/Model/AbstractModel.php
+++ b/app/code/Magento/ImportExport/Model/AbstractModel.php
@@ -63,7 +63,7 @@ abstract class AbstractModel extends \Magento\Object
     protected $_logTrace = array();
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -78,13 +78,13 @@ abstract class AbstractModel extends \Magento\Object
     protected $_adapterFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\App\Dir $dir
      * @param \Magento\Core\Model\Log\AdapterFactory $adapterFactory
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\App\Dir $dir,
         \Magento\Core\Model\Log\AdapterFactory $adapterFactory,
         array $data = array()
diff --git a/app/code/Magento/ImportExport/Model/Export.php b/app/code/Magento/ImportExport/Model/Export.php
index 0bbe6ba51d8..b73c96a8bf9 100644
--- a/app/code/Magento/ImportExport/Model/Export.php
+++ b/app/code/Magento/ImportExport/Model/Export.php
@@ -76,7 +76,7 @@ class Export extends \Magento\ImportExport\Model\AbstractModel
     protected $_exportAdapterFac;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\App\Dir $dir
      * @param \Magento\Core\Model\Log\AdapterFactory $adapterFactory
      * @param \Magento\ImportExport\Model\Export\ConfigInterface $exportConfig
@@ -85,7 +85,7 @@ class Export extends \Magento\ImportExport\Model\AbstractModel
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\App\Dir $dir,
         \Magento\Core\Model\Log\AdapterFactory $adapterFactory,
         \Magento\ImportExport\Model\Export\ConfigInterface $exportConfig,
diff --git a/app/code/Magento/ImportExport/Model/Export/Config/SchemaLocator.php b/app/code/Magento/ImportExport/Model/Export/Config/SchemaLocator.php
index b44d9b18dde..de38998f8b9 100644
--- a/app/code/Magento/ImportExport/Model/Export/Config/SchemaLocator.php
+++ b/app/code/Magento/ImportExport/Model/Export/Config/SchemaLocator.php
@@ -40,9 +40,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $etcDir = $moduleReader->getModuleDir('etc', 'Magento_ImportExport');
         $this->_schema = $etcDir . DIRECTORY_SEPARATOR . 'export_merged.xsd';
diff --git a/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php
index 53cfae5ec4f..cf8db424bd6 100644
--- a/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php
+++ b/app/code/Magento/ImportExport/Model/Export/Entity/AbstractEntity.php
@@ -168,13 +168,13 @@ abstract class AbstractEntity
     /**
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Eav\Model\Config $config
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      */
     public function __construct(
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Eav\Model\Config $config,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\StoreManagerInterface $storeManager
     ) {
         $this->_locale = $locale;
diff --git a/app/code/Magento/ImportExport/Model/Export/Entity/Product.php b/app/code/Magento/ImportExport/Model/Export/Entity/Product.php
index 71caae6fd3a..1be584e755c 100644
--- a/app/code/Magento/ImportExport/Model/Export/Entity/Product.php
+++ b/app/code/Magento/ImportExport/Model/Export/Entity/Product.php
@@ -155,7 +155,7 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity
     protected $_exportConfig;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
     /**
@@ -172,7 +172,7 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity
     protected $_categoryColFactory;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resourceModel;
 
@@ -199,9 +199,9 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity
     /**
      * @param \Magento\Core\Model\LocaleInterface $localeInterface
      * @param \Magento\Eav\Model\Config $config
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Catalog\Model\Resource\Product\Collection $collection
      * @param \Magento\ImportExport\Model\Export\ConfigInterface $exportConfig
      * @param \Magento\Catalog\Model\Resource\ProductFactory $productFactory
@@ -215,9 +215,9 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity
     public function __construct(
         \Magento\Core\Model\LocaleInterface $localeInterface,
         \Magento\Eav\Model\Config $config,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Catalog\Model\Resource\Product\Collection $collection,
         \Magento\ImportExport\Model\Export\ConfigInterface $exportConfig,
         \Magento\Catalog\Model\Resource\ProductFactory $productFactory,
diff --git a/app/code/Magento/Core/Model/Config/StorageInterface.php b/app/code/Magento/ImportExport/Model/HttpAdapterFactory.php
similarity index 74%
rename from app/code/Magento/Core/Model/Config/StorageInterface.php
rename to app/code/Magento/ImportExport/Model/HttpAdapterFactory.php
index cd836a7d157..11eb9370105 100644
--- a/app/code/Magento/Core/Model/Config/StorageInterface.php
+++ b/app/code/Magento/ImportExport/Model/HttpAdapterFactory.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Application config storage interface
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -23,19 +21,18 @@
  * @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\Config;
+namespace Magento\ImportExport\Model;
 
-interface StorageInterface
+class HttpAdapterFactory
 {
     /**
-     * Get loaded configuration
+     * Create HTTP adapter
      *
-     * @return \Magento\Core\Model\ConfigInterface
-     */
-    public function getConfiguration();
-
-    /**
-     * Remove configuration cache
+     * @param array $options
+     * @return \Zend_File_Transfer_Adapter_Http
      */
-    public function removeCache();
-}
+    public function create(array $options = array())
+    {
+        return new \Zend_File_Transfer_Adapter_Http($options);
+    }
+} 
\ No newline at end of file
diff --git a/app/code/Magento/ImportExport/Model/Import.php b/app/code/Magento/ImportExport/Model/Import.php
index f10e6a2a7ce..b6b8620e1e1 100644
--- a/app/code/Magento/ImportExport/Model/Import.php
+++ b/app/code/Magento/ImportExport/Model/Import.php
@@ -111,7 +111,7 @@ class Import extends \Magento\ImportExport\Model\AbstractModel
     protected $_csvFactory;
 
     /**
-     * @var \Zend_File_Transfer_Adapter_HttpFactory
+     * @var \Magento\ImportExport\Model\HttpAdapterFactory
      */
     protected $_httpFactory;
 
@@ -131,23 +131,23 @@ class Import extends \Magento\ImportExport\Model\AbstractModel
     protected $_behaviorFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\App\Dir $dir
      * @param \Magento\Core\Model\Log\AdapterFactory $adapterFactory
      * @param \Magento\ImportExport\Helper\Data $importExportData
      * @param \Magento\Core\Model\Config $coreConfig
-     * @param \Magento\ImportExport\Model\Import\ConfigInterface $importConfig
-     * @param \Magento\ImportExport\Model\Import\Entity\Factory $entityFactory
-     * @param \Magento\ImportExport\Model\Resource\Import\Data $importData
-     * @param \Magento\ImportExport\Model\Export\Adapter\CsvFactory $csvFactory
-     * @param \Zend_File_Transfer_Adapter_HttpFactory $httpFactory
+     * @param Import\ConfigInterface $importConfig
+     * @param Import\Entity\Factory $entityFactory
+     * @param Resource\Import\Data $importData
+     * @param Export\Adapter\CsvFactory $csvFactory
+     * @param HttpAdapterFactory $httpFactory
      * @param \Magento\Core\Model\File\UploaderFactory $uploaderFactory
-     * @param \Magento\ImportExport\Model\Source\Import\Behavior\Factory $behaviorFactory
+     * @param Source\Import\Behavior\Factory $behaviorFactory
      * @param \Magento\Index\Model\Indexer $indexer
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\App\Dir $dir,
         \Magento\Core\Model\Log\AdapterFactory $adapterFactory,
         \Magento\ImportExport\Helper\Data $importExportData,
@@ -156,7 +156,7 @@ class Import extends \Magento\ImportExport\Model\AbstractModel
         \Magento\ImportExport\Model\Import\Entity\Factory $entityFactory,
         \Magento\ImportExport\Model\Resource\Import\Data $importData,
         \Magento\ImportExport\Model\Export\Adapter\CsvFactory $csvFactory,
-        \Zend_File_Transfer_Adapter_HttpFactory $httpFactory,
+        \Magento\ImportExport\Model\HttpAdapterFactory $httpFactory,
         \Magento\Core\Model\File\UploaderFactory $uploaderFactory,
         \Magento\ImportExport\Model\Source\Import\Behavior\Factory $behaviorFactory,
         \Magento\Index\Model\Indexer $indexer,
diff --git a/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php
index f42c56f1350..a499f9cfa27 100644
--- a/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php
+++ b/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php
@@ -24,15 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\ImportExport\Model\Import;
+
 /**
  * Import entity abstract model
- *
- * @category    Magento
- * @package     Magento_ImportExport
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\ImportExport\Model\Import;
-
 abstract class AbstractEntity
 {
     /**
@@ -137,11 +133,11 @@ abstract class AbstractEntity
     protected $_jsonHelper;
 
     /**
-     * Helper to manipulate with string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_stringHelper;
+    protected $string;
 
     /**
      * Entity model parameters
@@ -251,20 +247,20 @@ abstract class AbstractEntity
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\ImportExport\Model\ImportFactory $importFactory
      * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\ImportExport\Model\ImportFactory $importFactory,
         \Magento\ImportExport\Model\Resource\Helper $resourceHelper,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         array $data = array()
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
@@ -273,7 +269,7 @@ abstract class AbstractEntity
         $this->_connection          = isset($data['connection']) ? $data['connection']
             : $resource->getConnection('write');
         $this->_jsonHelper          =  $coreData;
-        $this->_stringHelper        =  $coreString;
+        $this->string        =  $string;
         $this->_pageSize            = isset($data['page_size']) ? $data['page_size']
             : (static::XML_PATH_PAGE_SIZE ? (int)$this->_coreStoreConfig->getConfig(static::XML_PATH_PAGE_SIZE) : 0);
         $this->_maxDataSize         = isset($data['max_data_size']) ? $data['max_data_size']
@@ -581,8 +577,8 @@ abstract class AbstractEntity
     {
         switch ($attributeParams['type']) {
             case 'varchar':
-                $value = $this->_stringHelper->cleanString($rowData[$attributeCode]);
-                $valid = $this->_stringHelper->strlen($value) < self::DB_MAX_VARCHAR_LENGTH;
+                $value = $this->string->cleanString($rowData[$attributeCode]);
+                $valid = $this->string->strlen($value) < self::DB_MAX_VARCHAR_LENGTH;
                 break;
             case 'decimal':
                 $value = trim($rowData[$attributeCode]);
@@ -601,8 +597,8 @@ abstract class AbstractEntity
                 $valid = strtotime($value) !== false;
                 break;
             case 'text':
-                $value = $this->_stringHelper->cleanString($rowData[$attributeCode]);
-                $valid = $this->_stringHelper->strlen($value) < self::DB_MAX_TEXT_LENGTH;
+                $value = $this->string->cleanString($rowData[$attributeCode]);
+                $valid = $this->string->strlen($value) < self::DB_MAX_TEXT_LENGTH;
                 break;
             default:
                 $valid = true;
@@ -701,11 +697,10 @@ abstract class AbstractEntity
     {
         if (!$this->_dataValidated) {
             // do all permanent columns exist?
-            if ($absentColumns = array_diff($this->_permanentAttributes, $this->getSource()->getColNames())) {
+            $absentColumns = array_diff($this->_permanentAttributes, $this->getSource()->getColNames());
+            if ($absentColumns) {
                 throw new \Magento\Core\Exception(
-                    __('Cannot find required columns: %1',
-                        implode(', ', $absentColumns)
-                    )
+                    __('Cannot find required columns: %1', implode(', ', $absentColumns))
                 );
             }
 
@@ -726,16 +721,12 @@ abstract class AbstractEntity
 
             if ($emptyHeaderColumns) {
                 throw new \Magento\Core\Exception(
-                    __('Columns number: "%1" have empty headers',
-                        implode('", "', $emptyHeaderColumns)
-                    )
+                    __('Columns number: "%1" have empty headers', implode('", "', $emptyHeaderColumns))
                 );
             }
             if ($invalidColumns) {
                 throw new \Magento\Core\Exception(
-                    __('Column names: "%1" are invalid',
-                        implode('", "', $invalidColumns)
-                    )
+                    __('Column names: "%1" are invalid', implode('", "', $invalidColumns))
                 );
             }
 
diff --git a/app/code/Magento/ImportExport/Model/Import/Config/SchemaLocator.php b/app/code/Magento/ImportExport/Model/Import/Config/SchemaLocator.php
index a4898cf0981..d7eb2c0e892 100644
--- a/app/code/Magento/ImportExport/Model/Import/Config/SchemaLocator.php
+++ b/app/code/Magento/ImportExport/Model/Import/Config/SchemaLocator.php
@@ -40,9 +40,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $etcDir = $moduleReader->getModuleDir('etc', 'Magento_ImportExport');
         $this->_schema = $etcDir . DIRECTORY_SEPARATOR . 'import_merged.xsd';
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php
index 552abd8a2a4..c64a85c42aa 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEav.php
@@ -102,11 +102,11 @@ abstract class AbstractEav
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\ImportExport\Model\ImportFactory $importFactory
      * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\App $app
      * @param \Magento\ImportExport\Model\Export\Factory $collectionFactory
      * @param \Magento\Eav\Model\Config $eavConfig
@@ -114,18 +114,18 @@ abstract class AbstractEav
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\ImportExport\Model\ImportFactory $importFactory,
         \Magento\ImportExport\Model\Resource\Helper $resourceHelper,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\App $app,
         \Magento\ImportExport\Model\Export\Factory $collectionFactory,
         \Magento\Eav\Model\Config $eavConfig,
         array $data = array()
     ) {
         parent::__construct(
-            $coreData, $coreString, $coreStoreConfig, $importFactory, $resourceHelper, $resource, $data
+            $coreData, $string, $coreStoreConfig, $importFactory, $resourceHelper, $resource, $data
         );
 
         $this->_websiteManager = isset($data['website_manager']) ? $data['website_manager'] : $app;
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php
index d39bf564044..12d8f3a5960 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php
@@ -24,20 +24,15 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\ImportExport\Model\Import\Entity;
+
 /**
  * Import entity abstract model
- *
- * @category    Magento
- * @package     Magento_ImportExport
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\ImportExport\Model\Import\Entity;
-
 abstract class AbstractEntity
 {
     /**
      * Database constants
-     *
      */
     const DB_MAX_PACKET_COEFFICIENT = 900000;
     const DB_MAX_PACKET_DATA        = 1048576;
@@ -200,48 +195,49 @@ abstract class AbstractEntity
      *
      * @var \Magento\ImportExport\Helper\Data
      */
-    protected $_importExportData = null;
+    protected $_importExportData;
 
     /**
      * Core data
      *
      * @var \Magento\Core\Helper\Data
      */
-    protected $_coreData = null;
+    protected $_coreData;
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
+
     /**
      * @var \Magento\ImportExport\Model\Resource\Helper
      */
     protected $_resourceHelper;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\ImportExport\Helper\Data $importExportData
      * @param \Magento\ImportExport\Model\Resource\Import\Data $importData
      * @param \Magento\Eav\Model\Config $config
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\String $string
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
         \Magento\Core\Helper\Data $coreData,
         \Magento\ImportExport\Helper\Data $importExportData,
         \Magento\ImportExport\Model\Resource\Import\Data $importData,
         \Magento\Eav\Model\Config $config,
-        \Magento\Core\Model\Resource $resource,
-        \Magento\ImportExport\Model\Resource\Helper $resourceHelper
+        \Magento\App\Resource $resource,
+        \Magento\ImportExport\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\String $string
     ) {
-        $this->_coreString = $coreString;
         $this->_coreData = $coreData;
         $this->_importExportData = $importExportData;
         $this->_resourceHelper = $resourceHelper;
+        $this->string = $string;
 
         $entityType = $config->getEntityType($this->getEntityTypeCode());
 
@@ -254,6 +250,7 @@ abstract class AbstractEntity
      * Inner source object getter.
      *
      * @return \Magento\ImportExport\Model\Import\AbstractSource
+     * @throws \Magento\Core\Exception
      */
     protected function _getSource()
     {
@@ -591,8 +588,8 @@ abstract class AbstractEntity
     {
         switch ($attrParams['type']) {
             case 'varchar':
-                $val   = $this->_coreString->cleanString($rowData[$attrCode]);
-                $valid = $this->_coreString->strlen($val) < self::DB_MAX_VARCHAR_LENGTH;
+                $val   = $this->string->cleanString($rowData[$attrCode]);
+                $valid = $this->string->strlen($val) < self::DB_MAX_VARCHAR_LENGTH;
                 break;
             case 'decimal':
                 $val   = trim($rowData[$attrCode]);
@@ -611,8 +608,8 @@ abstract class AbstractEntity
                 $valid = strtotime($val) !== false;
                 break;
             case 'text':
-                $val   = $this->_coreString->cleanString($rowData[$attrCode]);
-                $valid = $this->_coreString->strlen($val) < self::DB_MAX_TEXT_LENGTH;
+                $val   = $this->string->cleanString($rowData[$attrCode]);
+                $valid = $this->string->strlen($val) < self::DB_MAX_TEXT_LENGTH;
                 break;
             default:
                 $valid = true;
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/CustomerComposite.php b/app/code/Magento/ImportExport/Model/Import/Entity/CustomerComposite.php
index d66dcde49dc..144bc0c2478 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/CustomerComposite.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/CustomerComposite.php
@@ -140,11 +140,11 @@ class CustomerComposite
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\ImportExport\Model\ImportFactory $importFactory
      * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\ImportExport\Model\Resource\Import\CustomerComposite\DataFactory $dataFactory
      * @param \Magento\ImportExport\Model\Import\Entity\Eav\CustomerFactory $customerFactory
      * @param \Magento\ImportExport\Model\Import\Entity\Eav\Customer\AddressFactory $addressFactory
@@ -154,18 +154,18 @@ class CustomerComposite
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\ImportExport\Model\ImportFactory $importFactory,
         \Magento\ImportExport\Model\Resource\Helper $resourceHelper,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\ImportExport\Model\Resource\Import\CustomerComposite\DataFactory $dataFactory,
         \Magento\ImportExport\Model\Import\Entity\Eav\CustomerFactory $customerFactory,
         \Magento\ImportExport\Model\Import\Entity\Eav\Customer\AddressFactory $addressFactory,
         array $data = array()
     ) {
         parent::__construct(
-            $coreData, $coreString, $coreStoreConfig, $importFactory, $resourceHelper, $resource, $data
+            $coreData, $string, $coreStoreConfig, $importFactory, $resourceHelper, $resource, $data
         );
 
         $this->addMessageTemplate(self::ERROR_ROW_IS_ORPHAN,
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Eav/AbstractCustomer.php b/app/code/Magento/ImportExport/Model/Import/Entity/Eav/AbstractCustomer.php
index 920204d6f82..947f34ad931 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/Eav/AbstractCustomer.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/Eav/AbstractCustomer.php
@@ -24,17 +24,12 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\ImportExport\Model\Import\Entity\Eav;
+
 /**
  * Import entity abstract customer model
- *
- * @category    Magento
- * @package     Magento_ImportExport
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\ImportExport\Model\Import\Entity\Eav;
-
-abstract class AbstractCustomer
-    extends \Magento\ImportExport\Model\Import\Entity\AbstractEav
+abstract class AbstractCustomer extends \Magento\ImportExport\Model\Import\Entity\AbstractEav
 {
     /**#@+
      * Permanent column names
@@ -80,11 +75,11 @@ abstract class AbstractCustomer
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\ImportExport\Model\ImportFactory $importFactory
      * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\App $app
      * @param \Magento\ImportExport\Model\Export\Factory $collectionFactory
      * @param \Magento\Eav\Model\Config $eavConfig
@@ -93,11 +88,11 @@ abstract class AbstractCustomer
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\ImportExport\Model\ImportFactory $importFactory,
         \Magento\ImportExport\Model\Resource\Helper $resourceHelper,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\App $app,
         \Magento\ImportExport\Model\Export\Factory $collectionFactory,
         \Magento\Eav\Model\Config $eavConfig,
@@ -106,7 +101,7 @@ abstract class AbstractCustomer
     ) {
         $this->_storageFactory = $storageFactory;
         parent::__construct(
-            $coreData, $coreString, $coreStoreConfig, $importFactory, $resourceHelper, $resource, $app,
+            $coreData, $string, $coreStoreConfig, $importFactory, $resourceHelper, $resource, $app,
             $collectionFactory, $eavConfig, $data
         );
 
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Eav/Customer.php b/app/code/Magento/ImportExport/Model/Import/Entity/Eav/Customer.php
index d9a8bb9740c..c273b9aa8fc 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/Eav/Customer.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/Eav/Customer.php
@@ -133,11 +133,11 @@ class Customer
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\ImportExport\Model\ImportFactory $importFactory
      * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\App $app
      * @param \Magento\ImportExport\Model\Export\Factory $collectionFactory
      * @param \Magento\Eav\Model\Config $eavConfig
@@ -148,11 +148,11 @@ class Customer
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\ImportExport\Model\ImportFactory $importFactory,
         \Magento\ImportExport\Model\Resource\Helper $resourceHelper,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\App $app,
         \Magento\ImportExport\Model\Export\Factory $collectionFactory,
         \Magento\Eav\Model\Config $eavConfig,
@@ -172,7 +172,7 @@ class Customer
             $data['attribute_collection'] = $this->_attributeCollection;
         }
 
-        parent::__construct($coreData, $coreString, $coreStoreConfig, $importFactory, $resourceHelper, $resource,
+        parent::__construct($coreData, $string, $coreStoreConfig, $importFactory, $resourceHelper, $resource,
             $app, $collectionFactory, $eavConfig, $storageFactory, $data);
 
         $this->_specialAttributes[] = self::COLUMN_WEBSITE;
@@ -197,8 +197,7 @@ class Customer
             __('Invalid password length')
         );
 
-        $this->_initStores(true)
-            ->_initAttributes();
+        $this->_initStores(true)->_initAttributes();
 
         $this->_customerModel = $customerFactory->create();
         /** @var $customerResource \Magento\Customer\Model\Resource\Customer */
@@ -314,8 +313,8 @@ class Customer
             'store_id'   => empty($rowData[self::COLUMN_STORE])
                 ? 0 : $this->_storeCodeToId[$rowData[self::COLUMN_STORE]],
 
-            'created_at' => $createdAt->format(\Magento\Date::DATETIME_PHP_FORMAT),
-            'updated_at' => $now->format(\Magento\Date::DATETIME_PHP_FORMAT),
+            'created_at' => $createdAt->format(\Magento\Stdlib\DateTime::DATETIME_PHP_FORMAT),
+            'updated_at' => $now->format(\Magento\Stdlib\DateTime::DATETIME_PHP_FORMAT),
         );
 
         $emailInLowercase = strtolower($rowData[self::COLUMN_EMAIL]);
@@ -347,7 +346,7 @@ class Customer
                     $value = $attributeParameters['options'][strtolower($value)];
                 } elseif ('datetime' == $attributeParameters['type']) {
                     $value = new \DateTime('@' . strtotime($value));
-                    $value = $value->format(\Magento\Date::DATETIME_PHP_FORMAT);
+                    $value = $value->format(\Magento\Stdlib\DateTime::DATETIME_PHP_FORMAT);
                 } elseif ($backendModel) {
                     $attribute->getBackend()->beforeSave($this->_customerModel->setData($attributeCode, $value));
                     $value = $this->_customerModel->getData($attributeCode);
@@ -459,7 +458,7 @@ class Customer
             }
             // check password
             if (isset($rowData['password']) && strlen($rowData['password'])
-                && $this->_stringHelper->strlen($rowData['password']) < self::MIN_PASSWORD_LENGTH
+                && $this->string->strlen($rowData['password']) < self::MIN_PASSWORD_LENGTH
             ) {
                 $this->addRowError(self::ERROR_PASSWORD_LENGTH, $rowNumber);
             }
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Eav/Customer/Address.php b/app/code/Magento/ImportExport/Model/Import/Entity/Eav/Customer/Address.php
index 37333663570..b8bc661303b 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/Eav/Customer/Address.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/Eav/Customer/Address.php
@@ -24,18 +24,14 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\ImportExport\Model\Import\Entity\Eav\Customer;
+
 /**
  * Import entity customer address model
  *
- * @category    Magento
- * @package     Magento_ImportExport
- * @author      Magento Core Team <core@magentocommerce.com>
- *
  * @todo finish moving dependencies to constructor in the scope of
  * @todo https://wiki.magento.com/display/MAGE2/Technical+Debt+%28Team-Donetsk-B%29
  */
-namespace Magento\ImportExport\Model\Import\Entity\Eav\Customer;
-
 class Address
     extends \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer
 {
@@ -224,13 +220,18 @@ class Address
      */
     protected $_addressFactory;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\ImportExport\Model\ImportFactory $importFactory
      * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\App $app
      * @param \Magento\ImportExport\Model\Export\Factory $collectionFactory
      * @param \Magento\Eav\Model\Config $eavConfig
@@ -240,15 +241,16 @@ class Address
      * @param \Magento\Customer\Model\CustomerFactory $customerFactory
      * @param \Magento\Customer\Model\Resource\Address\CollectionFactory $addressColFactory
      * @param \Magento\Customer\Model\Resource\Address\Attribute\CollectionFactory $attributesFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\ImportExport\Model\ImportFactory $importFactory,
         \Magento\ImportExport\Model\Resource\Helper $resourceHelper,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\App $app,
         \Magento\ImportExport\Model\Export\Factory $collectionFactory,
         \Magento\Eav\Model\Config $eavConfig,
@@ -258,12 +260,14 @@ class Address
         \Magento\Customer\Model\CustomerFactory $customerFactory,
         \Magento\Customer\Model\Resource\Address\CollectionFactory $addressColFactory,
         \Magento\Customer\Model\Resource\Address\Attribute\CollectionFactory $attributesFactory,
+        \Magento\Stdlib\DateTime $dateTime,
         array $data = array()
     ) {
         $this->_customerFactory = $customerFactory;
         $this->_addressFactory = $addressFactory;
         $this->_eavConfig = $eavConfig;
         $this->_resourceHelper = $resourceHelper;
+        $this->dateTime = $dateTime;
 
         if (!isset($data['attribute_collection'])) {
             /** @var $attributeCollection \Magento\Customer\Model\Resource\Address\Attribute\Collection */
@@ -273,7 +277,7 @@ class Address
             $data['attribute_collection'] = $attributeCollection;
         }
         parent::__construct(
-            $coreData, $coreString, $coreStoreConfig, $importFactory, $resourceHelper, $resource, $app,
+            $coreData, $string, $coreStoreConfig, $importFactory, $resourceHelper, $resource, $app,
             $collectionFactory, $eavConfig, $storageFactory, $data
         );
 
@@ -469,7 +473,7 @@ class Address
                     $value = $attributeParams['options'][strtolower($rowData[$attributeAlias])];
                 } elseif ('datetime' == $attributeParams['type']) {
                     $value = new \DateTime('@' . strtotime($rowData[$attributeAlias]));
-                    $value = $value->format(\Magento\Date::DATETIME_PHP_FORMAT);
+                    $value = $value->format(\Magento\Stdlib\DateTime::DATETIME_PHP_FORMAT);
                 } else {
                     $value = $rowData[$attributeAlias];
                 }
@@ -491,8 +495,8 @@ class Address
             'entity_id'      => $addressId,
             'entity_type_id' => $this->getEntityTypeId(),
             'parent_id'      => $customerId,
-            'created_at'     => now(),
-            'updated_at'     => now()
+            'created_at'     => $this->dateTime->now(),
+            'updated_at'     => $this->dateTime->now()
         );
 
         // attribute values
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Product.php b/app/code/Magento/ImportExport/Model/Import/Entity/Product.php
index a4a1ace7c87..05cf9bbc440 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/Product.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/Product.php
@@ -24,11 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\ImportExport\Model\Import\Entity;
+
 /**
  * Import entity product model
  */
-namespace Magento\ImportExport\Model\Import\Entity;
-
 class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
 {
     const CONFIG_KEY_PRODUCT_TYPES = 'global/importexport/import_product_types';
@@ -391,13 +391,18 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
     protected $_locale;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\ImportExport\Helper\Data $importExportData
      * @param \Magento\ImportExport\Model\Resource\Import\Data $importData
      * @param \Magento\Eav\Model\Config $config
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData
      * @param \Magento\Catalog\Helper\Data $catalogData
@@ -417,21 +422,21 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
      * @param \Magento\CatalogInventory\Model\Resource\Stock\ItemFactory $stockResItemFac
      * @param \Magento\CatalogInventory\Model\Stock\ItemFactory $stockItemFactory
      * @param \Magento\Core\Model\LocaleInterface $locale
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
         \Magento\Core\Helper\Data $coreData,
         \Magento\ImportExport\Helper\Data $importExportData,
         \Magento\ImportExport\Model\Resource\Import\Data $importData,
         \Magento\Eav\Model\Config $config,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\ImportExport\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\String $string,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\CatalogInventory\Helper\Data $catalogInventoryData,
         \Magento\Catalog\Helper\Data $catalogData,
         \Magento\ImportExport\Model\Import\Config $importConfig,
-
         \Magento\ImportExport\Model\Import\Proxy\Product\ResourceFactory $resourceFactory,
         \Magento\ImportExport\Model\Import\Entity\Product\OptionFactory $optionFactory,
         \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setColFactory,
@@ -447,6 +452,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         \Magento\CatalogInventory\Model\Resource\Stock\ItemFactory $stockResItemFac,
         \Magento\CatalogInventory\Model\Stock\ItemFactory $stockItemFactory,
         \Magento\Core\Model\LocaleInterface $locale,
+        \Magento\Stdlib\DateTime $dateTime,
         array $data = array()
     ) {
         $this->_eventManager = $eventManager;
@@ -467,8 +473,15 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         $this->_stockResItemFac = $stockResItemFac;
         $this->_stockItemFactory = $stockItemFactory;
         $this->_locale = $locale;
+        $this->dateTime = $dateTime;
         parent::__construct(
-            $coreString, $coreData, $importExportData, $importData, $config, $resource, $resourceHelper
+            $coreData,
+            $importExportData,
+            $importData,
+            $config,
+            $resource,
+            $resourceHelper,
+            $string
         );
         $this->_optionEntity = isset($data['option_entity'])
             ? $data['option_entity']
@@ -1097,7 +1110,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
                     // 1. Entity phase
                     if (isset($this->_oldSku[$rowSku])) { // existing row
                         $entityRowsUp[] = array(
-                            'updated_at' => now(),
+                            'updated_at' => $this->dateTime->now(),
                             'entity_id'  => $this->_oldSku[$rowSku]['entity_id']
                         );
                     } else { // new row
@@ -1107,8 +1120,8 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
                                 'attribute_set_id' => $this->_newSku[$rowSku]['attr_set_id'],
                                 'type_id'          => $this->_newSku[$rowSku]['type_id'],
                                 'sku'              => $rowSku,
-                                'created_at'       => now(),
-                                'updated_at'       => now()
+                                'created_at'       => $this->dateTime->now(),
+                                'updated_at'       => $this->dateTime->now()
                             );
                             $productsQty++;
                         } else {
@@ -1225,7 +1238,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
 
                     if ('datetime' == $attribute->getBackendType() && strtotime($attrValue)) {
                         $attrValue = new \DateTime('@' . strtotime($attrValue));
-                        $attrValue = $attrValue->format(\Magento\Date::DATETIME_PHP_FORMAT);
+                        $attrValue = $attrValue->format(\Magento\Stdlib\DateTime::DATETIME_PHP_FORMAT);
                     } elseif ($backModel) {
                         $attribute->getBackend()->beforeSave($product);
                         $attrValue = $product->getData($attribute->getAttributeCode());
@@ -1585,7 +1598,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
                     if ($stockItem->verifyNotification()) {
                         $stockItem->setLowStockDate($this->_locale
                             ->date(null, null, null, false)
-                            ->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT)
+                            ->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)
                         );
                     }
                     $stockItem->setStockStatusChangedAuto((int) !$stockItem->verifyStock());
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Product/Option.php b/app/code/Magento/ImportExport/Model/Import/Entity/Product/Option.php
index 8c95ecea555..51313f6938a 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/Product/Option.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/Product/Option.php
@@ -270,7 +270,7 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
     protected $_importFactory;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
@@ -294,9 +294,14 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
      */
     protected $_colIteratorFactory;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\ImportExport\Model\Resource\Import\Data $importData
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper
      * @param \Magento\Core\Model\StoreManagerInterface $_storeManager
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
@@ -304,13 +309,14 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
      * @param \Magento\ImportExport\Model\Resource\CollectionByPagesIteratorFactory $colIteratorFactory
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param array $data
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\ImportExport\Model\Resource\Import\Data $importData,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\ImportExport\Model\Resource\Helper $resourceHelper,
         \Magento\Core\Model\StoreManagerInterface $_storeManager,
         \Magento\Catalog\Model\ProductFactory $productFactory,
@@ -318,6 +324,7 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         \Magento\ImportExport\Model\Resource\CollectionByPagesIteratorFactory $colIteratorFactory,
         \Magento\Catalog\Helper\Data $catalogData,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
+        \Magento\Stdlib\DateTime $dateTime,
         array $data = array()
     ) {
         $this->_resource = $resource;
@@ -328,6 +335,7 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         $this->_optionColFactory = $optionColFactory;
         $this->_colIteratorFactory = $colIteratorFactory;
         $this->_coreStoreConfig = $coreStoreConfig;
+        $this->dateTime = $dateTime;
 
         if (isset($data['connection'])) {
             $this->_connection = $data['connection'];
@@ -1269,7 +1277,7 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
             'entity_id'        => $productId,
             'has_options'      => 1,
             'required_options' => 0,
-            'updated_at'       => \Magento\Date::now(),
+            'updated_at'       => $this->dateTime->now(),
         );
 
         if (!empty($rowData[self::COLUMN_IS_REQUIRED])) {
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Configurable.php b/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Configurable.php
index a90eba08267..244cf30a125 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Configurable.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Configurable.php
@@ -141,7 +141,7 @@ class Configurable
     protected $_resourceHelper;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
@@ -155,7 +155,7 @@ class Configurable
      * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $prodAttrColFac
      * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypesConfig
      * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $_productColFac
      * @param array $params
      */
@@ -164,7 +164,7 @@ class Configurable
         \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $prodAttrColFac,
         \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypesConfig,
         \Magento\ImportExport\Model\Resource\Helper $resourceHelper,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Catalog\Model\Resource\Product\CollectionFactory $_productColFac,
         array $params
     ) {
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Grouped.php b/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Grouped.php
index 9cdc9ebc422..9aa8c2eaa06 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Grouped.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Grouped.php
@@ -58,7 +58,7 @@ class Grouped
     protected $_importFactory;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
@@ -72,7 +72,7 @@ class Grouped
      * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $prodAttrColFac
      * @param \Magento\ImportExport\Model\ImportFactory $importFactory
      * @param \Magento\Catalog\Model\Resource\Product\LinkFactory $productLinkFactory
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param array $params
      */
     public function __construct(
@@ -80,7 +80,7 @@ class Grouped
         \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $prodAttrColFac,
         \Magento\ImportExport\Model\ImportFactory $importFactory,
         \Magento\Catalog\Model\Resource\Product\LinkFactory $productLinkFactory,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         array $params
     )
     {
diff --git a/app/code/Magento/ImportExport/Model/Resource/Helper.php b/app/code/Magento/ImportExport/Model/Resource/Helper.php
index 193d7dffc87..ce44302ff9f 100644
--- a/app/code/Magento/ImportExport/Model/Resource/Helper.php
+++ b/app/code/Magento/ImportExport/Model/Resource/Helper.php
@@ -43,11 +43,11 @@ class Helper extends \Magento\Core\Model\Resource\Helper
     const DB_MAX_PACKET_COEFFICIENT = 0.85; // The coefficient of useful data from maximum packet length
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param string $modulePrefix
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         $modulePrefix = 'importexport'
     ) {
         parent::__construct($resource, $modulePrefix);
diff --git a/app/code/Magento/ImportExport/Model/Resource/Import/CustomerComposite/Data.php b/app/code/Magento/ImportExport/Model/Resource/Import/CustomerComposite/Data.php
index 1aa42532d9e..fbfb396cf8b 100644
--- a/app/code/Magento/ImportExport/Model/Resource/Import/CustomerComposite/Data.php
+++ b/app/code/Magento/ImportExport/Model/Resource/Import/CustomerComposite/Data.php
@@ -33,8 +33,7 @@
  */
 namespace Magento\ImportExport\Model\Resource\Import\CustomerComposite;
 
-class Data
-    extends \Magento\ImportExport\Model\Resource\Import\Data
+class Data extends \Magento\ImportExport\Model\Resource\Import\Data
 {
     /**
      * Entity type
@@ -53,12 +52,12 @@ class Data
     /**
      * Class constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Helper\Data $coreHelper
      * @param array $arguments
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Helper\Data $coreHelper,
         array $arguments = array()
     ) {
diff --git a/app/code/Magento/ImportExport/Model/Resource/Import/Data.php b/app/code/Magento/ImportExport/Model/Resource/Import/Data.php
index 4039df5fb58..15feab6f062 100644
--- a/app/code/Magento/ImportExport/Model/Resource/Import/Data.php
+++ b/app/code/Magento/ImportExport/Model/Resource/Import/Data.php
@@ -52,11 +52,11 @@ class Data
     /**
      * Class constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Helper\Data $coreHelper
      * @param array $arguments
      */
-    public function __construct(\Magento\Core\Model\Resource $resource,
+    public function __construct(\Magento\App\Resource $resource,
         \Magento\Core\Helper\Data $coreHelper,
         array $arguments = array()
     ) {
diff --git a/app/code/Magento/ImportExport/etc/import.xml b/app/code/Magento/ImportExport/etc/import.xml
index 9073275c93d..03b8facff14 100644
--- a/app/code/Magento/ImportExport/etc/import.xml
+++ b/app/code/Magento/ImportExport/etc/import.xml
@@ -25,8 +25,8 @@
 -->
 <config>
     <entity name="catalog_product" label="Products" model="Magento\ImportExport\Model\Import\Entity\Product" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Basic" />
-    <entity name="customer_composite" label="Customers Main File" model="Magento\ImportExport\Model\Import\Entity\CustomerComposite" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Basic" />
-    <entity name="customer" label="Customers" model="Magento\ImportExport\Model\Import\Entity\Eav\Customer" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Custom" />
+    <entity name="customer_composite" label="Customers" model="Magento\ImportExport\Model\Import\Entity\CustomerComposite" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Basic" />
+    <entity name="customer" label="Customers Main File" model="Magento\ImportExport\Model\Import\Entity\Eav\Customer" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Custom" />
     <entity name="customer_address" label="Customer Addresses" model="Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Custom" />
     <productType name="simple" model="Magento\ImportExport\Model\Import\Entity\Product\Type\Simple" />
     <productType name="configurable" model="Magento\ImportExport\Model\Import\Entity\Product\Type\Configurable" />
diff --git a/app/code/Magento/Index/Model/EntryPoint/Indexer.php b/app/code/Magento/Index/App/Indexer.php
similarity index 71%
rename from app/code/Magento/Index/Model/EntryPoint/Indexer.php
rename to app/code/Magento/Index/App/Indexer.php
index 9b5292055dd..6278facb48f 100644
--- a/app/code/Magento/Index/Model/EntryPoint/Indexer.php
+++ b/app/code/Magento/Index/App/Indexer.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Indexer application
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,9 +23,12 @@
  * @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\Index\Model\EntryPoint;
+namespace Magento\Index\App;
+
+use Magento\AppInterface,
+    Magento\Filesystem;
 
-class Indexer extends \Magento\Core\Model\AbstractEntryPoint
+class Indexer implements AppInterface
 {
     /**
      * Report directory
@@ -38,38 +43,45 @@ class Indexer extends \Magento\Core\Model\AbstractEntryPoint
     protected $_filesystem;
 
     /**
-     * @param string $reportDir absolute path to report directory to be cleaned
-     * @param \Magento\Filesystem $filesystem
-     * @param \Magento\Core\Model\Config\Primary $config
-     * @param \Magento\ObjectManager $objectManager
+     * @var Magento\Index\Model\IndexerFactory
+     */
+    protected $_indexerFactory;
+
+    /**
+     * @param string $reportDir
+     * @param Filesystem $filesystem
+     * @param \Magento\Index\Model\IndexerFactory $indexerFactory
      */
     public function __construct(
         $reportDir,
-        \Magento\Filesystem $filesystem,
-        \Magento\Core\Model\Config\Primary $config,
-        \Magento\ObjectManager $objectManager = null
+        Filesystem $filesystem,
+        \Magento\Index\Model\IndexerFactory $indexerFactory
     ) {
-        parent::__construct($config, $objectManager);
         $this->_reportDir = $reportDir;
         $this->_filesystem = $filesystem;
+        $this->_indexerFactory = $indexerFactory;
     }
 
     /**
-     * Process request to application
+     * Run application
+     *
+     * @return int
      */
-    protected function _processRequest()
+    public function execute()
     {
         /* Clean reports */
         $this->_filesystem->delete($this->_reportDir, dirname($this->_reportDir));
 
         /* Run all indexer processes */
         /** @var $indexer \Magento\Index\Model\Indexer */
-        $indexer = $this->_objectManager->create('Magento\Index\Model\Indexer');
+        $indexer = $this->_indexerFactory->create();
         /** @var $process \Magento\Index\Model\Process */
         foreach ($indexer->getProcessesCollection() as $process) {
             if ($process->getIndexer()->isVisible()) {
                 $process->reindexEverything();
             }
         }
+        return 0;
     }
 }
+
diff --git a/app/code/Magento/Index/Model/EntryPoint/Shell.php b/app/code/Magento/Index/App/Shell.php
similarity index 62%
rename from app/code/Magento/Index/Model/EntryPoint/Shell.php
rename to app/code/Magento/Index/App/Shell.php
index c8104c01b90..c00c43af8e4 100644
--- a/app/code/Magento/Index/Model/EntryPoint/Shell.php
+++ b/app/code/Magento/Index/App/Shell.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Index shell application
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,9 +23,12 @@
  * @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\Index\Model\EntryPoint;
+namespace Magento\Index\App;
+
+use Magento\AppInterface,
+    Magento\Index\App\Shell\ErrorHandler;
 
-class Shell extends \Magento\Core\Model\AbstractEntryPoint
+class Shell implements AppInterface
 {
     /**
      * Filename of the entry point script
@@ -33,38 +38,43 @@ class Shell extends \Magento\Core\Model\AbstractEntryPoint
     protected $_entryFileName;
 
     /**
-     * @var \Magento\Index\Model\EntryPoint\Shell\ErrorHandler
+     * @var \Magento\Index\App\Shell\ErrorHandler
      */
     protected $_errorHandler;
 
     /**
-     * @param string $entryFileName filename of the entry point script
-     * @param \Magento\Index\Model\EntryPoint\Shell\ErrorHandler $errorHandler
-     * @param \Magento\Core\Model\Config\Primary $config
-     * @param \Magento\ObjectManager $objectManager
+     * @var \Magento\Index\Model\ShellFactory
+     */
+    protected $_shellFactory;
+
+    /**
+     * @param string $entryFileName
+     * @param \Magento\Index\Model\ShellFactory $shellFactory
+     * @param ErrorHandler $errorHandler
      */
     public function __construct(
         $entryFileName,
-        \Magento\Index\Model\EntryPoint\Shell\ErrorHandler $errorHandler,
-        \Magento\Core\Model\Config\Primary $config,
-        \Magento\ObjectManager $objectManager = null
+        \Magento\Index\Model\ShellFactory $shellFactory,
+        ErrorHandler $errorHandler
     ) {
-        parent::__construct($config, $objectManager);
         $this->_entryFileName = $entryFileName;
+        $this->_shellFactory = $shellFactory;
         $this->_errorHandler = $errorHandler;
     }
 
     /**
-     * Process request to application
+     * Run application
+     *
+     * @return int
      */
-    protected function _processRequest()
+    public function execute()
     {
         /** @var $shell \Magento\Index\Model\Shell */
-        $shell = $this->_objectManager
-            ->create('Magento\Index\Model\Shell', array('entryPoint' => $this->_entryFileName));
+        $shell = $this->_shellFactory->create(array('entryPoint' => $this->_entryFileName));
         $shell->run();
         if ($shell->hasErrors()) {
             $this->_errorHandler->terminate(1);
         }
+        return 0;
     }
 }
diff --git a/app/code/Magento/Index/Model/EntryPoint/Shell/ErrorHandler.php b/app/code/Magento/Index/App/Shell/ErrorHandler.php
similarity index 96%
rename from app/code/Magento/Index/Model/EntryPoint/Shell/ErrorHandler.php
rename to app/code/Magento/Index/App/Shell/ErrorHandler.php
index c6295eb519c..beb743b8d8a 100644
--- a/app/code/Magento/Index/Model/EntryPoint/Shell/ErrorHandler.php
+++ b/app/code/Magento/Index/App/Shell/ErrorHandler.php
@@ -21,7 +21,7 @@
  * @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\Index\Model\EntryPoint\Shell;
+namespace Magento\Index\App\Shell;
 
 class ErrorHandler
 {
diff --git a/app/code/Magento/Index/Model/Event.php b/app/code/Magento/Index/Model/Event.php
index ee8c83c05d7..288a95943f7 100644
--- a/app/code/Magento/Index/Model/Event.php
+++ b/app/code/Magento/Index/Model/Event.php
@@ -76,10 +76,16 @@ class Event extends \Magento\Core\Model\AbstractModel
      */
     protected $_indexer;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\Index\Model\Indexer $indexer
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -88,11 +94,13 @@ class Event extends \Magento\Core\Model\AbstractModel
         \Magento\Index\Model\Indexer $indexer,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         $this->_indexer = $indexer;
+        $this->dateTime = $dateTime;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -360,7 +368,7 @@ class Event extends \Magento\Core\Model\AbstractModel
         $newData = $this->getNewData(false);
         $this->setNewData(serialize($newData));
         if (!$this->hasCreatedAt()) {
-            $this->setCreatedAt($this->_getResource()->formatDate(time(), true));
+            $this->setCreatedAt($this->dateTime->formatDate(time(), true));
         }
         return parent::_beforeSave();
     }
diff --git a/app/code/Magento/Index/Model/Indexer/Config/SchemaLocator.php b/app/code/Magento/Index/Model/Indexer/Config/SchemaLocator.php
index 00c0c4be456..56f3ec2357f 100644
--- a/app/code/Magento/Index/Model/Indexer/Config/SchemaLocator.php
+++ b/app/code/Magento/Index/Model/Indexer/Config/SchemaLocator.php
@@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema
             = $moduleReader->getModuleDir('etc', 'Magento_Index') . DIRECTORY_SEPARATOR . 'indexers_merged.xsd';
diff --git a/app/code/Magento/Index/Model/Resource/Process.php b/app/code/Magento/Index/Model/Resource/Process.php
index 14b1d9c71f7..de08adb9416 100644
--- a/app/code/Magento/Index/Model/Resource/Process.php
+++ b/app/code/Magento/Index/Model/Resource/Process.php
@@ -36,9 +36,23 @@ namespace Magento\Index\Model\Resource;
 
 class Process extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\App\Resource $resource
+     */
+    public function __construct(\Magento\Stdlib\DateTime $dateTime, \Magento\App\Resource $resource)
+    {
+        $this->dateTime = $dateTime;
+        parent::__construct($resource);
+    }
+
     /**
      * Initialize  table and table pk
-     *
      */
     protected function _construct()
     {
@@ -74,7 +88,7 @@ class Process extends \Magento\Core\Model\Resource\Db\AbstractDb
     {
         $data = array(
             'status'    => \Magento\Index\Model\Process::STATUS_PENDING,
-            'ended_at'  => $this->formatDate(time()),
+            'ended_at'  => $this->dateTime->formatDate(time()),
         );
         $this->_updateProcessData($process->getId(), $data);
         return $this;
@@ -90,7 +104,7 @@ class Process extends \Magento\Core\Model\Resource\Db\AbstractDb
     {
         $data = array(
             'status'        => \Magento\Index\Model\Process::STATUS_RUNNING,
-            'started_at'    => $this->formatDate(time()),
+            'started_at'    => $this->dateTime->formatDate(time()),
         );
         $this->_updateProcessData($process->getId(), $data);
         return $this;
@@ -106,7 +120,7 @@ class Process extends \Magento\Core\Model\Resource\Db\AbstractDb
     {
         $data = array(
             'status'   => \Magento\Index\Model\Process::STATUS_REQUIRE_REINDEX,
-            'ended_at' => $this->formatDate(time()),
+            'ended_at' => $this->dateTime->formatDate(time()),
         );
         $this->_updateProcessData($process->getId(), $data);
         return $this;
@@ -149,7 +163,7 @@ class Process extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     public function updateProcessStartDate(\Magento\Index\Model\Process $process)
     {
-        $this->_updateProcessData($process->getId(), array('started_at' => $this->formatDate(time())));
+        $this->_updateProcessData($process->getId(), array('started_at' => $this->dateTime->formatDate(time())));
         return $this;
     }
 
@@ -161,7 +175,7 @@ class Process extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     public function updateProcessEndDate(\Magento\Index\Model\Process $process)
     {
-        $this->_updateProcessData($process->getId(), array('ended_at' => $this->formatDate(time())));
+        $this->_updateProcessData($process->getId(), array('ended_at' => $this->dateTime->formatDate(time())));
         return $this;
     }
 
diff --git a/app/code/Magento/Index/etc/di.xml b/app/code/Magento/Index/etc/di.xml
index ed8c9c225cb..3ee825bf052 100644
--- a/app/code/Magento/Index/etc/di.xml
+++ b/app/code/Magento/Index/etc/di.xml
@@ -25,7 +25,7 @@
 -->
 <config>
     <preference for="Magento\Index\Model\Indexer\ConfigInterface" type="Magento\Index\Model\Indexer\Config" />
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <index_setup>Magento\Index\Model\Resource\Setup</index_setup>
diff --git a/app/code/Magento/Install/Model/EntryPoint/Console.php b/app/code/Magento/Install/App/Console.php
similarity index 50%
rename from app/code/Magento/Install/Model/EntryPoint/Console.php
rename to app/code/Magento/Install/App/Console.php
index 4901c562be5..2a838aec034 100644
--- a/app/code/Magento/Install/Model/EntryPoint/Console.php
+++ b/app/code/Magento/Install/App/Console.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Console entry point
+ * Console application
  *
  * Magento
  *
@@ -23,83 +23,79 @@
  * @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\Install\Model\EntryPoint;
+namespace Magento\Install\App;
 
-class Console extends \Magento\Core\Model\AbstractEntryPoint
+class Console implements \Magento\AppInterface
 {
     /**
-     * Application params
-     *
-     * @var array
+     * @var  \Magento\Install\Model\Installer\ConsoleFactory
+     */
+    protected $_installerFactory;
+
+    /** @var array */
+    protected $_arguments;
+
+    /** @var \Magento\Install\App\Output */
+    protected $_output;
+
+    /**
+     * @var \Magento\App\ObjectManager\ConfigLoader
      */
-    protected $_params = array();
+    protected $_loader;
 
     /**
-     * @param \Magento\Core\Model\Config\Primary $baseDir
-     * @param array $params
-     * @param \Magento\Core\Model\Config\Primary $config
+     * @var \Magento\App\State
+     */
+    protected $_state;
+
+    /**
+     * @var \Magento\ObjectManager
+     */
+    protected $_objectManager;
+
+    /**
+     * @param \Magento\Install\Model\Installer\ConsoleFactory $installerFactory
+     * @param Output $output
+     * @param \Magento\App\State $state
+     * @param \Magento\App\ObjectManager\ConfigLoader $loader
      * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Install\Model\EntryPoint\Output $output
+     * @param array $arguments
      */
     public function __construct(
-        $baseDir,
-        array $params = array(),
-        \Magento\Core\Model\Config\Primary $config = null,
-        \Magento\ObjectManager $objectManager = null,
-        \Magento\Install\Model\EntryPoint\Output $output = null
+        \Magento\Install\Model\Installer\ConsoleFactory $installerFactory,
+        \Magento\Install\App\Output $output,
+        \Magento\App\State $state,
+        \Magento\App\ObjectManager\ConfigLoader $loader,
+        \Magento\ObjectManager $objectManager,
+        array $arguments = array()
     ) {
-        $this->_params = $this->_buildInitParams($params);
-        if (!$config) {
-            $config = new \Magento\Core\Model\Config\Primary($baseDir, $this->_params);
-        }
-        $this->_output = $output ?: new \Magento\Install\Model\EntryPoint\Output();
-        parent::__construct($config, $objectManager);
+        $this->_loader = $loader;
+        $this->_state  = $state;
+        $this->_installerFactory = $installerFactory;
+        $this->_arguments = $this->_buildInitArguments($arguments);
+        $this->_output = $output;
+        $this->_objectManager = $objectManager;
     }
 
     /**
-     * Customize application init parameters
+     * Customize application init arguments
      *
      * @param array $args
      * @return array
      */
-    protected function _buildInitParams(array $args)
+    protected function _buildInitArguments(array $args)
     {
         if (!empty($args[\Magento\Install\Model\Installer\Console::OPTION_URIS])) {
-            $args[\Magento\Core\Model\App::PARAM_APP_URIS] =
+            $args[\Magento\App\Dir::PARAM_APP_URIS] =
                 unserialize(base64_decode($args[\Magento\Install\Model\Installer\Console::OPTION_URIS]));
         }
         if (!empty($args[\Magento\Install\Model\Installer\Console::OPTION_DIRS])) {
-            $args[\Magento\Core\Model\App::PARAM_APP_DIRS] =
+            $args[\Magento\App\Dir::PARAM_APP_DIRS] =
                 unserialize(base64_decode($args[\Magento\Install\Model\Installer\Console::OPTION_DIRS]));
         }
         return $args;
     }
 
-    /**
-     * Run http application
-     */
-    protected function _processRequest()
-    {
-        /**
-         * @var $installer \Magento\Install\Model\Installer\Console
-         */
-        $installer = $this->_objectManager->create(
-            'Magento\Install\Model\Installer\Console',
-            array('installArgs' => $this->_params)
-        );
-        if (isset($this->_params['show_locales'])) {
-            $this->_output->export($installer->getAvailableLocales());
-        } else if (isset($this->_params['show_currencies'])) {
-            $this->_output->export($installer->getAvailableCurrencies());
-        } else if (isset($this->_params['show_timezones'])) {
-            $this->_output->export($installer->getAvailableTimezones());
-        } else if (isset($this->_params['show_install_options'])) {
-            $this->_output->export($installer->getAvailableInstallOptions());
-        } else {
-            $this->_handleInstall($installer);
-        }
-    }
-
     /**
      * Install/Uninstall application
      *
@@ -107,21 +103,20 @@ class Console extends \Magento\Core\Model\AbstractEntryPoint
      */
     protected function _handleInstall(\Magento\Install\Model\Installer\Console $installer)
     {
-        if (isset($this->_params['config']) && file_exists($this->_params['config'])) {
-            $config = (array) include($this->_params['config']);
-            $this->_params = array_merge((array)$config, $this->_params);
+        if (isset($this->_arguments['config']) && file_exists($this->_arguments['config'])) {
+            $config = (array) include($this->_arguments['config']);
+            $this->_arguments = array_merge((array)$config, $this->_arguments);
         }
-        $isUninstallMode = isset($this->_params['uninstall']);
+        $isUninstallMode = isset($this->_arguments['uninstall']);
         if ($isUninstallMode) {
             $result = $installer->uninstall();
         } else {
-            $result = $installer->install($this->_params);
+            $result = $installer->install($this->_arguments);
         }
         if (!$installer->hasErrors()) {
             if ($isUninstallMode) {
-                $msg = $result ?
-                    'Uninstalled successfully' :
-                    'Ignoring attempt to uninstall non-installed application';
+                $msg = $result ? 'Uninstalled successfully'
+                    : 'Ignoring attempt to uninstall non-installed application';
             } else {
                 $msg = 'Installed successfully' . ($result ? ' (encryption key "' . $result . '")' : '');
             }
@@ -130,4 +125,29 @@ class Console extends \Magento\Core\Model\AbstractEntryPoint
             $this->_output->error(implode(PHP_EOL, $installer->getErrors()) . PHP_EOL);
         }
     }
+
+    /**
+     * Execute application
+     * @return int
+     */
+    public function execute()
+    {
+        $areaCode = 'install';
+        $this->_state->setAreaCode($areaCode);
+        $this->_objectManager->configure($this->_loader->load($areaCode));
+
+        $installer = $this->_installerFactory->create(array('installArgs' => $this->_arguments));
+        if (isset($this->_arguments['show_locales'])) {
+            $this->_output->export($installer->getAvailableLocales());
+        } else if (isset($this->_arguments['show_currencies'])) {
+            $this->_output->export($installer->getAvailableCurrencies());
+        } else if (isset($this->_arguments['show_timezones'])) {
+            $this->_output->export($installer->getAvailableTimezones());
+        } else if (isset($this->_arguments['show_install_options'])) {
+            $this->_output->export($installer->getAvailableInstallOptions());
+        } else {
+            $this->_handleInstall($installer);
+        }
+        return 0;
+    }
 }
diff --git a/app/code/Magento/Install/Model/EntryPoint/Output.php b/app/code/Magento/Install/App/Output.php
similarity index 97%
rename from app/code/Magento/Install/Model/EntryPoint/Output.php
rename to app/code/Magento/Install/App/Output.php
index 041da09429c..122108a6778 100644
--- a/app/code/Magento/Install/Model/EntryPoint/Output.php
+++ b/app/code/Magento/Install/App/Output.php
@@ -21,7 +21,7 @@
  * @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\Install\Model\EntryPoint;
+namespace Magento\Install\App;
 
 class Output
 {
diff --git a/app/code/Magento/Install/Block/Download.php b/app/code/Magento/Install/Block/Download.php
index d7ce3d16414..bd7b215abd9 100644
--- a/app/code/Magento/Install/Block/Download.php
+++ b/app/code/Magento/Install/Block/Download.php
@@ -39,9 +39,9 @@ class Download extends \Magento\Install\Block\AbstractBlock
     protected $_template = 'download.phtml';
 
     /**
-     * @var \Magento\Core\Model\Config
+     * @var \Magento\Module\Dir\Reader
      */
-    protected $_coreConfig;
+    protected $_moduleReader;
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
@@ -49,7 +49,7 @@ class Download extends \Magento\Install\Block\AbstractBlock
      * @param \Magento\Install\Model\Installer $installer
      * @param \Magento\Install\Model\Wizard $installWizard
      * @param \Magento\Core\Model\Session\Generic $session
-     * @param \Magento\Core\Model\Config $coreConfig
+     * @param \Magento\Module\Dir\Reader $moduleReader
      * @param array $data
      */
     public function __construct(
@@ -58,11 +58,11 @@ class Download extends \Magento\Install\Block\AbstractBlock
         \Magento\Install\Model\Installer $installer,
         \Magento\Install\Model\Wizard $installWizard,
         \Magento\Core\Model\Session\Generic $session,
-        \Magento\Core\Model\Config $coreConfig,
+        \Magento\Module\Dir\Reader $moduleReader,
         array $data = array()
     ) {
         parent::__construct($coreData, $context, $installer, $installWizard, $session, $data);
-        $this->_coreConfig = $coreConfig;
+        $this->_moduleReader = $moduleReader;
     }
 
     /**
@@ -90,7 +90,7 @@ class Download extends \Magento\Install\Block\AbstractBlock
      */
     public function hasLocalCopy()
     {
-        $dir = $this->_coreConfig->getModuleDir('etc', 'Magento_Adminhtml');
+        $dir = $this->_moduleReader->getModuleDir('etc', 'Magento_Adminhtml');
         if ($dir && $this->_filesystem->isDirectory($dir)) {
             return true;
         }
diff --git a/app/code/Magento/Install/Controller/Index.php b/app/code/Magento/Install/Controller/Index.php
index b7169cfa109..0a57e7066f4 100644
--- a/app/code/Magento/Install/Controller/Index.php
+++ b/app/code/Magento/Install/Controller/Index.php
@@ -80,6 +80,6 @@ class Index extends \Magento\Install\Controller\Action
      */
     public function indexAction()
     {
-        $this->_forward('begin', 'wizard', 'install');
+        $this->_redirect('install/wizard/begin');
     }
 }
diff --git a/app/code/Magento/Install/Controller/Wizard.php b/app/code/Magento/Install/Controller/Wizard.php
index 363d8b6fc9e..20f8e0db71c 100644
--- a/app/code/Magento/Install/Controller/Wizard.php
+++ b/app/code/Magento/Install/Controller/Wizard.php
@@ -55,7 +55,7 @@ class Wizard extends \Magento\Install\Controller\Action
     /**
      * DB Updater
      *
-     * @var \Magento\App\UpdaterInterface
+     * @var \Magento\Module\UpdaterInterface
      */
     protected $_dbUpdater;
 
@@ -76,7 +76,7 @@ class Wizard extends \Magento\Install\Controller\Action
      * @param \Magento\Install\Model\Installer $installer
      * @param \Magento\Install\Model\Wizard $wizard
      * @param \Magento\Core\Model\Session\Generic $session
-     * @param \Magento\App\UpdaterInterface $dbUpdater
+     * @param \Magento\Module\UpdaterInterface $dbUpdater
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      */
     public function __construct(
@@ -89,7 +89,7 @@ class Wizard extends \Magento\Install\Controller\Action
         \Magento\Install\Model\Installer $installer,
         \Magento\Install\Model\Wizard $wizard,
         \Magento\Core\Model\Session\Generic $session,
-        \Magento\App\UpdaterInterface $dbUpdater,
+        \Magento\Module\UpdaterInterface $dbUpdater,
         \Magento\Core\Model\StoreManagerInterface $storeManager
     ) {
         parent::__construct($context, $configScope, $viewDesign, $collectionFactory, $app, $appState);
@@ -180,7 +180,7 @@ class Wizard extends \Magento\Install\Controller\Action
      */
     public function indexAction()
     {
-        $this->_forward('begin');
+        $this->_redirect('*/*/begin');
     }
 
     /**
diff --git a/app/code/Magento/Install/Model/Config/SchemaLocator.php b/app/code/Magento/Install/Model/Config/SchemaLocator.php
index 6f71cd94ef4..825709ac496 100644
--- a/app/code/Magento/Install/Model/Config/SchemaLocator.php
+++ b/app/code/Magento/Install/Model/Config/SchemaLocator.php
@@ -43,9 +43,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Install') . '/install_wizard.xsd';
         $this->_perFileSchema = $moduleReader->getModuleDir('etc', 'Magento_Install') . '/install_wizard_file.xsd';
diff --git a/app/code/Magento/Install/Model/EntryPoint/Upgrade.php b/app/code/Magento/Install/Model/EntryPoint/Upgrade.php
deleted file mode 100644
index 3c357ab43d8..00000000000
--- a/app/code/Magento/Install/Model/EntryPoint/Upgrade.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/**
- * Entry point for upgrading application
- *
- * 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\Install\Model\EntryPoint;
-
-class Upgrade extends \Magento\Core\Model\AbstractEntryPoint
-{
-    /**
-     * Key for passing reindexing parameter
-     */
-    const REINDEX = 'reindex';
-
-    /**@#+
-     * Reindexing modes
-     */
-    const REINDEX_INVALID = 1;
-    const REINDEX_ALL = 2;
-    /**@#-*/
-
-    /**
-     * Apply scheme & data updates
-     */
-    protected function _processRequest()
-    {
-        /** @var $cacheFrontendPool \Magento\Core\Model\Cache\Frontend\Pool */
-        $cacheFrontendPool = $this->_objectManager->get('Magento\Core\Model\Cache\Frontend\Pool');
-        /** @var $cacheFrontend \Magento\Cache\FrontendInterface */
-        foreach ($cacheFrontendPool as $cacheFrontend) {
-            $cacheFrontend->clean();
-        }
-
-        /** @var $updater \Magento\App\Updater */
-        $updater = $this->_objectManager->get('Magento\App\Updater');
-        $updater->updateScheme();
-        $updater->updateData();
-
-        $this->_reindex();
-    }
-
-    /**
-     * Perform reindexing if requested
-     */
-    private function _reindex()
-    {
-        /** @var $config \Magento\Core\Model\Config\Primary */
-        $config = $this->_objectManager->get('Magento\Core\Model\Config\Primary');
-        $reindexMode = $config->getParam(self::REINDEX);
-        if ($reindexMode) {
-            /** @var $indexer \Magento\Index\Model\Indexer */
-            $indexer = $this->_objectManager->get('Magento\Index\Model\Indexer');
-            if (self::REINDEX_ALL == $reindexMode) {
-                $indexer->reindexAll();
-            } elseif (self::REINDEX_INVALID == $reindexMode) {
-                $indexer->reindexRequired();
-            }
-        }
-    }
-}
diff --git a/app/code/Magento/Install/Model/Installer.php b/app/code/Magento/Install/Model/Installer.php
index 2931e96ed3e..f295f4415fd 100644
--- a/app/code/Magento/Install/Model/Installer.php
+++ b/app/code/Magento/Install/Model/Installer.php
@@ -42,14 +42,14 @@ class Installer extends \Magento\Object
     /**
      * DB updated model
      *
-     * @var \Magento\App\UpdaterInterface
+     * @var \Magento\Module\UpdaterInterface
      */
     protected $_dbUpdater;
 
     /**
      * Application chache model
      *
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cache;
 
@@ -78,17 +78,10 @@ class Installer extends \Magento\Object
     protected $_coreData = null;
 
     /**
-     * @var \Magento\App\Updater\SetupFactory
+     * @var \Magento\Module\Updater\SetupFactory
      */
     protected $_setupFactory;
 
-    /**
-     * Core Primary config
-     *
-     * @var \Magento\Core\Model\Config\Primary
-     */
-    protected $_primaryConfig;
-
     /**
      * Install installer pear
      *
@@ -152,37 +145,49 @@ class Installer extends \Magento\Object
      */
     protected $_session;
 
+    /** @var \Magento\App\Resource */
+    protected $_resource;
+
+    /**
+     * @var \Magento\Encryption\EncryptorInterface
+     */
+    protected $_encryptor;
+
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
     /**
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\ConfigInterface $config
-     * @param \Magento\App\UpdaterInterface $dbUpdater
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\Module\UpdaterInterface $dbUpdater
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Core\Model\Cache\TypeListInterface $cacheTypeList
      * @param \Magento\Core\Model\Cache\StateInterface $cacheState
-     * @param \Magento\App\Updater\SetupFactory $setupFactory
-     * @param \Magento\Core\Model\Config\Primary $primaryConfig
-     * @param \Magento\Core\Model\Config\Local $localConfig
+     * @param \Magento\Module\Updater\SetupFactory $setupFactory
+     * @param \Magento\App\Config $localConfig
      * @param \Magento\Core\Model\App $app
      * @param \Magento\App\State $appState
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\User\Model\UserFactory $userModelFactory
-     * @param \Magento\Install\Model\Installer\Filesystem $filesystem
-     * @param \Magento\Install\Model\Installer\Pear $installerPear
-     * @param \Magento\Install\Model\Installer\Db $installerDb
-     * @param \Magento\Install\Model\Installer\Config $installerConfig
+     * @param Installer\Filesystem $filesystem
+     * @param Installer\Pear $installerPear
+     * @param Installer\Db $installerDb
+     * @param Installer\Config $installerConfig
      * @param \Magento\Core\Model\Session\Generic $session
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
+     * @param \Magento\Math\Random $mathRandom
+     * @param \Magento\App\Resource $resource
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\ConfigInterface $config,
-        \Magento\App\UpdaterInterface $dbUpdater,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\Module\UpdaterInterface $dbUpdater,
+        \Magento\App\CacheInterface $cache,
         \Magento\Core\Model\Cache\TypeListInterface $cacheTypeList,
         \Magento\Core\Model\Cache\StateInterface $cacheState,
-        \Magento\App\Updater\SetupFactory $setupFactory,
-        \Magento\Core\Model\Config\Primary $primaryConfig,
-        \Magento\Core\Model\Config\Local $localConfig,
+        \Magento\Module\Updater\SetupFactory $setupFactory,
+        \Magento\App\Config $localConfig,
         \Magento\Core\Model\App $app,
         \Magento\App\State $appState,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -192,17 +197,20 @@ class Installer extends \Magento\Object
         \Magento\Install\Model\Installer\Db $installerDb,
         \Magento\Install\Model\Installer\Config $installerConfig,
         \Magento\Core\Model\Session\Generic $session,
+        \Magento\Encryption\EncryptorInterface $encryptor,
+        \Magento\Math\Random $mathRandom,
+        \Magento\App\Resource $resource,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
         $this->_dbUpdater = $dbUpdater;
         $this->_config = $config;
         $this->_cache = $cache;
         $this->_cacheState = $cacheState;
         $this->_cacheTypeList = $cacheTypeList;
         $this->_setupFactory = $setupFactory;
+        $this->_encryptor = $encryptor;
+        $this->mathRandom = $mathRandom;
         parent::__construct($data);
-        $this->_primaryConfig = $primaryConfig;
         $this->_localConfig = $localConfig;
         $this->_app = $app;
         $this->_appState = $appState;
@@ -213,6 +221,7 @@ class Installer extends \Magento\Object
         $this->_installerDb = $installerDb;
         $this->_installerConfig = $installerConfig;
         $this->_session = $session;
+        $this->_resource = $resource;
     }
 
     /**
@@ -314,10 +323,10 @@ class Installer extends \Magento\Object
             ->setConfigData($data)
             ->install();
 
-        $this->_primaryConfig->reinit();
         $this->_localConfig->reload();
+        $this->_resource->setTablePrefix($data['db_prefix']);
 
-        $this->_config->reloadConfig();
+        $this->_config->reinit();
 
         return $this;
     }
@@ -424,7 +433,7 @@ class Installer extends \Magento\Object
     {
         // \Magento\User\Model\User belongs to adminhtml area
         $this->_app
-            ->loadAreaPart(\Magento\Core\Model\App\Area::AREA_ADMINHTML, \Magento\Core\Model\App\Area::PART_CONFIG);
+            ->loadAreaPart(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, \Magento\Core\Model\App\Area::PART_CONFIG);
 
         /** @var $user \Magento\User\Model\User */
         $user = $this->_userModelFactory->create();
@@ -444,7 +453,7 @@ class Installer extends \Magento\Object
      */
     public function installEncryptionKey($key)
     {
-        $this->_coreData->validateKey($key);
+        $this->_encryptor->validateKey($key);
         $this->_installerConfig->replaceTmpEncryptKey($key);
         $this->_refreshConfig();
         return $this;
@@ -459,9 +468,9 @@ class Installer extends \Magento\Object
     public function getValidEncryptionKey($key = null)
     {
         if (!$key) {
-            $key = md5($this->_coreData->getRandomString(10));
+            $key = md5($this->mathRandom->getRandomString(10));
         }
-        $this->_coreData->validateKey($key);
+        $this->_encryptor->validateKey($key);
         return $key;
     }
 
@@ -472,11 +481,9 @@ class Installer extends \Magento\Object
     {
         $this->_installerConfig->replaceTmpInstallDate();
 
-        $this->_primaryConfig->reinit();
-
         $this->_refreshConfig();
 
-        $this->_config->reloadConfig();
+        $this->_config->reinit();
 
         /* Enable all cache types */
         foreach (array_keys($this->_cacheTypeList->getTypes()) as $cacheTypeCode) {
diff --git a/app/code/Magento/Install/Model/Installer/Console.php b/app/code/Magento/Install/Model/Installer/Console.php
index e6f031c5e27..22d41dcbdc3 100644
--- a/app/code/Magento/Install/Model/Installer/Console.php
+++ b/app/code/Magento/Install/Model/Installer/Console.php
@@ -89,14 +89,14 @@ class Console extends \Magento\Install\Model\Installer\AbstractInstaller
     /**
      * Resource config
      *
-     * @var \Magento\Core\Model\Config\Resource
+     * @var \Magento\App\Resource\Config
      */
     protected $_resourceConfig;
 
     /**
      * DB updater
      *
-     * @var \Magento\App\UpdaterInterface
+     * @var \Magento\Module\UpdaterInterface
      */
     protected $_dbUpdater;
 
@@ -137,8 +137,8 @@ class Console extends \Magento\Install\Model\Installer\AbstractInstaller
 
     /**
      * @param \Magento\Install\Model\Installer $installer
-     * @param \Magento\Core\Model\Config\Resource $resourceConfig
-     * @param \Magento\App\UpdaterInterface $dbUpdater
+     * @param \Magento\App\Resource\Config $resourceConfig
+     * @param \Magento\Module\UpdaterInterface $dbUpdater
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\Install\Model\Installer\Data $installerData
      * @param \Magento\App\State $appState
@@ -148,8 +148,8 @@ class Console extends \Magento\Install\Model\Installer\AbstractInstaller
      */
     public function __construct(
         \Magento\Install\Model\Installer $installer,
-        \Magento\Core\Model\Config\Resource $resourceConfig,
-        \Magento\App\UpdaterInterface $dbUpdater,
+        \Magento\App\Resource\Config $resourceConfig,
+        \Magento\Module\UpdaterInterface $dbUpdater,
         \Magento\Filesystem $filesystem,
         \Magento\Install\Model\Installer\Data $installerData,
         \Magento\App\State $appState,
diff --git a/app/code/Magento/Install/Model/Installer/Db.php b/app/code/Magento/Install/Model/Installer/Db.php
index 07d32156e2a..ff22bbdbe3b 100644
--- a/app/code/Magento/Install/Model/Installer/Db.php
+++ b/app/code/Magento/Install/Model/Installer/Db.php
@@ -39,7 +39,7 @@ class Db extends \Magento\Install\Model\Installer\AbstractInstaller
     protected $_dbResource;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -59,13 +59,13 @@ class Db extends \Magento\Install\Model\Installer\AbstractInstaller
 
     /**
      * @param \Magento\Install\Model\Installer $installer
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Install\Model\Installer\Db\Factory $dbFactory
      * @param array $dbConfig
      */
     public function __construct(
         \Magento\Install\Model\Installer $installer,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Install\Model\Installer\Db\Factory $dbFactory,
         array $dbConfig
     ) {
diff --git a/app/code/Magento/Install/Model/Installer/Db/AbstractDb.php b/app/code/Magento/Install/Model/Installer/Db/AbstractDb.php
index ee21049b23f..aa9af9ffd1a 100644
--- a/app/code/Magento/Install/Model/Installer/Db/AbstractDb.php
+++ b/app/code/Magento/Install/Model/Installer/Db/AbstractDb.php
@@ -73,12 +73,12 @@ abstract class AbstractDb
 
     /**
      * @param \Magento\Core\Model\Resource\Type\Db\Pdo\MysqlFactory $adapterFactory
-     * @param \Magento\Core\Model\Config\Local $localConfig
+     * @param \Magento\App\Config $localConfig
      * @param array $dbExtensions
      */
     public function __construct(
         \Magento\Core\Model\Resource\Type\Db\Pdo\MysqlFactory $adapterFactory,
-        \Magento\Core\Model\Config\Local $localConfig,
+        \Magento\App\Config $localConfig,
         array $dbExtensions = array()
     ) {
         $this->_adapterFactory = $adapterFactory;
diff --git a/app/code/Magento/Install/etc/di.xml b/app/code/Magento/Install/etc/di.xml
index aeb6d1ac7f5..7460d942e67 100644
--- a/app/code/Magento/Install/etc/di.xml
+++ b/app/code/Magento/Install/etc/di.xml
@@ -39,7 +39,7 @@
     </type>
     <type name="Magento\Install\Block\End">
         <param name="cryptKey">
-            <value type="argument">Magento\Core\Model\Encryption::PARAM_CRYPT_KEY</value>
+            <value type="argument">Magento\Encryption\Encryptor::PARAM_CRYPT_KEY</value>
         </param>
         <param name='session'>
             <instance type="Magento\Install\Model\Session" />
@@ -134,4 +134,19 @@
             <instance type="Magento\Install\Model\Installer\Proxy" />
         </param>
     </type>
+    <type name="Magento\App\AreaList">
+        <param name="areas">
+            <value>
+                <install>
+                    <frontName>install</frontName>
+                    <router>install</router>
+                </install>
+            </value>
+        </param>
+    </type>
+    <type name="Magento\Backend\Model\Url">
+        <param name="areaCode">
+            <value>adminhtml</value>
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Install/etc/install/di.xml b/app/code/Magento/Install/etc/install/di.xml
new file mode 100644
index 00000000000..68d9ba11772
--- /dev/null
+++ b/app/code/Magento/Install/etc/install/di.xml
@@ -0,0 +1,39 @@
+<?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>
+    <preference for="Magento\Core\Model\Theme" type="Magento\Core\Model\Theme\Data" />
+    <type name="Magento\App\RouterList" shared="true">
+        <param name="routerList">
+            <value>
+                <install>
+                    <instance>Magento\Core\App\Router\Base</instance>
+                    <disable type="bool">false</disable>
+                    <sortOrder>20</sortOrder>
+                </install>
+            </value>
+        </param>
+    </type>
+</config>
diff --git a/app/code/Magento/Install/etc/install/routes.xml b/app/code/Magento/Install/etc/install/routes.xml
new file mode 100644
index 00000000000..4e5b4fb93a5
--- /dev/null
+++ b/app/code/Magento/Install/etc/install/routes.xml
@@ -0,0 +1,32 @@
+<?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>
+    <router id="install">
+        <route id="install" frontName="install">
+            <module name="Magento_Install" />
+        </route>
+    </router>
+</config>
\ No newline at end of file
diff --git a/app/code/Magento/Install/etc/module.xml b/app/code/Magento/Install/etc/module.xml
index 545de912ed8..7c6fc8ec61c 100755
--- a/app/code/Magento/Install/etc/module.xml
+++ b/app/code/Magento/Install/etc/module.xml
@@ -34,7 +34,6 @@
             <module name="Magento_Adminhtml"/>
             <module name="Magento_Directory"/>
             <module name="Magento_User"/>
-            <module name="Magento_Index"/>
             <module name="Magento_Backend"/>
             <module name="Magento_Page" type="soft"/>
         </depends>
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration.php b/app/code/Magento/Integration/Block/Adminhtml/Integration.php
new file mode 100644
index 00000000000..384bc2c7df0
--- /dev/null
+++ b/app/code/Magento/Integration/Block/Adminhtml/Integration.php
@@ -0,0 +1,42 @@
+<?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\Integration\Block\Adminhtml;
+
+/**
+ * Integration block.
+ */
+class Integration extends \Magento\Backend\Block\Widget\Grid\Container
+{
+    /**
+     * Define actions available on the integrations grid page.
+     */
+    protected function _construct()
+    {
+        $this->_controller = 'adminhtml_integration';
+        $this->_blockGroup = 'Magento_Integration';
+        $this->_headerText = __('Integrations');
+        $this->_addButtonLabel = __('Add New Integration');
+        parent::_construct();
+    }
+}
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php
new file mode 100644
index 00000000000..21493db48e1
--- /dev/null
+++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php
@@ -0,0 +1,94 @@
+<?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\Integration\Block\Adminhtml\Integration;
+
+use Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info;
+use Magento\Integration\Controller\Adminhtml\Integration;
+
+class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
+{
+    /**
+     * Core registry
+     *
+     * @var \Magento\Core\Model\Registry
+     */
+    protected $_registry = null;
+
+    /**
+     * Initialize dependencies.
+     *
+     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Backend\Block\Template\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Core\Helper\Data $coreData,
+        \Magento\Backend\Block\Template\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        array $data = array()
+    ) {
+        $this->_registry = $registry;
+        parent::__construct($coreData, $context, $data);
+    }
+
+    /**
+     * Initialize Integration edit page
+     *
+     */
+    protected function _construct()
+    {
+        $this->_controller = 'adminhtml_integration';
+        $this->_blockGroup = 'Magento_Integration';
+        parent::_construct();
+    }
+
+    /**
+     * Get header text for edit page.
+     *
+     * @return string
+     */
+    public function getHeaderText()
+    {
+        if (isset($this->_registry->registry(Integration::REGISTRY_KEY_CURRENT_INTEGRATION)[Info::DATA_ID])) {
+            return __(
+                "Edit Integration '%1'",
+                $this->escapeHtml(
+                    $this->_registry->registry(Integration::REGISTRY_KEY_CURRENT_INTEGRATION)[Info::DATA_NAME]
+                )
+            );
+        } else {
+            return __('New Integration');
+        }
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getFormActionUrl()
+    {
+        return $this->getUrl('*/*/save');
+    }
+}
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Form.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Form.php
new file mode 100644
index 00000000000..9c0f4ce006e
--- /dev/null
+++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Form.php
@@ -0,0 +1,63 @@
+<?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_Integration
+ * @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\Integration\Block\Adminhtml\Integration\Edit;
+
+use Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info;
+use Magento\Integration\Controller\Adminhtml\Integration;
+
+/**
+ * @SuppressWarnings(PHPMD.DepthOfInheritance)
+ */
+class Form extends \Magento\Backend\Block\Widget\Form\Generic
+{
+    /**
+     * Prepare form before rendering HTML
+     *
+     * @return \Magento\Adminhtml\Block\Widget\Form
+     */
+    protected function _prepareForm()
+    {
+        /** @var \Magento\Data\Form $form */
+        $form = $this->_formFactory->create(
+            array(
+                'attributes' => array(
+                    'id' => 'edit_form',
+                    'action' => $this->getData('action'),
+                    'method' => 'post',
+                )
+            )
+        );
+        $integrationData = $this->_coreRegistry->registry(Integration::REGISTRY_KEY_CURRENT_INTEGRATION);
+        if (isset($integrationData[Info::DATA_ID])) {
+            $form->addField(Info::DATA_ID, 'hidden', array('name' => 'id'));
+            $form->setValues($integrationData);
+        }
+        $form->setUseContainer(true);
+        $this->setForm($form);
+        return parent::_prepareForm();
+    }
+}
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php
new file mode 100644
index 00000000000..a2ec2aa9681
--- /dev/null
+++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php
@@ -0,0 +1,195 @@
+<?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_Integration
+ * @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\Integration\Block\Adminhtml\Integration\Edit\Tab;
+
+use \Magento\Integration\Controller\Adminhtml\Integration;
+
+/**
+ * Main Integration info edit form
+ *
+ * @category   Magento
+ * @package    Magento_Integration
+ * @SuppressWarnings(PHPMD.DepthOfInheritance)
+ */
+class Info extends \Magento\Backend\Block\Widget\Form\Generic
+    implements \Magento\Backend\Block\Widget\Tab\TabInterface
+{
+    /** @var \Magento\Integration\Model\Integration\Source\Authentication */
+    protected $_authTypeSource;
+
+    /**#@+
+     * edit_form element names.
+     */
+    const HTML_ID_PREFIX = 'integration_properties_';
+    const DATA_ID = 'integration_id';
+    const DATA_NAME = 'name';
+    const DATA_EMAIL = 'email';
+    const DATA_AUTHENTICATION = 'authentication';
+    const DATA_ENDPOINT = 'endpoint';
+    /**#@-*/
+
+    /**
+     * Construct
+     *
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Data\FormFactory $formFactory
+     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Backend\Block\Template\Context $context
+     * @param array $data
+     * @param \Magento\Integration\Model\Integration\Source\Authentication $authTypeSource
+     */
+    public function __construct(
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Data\FormFactory $formFactory,
+        \Magento\Core\Helper\Data $coreData,
+        \Magento\Backend\Block\Template\Context $context,
+        \Magento\Integration\Model\Integration\Source\Authentication $authTypeSource,
+        array $data = array()
+    ) {
+        parent::__construct($registry, $formFactory, $coreData, $context, $data);
+        $this->_authTypeSource = $authTypeSource;
+    }
+
+    /**
+     * Set form id prefix, declare fields for integration info
+     *
+     * @return \Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info
+     */
+    protected function _prepareForm()
+    {
+        /** @var \Magento\Data\Form $form */
+        $form = $this->_formFactory->create();
+        $form->setHtmlIdPrefix(self::HTML_ID_PREFIX);
+        $integrationData = $this->_coreRegistry->registry(Integration::REGISTRY_KEY_CURRENT_INTEGRATION);
+        $fieldset = $form->addFieldset('base_fieldset', array('legend' => __('Integration')));
+        if (isset($integrationData[self::DATA_ID])) {
+            $fieldset->addField(self::DATA_ID, 'hidden', array('name' => 'id'));
+        }
+        $fieldset->addField(
+            self::DATA_NAME,
+            'text',
+            array(
+                'label' => __('Integration Name'),
+                'name' => self::DATA_NAME,
+                'required' => true,
+                'disabled' => false,
+                'maxlength' => '255'
+            )
+        );
+        $fieldset->addField(
+            self::DATA_EMAIL,
+            'text',
+            array(
+                'label' => __('Email'),
+                'name' => self::DATA_EMAIL,
+                'required' => true,
+                'disabled' => false,
+                'class' => 'validate-email',
+                'maxlength' => '254',
+            )
+        );
+        $fieldset->addField(
+            self::DATA_AUTHENTICATION,
+            'select',
+            array(
+                'label' => __('Authentication'),
+                'name' => self::DATA_AUTHENTICATION,
+                'disabled' => false,
+                'options' => $this->_authTypeSource->toOptionArray()
+            )
+        );
+        $fieldset->addField(
+            self::DATA_ENDPOINT,
+            'text',
+            array('label' => __('Endpoint URL'), 'name' => self::DATA_ENDPOINT, 'required' => true, 'disabled' => false)
+        );
+        $form->setValues($integrationData);
+        $this->setForm($form);
+        return $this;
+    }
+
+    /**
+     * Prepare label for tab
+     *
+     * @return string
+     */
+    public function getTabLabel()
+    {
+        return __('Integration Info');
+    }
+
+    /**
+     * Prepare title for tab
+     *
+     * @return string
+     */
+    public function getTabTitle()
+    {
+        return $this->getTabLabel();
+    }
+
+    /**
+     * Returns status flag about this tab can be showen or not
+     *
+     * @return true
+     */
+    public function canShowTab()
+    {
+        return true;
+    }
+
+    /**
+     * Returns status flag about this tab hidden or not
+     *
+     * @return true
+     */
+    public function isHidden()
+    {
+        return false;
+    }
+
+    /**
+     * Get additional script for tabs block
+     *
+     * @return string
+     */
+    protected function _toHtml()
+    {
+        $oauth = \Magento\Integration\Model\Integration::AUTHENTICATION_OAUTH;
+        $authFieldIdSelector = '#' . self::HTML_ID_PREFIX . self::DATA_AUTHENTICATION;
+        $endpointIdSelector = '#' . self::HTML_ID_PREFIX . self::DATA_ENDPOINT;
+        $endpointClassSel = '.field-' . self::DATA_ENDPOINT;
+        $script = <<<HTML
+        jQuery(function(){
+            jQuery('$authFieldIdSelector')
+                .mage('integration', {"authType": $oauth, "formSelector": '#edit_form',
+                endpointIdSelector: '$endpointIdSelector', endpointContainerClassSelector: '$endpointClassSel'});
+        });
+HTML;
+        return parent::_toHtml() . sprintf('<script type="text/javascript">%s</script>', $script);
+    }
+}
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tabs.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tabs.php
new file mode 100644
index 00000000000..c2a4ed0d3fa
--- /dev/null
+++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tabs.php
@@ -0,0 +1,42 @@
+<?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_Integration
+ * @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\Integration\Block\Adminhtml\Integration\Edit;
+
+class Tabs extends \Magento\Adminhtml\Block\Widget\Tabs
+{
+    /**
+     * Initialize integration edit page tabs
+     *
+     */
+    protected function _construct()
+    {
+        parent::_construct();
+        $this->setId('integration_edit_tabs');
+        $this->setDestElementId('edit_form');
+        $this->setTitle(__('Integration Information'));
+    }
+}
diff --git a/app/code/Magento/Integration/Controller/Adminhtml/Integration.php b/app/code/Magento/Integration/Controller/Adminhtml/Integration.php
new file mode 100644
index 00000000000..c9af1a0b16b
--- /dev/null
+++ b/app/code/Magento/Integration/Controller/Adminhtml/Integration.php
@@ -0,0 +1,204 @@
+<?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\Integration\Controller\Adminhtml;
+
+use Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info;
+/**
+ * Controller for integrations management.
+ */
+class Integration extends \Magento\Backend\Controller\Adminhtml\Action
+{
+    /** Param Key for extracting integration id from Request */
+    const PARAM_INTEGRATION_ID = 'id';
+
+    /** Keys used for registering data into the registry */
+    const REGISTRY_KEY_CURRENT_INTEGRATION = 'current_integration';
+
+    /**
+     * Core registry
+     *
+     * @var \Magento\Core\Model\Registry
+     */
+    protected $_registry = null;
+
+    /** @var \Magento\Integration\Service\IntegrationV1Interface */
+    private $_integrationService;
+
+    /**
+     * @param \Magento\Backend\Controller\Context $context
+     * @param \Magento\Integration\Service\IntegrationV1Interface $integrationService
+     * @param \Magento\Core\Model\Registry $registry
+     */
+    public function __construct(
+        \Magento\Backend\Controller\Context $context,
+        \Magento\Integration\Service\IntegrationV1Interface $integrationService,
+        \Magento\Core\Model\Registry $registry
+    ) {
+        $this->_registry = $registry;
+        $this->_integrationService = $integrationService;
+        parent::__construct($context);
+    }
+
+    /**
+     * Integrations grid.
+     */
+    public function indexAction()
+    {
+        $this->loadLayout();
+        $this->_setActiveMenu('Magento_Integration::system_integrations');
+        $this->_addBreadcrumb(__('Integrations'), __('Integrations'));
+        $this->_title(__('Integrations'));
+        $this->renderLayout();
+    }
+
+    /**
+     * AJAX integrations grid.
+     */
+    public function gridAction()
+    {
+        $this->loadLayout(false);
+        $this->renderLayout();
+    }
+
+    /**
+     * Check ACL.
+     *
+     * @return boolean
+     */
+    protected function _isAllowed()
+    {
+        return $this->_authorization->isAllowed('Magento_Integration::integrations');
+    }
+
+    /**
+     * New integration action.
+     */
+    public function newAction()
+    {
+        $this->loadLayout();
+        $this->_setActiveMenu('Magento_Integration::system_integrations');
+        $this->_addBreadcrumb(__('New Integration'), __('New Integration'));
+        $this->_title(__('New Integration'));
+        /** Try to recover integration data from session if it was added during previous request which failed. */
+        $restoredIntegration = $this->_getSession()->getIntegrationData();
+        if ($restoredIntegration) {
+            $this->_registry->register(self::REGISTRY_KEY_CURRENT_INTEGRATION, $restoredIntegration);
+            $this->_getSession()->setIntegrationData(array());
+        }
+        $this->renderLayout();
+    }
+
+    /**
+     * Edit integration action.
+     */
+    public function editAction()
+    {
+        /** Try to recover integration data from session if it was added during previous request which failed. */
+        $integrationId = (int)$this->getRequest()->getParam(self::PARAM_INTEGRATION_ID);
+        if ($integrationId) {
+            $integrationData = $this->_integrationService->get($integrationId);
+            $restoredIntegration = $this->_getSession()->getIntegrationData();
+            if (isset($restoredIntegration[Info::DATA_ID])
+                && $integrationId == $restoredIntegration[Info::DATA_ID]
+            ) {
+                $integrationData = array_merge($integrationData, $restoredIntegration);
+            }
+            if (!$integrationData[Info::DATA_ID]) {
+                $this->_getSession()->addError(__('This integration no longer exists.'));
+                $this->_redirect('*/*/');
+                return;
+            }
+            $this->_registry->register(self::REGISTRY_KEY_CURRENT_INTEGRATION, $integrationData);
+        } else {
+            $this->_getSession()->addError(__('Integration ID is not specified or is invalid.'));
+            $this->_redirect('*/*/');
+            return;
+        }
+        $this->loadLayout();
+        $this->_getSession()->setIntegrationData(array());
+        $this->_setActiveMenu('Magento_Integration::system_integrations');
+        $this->_addBreadcrumb(
+            __('Edit "%1" Integration', $integrationData[Info::DATA_NAME]),
+            __('Edit "%1" Integration', $integrationData[Info::DATA_NAME])
+        );
+        $this->_title(__('Edit "%1" Integration', $integrationData[Info::DATA_NAME]));
+        $this->renderLayout();
+    }
+
+    /**
+     * Save integration action.
+     */
+    public function saveAction()
+    {
+        try {
+            $integrationId = (int)$this->getRequest()->getParam(self::PARAM_INTEGRATION_ID);
+            /** @var array $integrationData */
+            $integrationData = array();
+            if ($integrationId) {
+                $integrationData = $this->_integrationService->get($integrationId);
+                if (!$integrationData[Info::DATA_ID]) {
+                    $this->_getSession()->addError(__('This integration no longer exists.'));
+                    $this->_redirect('*/*/');
+                    return;
+                }
+            }
+            /** @var array $data */
+            $data = $this->getRequest()->getPost();
+            //Merge Post-ed data
+            $integrationData = array_merge($integrationData, $data);
+            $this->_registry->register(self::REGISTRY_KEY_CURRENT_INTEGRATION, $integrationData);
+            if (!isset($integrationData[Info::DATA_ID])) {
+                $this->_integrationService->create($integrationData);
+            } else {
+                $this->_integrationService->update($integrationData);
+            }
+            $this->_getSession()->addSuccess(__('The integration \'%1\' has been saved.',
+                    $integrationData[Info::DATA_NAME]));
+            $this->_redirect('*/*/');
+        } catch (\Magento\Integration\Exception $e) {
+            $this->_getSession()->addError($e->getMessage())->setIntegrationData($integrationData);
+            $this->_redirectOnSaveError();
+        } catch (\Magento\Core\Exception $e) {
+            $this->_getSession()->addError($e->getMessage());
+            $this->_redirectOnSaveError();
+        } catch (\Exception $e) {
+            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_getSession()->addError($e->getMessage());
+            $this->_redirectOnSaveError();
+        }
+    }
+
+    /**
+     * Redirect merchant to 'Edit integration' or 'New integration' if error happened during integration save.
+     */
+    protected function _redirectOnSaveError()
+    {
+        $integrationId = $this->getRequest()->getParam(self::PARAM_INTEGRATION_ID);
+        if ($integrationId) {
+            $this->_redirect('*/*/edit', array('id' => $integrationId));
+        } else {
+            $this->_redirect('*/*/new');
+        }
+    }
+}
diff --git a/app/code/Magento/Core/Model/Config/Cache/Exception.php b/app/code/Magento/Integration/Exception.php
similarity index 85%
rename from app/code/Magento/Core/Model/Config/Cache/Exception.php
rename to app/code/Magento/Integration/Exception.php
index 1a5b214a110..ce781455552 100644
--- a/app/code/Magento/Core/Model/Config/Cache/Exception.php
+++ b/app/code/Magento/Integration/Exception.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * \Exception that should be thrown when config cache cannot be loaded
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -20,12 +18,14 @@
  * 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_Integration
  * @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\Config\Cache;
+namespace Magento\Integration;
 
-class Exception extends \LogicException
+class Exception extends \Magento\Core\Exception
 {
 
 }
diff --git a/app/code/Magento/Integration/Helper/Data.php b/app/code/Magento/Integration/Helper/Data.php
new file mode 100644
index 00000000000..ff6e3ec78d5
--- /dev/null
+++ b/app/code/Magento/Integration/Helper/Data.php
@@ -0,0 +1,32 @@
+<?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_Integration
+ * @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\Integration\Helper;
+
+class Data extends \Magento\Core\Helper\AbstractHelper
+{
+
+}
diff --git a/app/code/Magento/Integration/Model/Integration.php b/app/code/Magento/Integration/Model/Integration.php
new file mode 100644
index 00000000000..ff5f86953bc
--- /dev/null
+++ b/app/code/Magento/Integration/Model/Integration.php
@@ -0,0 +1,111 @@
+<?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\Integration\Model;
+
+/**
+ * Integration model.
+ *
+ * @method \string getName()
+ * @method Integration setName(\string $name)
+ * @method \string getEmail()
+ * @method Integration setEmail(\string $email)
+ * @method \int getStatus()
+ * @method Integration setStatus(\int $value)
+ * @method \int getAuthentication()
+ * @method Integration setAuthentication(\int $value)
+ * @method \string getEndpoint()
+ * @method Integration setEndpoint(\string $endpoint)
+ * @method \string getCreatedAt()
+ * @method Integration setCreatedAt(\string $createdAt)
+ * @method \string getUpdatedAt()
+ * @method Integration setUpdatedAt(\string $createdAt)
+ */
+class Integration extends \Magento\Core\Model\AbstractModel
+{
+    /**#@+
+     * Integration statuses.
+     */
+    const STATUS_INACTIVE = 0;
+    const STATUS_ACTIVE = 1;
+    /**#@-*/
+
+    /**#@+
+     * Authentication mechanism
+     */
+    const AUTHENTICATION_OAUTH = 1;
+    const AUTHENTICATION_MANUAL = 2;
+    /**#@-*/
+
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
+    /**
+     * @param \Magento\Core\Model\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Customer\Model\Resource\Customer $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Data\Collection\Db|null $resourceCollection
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Core\Model\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Stdlib\DateTime $dateTime,
+        \Magento\Core\Model\Resource\AbstractResource $resource = null,
+        \Magento\Data\Collection\Db $resourceCollection = null,
+        array $data = array()
+    ) {
+        $this->_dateTime = $dateTime;
+        parent::__construct($context, $registry, $resource, $resourceCollection, $data);
+    }
+
+    /**
+     * Initialize resource model
+     *
+     * @return void
+     */
+    protected function _construct()
+    {
+        parent::_construct();
+        $this->_init('Magento\Integration\Model\Resource\Integration');
+    }
+
+    /**
+     * Prepare data to be saved to database
+     *
+     * @return Integration
+     */
+    protected function _beforeSave()
+    {
+        parent::_beforeSave();
+        if ($this->isObjectNew()) {
+            $this->setCreatedAt($this->_dateTime->formatDate(true));
+        }
+        $this->setUpdatedAt($this->_dateTime->formatDate(true));
+        return $this;
+    }
+}
diff --git a/app/code/Magento/Integration/Model/Integration/Factory.php b/app/code/Magento/Integration/Model/Integration/Factory.php
new file mode 100644
index 00000000000..8a058c22ba0
--- /dev/null
+++ b/app/code/Magento/Integration/Model/Integration/Factory.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Factory for \Magento\Integration\Model\Integration
+ *
+ * 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_Integration
+ * @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\Integration\Model\Integration;
+
+class Factory
+{
+    /**
+     * @var \Magento\ObjectManager
+     */
+    protected $_objectManager;
+
+    /**
+     * @param \Magento\ObjectManager $objectManager
+     */
+    public function __construct(\Magento\ObjectManager $objectManager)
+    {
+        $this->_objectManager = $objectManager;
+    }
+
+    /**
+     * Create a new instance of \Magento\Integration\Model\Integration
+     *
+     * @param array $data Data for integration
+     * @return \Magento\Integration\Model\Integration
+     */
+    public function create(array $data = array())
+    {
+        $integration = $this->_objectManager->create('Magento\Integration\Model\Integration', array());
+        $integration->setData($data);
+        return $integration;
+    }
+}
diff --git a/app/code/Magento/Integration/Model/Integration/Source/Authentication.php b/app/code/Magento/Integration/Model/Integration/Source/Authentication.php
new file mode 100644
index 00000000000..9deeac5ae61
--- /dev/null
+++ b/app/code/Magento/Integration/Model/Integration/Source/Authentication.php
@@ -0,0 +1,43 @@
+<?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\Integration\Model\Integration\Source;
+
+/**
+ * Integration authentication options.
+ */
+class Authentication implements \Magento\Core\Model\Option\ArrayInterface
+{
+    /**
+     * Retrieve authentication options array.
+     *
+     * @return array
+     */
+    public function toOptionArray()
+    {
+        return array(
+            \Magento\Integration\Model\Integration::AUTHENTICATION_OAUTH => __('OAuth'),
+            \Magento\Integration\Model\Integration::AUTHENTICATION_MANUAL => __('Manual'),
+        );
+    }
+}
diff --git a/app/code/Magento/Integration/Model/Integration/Source/Status.php b/app/code/Magento/Integration/Model/Integration/Source/Status.php
new file mode 100644
index 00000000000..8dc8a0cab64
--- /dev/null
+++ b/app/code/Magento/Integration/Model/Integration/Source/Status.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\Integration\Model\Integration\Source;
+
+/**
+ * Integration status options.
+ */
+class Status implements \Magento\Core\Model\Option\ArrayInterface
+{
+    /**
+     * Retrieve status options array.
+     *
+     * @return array
+     */
+    public function toOptionArray()
+    {
+        return array(
+            array(
+                'value' => \Magento\Integration\Model\Integration::STATUS_INACTIVE,
+                'label' => __('Inactive')
+            ),
+            array(
+                'value' => \Magento\Integration\Model\Integration::STATUS_ACTIVE,
+                'label' => __('Active')
+            ),
+        );
+    }
+}
diff --git a/app/code/Magento/Integration/Model/Resource/Integration.php b/app/code/Magento/Integration/Model/Resource/Integration.php
new file mode 100644
index 00000000000..65f2fa75337
--- /dev/null
+++ b/app/code/Magento/Integration/Model/Resource/Integration.php
@@ -0,0 +1,43 @@
+<?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)
+ */
+
+/**
+ * Integration resource model
+ *
+ * @author Magento Core Team <core@magentocommerce.com>
+ */
+namespace Magento\Integration\Model\Resource;
+
+class Integration extends \Magento\Core\Model\Resource\Db\AbstractDb
+{
+    /**
+     * Initialize resource model
+     *
+     * @return void
+     */
+    protected function _construct()
+    {
+        $this->_init('integration', 'integration_id');
+    }
+}
diff --git a/app/code/Magento/Webapi/Model/Config/Dom.php b/app/code/Magento/Integration/Model/Resource/Integration/Collection.php
similarity index 71%
rename from app/code/Magento/Webapi/Model/Config/Dom.php
rename to app/code/Magento/Integration/Model/Resource/Integration/Collection.php
index 2571ca59544..0334992e078 100644
--- a/app/code/Magento/Webapi/Model/Config/Dom.php
+++ b/app/code/Magento/Integration/Model/Resource/Integration/Collection.php
@@ -21,23 +21,18 @@
  * @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\Integration\Model\Resource\Integration;
 
-namespace Magento\Webapi\Model\Config;
-
-class Dom extends \Magento\Config\Dom
+/**
+ * Integrations collection.
+ */
+class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractCollection
 {
-
     /**
-     * Getter for node by path
-     *
-     * @param string $nodePath
-     * @return \DOMElement|null
+     * Resource collection initialization.
      */
-    protected function _getMatchedNode($nodePath)
+    protected function _construct()
     {
-        if (!preg_match('/^\/config?$/i', $nodePath)) {
-            return null;
-        }
-        return parent::_getMatchedNode($nodePath);
+        $this->_init('Magento\Integration\Model\Integration', 'Magento\Integration\Model\Resource\Integration');
     }
 }
diff --git a/app/code/Magento/Integration/Service/IntegrationV1.php b/app/code/Magento/Integration/Service/IntegrationV1.php
new file mode 100644
index 00000000000..3f57375bb72
--- /dev/null
+++ b/app/code/Magento/Integration/Service/IntegrationV1.php
@@ -0,0 +1,136 @@
+<?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\Integration\Service;
+
+/**
+ * Integration Service.
+ * This service is used to interact with integrations.
+ */
+class IntegrationV1 implements \Magento\Integration\Service\IntegrationV1Interface
+{
+    /** @var \Magento\Integration\Model\Integration\Factory $_integrationFactory */
+    private $_integrationFactory;
+
+    /**
+     * @param \Magento\Integration\Model\Integration\Factory $integrationFactory
+     */
+    public function __construct(\Magento\Integration\Model\Integration\Factory $integrationFactory)
+    {
+        $this->_integrationFactory = $integrationFactory;
+    }
+
+    /**
+     * Create a new Integration
+     *
+     * @param array $integrationData
+     * @return array Integration data
+     * @throws \Magento\Integration\Exception
+     */
+    public function create(array $integrationData)
+    {
+        $this->_checkIntegrationByName($integrationData['name']);
+        $integration = $this->_integrationFactory->create($integrationData);
+        $this->_validateIntegration($integration);
+        $integration->save();
+        return $integration->getData();
+    }
+
+    /**
+     * Update an Integration.
+     *
+     * @param array $integrationData
+     * @return array Integration data
+     * @throws \Magento\Integration\Exception
+     */
+    public function update(array $integrationData)
+    {
+        $integration = $this->_loadIntegrationById($integrationData['integration_id']);
+        //If name has been updated check if it conflicts with an existing integration
+        if ($integration->getName() != $integrationData['name']) {
+            $this->_checkIntegrationByName($integrationData['name']);
+        }
+        $integration->addData($integrationData);
+        $this->_validateIntegration($integration);
+        $integration->save();
+        return $integration->getData();
+    }
+
+    /**
+     * Get the details of a specific Integration.
+     *
+     * @param int $integrationId
+     * @return array Integration data
+     * @throws \Magento\Integration\Exception
+     */
+    public function get($integrationId)
+    {
+        $integration = $this->_loadIntegrationById($integrationId);
+        return $integration->getData();
+    }
+
+    /**
+     * Validate an integration
+     *
+     * @param \Magento\Integration\Model\Integration $integration
+     * @throws \Magento\Integration\Exception
+     */
+    private function _validateIntegration(\Magento\Integration\Model\Integration $integration)
+    {
+        if ($integration->getAuthentication() == \Magento\Integration\Model\Integration::AUTHENTICATION_OAUTH
+            && !$integration->getEndpoint()
+        ) {
+            throw new \Magento\Integration\Exception(__('Please enter endpoint for oAuth.'));
+        }
+    }
+
+    /**
+     * Check if an integration exists by the name
+     *
+     * @param string $name
+     * @throws \Magento\Integration\Exception
+     */
+    private function _checkIntegrationByName($name)
+    {
+        $integration = $this->_integrationFactory->create()->load($name, 'name');
+        if ($integration->getId()) {
+            throw new \Magento\Integration\Exception(__("Integration with name '%1' exists.", $name));
+        }
+    }
+
+    /**
+     * Load integration by id.
+     *
+     * @param int $integrationId
+     * @return \Magento\Integration\Model\Integration
+     * @throws \Magento\Integration\Exception
+     */
+    protected function _loadIntegrationById($integrationId)
+    {
+        $integration = $this->_integrationFactory->create()->load($integrationId);
+        if (!$integration->getId()) {
+            throw new \Magento\Integration\Exception(__("Integration with ID '%1' doesn't exist.", $integrationId));
+        }
+        return $integration;
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/AbstractEntryPointTest.php b/app/code/Magento/Integration/Service/IntegrationV1Interface.php
similarity index 55%
rename from dev/tests/unit/testsuite/Magento/Core/Model/AbstractEntryPointTest.php
rename to app/code/Magento/Integration/Service/IntegrationV1Interface.php
index 6229e135b74..ecc31daa214 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/AbstractEntryPointTest.php
+++ b/app/code/Magento/Integration/Service/IntegrationV1Interface.php
@@ -21,26 +21,40 @@
  * @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\Integration\Service;
 
-namespace Magento\Core\Model;
-
-class AbstractEntryPointTest extends \PHPUnit_Framework_TestCase
+/**
+ * Integration Service Interface
+ */
+interface IntegrationV1Interface
 {
+
+    /**
+     * Create a new Integration
+     *
+     * @param array $integrationData
+     * @return array Integration data
+     * @throws \Magento\Integration\Exception
+     */
+    public function create(array $integrationData);
+
     /**
-     * Tested: successful model creation, verification of directories, call of template method _processRequest()
+     * Get the details of a specific Integration.
      *
-     * @magentoAppIsolation enabled
+     * @param int $integrationId
+     * @return array Integration data
+     * @throws \Magento\Integration\Exception
      */
-    public function testProcessRequest()
-    {
-        $objectManager = $this->getMock('Magento\ObjectManager');
+    public function get($integrationId);
+
 
-        $config = $this->getMock('Magento\Core\Model\Config\Primary', array(), array(), '', false);
+    /**
+     * Update a Integration.
+     *
+     * @param array $integrationData
+     * @return array Integration data
+     * @throws \Magento\Integration\Exception
+     */
+    public function update(array $integrationData);
 
-        $model = $this->getMockForAbstractClass('Magento\Core\Model\AbstractEntryPoint',
-            array($config, $objectManager), '');
-        $model->expects($this->once())
-            ->method('_processRequest');
-        $model->processRequest();
-    }
 }
diff --git a/app/code/Magento/Integration/etc/adminhtml/menu.xml b/app/code/Magento/Integration/etc/adminhtml/menu.xml
new file mode 100644
index 00000000000..d3f9e327259
--- /dev/null
+++ b/app/code/Magento/Integration/etc/adminhtml/menu.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Configuration of Integration module menu in Magento admin panel.
+ *
+ * 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>
+    <menu>
+        <add id="Magento_Integration::system_extensions" title="Extensions" module="Magento_Integration" sortOrder="45" parent="Magento_Adminhtml::system" resource="Magento_Integration::extensions"/>
+        <add id="Magento_Integration::system_integrations" title="Integrations" module="Magento_Integration" sortOrder="10" parent="Magento_Integration::system_extensions" action="adminhtml/integration" resource="Magento_Integration::integrations"/>
+    </menu>
+</config>
diff --git a/app/code/Magento/Integration/etc/adminhtml/routes.xml b/app/code/Magento/Integration/etc/adminhtml/routes.xml
new file mode 100644
index 00000000000..53fcd309330
--- /dev/null
+++ b/app/code/Magento/Integration/etc/adminhtml/routes.xml
@@ -0,0 +1,33 @@
+<?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>
+    <router id="admin">
+        <route id="adminhtml">
+            <module name="Magento_Integration_Adminhtml" before="Magento_Adminhtml" />
+        </route>
+    </router>
+</config>
+
diff --git a/app/code/Magento/Integration/etc/di.xml b/app/code/Magento/Integration/etc/di.xml
new file mode 100644
index 00000000000..74336eeea7c
--- /dev/null
+++ b/app/code/Magento/Integration/etc/di.xml
@@ -0,0 +1,28 @@
+<?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>
+    <preference for="Magento\Integration\Service\IntegrationV1Interface" type="Magento\Integration\Service\IntegrationV1" />
+</config>
diff --git a/app/code/Magento/Integration/etc/module.xml b/app/code/Magento/Integration/etc/module.xml
new file mode 100755
index 00000000000..59c2b029079
--- /dev/null
+++ b/app/code/Magento/Integration/etc/module.xml
@@ -0,0 +1,37 @@
+<?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>
+    <module name="Magento_Integration" version="1.0.0.0" active="true">
+        <sequence>
+            <module name="Magento_Adminhtml"/>
+        </sequence>
+        <depends>
+            <module name="Magento_Adminhtml"/>
+            <module name="Magento_Core"/>
+            <module name="Magento_Backend"/>
+        </depends>
+    </module>
+</config>
diff --git a/app/code/Magento/Integration/sql/integration_setup/install-1.0.0.0.php b/app/code/Magento/Integration/sql/integration_setup/install-1.0.0.0.php
new file mode 100644
index 00000000000..61e93facc48
--- /dev/null
+++ b/app/code/Magento/Integration/sql/integration_setup/install-1.0.0.0.php
@@ -0,0 +1,117 @@
+<?php
+/**
+ * Upgrade script for integration table creation.
+ *
+ * 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)
+ */
+
+/* @var \Magento\Core\Model\Resource\Setup $installer */
+$installer = $this;
+$installer->startSetup();
+
+$table = $installer->getConnection()
+    ->newTable($installer->getTable('integration'))
+    ->addColumn(
+        'integration_id',
+        \Magento\DB\Ddl\Table::TYPE_INTEGER,
+        null,
+        array(
+            'identity' => true,
+            'unsigned' => true,
+            'nullable' => false,
+            'primary' => true,
+        ),
+        'Integration ID'
+    )
+    ->addColumn(
+        'name',
+        \Magento\DB\Ddl\Table::TYPE_TEXT,
+        255,
+        array(
+            'nullable' => false,
+        ),
+        'Integration name is displayed in the admin interface'
+    )
+    ->addColumn(
+        'email',
+        \Magento\DB\Ddl\Table::TYPE_TEXT,
+        255,
+        array(
+            'nullable' => false,
+        ),
+        'Email address of the contact person'
+    )
+    ->addColumn(
+        'authentication',
+        \Magento\DB\Ddl\Table::TYPE_SMALLINT,
+        null,
+        array(
+            'unsigned' => true,
+            'nullable' => false
+        ),
+        'Authentication mechanism'
+    )
+    ->addColumn(
+        'endpoint',
+        \Magento\DB\Ddl\Table::TYPE_TEXT,
+        255,
+        array(
+            'nullable' => false,
+        ),
+        'Endpoint for Oauth handshake'
+    )
+    ->addColumn(
+        'status',
+        \Magento\DB\Ddl\Table::TYPE_SMALLINT,
+        null,
+        array(
+            'unsigned' => true,
+            'nullable' => false
+        ),
+        'Integration status'
+    )
+    ->addColumn(
+        'created_at',
+        \Magento\DB\Ddl\Table::TYPE_TIMESTAMP,
+        null,
+        array('nullable' => false),
+        'Creation Time'
+    )
+    ->addColumn(
+        'updated_at',
+        \Magento\DB\Ddl\Table::TYPE_TIMESTAMP,
+        null,
+        array('nullable' => false),
+        'Update Time'
+    )
+    ->addIndex(
+        $installer->getIdxName(
+            'integration',
+            array('name'),
+            \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
+        ),
+        array('name'),
+        array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE)
+    );
+$installer->getConnection()->createTable($table);
+
+$installer->endSetup();
diff --git a/app/code/Magento/Integration/view/adminhtml/js/integration.js b/app/code/Magento/Integration/view/adminhtml/js/integration.js
new file mode 100644
index 00000000000..a25c3c222d9
--- /dev/null
+++ b/app/code/Magento/Integration/view/adminhtml/js/integration.js
@@ -0,0 +1,77 @@
+/**
+ * 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)
+ */
+/*jshint jquery:true*/
+(function($) {
+    "use strict";
+    $.widget('mage.integration', {
+        options: {
+            authType: null, // Auth type : Manual or Oauth
+            formSelector: null,
+            endpointIdSelector: null,
+            endpointContainerClassSelector: null,
+            requiredClass: 'required-entry'
+        },
+
+        /**
+         * Initialize integration widget
+         * @private
+         */
+        _init: function() {
+            this._toggleEndpoint();
+        },
+
+        /**
+         * Bind a click handler to the widget's context element.
+         * @private
+         */
+        _create: function() {
+            this._on({
+                change: '_toggleEndpoint'
+            });
+            this._on($(this.options.formSelector), {
+                submit: '_resetEndpoint'
+            });
+        },
+
+        /**
+         * Toggle the visibility of the endpoint field based on Auth thype selected
+         * @private
+         */
+        _toggleEndpoint: function() {
+            var isOauth =  parseInt(this.element.val()) === this.options.authType;
+            $(this.options.endpointContainerClassSelector).children().toggle(isOauth);
+            $(this.options.endpointIdSelector).toggleClass(this.options.requiredClass, isOauth);
+        },
+
+        /**
+         * Reset endpoint field if the Authentication type is not Oauth
+         *
+         * @private
+         */
+        _resetEndpoint: function() {
+            if (parseInt(this.element.val()) !== this.options.authType) {
+                $(this.options.endpointIdSelector).val('');
+            }
+        }
+    });
+})(jQuery);
\ No newline at end of file
diff --git a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_edit.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_edit.xml
new file mode 100644
index 00000000000..d31f9200534
--- /dev/null
+++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_edit.xml
@@ -0,0 +1,47 @@
+<?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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <referenceBlock name="head">
+        <block class="Magento\Page\Block\Html\Head\Script" name="magento-integration-adminhtml-integration-js">
+            <arguments>
+                <argument name="file" xsi:type="string">Magento_Integration::js/integration.js</argument>
+            </arguments>
+        </block>
+    </referenceBlock>
+    <update handle="editor"/>
+    <referenceContainer name="left">
+        <block class="Magento\Integration\Block\Adminhtml\Integration\Edit\Tabs" name="integration_edit_tabs">
+            <block class="Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info" name="integration_edit_tab_info"/>
+            <action method="addTab">
+                <argument name="name" xsi:type="string">info_section</argument>
+                <argument name="block" xsi:type="string">integration_edit_tab_info</argument>
+            </action>
+        </block>
+    </referenceContainer>
+    <referenceContainer name="content">
+        <block class="Magento\Integration\Block\Adminhtml\Integration\Edit" name="integration_edit_content"/>
+    </referenceContainer>
+</layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_wysiwyg_images_contents.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid.xml
similarity index 80%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_wysiwyg_images_contents.xml
rename to app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid.xml
index 15a39a0780c..89381286eda 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_cms_wysiwyg_images_contents.xml
+++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid.xml
@@ -23,6 +23,8 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
+
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Adminhtml\Block\Cms\Wysiwyg\Images\Content\Files" name="wysiwyg_images.files" template="cms/browser/content/files.phtml" output="1"/>
-</layout>
+    <update handle="adminhtml_integration_grid_block"/>
+    <block class="Magento\Integration\Block\Adminhtml\Integration" name="integration.grid.container" template="Magento_Backend::widget/grid/container/empty.phtml" output="1"/>
+</layout>
\ No newline at end of file
diff --git a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml
new file mode 100644
index 00000000000..32c982c2dae
--- /dev/null
+++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Integrations grid block.
+ *
+ * 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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <referenceBlock name="integration.grid.container">
+        <block class="Magento\Backend\Block\Widget\Grid" name="integration.grid" as="grid">
+            <arguments>
+                <argument name="id" xsi:type="string">integrationGrid</argument>
+                <argument name="dataSource" xsi:type="object">\Magento\Integration\Model\Resource\Integration\Collection</argument>
+                <argument name="use_ajax" xsi:type="string">1</argument>
+                <argument name="default_sort" xsi:type="string">integration_id</argument>
+                <argument name="default_dir" xsi:type="string">asc</argument>
+                <argument name="grid_url" xsi:type="url" path="*/*/grid">
+                    <param name="_current">1</param>
+                </argument>
+            </arguments>
+            <block class="Magento\Backend\Block\Widget\Grid\ColumnSet" as="grid.columnSet" name="integration.grid.columnSet">
+                <arguments>
+                    <argument name="rowUrl" xsi:type="array">
+                        <item name="path" xsi:type="string">*/*/edit</item>
+                        <item name="extraParamsTemplate" xsi:type="array">
+                            <item name="id" xsi:type="string">getId</item>
+                        </item>
+                    </argument>
+                    <argument name="empty_text" xsi:type="string" translate="true">No Integrations Found</argument>
+                </arguments>
+                <block class="Magento\Backend\Block\Widget\Grid\Column" as="name">
+                    <arguments>
+                        <argument name="header" xsi:type="string" translate="true">Name</argument>
+                        <argument name="type" xsi:type="string">text</argument>
+                        <argument name="index" xsi:type="string">name</argument>
+                        <argument name="id" xsi:type="string">name</argument>
+                    </arguments>
+                </block>
+                <block class="Magento\Backend\Block\Widget\Grid\Column" as="status">
+                    <arguments>
+                        <argument name="header" xsi:type="string" translate="true">Status</argument>
+                        <argument name="type" xsi:type="string">options</argument>
+                        <argument name="options" xsi:type="options" model="Magento\Integration\Model\Integration\Source\Status"/>
+                        <argument name="width" xsi:type="string">50px</argument>
+                        <argument name="index" xsi:type="string">status</argument>
+                        <argument name="id" xsi:type="string">status</argument>
+                    </arguments>
+                </block>
+            </block>
+        </block>
+    </referenceBlock>
+</layout>
diff --git a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_index.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_index.xml
new file mode 100644
index 00000000000..b66612e929e
--- /dev/null
+++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_index.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Handle for integrations grid rendering.
+ *
+ * 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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <update handle="adminhtml_integration_grid_block"/>
+    <referenceContainer name="content">
+        <block class="Magento\Integration\Block\Adminhtml\Integration" name="integration.grid.container"/>
+    </referenceContainer>
+</layout>
diff --git a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_new.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_new.xml
new file mode 100644
index 00000000000..f4ea556b8ec
--- /dev/null
+++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_new.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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <update handle="adminhtml_integration_edit"/>
+    <referenceBlock name="head">
+        <block class="Magento\Page\Block\Html\Head\Script" name="magento-integration-adminhtml-integration-js">
+            <arguments>
+                <argument name="file" xsi:type="string">Magento_Integration::js/integration.js</argument>
+            </arguments>
+        </block>
+    </referenceBlock>
+</layout>
diff --git a/app/code/Magento/Log/Model/EntryPoint/Shell.php b/app/code/Magento/Log/App/Shell.php
similarity index 66%
rename from app/code/Magento/Log/Model/EntryPoint/Shell.php
rename to app/code/Magento/Log/App/Shell.php
index 64a871767be..e6e9dc3b18c 100644
--- a/app/code/Magento/Log/Model/EntryPoint/Shell.php
+++ b/app/code/Magento/Log/App/Shell.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Log shell application
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,9 +23,11 @@
  * @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\Log\Model\EntryPoint;
+namespace Magento\Log\App;
+
+use Magento\AppInterface;
 
-class Shell extends \Magento\Core\Model\AbstractEntryPoint
+class Shell implements AppInterface
 {
     /**
      * Filename of the entry point script
@@ -33,26 +37,33 @@ class Shell extends \Magento\Core\Model\AbstractEntryPoint
     protected $_entryFileName;
 
     /**
-     * @param \Magento\Core\Model\Config\Primary $config
-     * @param string $entryFileName  filename of the entry point script
-     * @param \Magento\ObjectManager $objectManager
+     * @var \Magento\Log\Model\ShellFactory
+     */
+    protected $_shellFactory;
+
+    /**
+     * @param string $entryFileName
+     * @param \Magento\Log\Model\ShellFactory $shellFactory
      */
     public function __construct(
-        \Magento\Core\Model\Config\Primary $config,
         $entryFileName,
-        \Magento\ObjectManager $objectManager = null
+        \Magento\Log\Model\ShellFactory $shellFactory
     ) {
-        parent::__construct($config, $objectManager);
         $this->_entryFileName = $entryFileName;
+        $this->_shellFactory = $shellFactory;
     }
 
+
     /**
-     * Process request to application
+     * Run application
+     *
+     * @return int
      */
-    protected function _processRequest()
+    public function execute()
     {
         /** @var $shell \Magento\Log\Model\Shell */
-        $shell = $this->_objectManager->create('Magento\Log\Model\Shell', array('entryPoint' => $this->_entryFileName));
+        $shell = $this->_shellFactory->create(array('entryPoint' => $this->_entryFileName));
         $shell->run();
+        return 0;
     }
 }
diff --git a/app/code/Magento/Log/Model/Customer.php b/app/code/Magento/Log/Model/Customer.php
index f22494402b9..4e6d4ca2d16 100644
--- a/app/code/Magento/Log/Model/Customer.php
+++ b/app/code/Magento/Log/Model/Customer.php
@@ -48,9 +48,33 @@ namespace Magento\Log\Model;
 
 class Customer extends \Magento\Core\Model\AbstractModel
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Core\Model\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Core\Model\Resource\AbstractResource $resource
+     * @param \Magento\Data\Collection\Db $resourceCollection
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Core\Model\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Stdlib\DateTime $dateTime,
+        \Magento\Core\Model\Resource\AbstractResource $resource = null,
+        \Magento\Data\Collection\Db $resourceCollection = null,
+        array $data = array()
+    ) {
+        $this->dateTime = $dateTime;
+        parent::__construct($context, $registry, $resource, $resourceCollection, $data);
+    }
+
     /**
      * Define resource model
-     *
      */
     protected function _construct()
     {
@@ -82,7 +106,7 @@ class Customer extends \Magento\Core\Model\AbstractModel
     {
         $loginAt = $this->getLoginAt();
         if ($loginAt) {
-            return \Magento\Date::toTimestamp($loginAt);
+            return $this->dateTime->toTimestamp($loginAt);
         }
 
         return null;
diff --git a/app/code/Magento/Log/Model/Resource/Log.php b/app/code/Magento/Log/Model/Resource/Log.php
index 0215c8d55ec..4a09bf99a4b 100644
--- a/app/code/Magento/Log/Model/Resource/Log.php
+++ b/app/code/Magento/Log/Model/Resource/Log.php
@@ -48,18 +48,26 @@ class Log extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected $_date;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\Core\Model\Date $date
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Core\Model\Date $date,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Resource $resource
+        \Magento\Stdlib\DateTime $dateTime,
+        \Magento\App\Resource $resource
     ) {
         $this->_date = $date;
         $this->_eventManager = $eventManager;
+        $this->dateTime = $dateTime;
         parent::__construct($resource);
     }
 
@@ -100,7 +108,7 @@ class Log extends \Magento\Core\Model\Resource\Db\AbstractDb
         $readAdapter    = $this->_getReadAdapter();
         $writeAdapter   = $this->_getWriteAdapter();
 
-        $timeLimit = $this->formatDate($this->_date->gmtTimestamp() - $time);
+        $timeLimit = $this->dateTime->formatDate($this->_date->gmtTimestamp() - $time);
 
         while (true) {
             $select = $readAdapter->select()
@@ -149,7 +157,7 @@ class Log extends \Magento\Core\Model\Resource\Db\AbstractDb
         $readAdapter    = $this->_getReadAdapter();
         $writeAdapter   = $this->_getWriteAdapter();
 
-        $timeLimit = $this->formatDate($this->_date->gmtTimestamp() - $time);
+        $timeLimit = $this->dateTime->formatDate($this->_date->gmtTimestamp() - $time);
 
         // retrieve last active customer log id
         $lastLogId = $readAdapter->fetchOne(
diff --git a/app/code/Magento/Log/Model/Resource/Shell.php b/app/code/Magento/Log/Model/Resource/Shell.php
index 46d47b937e7..3c96479fd28 100644
--- a/app/code/Magento/Log/Model/Resource/Shell.php
+++ b/app/code/Magento/Log/Model/Resource/Shell.php
@@ -36,7 +36,7 @@ namespace Magento\Log\Model\Resource;
 class Shell
 {
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
@@ -47,11 +47,11 @@ class Shell
 
     /**
      * @param \Magento\Core\Model\Resource\HelperPool $helperPool
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Core\Model\Resource\HelperPool $helperPool,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_helperPool = $helperPool;
         $this->_resource = $resource;
diff --git a/app/code/Magento/Log/Model/Resource/Visitor.php b/app/code/Magento/Log/Model/Resource/Visitor.php
index ebeb5b40e09..dceb0cd97ed 100644
--- a/app/code/Magento/Log/Model/Resource/Visitor.php
+++ b/app/code/Magento/Log/Model/Resource/Visitor.php
@@ -24,24 +24,19 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Log\Model\Resource;
 
 /**
  * Visitor log resource
- *
- * @category    Magento
- * @package     Magento_Log
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Log\Model\Resource;
-
 class Visitor extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
      * @var \Magento\Core\Model\Date
@@ -56,18 +51,18 @@ class Visitor extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * @param \Magento\Core\Model\Date $date
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Helper\String $coreString
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Stdlib\String $string
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Core\Model\Date $date,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Helper\String $coreString,
-        \Magento\Core\Model\Resource $resource
+        \Magento\Stdlib\String $string,
+        \Magento\App\Resource $resource
     ) {
         $this->_date = $date;
         $this->_storeManager = $storeManager;
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct($resource);
     }
 
@@ -106,8 +101,8 @@ class Visitor extends \Magento\Core\Model\Resource\Db\AbstractDb
     {
         $adapter    = $this->_getWriteAdapter();
         $data       = new \Magento\Object(array(
-            'url'    => $this->_coreString->substr($visitor->getUrl(), 0, 250),
-            'referer'=> $this->_coreString->substr($visitor->getHttpReferer(), 0, 250)
+            'url'    => $this->string->substr($visitor->getUrl(), 0, 250),
+            'referer'=> $this->string->substr($visitor->getHttpReferer(), 0, 250)
         ));
         $bind = $this->_prepareDataForTable($data, $this->getTable('log_url_info'));
 
@@ -183,17 +178,17 @@ class Visitor extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected function _saveVisitorInfo($visitor)
     {
-        $referer    = $this->_coreString->cleanString($visitor->getHttpReferer());
-        $referer    = $this->_coreString->substr($referer, 0, 255);
+        $referer    = $this->string->cleanString($visitor->getHttpReferer());
+        $referer    = $this->string->substr($referer, 0, 255);
 
-        $userAgent  = $this->_coreString->cleanString($visitor->getHttpUserAgent());
-        $userAgent  = $this->_coreString->substr($userAgent, 0, 255);
+        $userAgent  = $this->string->cleanString($visitor->getHttpUserAgent());
+        $userAgent  = $this->string->substr($userAgent, 0, 255);
 
-        $charset    = $this->_coreString->cleanString($visitor->getHttpAcceptCharset());
-        $charset    = $this->_coreString->substr($charset, 0, 255);
+        $charset    = $this->string->cleanString($visitor->getHttpAcceptCharset());
+        $charset    = $this->string->substr($charset, 0, 255);
 
-        $language   = $this->_coreString->cleanString($visitor->getHttpAcceptLanguage());
-        $language   = $this->_coreString->substr($language, 0, 255);
+        $language   = $this->string->cleanString($visitor->getHttpAcceptLanguage());
+        $language   = $this->string->substr($language, 0, 255);
 
         $data = new \Magento\Object(array(
             'visitor_id'            => $visitor->getId(),
diff --git a/app/code/Magento/Log/Model/Resource/Visitor/Online.php b/app/code/Magento/Log/Model/Resource/Visitor/Online.php
index 9a6423e07f5..2978812ff2b 100644
--- a/app/code/Magento/Log/Model/Resource/Visitor/Online.php
+++ b/app/code/Magento/Log/Model/Resource/Visitor/Online.php
@@ -43,11 +43,11 @@ class Online extends \Magento\Core\Model\Resource\Db\AbstractDb
 
     /**
      * @param \Magento\Core\Model\Date $date
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Core\Model\Date $date,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_date = $date;
         parent::__construct($resource);
diff --git a/app/code/Magento/Log/Model/Resource/Visitor/Online/Collection.php b/app/code/Magento/Log/Model/Resource/Visitor/Online/Collection.php
index 18d724d14e2..8e16d8a6343 100644
--- a/app/code/Magento/Log/Model/Resource/Visitor/Online/Collection.php
+++ b/app/code/Magento/Log/Model/Resource/Visitor/Online/Collection.php
@@ -51,7 +51,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     /**
      * @param \Magento\Customer\Model\CustomerFactory $customerFactory
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
@@ -59,7 +59,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     public function __construct(
         \Magento\Customer\Model\CustomerFactory $customerFactory,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
diff --git a/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Collection.php b/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Collection.php
index 08217b631be..e2db507913d 100644
--- a/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Collection.php
+++ b/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Collection.php
@@ -36,7 +36,7 @@ class Collection extends \Magento\Log\Model\Resource\Visitor\Online\Collection
      * @param \Magento\Log\Model\Visitor\OnlineFactory $onlineFactory
      * @param \Magento\Customer\Model\CustomerFactory $customerFactory
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
@@ -45,7 +45,7 @@ class Collection extends \Magento\Log\Model\Resource\Visitor\Online\Collection
         \Magento\Log\Model\Visitor\OnlineFactory $onlineFactory,
         \Magento\Customer\Model\CustomerFactory $customerFactory,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
diff --git a/app/code/Magento/Log/Model/Visitor.php b/app/code/Magento/Log/Model/Visitor.php
index 33d3a4775ab..383955d049a 100644
--- a/app/code/Magento/Log/Model/Visitor.php
+++ b/app/code/Magento/Log/Model/Visitor.php
@@ -24,6 +24,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Log\Model;
 
 /**
  * @method \Magento\Log\Model\Resource\Visitor _getResource()
@@ -36,13 +37,7 @@
  * @method \Magento\Log\Model\Visitor setLastUrlId(int $value)
  * @method int getStoreId()
  * @method \Magento\Log\Model\Visitor setStoreId(int $value)
- *
- * @category    Magento
- * @package     Magento_Log
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Log\Model;
-
 class Visitor extends \Magento\Core\Model\AbstractModel
 {
     const DEFAULT_ONLINE_MINUTES_INTERVAL = 15;
@@ -54,13 +49,6 @@ class Visitor extends \Magento\Core\Model\AbstractModel
      */
     protected $_skipRequestLogging = false;
 
-    /**
-     * Core http
-     *
-     * @var \Magento\Core\Helper\Http
-     */
-    protected $_coreHttp = null;
-
     /**
      * @var array
      */
@@ -113,21 +101,44 @@ class Visitor extends \Magento\Core\Model\AbstractModel
     protected $_customerFactory;
 
     /**
-     * @param \Magento\Core\Model\Context               $context
-     * @param \Magento\Core\Model\Registry              $registry
-     * @param \Magento\Core\Model\Store\Config          $coreStoreConfig
-     * @param \Magento\Event\ManagerInterface         $eventManager
-     * @param \Magento\Customer\Model\CustomerFactory   $customerFactory
-     * @param \Magento\Sales\Model\QuoteFactory         $quoteFactory
-     * @param \Magento\Core\Model\Session               $session
+     * @var \Magento\HTTP\Header
+     */
+    protected $_httpHeader;
+
+    /**
+     * @var \Magento\HTTP\PhpEnvironment\RemoteAddress
+     */
+    protected $_remoteAddress;
+
+    /**
+     * @var \Magento\HTTP\PhpEnvironment\ServerAddress
+     */
+    protected $_serverAddress;
+
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Core\Model\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Core\Model\Store\Config $coreStoreConfig
+     * @param \Magento\Event\ManagerInterface $eventManager
+     * @param \Magento\Customer\Model\CustomerFactory $customerFactory
+     * @param \Magento\Sales\Model\QuoteFactory $quoteFactory
+     * @param \Magento\Core\Model\Session $session
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Helper\Http                 $coreHttp
-     * @param \Magento\Core\Model\Config                $coreConfig
-     * @param array                                    $data
-     * @param array                                    $ignoredUserAgents
-     * @param array                                    $ignores
-     * @param \Magento\Core\Model\Resource\AbstractResource     $resource
-     * @param \Magento\Data\Collection\Db               $resourceCollection
+     * @param \Magento\Core\Model\Config $coreConfig
+     * @param \Magento\HTTP\Header $httpHeader
+     * @param \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress
+     * @param \Magento\HTTP\PhpEnvironment\ServerAddress $serverAddress
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param array $data
+     * @param array $ignoredUserAgents
+     * @param array $ignores
+     * @param \Magento\Core\Model\Resource\AbstractResource $resource
+     * @param \Magento\Data\Collection\Db $resourceCollection
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -140,8 +151,11 @@ class Visitor extends \Magento\Core\Model\AbstractModel
         \Magento\Sales\Model\QuoteFactory $quoteFactory,
         \Magento\Core\Model\Session $session,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Helper\Http $coreHttp,
         \Magento\Core\Model\Config $coreConfig,
+        \Magento\HTTP\Header $httpHeader,
+        \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress,
+        \Magento\HTTP\PhpEnvironment\ServerAddress $serverAddress,
+        \Magento\Stdlib\DateTime $dateTime,
         array $data = array(),
         array $ignoredUserAgents = array(),
         array $ignores = array(),
@@ -154,9 +168,12 @@ class Visitor extends \Magento\Core\Model\AbstractModel
         $this->_quoteFactory = $quoteFactory;
         $this->_session = $session;
         $this->_storeManager = $storeManager;
-        $this->_coreHttp = $coreHttp;
         $this->_coreConfig = $coreConfig;
         $this->_ignoredUserAgents = $ignoredUserAgents;
+        $this->_httpHeader = $httpHeader;
+        $this->_remoteAddress = $remoteAddress;
+        $this->_serverAddress = $serverAddress;
+        $this->dateTime = $dateTime;
 
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
         $this->_ignores = $ignores;
@@ -168,7 +185,7 @@ class Visitor extends \Magento\Core\Model\AbstractModel
     protected function _construct()
     {
         $this->_init('Magento\Log\Model\Resource\Visitor');
-        $userAgent = $this->_coreHttp->getHttpUserAgent();
+        $userAgent = $this->_httpHeader->getHttpUserAgent();
         if ($this->_ignoredUserAgents) {
             if (in_array($userAgent, $this->_ignoredUserAgents)) {
                 $this->_skipRequestLogging = true;
@@ -193,17 +210,18 @@ class Visitor extends \Magento\Core\Model\AbstractModel
      */
     public function initServerData()
     {
+        $clean = true;
         $this->addData(array(
-            'server_addr'           => $this->_coreHttp->getServerAddr(true),
-            'remote_addr'           => $this->_coreHttp->getRemoteAddr(true),
+            'server_addr'           => $this->_serverAddress->getServerAddress(true),
+            'remote_addr'           => $this->_remoteAddress->getRemoteAddress(true),
             'http_secure'           => $this->_storeManager->getStore()->isCurrentlySecure(),
-            'http_host'             => $this->_coreHttp->getHttpHost(true),
-            'http_user_agent'       => $this->_coreHttp->getHttpUserAgent(true),
-            'http_accept_language'  => $this->_coreHttp->getHttpAcceptLanguage(true),
-            'http_accept_charset'   => $this->_coreHttp->getHttpAcceptCharset(true),
-            'request_uri'           => $this->_coreHttp->getRequestUri(true),
+            'http_host'             => $this->_httpHeader->getHttpHost($clean),
+            'http_user_agent'       => $this->_httpHeader->getHttpUserAgent($clean),
+            'http_accept_language'  => $this->_httpHeader->getHttpAcceptLanguage($clean),
+            'http_accept_charset'   => $this->_httpHeader->getHttpAcceptCharset($clean),
+            'request_uri'           => $this->_httpHeader->getRequestUri($clean),
             'session_id'            => $this->_getSession()->getSessionId(),
-            'http_referer'          => $this->_coreHttp->getHttpReferer(true),
+            'http_referer'          => $this->_httpHeader->getHttpReferer($clean),
         ));
 
         return $this;
@@ -237,7 +255,7 @@ class Visitor extends \Magento\Core\Model\AbstractModel
     public function getFirstVisitAt()
     {
         if (!$this->hasData('first_visit_at')) {
-            $this->setData('first_visit_at', now());
+            $this->setData('first_visit_at', $this->dateTime->now());
         }
         return $this->getData('first_visit_at');
     }
@@ -245,7 +263,7 @@ class Visitor extends \Magento\Core\Model\AbstractModel
     public function getLastVisitAt()
     {
         if (!$this->hasData('last_visit_at')) {
-            $this->setData('last_visit_at', now());
+            $this->setData('last_visit_at', $this->dateTime->now());
         }
         return $this->getData('last_visit_at');
     }
@@ -268,7 +286,7 @@ class Visitor extends \Magento\Core\Model\AbstractModel
         $this->initServerData();
 
         if (!$this->getId()) {
-            $this->setFirstVisitAt(now());
+            $this->setFirstVisitAt($this->dateTime->now());
             $this->setIsNewVisitor(true);
             $this->save();
             $this->_eventManager->dispatch('visitor_init', array('visitor' => $this));
@@ -291,7 +309,7 @@ class Visitor extends \Magento\Core\Model\AbstractModel
         }
 
         try {
-            $this->setLastVisitAt(now());
+            $this->setLastVisitAt($this->dateTime->now());
             $this->save();
             $this->_getSession()->setVisitorData($this->getData());
         } catch (\Exception $e) {
diff --git a/app/code/Magento/Log/Model/Visitor/Online.php b/app/code/Magento/Log/Model/Visitor/Online.php
index 706a23692b2..e526e35db4d 100644
--- a/app/code/Magento/Log/Model/Visitor/Online.php
+++ b/app/code/Magento/Log/Model/Visitor/Online.php
@@ -61,12 +61,12 @@ class Online extends \Magento\Core\Model\AbstractModel
     protected $_coreStoreConfig;
 
     /**
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cache;
 
     /**
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
@@ -75,7 +75,7 @@ class Online extends \Magento\Core\Model\AbstractModel
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
diff --git a/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php
index 818ff4a80a3..cfecd07e597 100644
--- a/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php
+++ b/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php
@@ -58,7 +58,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      * Construct
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerCollectionFactory
@@ -66,7 +66,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerCollectionFactory,
diff --git a/app/code/Magento/Newsletter/Model/Resource/Queue.php b/app/code/Magento/Newsletter/Model/Resource/Queue.php
index 43d0256785f..be85c076c6c 100644
--- a/app/code/Magento/Newsletter/Model/Resource/Queue.php
+++ b/app/code/Magento/Newsletter/Model/Resource/Queue.php
@@ -46,11 +46,11 @@ class Queue extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Newsletter\Model\Resource\Subscriber\Collection $subscriberCollection
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Newsletter\Model\Resource\Subscriber\Collection $subscriberCollection
     ) {
         parent::__construct($resource);
diff --git a/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php
index 42d5499f175..9e0a5c342cd 100644
--- a/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php
+++ b/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php
@@ -61,7 +61,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      * Construct
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Date $date
@@ -69,7 +69,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Date $date,
diff --git a/app/code/Magento/Newsletter/Model/Resource/Subscriber.php b/app/code/Magento/Newsletter/Model/Resource/Subscriber.php
index ba62b3e26e3..cfd32b7e40f 100644
--- a/app/code/Magento/Newsletter/Model/Resource/Subscriber.php
+++ b/app/code/Magento/Newsletter/Model/Resource/Subscriber.php
@@ -64,13 +64,6 @@ class Subscriber extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected $_messagesScope          = 'newsletter/session';
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
-
     /**
      * Date
      *
@@ -78,21 +71,26 @@ class Subscriber extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected $_date;
 
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Date $date
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Math\Random $mathRandom
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\Date $date,
-        \Magento\Core\Helper\Data $coreData
+        \Magento\Math\Random $mathRandom
     ) {
-        parent::__construct($resource);
         $this->_date = $date;
-        $this->_coreData = $coreData;
+        $this->mathRandom = $mathRandom;
+        parent::__construct($resource);
     }
 
     /**
@@ -177,7 +175,7 @@ class Subscriber extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected function _generateRandomCode()
     {
-        return $this->_coreData->uniqHash();
+        return $this->mathRandom->getUniqueHash();
     }
 
     /**
diff --git a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php
index de21c679c74..31e4589d514 100644
--- a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php
+++ b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php
@@ -83,7 +83,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      * Construct
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Customer\Model\CustomerFactory $customerFactory
@@ -91,7 +91,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Customer\Model\CustomerFactory $customerFactory,
diff --git a/app/code/Magento/Newsletter/Model/Resource/Template.php b/app/code/Magento/Newsletter/Model/Resource/Template.php
index 8690065fa74..4499857d0b0 100644
--- a/app/code/Magento/Newsletter/Model/Resource/Template.php
+++ b/app/code/Magento/Newsletter/Model/Resource/Template.php
@@ -46,12 +46,12 @@ class Template extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Date $date
      */
     public function __construct(
         \Magento\Core\Model\Date $date,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         parent::__construct($resource);
         $this->_date = $date;
diff --git a/app/code/Magento/Newsletter/Model/Template.php b/app/code/Magento/Newsletter/Model/Template.php
index 680a6729621..6df0cfd49aa 100644
--- a/app/code/Magento/Newsletter/Model/Template.php
+++ b/app/code/Magento/Newsletter/Model/Template.php
@@ -107,6 +107,11 @@ class Template extends \Magento\Core\Model\Template
      */
     protected $_templateFactory;
 
+    /**
+     * @var \Magento\Filter\FilterManager
+     */
+    protected $_filterManager;
+
     /**
      * @param \Magento\View\DesignInterface $design
      * @param \Magento\Core\Model\Context $context
@@ -117,6 +122,7 @@ class Template extends \Magento\Core\Model\Template
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory
      * @param \Magento\Core\Model\App\Emulation $appEmulation
+     * @param \Magento\Filter\FilterManager $filterManager
      * @param array $data
      */
     public function __construct(
@@ -129,6 +135,7 @@ class Template extends \Magento\Core\Model\Template
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Newsletter\Model\TemplateFactory $templateFactory,
         \Magento\Core\Model\App\Emulation $appEmulation,
+        \Magento\Filter\FilterManager $filterManager,
         array $data = array()
     ) {
         parent::__construct($design, $context, $registry, $appEmulation, $storeManager, $data);
@@ -137,6 +144,7 @@ class Template extends \Magento\Core\Model\Template
         $this->_filter = $filter;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_templateFactory = $templateFactory;
+        $this->_filterManager = $filterManager;
     }
 
     /**
@@ -313,14 +321,10 @@ class Template extends \Magento\Core\Model\Template
      */
     public function getProcessedTemplateSubject(array $variables)
     {
-        $processor = new \Magento\Filter\Template();
-
         if (!$this->_preprocessFlag) {
             $variables['this'] = $this;
         }
-
-        $processor->setVariables($variables);
-        return $processor->filter($this->getTemplateSubject());
+        return $this->_filterManager->template($this->getTemplateSubject(), array('variables' => $variables));
     }
 
     /**
diff --git a/app/code/Magento/Newsletter/etc/di.xml b/app/code/Magento/Newsletter/etc/di.xml
index b428f17ca3f..8e9456d5cf7 100644
--- a/app/code/Magento/Newsletter/etc/di.xml
+++ b/app/code/Magento/Newsletter/etc/di.xml
@@ -24,7 +24,7 @@
  */
 -->
 <config>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <newsletter_setup>Magento\Newsletter\Model\Resource\Setup</newsletter_setup>
diff --git a/app/code/Magento/Oauth/Block/Authorize/AbstractAuthorize.php b/app/code/Magento/Oauth/Block/Authorize/AbstractAuthorize.php
index 356cd5ece38..95f032508e1 100644
--- a/app/code/Magento/Oauth/Block/Authorize/AbstractAuthorize.php
+++ b/app/code/Magento/Oauth/Block/Authorize/AbstractAuthorize.php
@@ -105,7 +105,7 @@ abstract class AbstractAuthorize extends \Magento\Core\Block\Template
         //load base template from admin area
         $params = array(
             '_relative' => true,
-            'area'     => 'adminhtml',
+            'area'     => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE,
             'package'  => 'default'
         );
         return $this->_viewFileSystem->getFilename($this->getTemplate(), $params);
diff --git a/app/code/Magento/Oauth/Controller/Adminhtml/Oauth/Consumer.php b/app/code/Magento/Oauth/Controller/Adminhtml/Oauth/Consumer.php
index 2c97ca24372..1968d302e4a 100644
--- a/app/code/Magento/Oauth/Controller/Adminhtml/Oauth/Consumer.php
+++ b/app/code/Magento/Oauth/Controller/Adminhtml/Oauth/Consumer.php
@@ -59,30 +59,26 @@ class Consumer extends \Magento\Backend\Controller\AbstractAction
     /** @var \Magento\Oauth\Helper\Service */
     protected $_oauthHelper;
 
-    /** @var \Magento\Core\Model\Logger */
+    /** @var \Magento\Logger */
     protected $_logger;
 
     /**
-     * Class constructor
-     *
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Oauth\Helper\Service $oauthHelper
      * @param \Magento\Oauth\Model\Consumer\Factory $consumerFactory
      * @param \Magento\Oauth\Service\OauthV1Interface $oauthService
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Backend\Controller\Context $context
-     * @param string $areaCode
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
         \Magento\Oauth\Helper\Service $oauthHelper,
         \Magento\Oauth\Model\Consumer\Factory $consumerFactory,
         \Magento\Oauth\Service\OauthV1Interface $oauthService,
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Backend\Controller\Context $context,
-        $areaCode = null
+        \Magento\Logger $logger,
+        \Magento\Backend\Controller\Context $context
     ) {
-        parent::__construct($context, $areaCode);
+        parent::__construct($context);
         $this->_registry = $registry;
         $this->_oauthHelper = $oauthHelper;
         $this->_consumerFactory = $consumerFactory;
@@ -264,7 +260,7 @@ class Consumer extends \Magento\Backend\Controller\AbstractAction
             $this->_setFormData(null);
         } catch (\Magento\Core\Exception $e) {
             $this->_setFormData($data);
-            $this->_getSession()->addError($this->_oauthHelper->escapeHtml($e->getMessage()));
+            $this->_getSession()->addError($this->_objectManager->get('Magento\Escaper')->escapeHtml($e->getMessage()));
             $this->getRequest()->setParam('back', 'edit');
         } catch (\Exception $e) {
             $this->_setFormData(null);
diff --git a/app/code/Magento/Oauth/Exception.php b/app/code/Magento/Oauth/Exception.php
index da9851438ba..d3e7e91c9a5 100644
--- a/app/code/Magento/Oauth/Exception.php
+++ b/app/code/Magento/Oauth/Exception.php
@@ -40,9 +40,15 @@ class Exception extends \Magento\Webapi\Exception
      * @param int $code
      * @param int $httpCode
      * @param array $details
+     * @param string $name
      */
-    public function __construct($message, $code = 0, $httpCode = self::HTTP_UNAUTHORIZED, array $details = array())
-    {
-        parent::__construct($message, $code, $httpCode, $details);
+    public function __construct(
+        $message,
+        $code = 0,
+        $httpCode = self::HTTP_UNAUTHORIZED,
+        array $details = array(),
+        $name = 'oauth'
+    ) {
+        parent::__construct($message, $code, $httpCode, $details, $name);
     }
 }
diff --git a/app/code/Magento/Oauth/Helper/Service.php b/app/code/Magento/Oauth/Helper/Service.php
index a51069f917e..c2af696b56f 100644
--- a/app/code/Magento/Oauth/Helper/Service.php
+++ b/app/code/Magento/Oauth/Helper/Service.php
@@ -53,29 +53,28 @@ class Service extends \Magento\Core\Helper\AbstractHelper
      */
     const CALLBACK_ESTABLISHED = 'oob';
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
-
     /** @var \Magento\Core\Model\Store\Config */
     protected $_storeConfig;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
+    /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Core\Model\Store\Config $storeConfig
+     * @param \Magento\Math\Random $mathRandom
+     * @internal param \Magento\Core\Helper\Data $coreData
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\Context $context,
-        \Magento\Core\Model\Store\Config $storeConfig
+        \Magento\Core\Model\Store\Config $storeConfig,
+        \Magento\Math\Random $mathRandom
     ) {
         parent::__construct($context);
-        $this->_coreData = $coreData;
         $this->_storeConfig = $storeConfig;
+        $this->mathRandom = $mathRandom;
     }
 
     /**
@@ -93,9 +92,9 @@ class Service extends \Magento\Core\Helper\AbstractHelper
             $randomString = substr($hex, 0, $length); // truncate at most 1 char if length parameter is an odd number
         } else {
             // fallback to mt_rand() if openssl is not installed
-            $randomString = $this->_coreData->getRandomString(
+            $randomString = $this->mathRandom->getRandomString(
                 $length,
-                \Magento\Core\Helper\Data::CHARS_DIGITS . \Magento\Core\Helper\Data::CHARS_LOWERS
+                \Magento\Math\Random::CHARS_DIGITS . \Magento\Math\Random::CHARS_LOWERS
             );
         }
 
diff --git a/app/code/Magento/Oauth/Model/Nonce.php b/app/code/Magento/Oauth/Model/Nonce.php
index a000e67fa5f..a6e1a032d1a 100644
--- a/app/code/Magento/Oauth/Model/Nonce.php
+++ b/app/code/Magento/Oauth/Model/Nonce.php
@@ -97,7 +97,9 @@ class Nonce extends \Magento\Core\Model\AbstractModel
      */
     public function loadByCompositeKey($nonce, $consumerId)
     {
-        $this->setData($this->getResource()->selectByCompositeKey($nonce, $consumerId));
+        /** @var \Magento\Oauth\Model\Resource\Nonce $resource */
+        $resource = $this->getResource();
+        $this->setData($resource->selectByCompositeKey($nonce, $consumerId));
         return $this;
     }
 }
diff --git a/app/code/Magento/Oauth/Model/Resource/Consumer.php b/app/code/Magento/Oauth/Model/Resource/Consumer.php
index 6e534a041f6..d410bcf614a 100644
--- a/app/code/Magento/Oauth/Model/Resource/Consumer.php
+++ b/app/code/Magento/Oauth/Model/Resource/Consumer.php
@@ -31,6 +31,21 @@ namespace Magento\Oauth\Model\Resource;
 
 class Consumer extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\App\Resource $resource
+     */
+    public function __construct(\Magento\Stdlib\DateTime $dateTime, \Magento\App\Resource $resource)
+    {
+        $this->dateTime = $dateTime;
+        parent::__construct($resource);
+    }
+
     /**
      * Initialize resource model
      *
@@ -49,7 +64,7 @@ class Consumer extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     public function _beforeSave(\Magento\Core\Model\AbstractModel $object)
     {
-        $object->setUpdatedAt($this->formatDate(time()));
+        $object->setUpdatedAt($this->dateTime->formatDate(time()));
         return parent::_beforeSave($object);
     }
 
diff --git a/app/code/Magento/Oauth/Model/Resource/Nonce.php b/app/code/Magento/Oauth/Model/Resource/Nonce.php
index 056edffed8e..33fc9f2dc2f 100644
--- a/app/code/Magento/Oauth/Model/Resource/Nonce.php
+++ b/app/code/Magento/Oauth/Model/Resource/Nonce.php
@@ -77,6 +77,8 @@ class Nonce extends \Magento\Core\Model\Resource\Db\AbstractDb
         $select = $adapter->select()
             ->from($this->getMainTable())
             ->where('nonce = ?', $nonce)->where('consumer_id = ?', $consumerId);
-        return $adapter->fetchRow($select);
+        $row = $adapter->fetchRow($select);
+
+        return $row ? $row : array();
     }
 }
diff --git a/app/code/Magento/Oauth/Model/Resource/Token.php b/app/code/Magento/Oauth/Model/Resource/Token.php
index 0f302833bc1..d7d55e33a24 100644
--- a/app/code/Magento/Oauth/Model/Resource/Token.php
+++ b/app/code/Magento/Oauth/Model/Resource/Token.php
@@ -35,10 +35,23 @@ namespace Magento\Oauth\Model\Resource;
 
 class Token extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\App\Resource $resource
+     */
+    public function __construct(\Magento\Stdlib\DateTime $dateTime, \Magento\App\Resource $resource)
+    {
+        $this->dateTime = $dateTime;
+        parent::__construct($resource);
+    }
+
     /**
      * Initialize resource model
-     *
-     * @return void
      */
     protected function _construct()
     {
@@ -88,7 +101,7 @@ class Token extends \Magento\Core\Model\Resource\Db\AbstractDb
                 $this->getMainTable(),
                 $adapter->quoteInto(
                     'type = "' . \Magento\Oauth\Model\Token::TYPE_REQUEST . '" AND created_at <= ?',
-                    \Magento\Date::formatDate(time() - $minutes * 60)
+                    $this->dateTime->formatDate(time() - $minutes * 60)
                 )
             );
         } else {
diff --git a/app/code/Magento/Oauth/Model/Token.php b/app/code/Magento/Oauth/Model/Token.php
index 2b521313ba7..5239c3bfe57 100644
--- a/app/code/Magento/Oauth/Model/Token.php
+++ b/app/code/Magento/Oauth/Model/Token.php
@@ -22,12 +22,11 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Oauth\Model;
+
 /**
  * oAuth token model
  *
- * @category    Magento
- * @package     Magento_Oauth
- * @author      Magento Core Team <core@magentocommerce.com>
  * @method string getName() Consumer name (joined from consumer table)
  * @method \Magento\Oauth\Model\Resource\Token\Collection getCollection()
  * @method \Magento\Oauth\Model\Resource\Token\Collection getResourceCollection()
@@ -54,8 +53,6 @@
  * @method int getAuthorized()
  * @method \Magento\Oauth\Model\Token setAuthorized() setAuthorized(int $authorized)
  */
-namespace Magento\Oauth\Model;
-
 class Token extends \Magento\Core\Model\AbstractModel
 {
     /**#@+
@@ -96,9 +93,15 @@ class Token extends \Magento\Core\Model\AbstractModel
      */
     protected $keyLengthFactory;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\Oauth\Model\Consumer\Validator\KeyLengthFactory $keyLengthFactory
      * @param \Magento\Url\Validator $urlValidator
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Oauth\Model\Consumer\Factory $consumerFactory
      * @param \Magento\Oauth\Helper\Service $oauthData
      * @param \Magento\Core\Model\Context $context
@@ -110,6 +113,7 @@ class Token extends \Magento\Core\Model\AbstractModel
     public function __construct(
         \Magento\Oauth\Model\Consumer\Validator\KeyLengthFactory $keyLengthFactory,
         \Magento\Url\Validator $urlValidator,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Oauth\Model\Consumer\Factory $consumerFactory,
         \Magento\Oauth\Helper\Service $oauthData,
         \Magento\Core\Model\Context $context,
@@ -120,6 +124,7 @@ class Token extends \Magento\Core\Model\AbstractModel
     ) {
         $this->keyLengthFactory = $keyLengthFactory;
         $this->urlValidator = $urlValidator;
+        $this->dateTime = $dateTime;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
         $this->_consumerFactory = $consumerFactory;
         $this->_oauthData = $oauthData;
@@ -289,7 +294,7 @@ class Token extends \Magento\Core\Model\AbstractModel
         $this->validate();
 
         if ($this->isObjectNew() && null === $this->getCreatedAt()) {
-            $this->setCreatedAt(\Magento\Date::now());
+            $this->setCreatedAt($this->dateTime->now());
         }
         parent::_beforeSave();
         return $this;
diff --git a/app/code/Magento/Oauth/Service/OauthV1.php b/app/code/Magento/Oauth/Service/OauthV1.php
index ccf67ae46aa..62886e5b155 100644
--- a/app/code/Magento/Oauth/Service/OauthV1.php
+++ b/app/code/Magento/Oauth/Service/OauthV1.php
@@ -90,8 +90,8 @@ class OauthV1 implements \Magento\Oauth\Service\OauthV1Interface
      * @param \Magento\Oauth\Model\Consumer\Factory $consumerFactory
      * @param \Magento\Oauth\Model\Nonce\Factory $nonceFactory
      * @param \Magento\Oauth\Model\Token\Factory $tokenFactory
-     * @param \Magento\Core\Model\StoreManagerInterface
-     * @param \Magento\HTTP\ZendClient
+     * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\HTTP\ZendClient $httpClient
      * @param \Zend_Oauth_Http_Utility $httpUtility
      * @param \Magento\Core\Model\Date $date
      */
diff --git a/app/code/Magento/Oauth/etc/config.xml b/app/code/Magento/Oauth/etc/config.xml
index bd080e724dc..a42cd98b1d7 100644
--- a/app/code/Magento/Oauth/etc/config.xml
+++ b/app/code/Magento/Oauth/etc/config.xml
@@ -26,8 +26,6 @@
  */
 -->
 <config>
-    <global>
-    </global>
     <default>
         <oauth>
             <cleanup>
diff --git a/app/code/Magento/Oauth/etc/di.xml b/app/code/Magento/Oauth/etc/di.xml
index cb21abad3a0..9b7e5c54053 100644
--- a/app/code/Magento/Oauth/etc/di.xml
+++ b/app/code/Magento/Oauth/etc/di.xml
@@ -23,5 +23,10 @@
  */
 -->
 <config>
-    <preference for="Magento\Oauth\Service\OauthV1Interface" type="Magento\Oauth\Service\OauthV1" />
+    <preference for="Magento\Oauth\Service\OauthV1Interface" type="Magento\Oauth\Service\OauthV1"/>
+    <type name="Magento\Oauth\Service\OauthV1">
+        <param name="date">
+            <instance type="Magento\Core\Model\Date\Proxy"/>
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Ogone/Model/Api.php b/app/code/Magento/Ogone/Model/Api.php
index 1c0008bf831..3c4b524c0e4 100644
--- a/app/code/Magento/Ogone/Model/Api.php
+++ b/app/code/Magento/Ogone/Model/Api.php
@@ -24,11 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Ogone\Model;
+
 /**
  * Ogone payment method model
  */
-namespace Magento\Ogone\Model;
-
 class Api extends \Magento\Payment\Model\Method\AbstractMethod
 {
     /**
@@ -168,25 +168,23 @@ class Api extends \Magento\Payment\Model\Method\AbstractMethod
 
     /**
      * Parameters hashing context
-     * @var string
      */
     const HASH_DIR_OUT = 'out';
     const HASH_DIR_IN = 'in';
 
     /**
      * Supported hashing algorithms
-     * @var string
      */
     const HASH_SHA1 = 'sha1';
     const HASH_SHA256 = 'sha256';
     const HASH_SHA512 = 'sha512';
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
      * @var \Magento\UrlInterface
@@ -212,7 +210,7 @@ class Api extends \Magento\Payment\Model\Method\AbstractMethod
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\UrlInterface $urlBuilder
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Ogone\Model\Config $config
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param array $data
@@ -224,7 +222,7 @@ class Api extends \Magento\Payment\Model\Method\AbstractMethod
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\UrlInterface $urlBuilder,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Ogone\Model\Config $config,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         array $data = array()
@@ -232,7 +230,7 @@ class Api extends \Magento\Payment\Model\Method\AbstractMethod
         $this->_storeManager = $storeManager;
         $this->_locale = $locale;
         $this->_urlBuilder = $urlBuilder;
-        $this->_coreString = $coreString;
+        $this->string = $string;
         $this->_config = $config;
         parent::__construct($eventManager, $paymentData, $coreStoreConfig, $logAdapterFactory, $data);
     }
@@ -455,12 +453,12 @@ class Api extends \Magento\Payment\Model\Method\AbstractMethod
                 continue;
             }
             //COM filed can only handle max 100
-            if ($this->_coreString->strlen($invoiceDesc.$item->getName()) > 100) {
+            if ($this->string->strlen($invoiceDesc.$item->getName()) > 100) {
                 break;
             }
             $invoiceDesc .= $item->getName() . ', ';
         }
-        return $this->_coreString->substr($invoiceDesc, 0, -2);
+        return $this->string->substr($invoiceDesc, 0, -2);
     }
 
     /**
diff --git a/app/code/Magento/Ogone/Model/Config.php b/app/code/Magento/Ogone/Model/Config.php
index 7539df6ea65..b9f33c660f2 100644
--- a/app/code/Magento/Ogone/Model/Config.php
+++ b/app/code/Magento/Ogone/Model/Config.php
@@ -34,20 +34,18 @@ class Config extends \Magento\Payment\Model\Config
     const OGONE_PAYMENT_PATH = 'payment/ogone/';
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\UrlInterface
      */
-    protected $_coreData = null;
+    protected $_urlBuilder;
 
     /**
-     * @var \Magento\UrlInterface
+     * @var \Magento\Encryption\EncryptorInterface
      */
-    protected $_urlBuilder;
+    protected $_encryptor;
 
     /**
      * @param \Magento\UrlInterface $urlBuilder
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\Config $coreConfig
      * @param \Magento\Payment\Model\Method\Factory $paymentMethodFactory
@@ -56,7 +54,7 @@ class Config extends \Magento\Payment\Model\Config
      */
     public function __construct(
         \Magento\UrlInterface $urlBuilder,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Encryption\EncryptorInterface $encryptor,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\Config $coreConfig,
         \Magento\Payment\Model\Method\Factory $paymentMethodFactory,
@@ -65,7 +63,7 @@ class Config extends \Magento\Payment\Model\Config
     ) {
         parent::__construct($coreStoreConfig, $coreConfig, $paymentMethodFactory, $locale, $dataStorage);
         $this->_urlBuilder = $urlBuilder;
-        $this->_coreData = $coreData;
+        $this->_encryptor = $encryptor;
     }
 
     /**
@@ -91,7 +89,7 @@ class Config extends \Magento\Payment\Model\Config
      */
     public function getShaInCode($storeId=null)
     {
-        return $this->_coreData->decrypt($this->getConfigData('secret_key_in', $storeId));
+        return $this->_encryptor->decrypt($this->getConfigData('secret_key_in', $storeId));
     }
 
     /**
@@ -101,7 +99,7 @@ class Config extends \Magento\Payment\Model\Config
      */
     public function getShaOutCode($storeId=null)
     {
-        return $this->_coreData->decrypt($this->getConfigData('secret_key_out', $storeId));
+        return $this->_encryptor->decrypt($this->getConfigData('secret_key_out', $storeId));
     }
 
     /**
diff --git a/app/code/Magento/Page/Block/Html/Welcome.php b/app/code/Magento/Page/Block/Html/Welcome.php
index e9588db92f7..54a510c4ba2 100644
--- a/app/code/Magento/Page/Block/Html/Welcome.php
+++ b/app/code/Magento/Page/Block/Html/Welcome.php
@@ -24,40 +24,28 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Page\Block\Html;
+
 /**
  * Html page block
- *
- * @category   Magento
- * @package    Magento_Page
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Page\Block\Html;
-
 class Welcome extends \Magento\Core\Block\Template
 {
     /**
-     * @var \Magento\View\LayoutInterface
-     */
-    protected $_layout;
-
-    /**
-     * @param \Magento\View\LayoutInterface $layout
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Block\Template\Context $context
      * @param array $data
      */
     public function __construct(
-        \Magento\View\LayoutInterface $layout,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Block\Template\Context $context,
         array $data = array()
     ) {
-        $this->_layout = $layout;
         parent::__construct($coreData, $context, $data);
     }
 
     /**
-     * Get block messsage
+     * Get block message
      *
      * @return string
      */
diff --git a/app/code/Magento/Page/Block/Link/Current.php b/app/code/Magento/Page/Block/Link/Current.php
index 14d2de1622c..82611b37c39 100644
--- a/app/code/Magento/Page/Block/Link/Current.php
+++ b/app/code/Magento/Page/Block/Link/Current.php
@@ -41,6 +41,30 @@ class Current extends \Magento\Core\Block\Template
      */
     protected $_template = 'Magento_Page::link/current.phtml';
 
+    /**
+     * Default path
+     *
+     * @var \Magento\App\DefaultPathInterface
+     */
+    protected $_defaultPath;
+
+    /**
+     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Core\Block\Template\Context $context
+     * @param \Magento\App\DefaultPathInterface $defaultPath
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Core\Helper\Data $coreData,
+        \Magento\Core\Block\Template\Context $context,
+        \Magento\App\DefaultPathInterface $defaultPath,
+        array $data = array()
+    ) {
+        parent::__construct($coreData, $context, $data);
+        $this->_defaultPath = $defaultPath;
+    }
+
+
     /**
      * @return string
      */
@@ -61,11 +85,10 @@ class Current extends \Magento\Core\Block\Template
             'controller' => $this->_request->getControllerName(),
             'action' => $this->_request->getActionName(),
         );
-        $dafaultsParams = $this->_frontController->getDefault();
 
         $parts = array();
         foreach ($routeParts as $key => $value) {
-            if (!empty($value) && (!isset($dafaultsParams[$key]) || $value != $dafaultsParams[$key])) {
+            if (!empty($value) && ($value != $this->_defaultPath->getPart($key))) {
                 $parts[] = $value;
             }
         }
diff --git a/app/code/Magento/Page/Block/Redirect.php b/app/code/Magento/Page/Block/Redirect.php
index f16b53527e1..f3a8f66a030 100644
--- a/app/code/Magento/Page/Block/Redirect.php
+++ b/app/code/Magento/Page/Block/Redirect.php
@@ -47,13 +47,13 @@ class Redirect extends \Magento\Core\Block\Template
     protected $_formFactory;
 
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Block\Template\Context $context
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Page/Model/Config/SchemaLocator.php b/app/code/Magento/Page/Model/Config/SchemaLocator.php
index e0bb038821b..cd17bdabf20 100644
--- a/app/code/Magento/Page/Model/Config/SchemaLocator.php
+++ b/app/code/Magento/Page/Model/Config/SchemaLocator.php
@@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema =  $moduleReader->getModuleDir('etc', 'Magento_Page') . '/page_layouts.xsd';
         $this->_perFileSchema =  $moduleReader->getModuleDir('etc', 'Magento_Page') . '/page_layouts_file.xsd';
diff --git a/app/code/Magento/PageCache/Model/CacheControlFactory.php b/app/code/Magento/PageCache/Model/CacheControlFactory.php
index 756bd2fbf67..4f2bccbb436 100644
--- a/app/code/Magento/PageCache/Model/CacheControlFactory.php
+++ b/app/code/Magento/PageCache/Model/CacheControlFactory.php
@@ -31,11 +31,6 @@ namespace Magento\PageCache\Model;
 
 class CacheControlFactory
 {
-    /**
-     * Path to external cache controls
-     */
-    const XML_PATH_EXTERNAL_CACHE_CONTROLS = 'global/external_cache/controls';
-
     /**
      * Paths to external cache config option
      */
@@ -49,32 +44,30 @@ class CacheControlFactory
     protected $_objectManager;
 
     /**
-     * Config
+     * Core store config
      *
-     * @var \Magento\Centinel\Model\Config
+     * @var \Magento\Core\Model\Store\Config
      */
-    protected $_config;
+    protected $_storeConfig;
 
     /**
-     * Core store config
-     *
-     * @var \Magento\Core\Model\Store\Config
+     * @var array
      */
-    protected $_coreStoreConfig;
+    protected $_cacheControls;
 
     /**
      * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Core\Model\ConfigInterface $config
-     * @param \Magento\Core\Model\Store\Config $coreStoreConfig
+     * @param \Magento\Core\Model\Store\Config $storeConfig
+     * @param array $cacheControls
      */
     public function __construct(
         \Magento\ObjectManager $objectManager,
-        \Magento\Core\Model\ConfigInterface $config,
-        \Magento\Core\Model\Store\Config $coreStoreConfig
+        \Magento\Core\Model\Store\Config $storeConfig,
+        array $cacheControls = array()
     ) {
         $this->_objectManager = $objectManager;
-        $this->_config = $config;
-        $this->_coreStoreConfig = $coreStoreConfig;
+        $this->_storeConfig = $storeConfig;
+        $this->_cacheControls = $cacheControls;
     }
 
     /**
@@ -84,8 +77,7 @@ class CacheControlFactory
      */
     public function getCacheControls()
     {
-        $controls = $this->_config->getNode(self::XML_PATH_EXTERNAL_CACHE_CONTROLS);
-        return $controls instanceof \Magento\Simplexml\Element ? $controls->asCanonicalArray() : array();
+        return $this->_cacheControls;
     }
 
     /**
@@ -96,11 +88,11 @@ class CacheControlFactory
      */
     public function getCacheControlInstance()
     {
-        $usedControl = $this->_coreStoreConfig->getConfig(self::XML_PATH_EXTERNAL_CACHE_CONTROL);
+        $usedControl = $this->_storeConfig->getConfig(self::XML_PATH_EXTERNAL_CACHE_CONTROL);
         if ($usedControl) {
             foreach ($this->getCacheControls() as $control => $info) {
-                if ($control == $usedControl && !empty($info['class'])) {
-                    return $this->_objectManager->get($info['class']);
+                if ($control == $usedControl && !empty($info['instance'])) {
+                    return $this->_objectManager->get($info['instance']);
                 }
             }
         }
diff --git a/app/code/Magento/PageCache/Model/Observer.php b/app/code/Magento/PageCache/Model/Observer.php
index e9aed9bfa76..ae7564d39aa 100644
--- a/app/code/Magento/PageCache/Model/Observer.php
+++ b/app/code/Magento/PageCache/Model/Observer.php
@@ -45,20 +45,18 @@ class Observer
     protected $_pageCacheData = null;
 
     /**
-     * @var \Magento\Core\Model\Config
+     * @var array
      */
-    protected $_coreConfig;
+    protected $_allowedCache;
 
     /**
      * @param \Magento\PageCache\Helper\Data $pageCacheData
-     * @param \Magento\Core\Model\Config $coreConfig
+     * @param array $allowedCache
      */
-    public function __construct(
-        \Magento\PageCache\Helper\Data $pageCacheData,
-        \Magento\Core\Model\Config $coreConfig
-    ) {
+    public function __construct(\Magento\PageCache\Helper\Data $pageCacheData, array $allowedCache = array())
+    {
         $this->_pageCacheData = $pageCacheData;
-        $this->_coreConfig = $coreConfig;
+        $this->_allowedCache = $allowedCache;
     }
 
     /**
@@ -90,26 +88,26 @@ class Observer
             $needCaching = false;
         }
 
-        $configuration = $this->_coreConfig->getNode(self::XML_NODE_ALLOWED_CACHE);
-
-        if (!$configuration) {
+        if (empty($this->_allowedCache)) {
             $needCaching = false;
         }
 
-        $configuration = $configuration->asArray();
         $module = $request->getModuleName();
         $controller = $request->getControllerName();
         $action = $request->getActionName();
 
-        if (!isset($configuration[$module])) {
+
+        if (!isset($this->_allowedCache[$module])) {
             $needCaching = false;
         }
 
-        if (isset($configuration[$module]['controller']) && $configuration[$module]['controller'] != $controller) {
+        if (isset($this->_allowedCache[$module]['controller'])
+            && $this->_allowedCache[$module]['controller'] != $controller
+        ) {
             $needCaching = false;
         }
 
-        if (isset($configuration[$module]['action']) && $configuration[$module]['action'] != $action) {
+        if (isset($this->_allowedCache[$module]['action']) && $this->_allowedCache[$module]['action'] != $action) {
             $needCaching = false;
         }
 
diff --git a/app/code/Magento/PageCache/etc/config.xml b/app/code/Magento/PageCache/etc/config.xml
index a6ef64b3412..3f514e828b0 100644
--- a/app/code/Magento/PageCache/etc/config.xml
+++ b/app/code/Magento/PageCache/etc/config.xml
@@ -26,23 +26,6 @@
  */
 -->
 <config>
-    <frontend>
-        <cache>
-            <allowed_requests>
-                <cms />
-                <catalog>
-                    <category>
-                        <view />
-                    </category>
-                </catalog>
-                <catalog>
-                    <product>
-                        <view />
-                    </product>
-                </catalog>
-            </allowed_requests>
-        </cache>
-    </frontend>
     <default>
         <system>
             <external_page_cache>
diff --git a/app/code/Magento/PageCache/etc/di.xml b/app/code/Magento/PageCache/etc/di.xml
new file mode 100644
index 00000000000..71fb3df4580
--- /dev/null
+++ b/app/code/Magento/PageCache/etc/di.xml
@@ -0,0 +1,37 @@
+<?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\PageCache\Model\CacheControlFactory">
+        <param name="cacheControls">
+            <value>
+                <zendPageCache>
+                    <instance>Magento\PageCache\Model\Control\Zend</instance>
+                    <label>Zend Full Page Cache</label>
+                </zendPageCache>
+            </value>
+        </param>
+    </type>
+</config>
\ No newline at end of file
diff --git a/app/code/Magento/PageCache/etc/frontend/di.xml b/app/code/Magento/PageCache/etc/frontend/di.xml
new file mode 100644
index 00000000000..dc8b77c9ed6
--- /dev/null
+++ b/app/code/Magento/PageCache/etc/frontend/di.xml
@@ -0,0 +1,42 @@
+<?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\PageCache\Model\Observer">
+        <param name="allowedCache">
+            <value>
+                <cms>true</cms>
+                <catalog>
+                    <category>
+                        <view>true</view>
+                    </category>
+                    <product>
+                        <view>true</view>
+                    </product>
+                </catalog>
+            </value>
+        </param>
+    </type>
+</config>
\ No newline at end of file
diff --git a/app/code/Magento/Paygate/Controller/Adminhtml/Paygate/Authorizenet/Payment.php b/app/code/Magento/Paygate/Controller/Adminhtml/Paygate/Authorizenet/Payment.php
index dc6eb3ea7f7..28bda85ce6d 100644
--- a/app/code/Magento/Paygate/Controller/Adminhtml/Paygate/Authorizenet/Payment.php
+++ b/app/code/Magento/Paygate/Controller/Adminhtml/Paygate/Authorizenet/Payment.php
@@ -77,10 +77,10 @@ class Payment extends \Magento\Backend\Controller\Adminhtml\Action
             $result['success']  = true;
             $result['update_html'] = $this->_getPaymentMethodsHtml();
         } catch (\Magento\Core\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $result['error_message'] = $e->getMessage();
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $result['error_message'] = __('Something went wrong canceling the transactions.');
         }
 
diff --git a/app/code/Magento/Paygate/Controller/Authorizenet/Payment.php b/app/code/Magento/Paygate/Controller/Authorizenet/Payment.php
index 2f7acdaa32e..ceefc90e318 100644
--- a/app/code/Magento/Paygate/Controller/Authorizenet/Payment.php
+++ b/app/code/Magento/Paygate/Controller/Authorizenet/Payment.php
@@ -72,10 +72,10 @@ class Payment extends \Magento\Core\Controller\Front\Action
             $result['success']  = true;
             $result['update_html'] = $this->_getPaymentMethodsHtml();
         } catch (\Magento\Core\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $result['error_message'] = $e->getMessage();
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $result['error_message'] = __('There was an error canceling transactions. Please contact us or try again later.');
         }
 
diff --git a/app/code/Magento/Paygate/Model/Authorizenet.php b/app/code/Magento/Paygate/Model/Authorizenet.php
index c79fd2a9da4..6ff983a3966 100644
--- a/app/code/Magento/Paygate/Model/Authorizenet.php
+++ b/app/code/Magento/Paygate/Model/Authorizenet.php
@@ -238,10 +238,10 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      * @param \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
      * @param \Magento\Core\Model\Session\AbstractSession $session
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Paygate\Helper\Data $paygateData
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\Module\ModuleListInterface $moduleList
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
@@ -255,10 +255,10 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
         \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory,
         \Magento\Sales\Model\OrderFactory $orderFactory,
         \Magento\Core\Model\Session\AbstractSession $session,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Paygate\Helper\Data $paygateData,
-        \Magento\App\ModuleListInterface $moduleList,
+        \Magento\Module\ModuleListInterface $moduleList,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
diff --git a/app/code/Magento/Payment/Model/Config/SchemaLocator.php b/app/code/Magento/Payment/Model/Config/SchemaLocator.php
index 48966e5466a..b64b52d6f7f 100644
--- a/app/code/Magento/Payment/Model/Config/SchemaLocator.php
+++ b/app/code/Magento/Payment/Model/Config/SchemaLocator.php
@@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema =  $moduleReader->getModuleDir('etc', 'Magento_Payment') . '/payment.xsd';
         $this->_perFileSchema =  $moduleReader->getModuleDir('etc', 'Magento_Payment') . '/payment_file.xsd';
diff --git a/app/code/Magento/Payment/Model/Info.php b/app/code/Magento/Payment/Model/Info.php
index ccc7ddc7b1e..15a7d07acde 100644
--- a/app/code/Magento/Payment/Model/Info.php
+++ b/app/code/Magento/Payment/Model/Info.php
@@ -46,32 +46,30 @@ class Info extends \Magento\Core\Model\AbstractModel
     protected $_paymentData = null;
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Encryption\EncryptorInterface
      */
-    protected $_coreData = null;
+    protected $_encryptor;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
+        \Magento\Encryption\EncryptorInterface $encryptor,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
         $this->_paymentData = $paymentData;
+        $this->_encryptor = $encryptor;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -129,7 +127,7 @@ class Info extends \Magento\Core\Model\AbstractModel
     public function encrypt($data)
     {
         if ($data) {
-            return $this->_coreData->encrypt($data);
+            return $this->_encryptor->encrypt($data);
         }
         return $data;
     }
@@ -143,7 +141,7 @@ class Info extends \Magento\Core\Model\AbstractModel
     public function decrypt($data)
     {
         if ($data) {
-            return $this->_coreData->decrypt($data);
+            return $this->_encryptor->decrypt($data);
         }
         return $data;
     }
diff --git a/app/code/Magento/Payment/Model/Method/Cc.php b/app/code/Magento/Payment/Model/Method/Cc.php
index 577b38313c7..368c36a8ef2 100644
--- a/app/code/Magento/Payment/Model/Method/Cc.php
+++ b/app/code/Magento/Payment/Model/Method/Cc.php
@@ -33,7 +33,7 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod
     protected $_canSaveCc     = false;
 
     /**
-     * @var \Magento\App\ModuleListInterface
+     * @var \Magento\Module\ModuleListInterface
      */
     protected $_moduleList;
 
@@ -54,17 +54,17 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod
     /**
      * Construct
      *
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\Module\ModuleListInterface $moduleList
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -72,10 +72,10 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\App\ModuleListInterface $moduleList,
+        \Magento\Module\ModuleListInterface $moduleList,
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Core\Model\LocaleInterface $locale,
diff --git a/app/code/Magento/Payment/Model/Recurring/Profile.php b/app/code/Magento/Payment/Model/Recurring/Profile.php
index 7fe2f18d7f2..e73f9fc19f7 100644
--- a/app/code/Magento/Payment/Model/Recurring/Profile.php
+++ b/app/code/Magento/Payment/Model/Recurring/Profile.php
@@ -126,7 +126,7 @@ class Profile extends \Magento\Core\Model\AbstractModel
         // start date, order ref ID, schedule description
         if (!$this->getStartDatetime()) {
             $this->_errors['start_datetime'][] = __('The start date is undefined.');
-        } elseif (!\Zend_Date::isDate($this->getStartDatetime(), \Magento\Date::DATETIME_INTERNAL_FORMAT)) {
+        } elseif (!\Zend_Date::isDate($this->getStartDatetime(), \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)) {
             $this->_errors['start_datetime'][] = __('The start date has an invalid format.');
         }
         if (!$this->getScheduleDescription()) {
@@ -248,7 +248,7 @@ class Profile extends \Magento\Core\Model\AbstractModel
                 throw new \Magento\Core\Exception(__('The recurring profile start date has invalid format.'));
             }
             $utcTime = $this->_locale->utcDate($this->_store, $startDate, true, $dateFormat)
-                ->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT);
+                ->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
             $this->setStartDatetime($utcTime)->setImportedStartDatetime($startDate);
         }
         return $this->_filterValues();
@@ -279,7 +279,7 @@ class Profile extends \Magento\Core\Model\AbstractModel
                 if (is_array($options)) {
                     if (isset($options['start_datetime'])) {
                         $startDatetime = new \Zend_Date($options['start_datetime'],
-                            \Magento\Date::DATETIME_INTERNAL_FORMAT);
+                            \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
                         $this->setNearestStartDatetime($startDatetime);
                     }
                 }
@@ -326,7 +326,7 @@ class Profile extends \Magento\Core\Model\AbstractModel
         if (!$date || $date->getTimestamp() < time()) {
             $date = new \Zend_Date(time());
         }
-        $this->setStartDatetime($date->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT));
+        $this->setStartDatetime($date->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT));
         return $this;
     }
 
@@ -578,7 +578,7 @@ class Profile extends \Magento\Core\Model\AbstractModel
 
         // automatically determine start date, if not set
         if ($this->getStartDatetime()) {
-            $date = new \Zend_Date($this->getStartDatetime(), \Magento\Date::DATETIME_INTERNAL_FORMAT);
+            $date = new \Zend_Date($this->getStartDatetime(), \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
             $this->setNearestStartDatetime($date);
         } else {
             $this->setNearestStartDatetime();
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php b/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php
index 8747e62dd4e..3cfa27be14f 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php
@@ -43,7 +43,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -52,7 +52,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Core\Model\LocaleInterface $locale,
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Location.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Location.php
index b113e6489cd..810742ccde5 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Location.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Location.php
@@ -213,7 +213,7 @@ class Location
 
                             if (conflict && !confirmationShowed && anotherEnabler.value == 1) {
                                 if (isEvent) {
-                                    confirmationApproved = confirm(\'' .  $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('There is already another PayPal solution enabled. Enable this solution instead?')) . '\');
+                                    confirmationApproved = confirm(\'' .  $this->escapeJsQuote(__('There is already another PayPal solution enabled. Enable this solution instead?')) . '\');
                                 } else {
                                     paypalConflictsObject.isConflict = true;
                                 }
@@ -312,14 +312,14 @@ class Location
                     paypalConflictsObject.checkPaymentConflicts(enablerElement, "initial");
                 });
                 if (paypalConflictsObject.isConflict || paypalConflictsObject.ecMissed) {
-                    var notification = \'' .  $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('The following error(s) occured:')) . '\';
+                    var notification = \'' .  $this->escapeJsQuote(__('The following error(s) occured:')) . '\';
                     if (paypalConflictsObject.isConflict) {
-                        notification += "\\n  " + \'' .  $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Some PayPal solutions conflict.')) . '\';
+                        notification += "\\n  " + \'' .  $this->escapeJsQuote(__('Some PayPal solutions conflict.')) . '\';
                     }
                     if (paypalConflictsObject.ecMissed) {
-                        notification += "\\n  " + \'' .  $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('PayPal Express Checkout is not enabled.')) . '\';
+                        notification += "\\n  " + \'' .  $this->escapeJsQuote(__('PayPal Express Checkout is not enabled.')) . '\';
                     }
-                    notification += "\\n" + \'' .  $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Please re-enable the previously enabled payment solutions.')) . '\';
+                    notification += "\\n" + \'' .  $this->escapeJsQuote(__('Please re-enable the previously enabled payment solutions.')) . '\';
                     setTimeout(function() {
                         alert(notification);
                     }, 1);
diff --git a/app/code/Magento/Paypal/Block/Express/Shortcut.php b/app/code/Magento/Paypal/Block/Express/Shortcut.php
index 36b1ec7a8b1..86c0b5e0a5d 100644
--- a/app/code/Magento/Paypal/Block/Express/Shortcut.php
+++ b/app/code/Magento/Paypal/Block/Express/Shortcut.php
@@ -111,6 +111,11 @@ class Shortcut extends \Magento\Core\Block\Template
      */
     protected $_checkoutFactory;
 
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
     /**
      * @param \Magento\Paypal\Helper\Data $paypalData
      * @param \Magento\Payment\Helper\Data $paymentData
@@ -122,6 +127,7 @@ class Shortcut extends \Magento\Core\Block\Template
      * @param \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory
+     * @param \Magento\Math\Random $mathRandom
      * @param array $data
      */
     public function __construct(
@@ -135,6 +141,7 @@ class Shortcut extends \Magento\Core\Block\Template
         \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory,
         \Magento\Checkout\Model\Session $checkoutSession,
         \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory,
+        \Magento\Math\Random $mathRandom,
         array $data = array()
     ) {
         $this->_coreRegistry = $registry;
@@ -145,6 +152,7 @@ class Shortcut extends \Magento\Core\Block\Template
         $this->_paypalConfigFactory = $paypalConfigFactory;
         $this->_checkoutSession = $checkoutSession;
         $this->_checkoutFactory = $checkoutFactory;
+        $this->mathRandom = $mathRandom;
         parent::__construct($coreData, $context, $data);
     }
 
@@ -193,7 +201,7 @@ class Shortcut extends \Magento\Core\Block\Template
         }
 
         // set misc data
-        $this->setShortcutHtmlId($this->helper('Magento\Core\Helper\Data')->uniqHash('ec_shortcut_'))
+        $this->setShortcutHtmlId($this->mathRandom->getUniqueHash('ec_shortcut_'))
             ->setCheckoutUrl($this->getUrl($this->_startAction))
         ;
 
diff --git a/app/code/Magento/Paypal/Block/Standard/Redirect.php b/app/code/Magento/Paypal/Block/Standard/Redirect.php
index df060aa7de1..ff2e99b4898 100644
--- a/app/code/Magento/Paypal/Block/Standard/Redirect.php
+++ b/app/code/Magento/Paypal/Block/Standard/Redirect.php
@@ -28,14 +28,7 @@ namespace Magento\Paypal\Block\Standard;
 class Redirect extends \Magento\Core\Block\AbstractBlock
 {
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData;
-
-    /**
-     * @var \Magento\Data\Form\Factory
+     * @var \Magento\Data\FormFactory
      */
     protected $_formFactory;
 
@@ -50,25 +43,30 @@ class Redirect extends \Magento\Core\Block\AbstractBlock
     protected $_paypalStandardFactory;
 
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
+    /**
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Data\Form\Element\Factory $elementFactory
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Block\Context $context
      * @param \Magento\Paypal\Model\StandardFactory $paypalStandardFactory
+     * @param \Magento\Math\Random $mathRandom
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Data\Form\Element\Factory $elementFactory,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Block\Context $context,
         \Magento\Paypal\Model\StandardFactory $paypalStandardFactory,
+        \Magento\Math\Random $mathRandom,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
         $this->_formFactory = $formFactory;
         $this->_elementFactory = $elementFactory;
         $this->_paypalStandardFactory = $paypalStandardFactory;
+        $this->mathRandom = $mathRandom;
         parent::__construct($context, $data);
     }
 
@@ -88,7 +86,7 @@ class Redirect extends \Magento\Core\Block\AbstractBlock
         foreach ($standard->getStandardCheckoutFormFields() as $field => $value) {
             $form->addField($field, 'hidden', array('name' => $field, 'value' => $value));
         }
-        $idSuffix = $this->_coreData->uniqHash();
+        $idSuffix = $this->mathRandom->getUniqueHash();
         $submitButton = $this->_elementFactory->create('submit', array('attributes' => array(
             'value' => __('Click here if you are not redirected within 10 seconds.'),
         )));
diff --git a/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php b/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php
index f3a8d93ff9c..5eb5e07bda3 100644
--- a/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php
+++ b/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php
@@ -49,7 +49,7 @@ class Reports extends \Magento\Backend\Controller\Adminhtml\Action
     protected $_settlementFactory;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
diff --git a/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php b/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php
index 2ceb1810858..c47bebf804a 100644
--- a/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php
+++ b/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php
@@ -196,7 +196,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action
             $this->_getCheckoutSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getCheckoutSession()->addError(__('We can\'t start Express Checkout.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
 
         $this->_redirect('checkout/cart');
@@ -214,7 +214,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action
             $response = $this->_checkout->getShippingOptionsCallbackResponse($this->getRequest()->getParams());
             $this->getResponse()->setBody($response);
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
     }
 
@@ -245,7 +245,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action
             $this->_getCheckoutSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getCheckoutSession()->addError(__('Unable to cancel Express Checkout'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
 
         $this->_redirect('checkout/cart');
@@ -265,7 +265,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action
             $this->_checkoutSession->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_checkoutSession->addError(__('We can\'t process Express Checkout approval.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->_redirect('checkout/cart');
     }
@@ -294,7 +294,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action
             $this->_checkoutSession->addError(
                 __('We can\'t initialize Express Checkout review.')
             );
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->_redirect('checkout/cart');
     }
@@ -332,7 +332,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getSession()->addError(__('We can\'t update shipping method.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         if ($isAjax) {
             $this->getResponse()->setBody('<script type="text/javascript">window.location.href = '
@@ -360,7 +360,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getSession()->addError(__('We can\'t update Order data.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody('<script type="text/javascript">window.location.href = '
             . $this->_urlBuilder->getUrl('*/*/review') . ';</script>');
@@ -386,7 +386,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getSession()->addError(__('We can\'t update Order data.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         if ($isAjax) {
             $this->getResponse()->setBody('<script type="text/javascript">window.location.href = '
@@ -460,7 +460,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getSession()->addError(__('We can\'t place the order.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->_redirect('*/*/review');
     }
diff --git a/app/code/Magento/Paypal/Controller/Ipn.php b/app/code/Magento/Paypal/Controller/Ipn.php
index 8dbb5cf6681..194f0c9316a 100644
--- a/app/code/Magento/Paypal/Controller/Ipn.php
+++ b/app/code/Magento/Paypal/Controller/Ipn.php
@@ -30,7 +30,7 @@ namespace Magento\Paypal\Controller;
 class Ipn extends \Magento\Core\Controller\Front\Action
 {
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
diff --git a/app/code/Magento/Paypal/Controller/Payflow.php b/app/code/Magento/Paypal/Controller/Payflow.php
index 49aa14b3310..a1b20ef02dc 100644
--- a/app/code/Magento/Paypal/Controller/Payflow.php
+++ b/app/code/Magento/Paypal/Controller/Payflow.php
@@ -40,7 +40,7 @@ class Payflow extends \Magento\Core\Controller\Front\Action
     protected $_orderFactory;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
diff --git a/app/code/Magento/Paypal/Controller/Payflowadvanced.php b/app/code/Magento/Paypal/Controller/Payflowadvanced.php
index e47af1598a8..ed1b94c7dd8 100644
--- a/app/code/Magento/Paypal/Controller/Payflowadvanced.php
+++ b/app/code/Magento/Paypal/Controller/Payflowadvanced.php
@@ -51,7 +51,7 @@ class Payflowadvanced extends \Magento\Paypal\Controller\Express\AbstractExpress
     protected $_checkoutType = 'Magento\Paypal\Model\Payflowadvanced';
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
diff --git a/app/code/Magento/Paypal/Model/Api/AbstractApi.php b/app/code/Magento/Paypal/Model/Api/AbstractApi.php
index 67d7652eba0..0809145454f 100644
--- a/app/code/Magento/Paypal/Model/Api/AbstractApi.php
+++ b/app/code/Magento/Paypal/Model/Api/AbstractApi.php
@@ -103,7 +103,7 @@ abstract class AbstractApi extends \Magento\Object
     protected $_customerAddress;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -129,7 +129,7 @@ abstract class AbstractApi extends \Magento\Object
      * attributes This behavior may change in child classes
      *
      * @param \Magento\Customer\Helper\Address $customerAddress
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Directory\Model\RegionFactory $regionFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
@@ -137,7 +137,7 @@ abstract class AbstractApi extends \Magento\Object
      */
     public function __construct(
         \Magento\Customer\Helper\Address $customerAddress,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Directory\Model\RegionFactory $regionFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
diff --git a/app/code/Magento/Paypal/Model/Api/Nvp.php b/app/code/Magento/Paypal/Model/Api/Nvp.php
index 1bbc4c306dc..2c4091f348a 100644
--- a/app/code/Magento/Paypal/Model/Api/Nvp.php
+++ b/app/code/Magento/Paypal/Model/Api/Nvp.php
@@ -576,7 +576,7 @@ class Nvp extends \Magento\Paypal\Model\Api\AbstractApi
 
     /**
      * @param \Magento\Customer\Helper\Address $customerAddress
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Directory\Model\RegionFactory $regionFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
@@ -585,7 +585,7 @@ class Nvp extends \Magento\Paypal\Model\Api\AbstractApi
      */
     public function __construct(
         \Magento\Customer\Helper\Address $customerAddress,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Directory\Model\RegionFactory $regionFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
diff --git a/app/code/Magento/Paypal/Model/Cert.php b/app/code/Magento/Paypal/Model/Cert.php
index b6d50975ff9..3130e8070f5 100644
--- a/app/code/Magento/Paypal/Model/Cert.php
+++ b/app/code/Magento/Paypal/Model/Cert.php
@@ -37,37 +37,35 @@ class Cert extends \Magento\Core\Model\AbstractModel
     const BASEPATH_PAYPAL_CERT  = 'cert/paypal';
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\App\Dir
      */
-    protected $_coreData;
+    protected $_coreDir;
 
     /**
-     * @var \Magento\App\Dir
+     * @var \Magento\Encryption\EncryptorInterface
      */
-    protected $_coreDir;
+    protected $_encryptor;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\App\Dir $coreDir
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\App\Dir $coreDir,
+        \Magento\Encryption\EncryptorInterface $encryptor,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
         $this->_coreDir = $coreDir;
+        $this->_encryptor = $encryptor;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -129,7 +127,7 @@ class Cert extends \Magento\Core\Model\AbstractModel
             $this->_removeOutdatedCertFile();
         }
 
-        file_put_contents($file, $this->_coreData->decrypt($this->getContent()));
+        file_put_contents($file, $this->_encryptor->decrypt($this->getContent()));
     }
 
     /**
diff --git a/app/code/Magento/Paypal/Model/Direct.php b/app/code/Magento/Paypal/Model/Direct.php
index f671cdad2b9..7e0e8f0aa57 100644
--- a/app/code/Magento/Paypal/Model/Direct.php
+++ b/app/code/Magento/Paypal/Model/Direct.php
@@ -99,10 +99,10 @@ class Direct extends \Magento\Payment\Model\Method\Cc
     protected $_cartFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\Module\ModuleListInterface $moduleList
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -117,10 +117,10 @@ class Direct extends \Magento\Payment\Model\Method\Cc
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\App\ModuleListInterface $moduleList,
+        \Magento\Module\ModuleListInterface $moduleList,
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Core\Model\LocaleInterface $locale,
diff --git a/app/code/Magento/Paypal/Model/Express/Checkout.php b/app/code/Magento/Paypal/Model/Express/Checkout.php
index 760b2746eaf..0b0f3291b61 100644
--- a/app/code/Magento/Paypal/Model/Express/Checkout.php
+++ b/app/code/Magento/Paypal/Model/Express/Checkout.php
@@ -172,7 +172,7 @@ class Checkout
     protected $_customerData;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -229,7 +229,7 @@ class Checkout
     /**
      * Set config, session and quote instances
      *
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Customer\Helper\Data $customerData
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Tax\Helper\Data $taxData
@@ -252,7 +252,7 @@ class Checkout
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Customer\Helper\Data $customerData,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Tax\Helper\Data $taxData,
diff --git a/app/code/Magento/Paypal/Model/Hostedpro.php b/app/code/Magento/Paypal/Model/Hostedpro.php
index 9a70f8e3944..0791831edff 100644
--- a/app/code/Magento/Paypal/Model/Hostedpro.php
+++ b/app/code/Magento/Paypal/Model/Hostedpro.php
@@ -78,10 +78,10 @@ class Hostedpro extends \Magento\Paypal\Model\Direct
     protected $_hostedproRequestFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\Module\ModuleListInterface $moduleList
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -97,10 +97,10 @@ class Hostedpro extends \Magento\Paypal\Model\Direct
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\App\ModuleListInterface $moduleList,
+        \Magento\Module\ModuleListInterface $moduleList,
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Core\Model\LocaleInterface $locale,
diff --git a/app/code/Magento/Paypal/Model/Observer.php b/app/code/Magento/Paypal/Model/Observer.php
index eaa57c6a484..702476d6b86 100644
--- a/app/code/Magento/Paypal/Model/Observer.php
+++ b/app/code/Magento/Paypal/Model/Observer.php
@@ -53,7 +53,7 @@ class Observer
     protected $_coreData;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -66,14 +66,14 @@ class Observer
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Paypal\Helper\Hss $paypalHss
      * @param \Magento\Core\Model\Registry $coreRegistry
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Paypal\Model\Report\SettlementFactory $settlementFactory
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
         \Magento\Paypal\Helper\Hss $paypalHss,
         \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Paypal\Model\Report\SettlementFactory $settlementFactory
     ) {
         $this->_coreData = $coreData;
diff --git a/app/code/Magento/Paypal/Model/Payflowlink.php b/app/code/Magento/Paypal/Model/Payflowlink.php
index 61410d9f25a..e54f6d13b8a 100644
--- a/app/code/Magento/Paypal/Model/Payflowlink.php
+++ b/app/code/Magento/Paypal/Model/Payflowlink.php
@@ -140,17 +140,17 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro
     protected $_websiteFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\Module\ModuleListInterface $moduleList
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Centinel\Model\Service $centinelService
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Paypal\Model\ConfigFactory $configFactory
+     * @param \Magento\Math\Random $mathRandom
      * @param \Magento\Paypal\Model\Payflow\RequestFactory $requestFactory
      * @param \Magento\Sales\Model\QuoteFactory $quoteFactory
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
@@ -161,17 +161,17 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\App\ModuleListInterface $moduleList,
+        \Magento\Module\ModuleListInterface $moduleList,
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Centinel\Model\Service $centinelService,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Paypal\Model\ConfigFactory $configFactory,
+        \Magento\Math\Random $mathRandom,
         \Magento\Paypal\Model\Payflow\RequestFactory $requestFactory,
         \Magento\Sales\Model\QuoteFactory $quoteFactory,
         \Magento\Sales\Model\OrderFactory $orderFactory,
@@ -193,9 +193,9 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro
             $logAdapterFactory,
             $locale,
             $centinelService,
-            $coreData,
             $storeManager,
             $configFactory,
+            $mathRandom,
             $data
         );
     }
@@ -573,7 +573,7 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro
      */
     protected function _generateSecureTokenId()
     {
-        return $this->_coreData->uniqHash();
+        return $this->mathRandom->getUniqueHash();
     }
 
     /**
@@ -628,7 +628,7 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro
      */
     protected function _generateSecureSilentPostHash($payment)
     {
-        $secureHash = md5($this->_coreData->getRandomString(10));
+        $secureHash = md5($this->mathRandom->getRandomString(10));
         $payment->setAdditionalInformation($this->_secureSilentPostHashKey, $secureHash);
         return $secureHash;
     }
diff --git a/app/code/Magento/Paypal/Model/Payflowpro.php b/app/code/Magento/Paypal/Model/Payflowpro.php
index 5f2496cc756..c393c14471c 100644
--- a/app/code/Magento/Paypal/Model/Payflowpro.php
+++ b/app/code/Magento/Paypal/Model/Payflowpro.php
@@ -112,14 +112,6 @@ class Payflowpro extends  \Magento\Payment\Model\Method\Cc
         'centinel_eci'          => 'ECI',
         'centinel_xid'          => 'XID',
     );
-
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData;
-
     /**
      * @var \Magento\Core\Model\StoreManagerInterface
      */
@@ -131,38 +123,43 @@ class Payflowpro extends  \Magento\Payment\Model\Method\Cc
     protected $_configFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
+    /**
+     * @param \Magento\Logger $logger
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\Module\ModuleListInterface $moduleList
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Centinel\Model\Service $centinelService
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Paypal\Model\ConfigFactory $configFactory
+     * @param ConfigFactory $configFactory
+     * @param \Magento\Math\Random $mathRandom
      * @param array $data
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\App\ModuleListInterface $moduleList,
+        \Magento\Module\ModuleListInterface $moduleList,
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Centinel\Model\Service $centinelService,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Paypal\Model\ConfigFactory $configFactory,
+        \Magento\Math\Random $mathRandom,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
         $this->_storeManager = $storeManager;
         $this->_configFactory = $configFactory;
+        $this->mathRandom = $mathRandom;
         parent::__construct(
             $logger,
             $eventManager,
@@ -551,7 +548,7 @@ class Payflowpro extends  \Magento\Payment\Model\Method\Cc
      */
     protected function _generateRequestId()
     {
-        return $this->_coreData->uniqHash();
+        return $this->mathRandom->getUniqueHash();
     }
 
     /**
diff --git a/app/code/Magento/Paypal/Model/Report/Settlement.php b/app/code/Magento/Paypal/Model/Report/Settlement.php
index ea17542067c..ad4da16cec4 100644
--- a/app/code/Magento/Paypal/Model/Report/Settlement.php
+++ b/app/code/Magento/Paypal/Model/Report/Settlement.php
@@ -248,7 +248,7 @@ class Settlement extends \Magento\Core\Model\AbstractModel
                 // Set last modified date, this value will be overwritten during parsing
                 if (isset($attributes['mtime'])) {
                     $lastModified = new \Zend_Date($attributes['mtime']);
-                    $this->setReportLastModified($lastModified->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT));
+                    $this->setReportLastModified($lastModified->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT));
                 }
 
                 $this->setReportDate($this->_fileNameToDate($filename))
@@ -318,7 +318,7 @@ class Settlement extends \Magento\Core\Model\AbstractModel
             switch($lineType) {
                 case 'RH': // Report header.
                     $lastModified = new \Zend_Date($line[1]);
-                    $this->setReportLastModified($lastModified->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT));
+                    $this->setReportLastModified($lastModified->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT));
                     //$this->setAccountId($columns[2]); -- probably we'll just take that from the section header...
                     break;
                 case 'FH': // File header.
diff --git a/app/code/Magento/Paypal/Model/Resource/Cert.php b/app/code/Magento/Paypal/Model/Resource/Cert.php
index 13d7dc256b7..9417e9eebc3 100644
--- a/app/code/Magento/Paypal/Model/Resource/Cert.php
+++ b/app/code/Magento/Paypal/Model/Resource/Cert.php
@@ -37,12 +37,22 @@ class Cert extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_coreDate;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Date $coreDate
+     * @param \Magento\Stdlib\DateTime $dateTime
      */
-    public function __construct(\Magento\Core\Model\Resource $resource, \Magento\Core\Model\Date $coreDate)
-    {
+    public function __construct(
+        \Magento\App\Resource $resource,
+        \Magento\Core\Model\Date $coreDate,
+        \Magento\Stdlib\DateTime $dateTime
+    ) {
         $this->_coreDate = $coreDate;
+        $this->dateTime = $dateTime;
         parent::__construct($resource);
     }
 
@@ -62,7 +72,7 @@ class Cert extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected function _beforeSave(\Magento\Core\Model\AbstractModel $object)
     {
-        $object->setUpdatedAt($this->formatDate($this->_coreDate->gmtDate()));
+        $object->setUpdatedAt($this->dateTime->formatDate($this->_coreDate->gmtDate()));
         return parent::_beforeSave($object);
     }
 
diff --git a/app/code/Magento/Paypal/Model/Resource/Report/Settlement.php b/app/code/Magento/Paypal/Model/Resource/Report/Settlement.php
index 34db3116dad..54e526c8e94 100644
--- a/app/code/Magento/Paypal/Model/Resource/Report/Settlement.php
+++ b/app/code/Magento/Paypal/Model/Resource/Report/Settlement.php
@@ -44,10 +44,10 @@ class Settlement extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_coreDate;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Date $coreDate
      */
-    public function __construct(\Magento\Core\Model\Resource $resource, \Magento\Core\Model\Date $coreDate)
+    public function __construct(\Magento\App\Resource $resource, \Magento\Core\Model\Date $coreDate)
     {
         $this->_coreDate = $coreDate;
         parent::__construct($resource);
diff --git a/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php b/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php
index c98253ad389..daaee2bfddf 100644
--- a/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php
+++ b/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php
@@ -32,41 +32,39 @@ namespace Magento\Paypal\Model\System\Config\Backend;
 class Cert extends \Magento\Core\Model\Config\Value
 {
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Paypal\Model\CertFactory
      */
-    protected $_coreData;
+    protected $_certFactory;
 
     /**
-     * @var \Magento\Paypal\Model\CertFactory
+     * @var \Magento\Encryption\EncryptorInterface
      */
-    protected $_certFactory;
+    protected $_encryptor;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Paypal\Model\CertFactory $certFactory
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Config $config,
         \Magento\Paypal\Model\CertFactory $certFactory,
+        \Magento\Encryption\EncryptorInterface $encryptor,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
         $this->_certFactory = $certFactory;
+        $this->_encryptor = $encryptor;
         parent::__construct($context, $registry, $storeManager, $config, $resource, $resourceCollection, $data);
     }
 
@@ -93,7 +91,7 @@ class Cert extends \Magento\Core\Model\Config\Value
                 throw new \Magento\Core\Exception(__('The PayPal certificate file is empty.'));
             }
             $this->setValue($_FILES['groups']['name'][$this->getGroupId()]['fields'][$this->getField()]['value']);
-            $content = $this->_coreData->encrypt(file_get_contents($tmpPath));
+            $content = $this->_encryptor->encrypt(file_get_contents($tmpPath));
             $this->_certFactory->create()->loadByWebsite($this->getScopeId())
                 ->setContent($content)
                 ->save();
diff --git a/app/code/Magento/Paypal/etc/di.xml b/app/code/Magento/Paypal/etc/di.xml
index 8fdbdbc7fd9..369c39bb37e 100644
--- a/app/code/Magento/Paypal/etc/di.xml
+++ b/app/code/Magento/Paypal/etc/di.xml
@@ -24,7 +24,7 @@
  */
 -->
 <config>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <paypal_setup>Magento\Sales\Model\Resource\Setup</paypal_setup>
diff --git a/app/code/Magento/Paypal/view/frontend/express/shortcut.phtml b/app/code/Magento/Paypal/view/frontend/express/shortcut.phtml
index 4bbf6636819..ed4c4cf1ba3 100644
--- a/app/code/Magento/Paypal/view/frontend/express/shortcut.phtml
+++ b/app/code/Magento/Paypal/view/frontend/express/shortcut.phtml
@@ -57,7 +57,7 @@ if ($this->isOrPositionBefore()) {
                 "<?php echo $this->getViewFileUrl('Magento_Paypal::js/paypal-checkout.js') ?>",
                 function () {
                     $('.paypal-logo').paypalCheckout({
-                        confirmMessage: "<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape($this->getConfirmationMessage())?>",
+                        confirmMessage: "<?php echo $this->escapeJsQuote($this->getConfirmationMessage())?>",
                         confirmUrl: "<?php echo !empty($confirmationUrl) ? $confirmationUrl : false ?>",
                         isCatalogProduct: "<?php echo !empty($isInCatalogProduct) ? $isInCatalogProduct : false ?>",
                         paypalCheckoutSelector: '#pp-checkout-url',
@@ -66,4 +66,4 @@ if ($this->isOrPositionBefore()) {
                 });
         })(jQuery);
     </script>
-</div>
\ No newline at end of file
+</div>
diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review_details.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review_details.xml
index 6de51a8c3a0..f340c628704 100644
--- a/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review_details.xml
+++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review_details.xml
@@ -24,7 +24,7 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Paypal\Block\Express\Review\Details" output="1" name="paypal.express.review.details" template="express/review/details.phtml">
+    <block class="Magento\Paypal\Block\Express\Review\Details" output="1" name="root" template="express/review/details.phtml">
         <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="onepage/review/item.phtml"/>
         <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="onepage/review/item.phtml"/>
         <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="onepage/review/item.phtml"/>
diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_hostedpro_cancel.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_hostedpro_cancel.xml
index bcdd5b3d58a..e40967effa8 100644
--- a/app/code/Magento/Paypal/view/frontend/layout/paypal_hostedpro_cancel.xml
+++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_hostedpro_cancel.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Hosted Pro Frame" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Hosted\Pro\Iframe" name="hosted.pro.iframe" template="hss/redirect.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Hosted\Pro\Iframe" name="hosted.pro.iframe" output="1" template="hss/redirect.phtml"/>
 </layout>
diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_cancelpayment.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_cancelpayment.xml
index 8903d93d453..68f8ce811fa 100644
--- a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_cancelpayment.xml
+++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_cancelpayment.xml
@@ -24,8 +24,6 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Cancel Payment" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe"
-               template="payflowlink/redirect.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe" output="1"
+           template="payflowlink/redirect.phtml"/>
 </layout>
diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_form.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_form.xml
index 1ce93f586de..ff64b403b62 100644
--- a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_form.xml
+++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_form.xml
@@ -24,8 +24,6 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Form" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe"
-               template="payflowlink/form.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe" output="1"
+           template="payflowlink/form.phtml"/>
 </layout>
diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_returnurl.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_returnurl.xml
index aa16a52ef33..c8a429aa448 100644
--- a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_returnurl.xml
+++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflow_returnurl.xml
@@ -24,8 +24,6 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Return URL" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe"
-               template="payflowlink/redirect.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe" output="1"
+           template="payflowlink/redirect.phtml"/>
 </layout>
diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_cancelpayment.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_cancelpayment.xml
index f6282dcfa94..a72eb037793 100644
--- a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_cancelpayment.xml
+++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_cancelpayment.xml
@@ -24,8 +24,6 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Advanced Cancel Payment" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe"
-               template="payflowadvanced/redirect.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe" output="1"
+           template="payflowadvanced/redirect.phtml"/>
 </layout>
diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_form.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_form.xml
index 8c2a6b505ea..c1d41e2be0f 100644
--- a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_form.xml
+++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_form.xml
@@ -24,8 +24,6 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Advanced Form" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe"
-               template="payflowadvanced/form.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe" output="1"
+           template="payflowadvanced/form.phtml"/>
 </layout>
diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_returnurl.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_returnurl.xml
index f92c3490b3c..dc3bb8c0032 100644
--- a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_returnurl.xml
+++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowadvanced_returnurl.xml
@@ -24,8 +24,6 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Advanced Return URL" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe"
-               template="payflowadvanced/redirect.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe" output="1"
+           template="payflowadvanced/redirect.phtml"/>
 </layout>
diff --git a/app/code/Magento/PaypalUk/Model/Api/Nvp.php b/app/code/Magento/PaypalUk/Model/Api/Nvp.php
index 3c04521c2e1..2ff463316c2 100644
--- a/app/code/Magento/PaypalUk/Model/Api/Nvp.php
+++ b/app/code/Magento/PaypalUk/Model/Api/Nvp.php
@@ -334,11 +334,9 @@ class Nvp extends \Magento\Paypal\Model\Api\Nvp
     );
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Math\Random
      */
-    protected $_coreData;
+    protected $mathRandom;
 
     /**
      * Constructor
@@ -347,23 +345,23 @@ class Nvp extends \Magento\Paypal\Model\Api\Nvp
      * attributes This behavior may change in child classes
      *
      * @param \Magento\Customer\Helper\Address $customerAddress
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Directory\Model\RegionFactory $regionFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Directory\Model\CountryFactory $countryFactory
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Math\Random $mathRandom
      */
     public function __construct(
         \Magento\Customer\Helper\Address $customerAddress,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Directory\Model\RegionFactory $regionFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Directory\Model\CountryFactory $countryFactory,
-        \Magento\Core\Helper\Data $coreData
+        \Magento\Math\Random $mathRandom
     ) {
-        $this->_coreData = $coreData;
+        $this->mathRandom = $mathRandom;
         parent::__construct($customerAddress, $logger, $locale, $regionFactory, $logAdapterFactory, $countryFactory);
     }
 
@@ -507,7 +505,7 @@ class Nvp extends \Magento\Paypal\Model\Api\Nvp
      * Catch success calls and collect warnings
      *
      * @param array
-     * @return bool| success flag
+     * @return bool success flag
      */
     protected function _isCallSuccessful($response)
     {
@@ -560,7 +558,7 @@ class Nvp extends \Magento\Paypal\Model\Api\Nvp
      */
     protected function getRequestId()
     {
-        return $this->_coreData->uniqHash();
+        return $this->mathRandom->getUniqueHash();
     }
 
     /**
diff --git a/app/code/Magento/PaypalUk/etc/module.xml b/app/code/Magento/PaypalUk/etc/module.xml
index 0ae08138881..9fd63905f57 100755
--- a/app/code/Magento/PaypalUk/etc/module.xml
+++ b/app/code/Magento/PaypalUk/etc/module.xml
@@ -38,7 +38,6 @@
             <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/PaypalUk/view/frontend/layout/paypal_express_review_details.xml b/app/code/Magento/PaypalUk/view/frontend/layout/paypal_express_review_details.xml
index 8b5fee65e7c..8ac62f38ae2 100644
--- a/app/code/Magento/PaypalUk/view/frontend/layout/paypal_express_review_details.xml
+++ b/app/code/Magento/PaypalUk/view/frontend/layout/paypal_express_review_details.xml
@@ -24,16 +24,14 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Express\Review\Details" name="paypal.express.review.details"
-               template="express/review/details.phtml">
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="onepage/review/item.phtml"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped"
-                   template="onepage/review/item.phtml"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable"
-                   template="onepage/review/item.phtml"/>
-            <block class="Magento\Checkout\Block\Cart\Totals" name="paypal.express.review.details.totals" as="totals"
-                   template="onepage/review/totals.phtml"/>
-        </block>
+    <block class="Magento\Paypal\Block\Express\Review\Details" name="root" output="1"
+           template="express/review/details.phtml">
+        <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="onepage/review/item.phtml"/>
+        <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped"
+               template="onepage/review/item.phtml"/>
+        <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable"
+               template="onepage/review/item.phtml"/>
+        <block class="Magento\Checkout\Block\Cart\Totals" name="paypal.express.review.details.totals" as="totals"
+               template="onepage/review/totals.phtml"/>
     </block>
 </layout>
diff --git a/app/code/Magento/Persistent/Helper/Data.php b/app/code/Magento/Persistent/Helper/Data.php
index 22107706a0d..242d0d90cf3 100644
--- a/app/code/Magento/Persistent/Helper/Data.php
+++ b/app/code/Magento/Persistent/Helper/Data.php
@@ -59,6 +59,11 @@ class Data extends \Magento\Core\Helper\Data
      */
     protected $_checkoutData;
 
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
     /**
      * Core url
      *
@@ -66,44 +71,56 @@ class Data extends \Magento\Core\Helper\Data
      */
     protected $_coreUrl;
 
+    /**
+     * @var \Magento\Module\Dir\Reader
+     */
+    protected $_modulesReader;
+
     /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Config $config
+     * @param \Magento\Module\Dir\Reader $modulesReader
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Encryption $encryptor
      * @param \Magento\Core\Helper\Url $coreUrl
      * @param \Magento\Checkout\Helper\Data $checkoutData
-     * @param \Magento\Persistent\Helper\Session $persistentSession
+     * @param Session $persistentSession
+     * @param \Magento\Escaper $escaper
      * @param bool $dbCompatibleMode
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Config $config,
+        \Magento\Module\Dir\Reader $modulesReader,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\Core\Model\Date $dateModel,
         \Magento\App\State $appState,
-        \Magento\Core\Model\Encryption $encryptor,
         \Magento\Core\Helper\Url $coreUrl,
         \Magento\Checkout\Helper\Data $checkoutData,
         \Magento\Persistent\Helper\Session $persistentSession,
+        \Magento\Escaper $escaper,
         $dbCompatibleMode = true
-    )
-    {
+    ) {
+        $this->_modulesReader = $modulesReader;
         $this->_coreUrl = $coreUrl;
         $this->_checkoutData = $checkoutData;
         $this->_persistentSession = $persistentSession;
-        parent::__construct($context, $eventManager, $coreHttp, $config, $coreStoreConfig, $storeManager,
-            $locale, $dateModel, $appState, $encryptor, $dbCompatibleMode
+        $this->_escaper = $escaper;
+
+        parent::__construct(
+            $context,
+            $eventManager,
+            $coreStoreConfig,
+            $storeManager,
+            $locale,
+            $dateModel,
+            $appState,
+            $dbCompatibleMode
         );
     }
 
@@ -190,7 +207,7 @@ class Data extends \Magento\Core\Helper\Data
      */
     public function getPersistentName()
     {
-        return __('(Not %1?)', $this->escapeHtml($this->_persistentSession->getCustomer()->getName()));
+        return __('(Not %1?)', $this->_escaper->escapeHtml($this->_persistentSession->getCustomer()->getName()));
     }
 
     /**
@@ -200,7 +217,7 @@ class Data extends \Magento\Core\Helper\Data
      */
     public function getPersistentConfigFilePath()
     {
-        return $this->_config->getModuleDir('etc', $this->_getModuleName()) . DS . $this->_configFileName;
+        return $this->_modulesReader->getModuleDir('etc', $this->_getModuleName()) . DS . $this->_configFileName;
     }
 
     /**
diff --git a/app/code/Magento/Persistent/Helper/Session.php b/app/code/Magento/Persistent/Helper/Session.php
index b28b2b32d7f..165c4887a9c 100644
--- a/app/code/Magento/Persistent/Helper/Session.php
+++ b/app/code/Magento/Persistent/Helper/Session.php
@@ -23,12 +23,11 @@
  * @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;
 
 /**
  * Persistent Shopping Cart Data Helper
  */
-namespace Magento\Persistent\Helper;
-
 class Session extends \Magento\Core\Helper\Data
 {
     /**
@@ -83,15 +82,12 @@ class Session extends \Magento\Core\Helper\Data
     /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Encryption $encryptor
-     * @param \Magento\Persistent\Helper\Data $persistentData
+     * @param Data $persistentData
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param \Magento\Customer\Model\CustomerFactory $customerFactory
      * @param \Magento\Persistent\Model\SessionFactory $sessionFactory
@@ -100,27 +96,30 @@ class Session extends \Magento\Core\Helper\Data
     public function __construct(
         \Magento\Core\Helper\Context $context,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\Core\Model\Date $dateModel,
         \Magento\App\State $appState,
-        \Magento\Core\Model\Encryption $encryptor,
         \Magento\Persistent\Helper\Data $persistentData,
         \Magento\Checkout\Model\Session $checkoutSession,
         \Magento\Customer\Model\CustomerFactory $customerFactory,
         \Magento\Persistent\Model\SessionFactory $sessionFactory,
         $dbCompatibleMode = true
-    )
-    {
+    ) {
         $this->_persistentData = $persistentData;
         $this->_checkoutSession = $checkoutSession;
         $this->_customerFactory = $customerFactory;
         $this->_sessionFactory = $sessionFactory;
-        parent::__construct($context, $eventManager, $coreHttp, $config, $coreStoreConfig, $storeManager,
-            $locale, $dateModel, $appState, $encryptor, $dbCompatibleMode
+        parent::__construct(
+            $context,
+            $eventManager,
+            $coreStoreConfig,
+            $storeManager,
+            $locale,
+            $dateModel,
+            $appState,
+            $dbCompatibleMode
         );
     }
 
diff --git a/app/code/Magento/Persistent/Model/Observer.php b/app/code/Magento/Persistent/Model/Observer.php
index 07d256bef1e..0a34b81d8bf 100644
--- a/app/code/Magento/Persistent/Model/Observer.php
+++ b/app/code/Magento/Persistent/Model/Observer.php
@@ -47,13 +47,6 @@ class Observer
      */
     protected $_persistentData = null;
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
-
     /**
      * Persistent session
      *
@@ -146,9 +139,15 @@ class Observer
     protected $_websiteCollectionFactory;
 
     /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
+    /**
+     * Construct
+     *
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Persistent\Helper\Session $persistentSession
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Persistent\Helper\Data $persistentData
      * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websiteCollectionFactory
      * @param \Magento\Core\Model\Session $session
@@ -161,13 +160,13 @@ class Observer
      * @param Persistent\ConfigFactory $persistentConfigFactory
      * @param \Magento\App\RequestInterface $requestHttp
      * @param \Magento\View\LayoutInterface $layout
-     * 
+     * @param \Magento\Escaper $escaper
+     *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Persistent\Helper\Session $persistentSession,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Persistent\Helper\Data $persistentData,
         \Magento\Core\Model\Resource\Website\CollectionFactory $websiteCollectionFactory,
         \Magento\Core\Model\Session $session,
@@ -179,11 +178,11 @@ class Observer
         \Magento\Customer\Model\CustomerFactory $customerFactory,
         \Magento\Persistent\Model\Persistent\ConfigFactory $persistentConfigFactory,
         \Magento\App\RequestInterface $requestHttp,
-        \Magento\View\LayoutInterface $layout
+        \Magento\View\LayoutInterface $layout,
+        \Magento\Escaper $escaper
     ) {
         $this->_eventManager = $eventManager;
         $this->_persistentSession = $persistentSession;
-        $this->_coreData = $coreData;
         $this->_persistentData = $persistentData;
         $this->_websiteCollectionFactory = $websiteCollectionFactory;
         $this->_session = $session;
@@ -196,6 +195,7 @@ class Observer
         $this->_persistentConfigFactory = $persistentConfigFactory;
         $this->_requestHttp = $requestHttp;
         $this->_layout = $layout;
+        $this->_escaper = $escaper;
     }
 
     /**
@@ -262,8 +262,7 @@ class Observer
      */
     public function emulateWelcomeBlock($block)
     {
-        $escapedName = $this->_coreData
-            ->escapeHtml($this->_getPersistentCustomer()->getName(), null);
+        $escapedName = $this->_escaper->escapeHtml($this->_getPersistentCustomer()->getName(), null);
 
         $this->_applyAccountLinksPersistentData();
         $welcomeMessage = __('Welcome, %1!', $escapedName)
diff --git a/app/code/Magento/Persistent/Model/Observer/Session.php b/app/code/Magento/Persistent/Model/Observer/Session.php
index 9ff965a3d5d..a0f0a31cfa3 100644
--- a/app/code/Magento/Persistent/Model/Observer/Session.php
+++ b/app/code/Magento/Persistent/Model/Observer/Session.php
@@ -196,7 +196,7 @@ class Session
         $sessionModel = $this->_persistentSession->getSession();
 
         /** @var $request \Magento\App\RequestInterface */
-        $request = $observer->getEvent()->getFront()->getRequest();
+        $request = $observer->getEvent()->getRequest();
 
         // Quote Id could be changed only by logged in customer
         if ($this->_customerSession->isLoggedIn()
diff --git a/app/code/Magento/Persistent/Model/Persistent/Config.php b/app/code/Magento/Persistent/Model/Persistent/Config.php
index e890c87ff90..7744d099f1d 100644
--- a/app/code/Magento/Persistent/Model/Persistent/Config.php
+++ b/app/code/Magento/Persistent/Model/Persistent/Config.php
@@ -42,7 +42,7 @@ class Config
     /** @var \Magento\Config\DomFactory  */
     protected $_domFactory;
 
-    /** @var \Magento\Core\Model\Config\Modules\Reader  */
+    /** @var \Magento\Module\Dir\Reader  */
     protected $_moduleReader;
 
     /** @var \DOMXPath  */
@@ -71,14 +71,14 @@ class Config
 
     /**
      * @param \Magento\Config\DomFactory $domFactory
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      * @param \Magento\View\LayoutInterface $layout
      * @param \Magento\App\State $appState
      * @param \Magento\Persistent\Model\Factory $persistentFactory
      */
     public function __construct(
         \Magento\Config\DomFactory $domFactory,
-        \Magento\Core\Model\Config\Modules\Reader $moduleReader,
+        \Magento\Module\Dir\Reader $moduleReader,
         \Magento\View\LayoutInterface $layout,
         \Magento\App\State $appState,
         \Magento\Persistent\Model\Factory $persistentFactory
diff --git a/app/code/Magento/Persistent/Model/Resource/Session.php b/app/code/Magento/Persistent/Model/Resource/Session.php
index 4cb592015f5..6d00532d684 100644
--- a/app/code/Magento/Persistent/Model/Resource/Session.php
+++ b/app/code/Magento/Persistent/Model/Resource/Session.php
@@ -49,11 +49,11 @@ class Session extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Class constructor
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Persistent\Model\SessionFactory $sessionFactory
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Persistent\Model\SessionFactory $sessionFactory
     ) {
         $this->_sessionFactory = $sessionFactory;
diff --git a/app/code/Magento/Persistent/Model/Session.php b/app/code/Magento/Persistent/Model/Session.php
index 0250a21cf05..18bc72cc3be 100644
--- a/app/code/Magento/Persistent/Model/Session.php
+++ b/app/code/Magento/Persistent/Model/Session.php
@@ -86,6 +86,11 @@ class Session extends \Magento\Core\Model\AbstractModel
      */
     protected $_cookie;
 
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
     /**
      * Construct
      *
@@ -96,6 +101,7 @@ class Session extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Persistent\Helper\Data $persistentData
      * @param \Magento\Core\Model\Cookie $cookie
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Math\Random $mathRandom
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -108,6 +114,7 @@ class Session extends \Magento\Core\Model\AbstractModel
         \Magento\Persistent\Helper\Data $persistentData,
         \Magento\Core\Model\Cookie $cookie,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Math\Random $mathRandom,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -117,6 +124,7 @@ class Session extends \Magento\Core\Model\AbstractModel
         $this->_coreConfig = $coreConfig;
         $this->_cookie = $cookie;
         $this->_storeManager = $storeManager;
+        $this->mathRandom = $mathRandom;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -184,7 +192,7 @@ class Session extends \Magento\Core\Model\AbstractModel
             $this->setWebsiteId($this->_storeManager->getStore()->getWebsiteId());
             // Setting cookie key
             do {
-                $this->setKey($this->_coreData->getRandomString(self::KEY_LENGTH));
+                $this->setKey($this->mathRandom->getRandomString(self::KEY_LENGTH));
             } while (!$this->getResource()->isKeyAllowed($this->getKey()));
         }
 
diff --git a/app/code/Magento/Persistent/etc/di.xml b/app/code/Magento/Persistent/etc/di.xml
index 1328c683ff4..232553da278 100644
--- a/app/code/Magento/Persistent/etc/di.xml
+++ b/app/code/Magento/Persistent/etc/di.xml
@@ -26,10 +26,7 @@
 <config>
     <type name="Magento\Persistent\Helper\Data">
         <param name="persistentSession">
-            <instance type="Magento\Persistent\Helper\SessionProxy" />
-        </param>
-        <param name="config">
-            <instance type="Magento\Core\Model\ConfigProxy" />
+            <instance type="Magento\Persistent\Helper\Session\Proxy" />
         </param>
     </type>
 </config>
diff --git a/app/code/Magento/ProductAlert/Model/Resource/Price.php b/app/code/Magento/ProductAlert/Model/Resource/Price.php
index df1b0e56fd0..354f6dd53e3 100644
--- a/app/code/Magento/ProductAlert/Model/Resource/Price.php
+++ b/app/code/Magento/ProductAlert/Model/Resource/Price.php
@@ -37,11 +37,11 @@ class Price extends \Magento\ProductAlert\Model\Resource\AbstractResource
     protected $_dateFactory;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\DateFactory $dateFactory
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\DateFactory $dateFactory
     ) {
         $this->_dateFactory = $dateFactory;
diff --git a/app/code/Magento/ProductAlert/Model/Resource/Stock.php b/app/code/Magento/ProductAlert/Model/Resource/Stock.php
index 037241f8c85..8a8d3ec6561 100644
--- a/app/code/Magento/ProductAlert/Model/Resource/Stock.php
+++ b/app/code/Magento/ProductAlert/Model/Resource/Stock.php
@@ -37,11 +37,11 @@ class Stock extends \Magento\ProductAlert\Model\Resource\AbstractResource
     protected $_dateFactory;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\DateFactory $dateFactory
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\DateFactory $dateFactory
     ) {
         $this->_dateFactory = $dateFactory;
diff --git a/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Form.php b/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Form.php
index 84c914747dc..68f53c58483 100644
--- a/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Form.php
+++ b/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Form.php
@@ -61,7 +61,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Rating\Model\Rating\OptionFactory $optionFactory
      * @param \Magento\Core\Model\Session\AbstractSession $session
      * @param \Magento\Core\Model\System\Store $systemStore
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -72,7 +72,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Rating\Model\Rating\OptionFactory $optionFactory,
         \Magento\Core\Model\Session\AbstractSession $session,
         \Magento\Core\Model\System\Store $systemStore,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Options.php b/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Options.php
index 93f43f79378..b69d2f2fc3b 100644
--- a/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Options.php
+++ b/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Options.php
@@ -38,7 +38,7 @@ class Options extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * @param \Magento\Rating\Model\Rating\OptionFactory $optionFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -46,7 +46,7 @@ class Options extends \Magento\Backend\Block\Widget\Form\Generic
     public function __construct(
         \Magento\Rating\Model\Rating\OptionFactory $optionFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Rating/Model/Resource/Rating.php b/app/code/Magento/Rating/Model/Resource/Rating.php
index a7af06dbc1b..d11f9b6b845 100644
--- a/app/code/Magento/Rating/Model/Resource/Rating.php
+++ b/app/code/Magento/Rating/Model/Resource/Rating.php
@@ -52,21 +52,21 @@ class Rating extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_ratingData = null;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Rating\Helper\Data $ratingData
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Review\Model\Resource\Review\Summary $reviewSummary
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Rating\Helper\Data $ratingData,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Review\Model\Resource\Review\Summary $reviewSummary
     ) {
diff --git a/app/code/Magento/Rating/Model/Resource/Rating/Collection.php b/app/code/Magento/Rating/Model/Resource/Rating/Collection.php
index 215f1e57437..2c8bbaf4012 100644
--- a/app/code/Magento/Rating/Model/Resource/Rating/Collection.php
+++ b/app/code/Magento/Rating/Model/Resource/Rating/Collection.php
@@ -47,7 +47,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -56,7 +56,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Rating/Model/Resource/Rating/Grid/Collection.php b/app/code/Magento/Rating/Model/Resource/Rating/Grid/Collection.php
index a7bd91c2c58..b720426d35f 100644
--- a/app/code/Magento/Rating/Model/Resource/Rating/Grid/Collection.php
+++ b/app/code/Magento/Rating/Model/Resource/Rating/Grid/Collection.php
@@ -44,7 +44,7 @@ class Collection extends \Magento\Rating\Model\Resource\Rating\Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -54,7 +54,7 @@ class Collection extends \Magento\Rating\Model\Resource\Rating\Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Rating/Model/Resource/Rating/Option.php b/app/code/Magento/Rating/Model/Resource/Rating/Option.php
index b27c4404437..5fe3887860e 100644
--- a/app/code/Magento/Rating/Model/Resource/Rating/Option.php
+++ b/app/code/Magento/Rating/Model/Resource/Rating/Option.php
@@ -91,13 +91,6 @@ class Option extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected $_optionId;
 
-    /**
-     * Core http
-     *
-     * @var \Magento\Core\Helper\Http
-     */
-    protected $_coreHttp = null;
-
     /**
      * @var \Magento\Customer\Model\Session
      */
@@ -109,20 +102,20 @@ class Option extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_ratingOptionVoteF;
 
     /**
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Rating\Model\Rating\Option\VoteFactory $ratingOptionVoteF
+     * @param \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress
      */
     public function __construct(
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Customer\Model\Session $customerSession,
-        \Magento\Rating\Model\Rating\Option\VoteFactory $ratingOptionVoteF
+        \Magento\Rating\Model\Rating\Option\VoteFactory $ratingOptionVoteF,
+        \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress
     ) {
-        $this->_coreHttp = $coreHttp;
         $this->_customerSession = $customerSession;
         $this->_ratingOptionVoteF = $ratingOptionVoteF;
+        $this->_remoteAddress = $remoteAddress;
         parent::__construct($resource);
     }
 
@@ -160,8 +153,8 @@ class Option extends \Magento\Core\Model\Resource\Db\AbstractDb
         );
 
         if (!$option->getDoUpdate()) {
-            $data['remote_ip']       = $this->_coreHttp->getRemoteAddr();
-            $data['remote_ip_long']  = $this->_coreHttp->getRemoteAddr(true);
+            $data['remote_ip']       = $this->_remoteAddress->getRemoteAddress();
+            $data['remote_ip_long']  = $this->_remoteAddress->getRemoteAddress(true);
             $data['customer_id']     = $this->_customerSession->getCustomerId();
             $data['entity_pk_value'] = $option->getEntityPkValue();
             $data['rating_id']       = $option->getRatingId();
diff --git a/app/code/Magento/Rating/Model/Resource/Rating/Option/Vote/Collection.php b/app/code/Magento/Rating/Model/Resource/Rating/Option/Vote/Collection.php
index e04759091c8..705e0687f74 100644
--- a/app/code/Magento/Rating/Model/Resource/Rating/Option/Vote/Collection.php
+++ b/app/code/Magento/Rating/Model/Resource/Rating/Option/Vote/Collection.php
@@ -49,7 +49,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -58,7 +58,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Rating/view/adminhtml/rating/detailed.phtml b/app/code/Magento/Rating/view/adminhtml/rating/detailed.phtml
index 9e40c58c3a1..ed230745bab 100644
--- a/app/code/Magento/Rating/view/adminhtml/rating/detailed.phtml
+++ b/app/code/Magento/Rating/view/adminhtml/rating/detailed.phtml
@@ -47,7 +47,7 @@
     (function($) {
         "use strict";
         $.mage.extend('validation', 'validation',
-            '<?php echo $this->getViewFileUrl('Magento_Adminhtml::validation-rules.js'); ?>');
+            '<?php echo $this->getViewFileUrl('Magento_Rating::rating/validation-rules.js'); ?>');
         $('[data-widget="ratingControl"]').ratingControl();
     })(jQuery);
 </script>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/validation-rules.js b/app/code/Magento/Rating/view/adminhtml/rating/validation-rules.js
similarity index 95%
rename from app/code/Magento/Adminhtml/view/adminhtml/validation-rules.js
rename to app/code/Magento/Rating/view/adminhtml/rating/validation-rules.js
index 91389725ab7..1eef30af2c8 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/validation-rules.js
+++ b/app/code/Magento/Rating/view/adminhtml/rating/validation-rules.js
@@ -1,5 +1,5 @@
 /**
- * Adminhtml client side validation rules
+ * Rating validation rules
  *
  * Magento
  *
@@ -20,7 +20,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Rating
  * @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)
  */
diff --git a/app/code/Magento/Reports/Helper/Data.php b/app/code/Magento/Reports/Helper/Data.php
index 287d5c70cda..4b05f9cbb18 100644
--- a/app/code/Magento/Reports/Helper/Data.php
+++ b/app/code/Magento/Reports/Helper/Data.php
@@ -67,21 +67,21 @@ class Data extends \Magento\Core\Helper\AbstractHelper
             return $intervals;
         }
 
-        $start = new \Zend_Date($from, \Magento\Date::DATE_INTERNAL_FORMAT);
+        $start = new \Zend_Date($from, \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT);
 
         if ($period == self::REPORT_PERIOD_TYPE_DAY) {
             $dateStart = $start;
         }
 
         if ($period == self::REPORT_PERIOD_TYPE_MONTH) {
-            $dateStart = new \Zend_Date(date("Y-m", $start->getTimestamp()), \Magento\Date::DATE_INTERNAL_FORMAT);
+            $dateStart = new \Zend_Date(date("Y-m", $start->getTimestamp()), \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT);
         }
 
         if ($period == self::REPORT_PERIOD_TYPE_YEAR) {
-            $dateStart = new \Zend_Date(date("Y", $start->getTimestamp()), \Magento\Date::DATE_INTERNAL_FORMAT);
+            $dateStart = new \Zend_Date(date("Y", $start->getTimestamp()), \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT);
         }
 
-        $dateEnd = new \Zend_Date($to, \Magento\Date::DATE_INTERNAL_FORMAT);
+        $dateEnd = new \Zend_Date($to, \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT);
 
         while ($dateStart->compare($dateEnd) <= 0) {
             switch ($period) {
diff --git a/app/code/Magento/Reports/Model/Config.php b/app/code/Magento/Reports/Model/Config.php
index 93fb148be9e..0b1147bf0c9 100644
--- a/app/code/Magento/Reports/Model/Config.php
+++ b/app/code/Magento/Reports/Model/Config.php
@@ -32,7 +32,7 @@ namespace Magento\Reports\Model;
 class Config extends \Magento\Object
 {
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_moduleReader;
 
@@ -42,12 +42,12 @@ class Config extends \Magento\Object
     protected $_storeManager;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Config\Modules\Reader $moduleReader,
+        \Magento\Module\Dir\Reader $moduleReader,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         array $data = array()
     ) {
diff --git a/app/code/Magento/Reports/Model/DateFactory.php b/app/code/Magento/Reports/Model/DateFactory.php
new file mode 100644
index 00000000000..3cb4c14b1dd
--- /dev/null
+++ b/app/code/Magento/Reports/Model/DateFactory.php
@@ -0,0 +1,41 @@
+<?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\Reports\Model;
+
+class DateFactory
+{
+    /**
+     * @param  string|integer|\Zend_Date|array  $date    OPTIONAL Date value or value of date part to set
+     *                                                 ,depending on $part. If null the actual time is set
+     * @param  string                          $part    OPTIONAL Defines the input format of $date
+     * @param  string|\Zend_Locale              $locale  OPTIONAL Locale for parsing input
+     * @return \Zend_Date
+     */
+    public function create($date = null, $part = null, $locale = null)
+    {
+        return new \Zend_Date($date, $part, $locale);
+    }
+
+} 
\ No newline at end of file
diff --git a/app/code/Magento/Reports/Model/Event/Observer.php b/app/code/Magento/Reports/Model/Event/Observer.php
index f9c1042d1d4..6e266a92cf8 100644
--- a/app/code/Magento/Reports/Model/Event/Observer.php
+++ b/app/code/Magento/Reports/Model/Event/Observer.php
@@ -98,8 +98,7 @@ class Observer
             if ($this->_customerSession->isLoggedIn()) {
                 $customer = $this->_customerSession->getCustomer();
                 $subjectId = $customer->getId();
-            }
-            else {
+            } else {
                 $subjectId = $this->_logVisitor->getId();
                 $subtype = 1;
             }
diff --git a/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php b/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php
index 291b74f003d..b9812bf7203 100644
--- a/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php
+++ b/app/code/Magento/Reports/Model/Product/Index/AbstractIndex.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Reports\Model\Product\Index;
 
 /**
  * Reports Product Index Abstract Model
- *
- * @category   Magento
- * @package    Magento_Reports
- * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Reports\Model\Product\Index;
-
 abstract class AbstractIndex extends \Magento\Core\Model\AbstractModel
 {
     /**
@@ -68,6 +63,11 @@ abstract class AbstractIndex extends \Magento\Core\Model\AbstractModel
      */
     protected $_productVisibility;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -76,6 +76,7 @@ abstract class AbstractIndex extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Core\Model\Session\Generic $reportSession
      * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -88,13 +89,14 @@ abstract class AbstractIndex extends \Magento\Core\Model\AbstractModel
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Core\Model\Session\Generic $reportSession,
         \Magento\Catalog\Model\Product\Visibility $productVisibility,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
         $this->_storeManager = $storeManager;
-
+        $this->dateTime = $dateTime;
         $this->_logVisitor = $logVisitor;
         $this->_customerSession = $customerSession;
         $this->_reportSession = $reportSession;
@@ -120,7 +122,7 @@ abstract class AbstractIndex extends \Magento\Core\Model\AbstractModel
             $this->setStoreId($this->getStoreId());
         }
         if (!$this->hasAddedAt()) {
-            $this->setAddedAt(now());
+            $this->setAddedAt($this->dateTime->now());
         }
 
         return $this;
diff --git a/app/code/Magento/Reports/Model/Product/Index/Compared.php b/app/code/Magento/Reports/Model/Product/Index/Compared.php
index 3a6fd4eae11..05d91f033e6 100644
--- a/app/code/Magento/Reports/Model/Product/Index/Compared.php
+++ b/app/code/Magento/Reports/Model/Product/Index/Compared.php
@@ -69,6 +69,7 @@ class Compared extends \Magento\Reports\Model\Product\Index\AbstractIndex
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Core\Model\Session\Generic $reportSession
      * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -82,13 +83,14 @@ class Compared extends \Magento\Reports\Model\Product\Index\AbstractIndex
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Core\Model\Session\Generic $reportSession,
         \Magento\Catalog\Model\Product\Visibility $productVisibility,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         parent::__construct(
             $context, $registry, $storeManager, $logVisitor, $customerSession,
-            $reportSession, $productVisibility, $resource, $resourceCollection, $data
+            $reportSession, $productVisibility, $dateTime, $resource, $resourceCollection, $data
         );
         $this->_productCompare = $productCompare;
     }
diff --git a/app/code/Magento/Reports/Model/Resource/Customer/Collection.php b/app/code/Magento/Reports/Model/Resource/Customer/Collection.php
index a71dc4f87f6..5161b07ebe0 100644
--- a/app/code/Magento/Reports/Model/Resource/Customer/Collection.php
+++ b/app/code/Magento/Reports/Model/Resource/Customer/Collection.php
@@ -89,11 +89,11 @@ class Collection extends \Magento\Customer\Model\Resource\Customer\Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Eav\Model\Resource\Helper $resourceHelper
      * @param \Magento\Validator\UniversalFactory $universalFactory
@@ -105,11 +105,11 @@ class Collection extends \Magento\Customer\Model\Resource\Customer\Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Eav\Model\Resource\Helper $resourceHelper,
         \Magento\Validator\UniversalFactory $universalFactory,
diff --git a/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php b/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php
index eac2a83521f..7ab0246581e 100644
--- a/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php
+++ b/app/code/Magento/Reports/Model/Resource/Entity/Summary/Collection/AbstractCollection.php
@@ -43,6 +43,21 @@ class AbstractCollection extends \Magento\Data\Collection
      */
     protected $_entityCollection;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Core\Model\EntityFactory $entityFactory
+     */
+    public function __construct(\Magento\Stdlib\DateTime $dateTime, \Magento\Core\Model\EntityFactory $entityFactory)
+    {
+        $this->dateTime = $dateTime;
+        parent::__construct($entityFactory);
+    }
+
     /**
      * Filters the summaries by some period
      *
@@ -55,23 +70,23 @@ class AbstractCollection extends \Magento\Data\Collection
     {
         switch ($periodType) {
             case "24h":
-                $customStart = \Magento\Date::toTimestamp(true) - 86400;
-                $customEnd   = \Magento\Date::toTimestamp(true);
+                $customStart = $this->dateTime->toTimestamp(true) - 86400;
+                $customEnd   = $this->dateTime->toTimestamp(true);
                 break;
 
             case "7d":
-                $customStart = \Magento\Date::toTimestamp(true) - 604800;
-                $customEnd   = \Magento\Date::toTimestamp(true);
+                $customStart = $this->dateTime->toTimestamp(true) - 604800;
+                $customEnd   = $this->dateTime->toTimestamp(true);
                 break;
 
             case "30d":
-                $customStart = \Magento\Date::toTimestamp(true) - 2592000;
-                $customEnd   = \Magento\Date::toTimestamp(true);
+                $customStart = $this->dateTime->toTimestamp(true) - 2592000;
+                $customEnd   = $this->dateTime->toTimestamp(true);
                 break;
 
             case "1y":
-                $customStart = \Magento\Date::toTimestamp(true) - 31536000;
-                $customEnd   = \Magento\Date::toTimestamp(true);
+                $customStart = $this->dateTime->toTimestamp(true) - 31536000;
+                $customEnd   = $this->dateTime->toTimestamp(true);
                 break;
 
             default:
diff --git a/app/code/Magento/Reports/Model/Resource/Event.php b/app/code/Magento/Reports/Model/Resource/Event.php
index 97b638ace0a..ae2a4a85302 100644
--- a/app/code/Magento/Reports/Model/Resource/Event.php
+++ b/app/code/Magento/Reports/Model/Resource/Event.php
@@ -49,12 +49,12 @@ class Event extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_storeManager;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager
     ) {
diff --git a/app/code/Magento/Reports/Model/Resource/Helper.php b/app/code/Magento/Reports/Model/Resource/Helper.php
index 732f0f24aca..1a9eac20399 100644
--- a/app/code/Magento/Reports/Model/Resource/Helper.php
+++ b/app/code/Magento/Reports/Model/Resource/Helper.php
@@ -38,11 +38,11 @@ class Helper extends \Magento\Core\Model\Resource\Helper
     implements \Magento\Reports\Model\Resource\HelperInterface
 {
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param string $modulePrefix
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         $modulePrefix = 'reports'
     ) {
         parent::__construct($resource, $modulePrefix);
diff --git a/app/code/Magento/Reports/Model/Resource/Order/Collection.php b/app/code/Magento/Reports/Model/Resource/Order/Collection.php
index 8ee0676fd40..3ac93095fa5 100644
--- a/app/code/Magento/Reports/Model/Resource/Order/Collection.php
+++ b/app/code/Magento/Reports/Model/Resource/Order/Collection.php
@@ -79,7 +79,7 @@ class Collection extends \Magento\Sales\Model\Resource\Order\Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\Resource\Helper $coreResourceHelper
@@ -92,7 +92,7 @@ class Collection extends \Magento\Sales\Model\Resource\Order\Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\Resource\Helper $coreResourceHelper,
@@ -870,8 +870,8 @@ class Collection extends \Magento\Sales\Model\Resource\Order\Collection
         }
 
         $this->addFieldToFilter($fieldToFilter, array(
-            'from'  => $from->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT),
-            'to'    => $to->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT)
+            'from'  => $from->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT),
+            'to'    => $to->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)
         ));
 
         return $this;
diff --git a/app/code/Magento/Reports/Model/Resource/Product/Collection.php b/app/code/Magento/Reports/Model/Resource/Product/Collection.php
index 1c87e5a4e12..8872079ed39 100644
--- a/app/code/Magento/Reports/Model/Resource/Product/Collection.php
+++ b/app/code/Magento/Reports/Model/Resource/Product/Collection.php
@@ -80,11 +80,11 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      * Construct
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -96,6 +96,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Catalog\Model\Resource\Product $product
      * @param \Magento\Reports\Model\Event\TypeFactory $eventTypeFactory
      * @param \Magento\Catalog\Model\Product\Type $productType
@@ -104,11 +105,11 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -120,6 +121,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Catalog\Model\Resource\Product $product,
         \Magento\Reports\Model\Event\TypeFactory $eventTypeFactory,
         \Magento\Catalog\Model\Product\Type $productType
@@ -129,7 +131,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
         $this->setProductEntityTypeId($product->getTypeId());
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource,
             $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig,
-            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper
+            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime
         );
         $this->_eventTypeFactory = $eventTypeFactory;
         $this->_productType = $productType;
diff --git a/app/code/Magento/Reports/Model/Resource/Product/Index/AbstractIndex.php b/app/code/Magento/Reports/Model/Resource/Product/Index/AbstractIndex.php
index 46b73e0de5c..1b3c5051256 100644
--- a/app/code/Magento/Reports/Model/Resource/Product/Index/AbstractIndex.php
+++ b/app/code/Magento/Reports/Model/Resource/Product/Index/AbstractIndex.php
@@ -24,29 +24,36 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Reports\Model\Resource\Product\Index;
 
 /**
  * Reports Product Index Abstract Resource Model
- *
- * @category    Magento
- * @package     Magento_Reports
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Reports\Model\Resource\Product\Index;
-
 abstract class AbstractIndex extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @var \Magento\Reports\Model\Resource\HelperFactory
      */
     protected $_helperFactory;
 
+    /**
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Reports\Model\Resource\HelperFactory $helperFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
+     */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
-        \Magento\Reports\Model\Resource\HelperFactory $helperFactory
+        \Magento\App\Resource $resource,
+        \Magento\Reports\Model\Resource\HelperFactory $helperFactory,
+        \Magento\Stdlib\DateTime $dateTime
     ) {
         parent::__construct($resource);
         $this->_helperFactory = $helperFactory;
+        $this->dateTime = $dateTime;
     }
 
     /**
@@ -91,14 +98,14 @@ abstract class AbstractIndex extends \Magento\Core\Model\Resource\Db\AbstractDb
                  $data  = array(
                      'visitor_id'    => $object->getVisitorId(),
                      'store_id'      => $object->getStoreId(),
-                     'added_at'      => \Magento\Date::now(),
+                     'added_at'      => $this->dateTime->now(),
                  );
             } else {
                 $where = array('index_id = ?' => $row['index_id']);
                 $data  = array(
                     'customer_id'   => $object->getCustomerId(),
                     'store_id'      => $object->getStoreId(),
-                    'added_at'      => \Magento\Date::now()
+                    'added_at'      => $this->dateTime->now()
                 );
             }
 
@@ -199,7 +206,7 @@ abstract class AbstractIndex extends \Magento\Core\Model\Resource\Db\AbstractDb
      * Add information about product ids to visitor/customer
      *
      *
-     * @param \Magento\Reports\Model\Product\Index\AbstractIndex $object
+     * @param \Magento\Object|\Magento\Reports\Model\Product\Index\AbstractIndex $object
      * @param array $productIds
      * @return \Magento\Reports\Model\Resource\Product\Index\AbstractIndex
      */
@@ -210,13 +217,13 @@ abstract class AbstractIndex extends \Magento\Core\Model\Resource\Db\AbstractDb
             'customer_id'   => $object->getCustomerId(),
             'store_id'      => $object->getStoreId(),
         );
-        $addedAt    = \Magento\Date::toTimestamp(true);
+        $addedAt    = $this->dateTime->toTimestamp(true);
         $data = array();
         foreach ($productIds as $productId) {
             $productId = (int) $productId;
             if ($productId) {
                 $row['product_id'] = $productId;
-                $row['added_at']   = \Magento\Date::formatDate($addedAt);
+                $row['added_at']   = $this->dateTime->formatDate($addedAt);
                 $data[] = $row;
             }
             $addedAt -= ($addedAt > 0) ? 1 : 0;
diff --git a/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php b/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php
index 45eca209d6e..8bbedf56bf5 100644
--- a/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php
+++ b/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php
@@ -53,11 +53,11 @@ abstract class AbstractCollection
      * Construct
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -69,17 +69,18 @@ abstract class AbstractCollection
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Log\Model\Visitor $logVisitor
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -91,11 +92,12 @@ abstract class AbstractCollection
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Log\Model\Visitor $logVisitor
     ) {
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource,
             $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig,
-            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper
+            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime
         );
         $this->_logVisitor = $logVisitor;
     }
diff --git a/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php b/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php
index 257bddb3104..7adc9928b44 100644
--- a/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php
+++ b/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php
@@ -66,11 +66,11 @@ class Collection extends \Magento\Reports\Model\Resource\Product\Collection
      * Construct
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -82,6 +82,7 @@ class Collection extends \Magento\Reports\Model\Resource\Product\Collection
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Catalog\Model\Resource\Product $product
      * @param \Magento\Reports\Model\Event\TypeFactory $eventTypeFactory
      * @param \Magento\Catalog\Model\Product\Type $productType
@@ -92,11 +93,11 @@ class Collection extends \Magento\Reports\Model\Resource\Product\Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -108,6 +109,7 @@ class Collection extends \Magento\Reports\Model\Resource\Product\Collection
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\Resource\Helper $resourceHelper,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Catalog\Model\Resource\Product $product,
         \Magento\Reports\Model\Event\TypeFactory $eventTypeFactory,
         \Magento\Catalog\Model\Product\Type $productType,
@@ -116,8 +118,8 @@ class Collection extends \Magento\Reports\Model\Resource\Product\Collection
     ) {
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource,
             $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig,
-            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $product, $eventTypeFactory,
-            $productType
+            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime, $product,
+            $eventTypeFactory, $productType
         );
         $this->_inventoryData = $catalogInventoryData;
         $this->_itemResource = $itemResource;
diff --git a/app/code/Magento/Reports/Model/Resource/Quote/Collection.php b/app/code/Magento/Reports/Model/Resource/Quote/Collection.php
index bae1bc57c35..81c49ad5550 100644
--- a/app/code/Magento/Reports/Model/Resource/Quote/Collection.php
+++ b/app/code/Magento/Reports/Model/Resource/Quote/Collection.php
@@ -67,7 +67,7 @@ class Collection extends \Magento\Sales\Model\Resource\Quote\Collection
 
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Catalog\Model\Resource\Product\Collection $productResource,
diff --git a/app/code/Magento/Reports/Model/Resource/Refresh/Collection.php b/app/code/Magento/Reports/Model/Resource/Refresh/Collection.php
index c2c53780aec..bf8dddaa31f 100644
--- a/app/code/Magento/Reports/Model/Resource/Refresh/Collection.php
+++ b/app/code/Magento/Reports/Model/Resource/Refresh/Collection.php
@@ -76,7 +76,7 @@ class Collection extends \Magento\Data\Collection
             ->loadSelf();
         return ($flag->hasData())
             ? $this->_locale
-                ->storeDate(0, new \Zend_Date($flag->getLastUpdate(), \Magento\Date::DATETIME_INTERNAL_FORMAT), true)
+                ->storeDate(0, new \Zend_Date($flag->getLastUpdate(), \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT), true)
             : '';
     }
 
diff --git a/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php b/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php
index ccd24297d5a..d23826f27d0 100644
--- a/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php
+++ b/app/code/Magento/Reports/Model/Resource/Report/AbstractReport.php
@@ -44,7 +44,7 @@ abstract class AbstractReport extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_flag     = null;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -59,21 +59,24 @@ abstract class AbstractReport extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_reportsFlagFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Logger $logger
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Reports\Model\FlagFactory $reportsFlagFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\Logger $logger,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\Reports\Model\FlagFactory $reportsFlagFactory
+        \Magento\Reports\Model\FlagFactory $reportsFlagFactory,
+        \Magento\Stdlib\DateTime $dateTime
     ) {
         parent::__construct($resource);
         $this->_logger = $logger;
         $this->_locale = $locale;
         $this->_reportsFlagFactory = $reportsFlagFactory;
+        $this->dateTime = $dateTime;
     }
 
     /**
@@ -107,9 +110,9 @@ abstract class AbstractReport extends \Magento\Core\Model\Resource\Db\AbstractDb
             $this->_getFlag()->setFlagData($value);
         }
 
-        $time = \Magento\Date::toTimestamp(true);
+        $time = $this->dateTime->toTimestamp(true);
         // touch last_update
-        $this->_getFlag()->setLastUpdate($this->formatDate($time));
+        $this->_getFlag()->setLastUpdate($this->dateTime->formatDate($time));
 
         $this->_getFlag()->save();
 
@@ -359,11 +362,11 @@ abstract class AbstractReport extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected function _checkDates(&$dateFrom, &$dateTo)
     {
         if ($dateFrom !== null) {
-            $dateFrom = $this->formatDate($dateFrom);
+            $dateFrom = $this->dateTime->formatDate($dateFrom);
         }
 
         if ($dateTo !== null) {
-            $dateTo = $this->formatDate($dateTo);
+            $dateTo = $this->dateTime->formatDate($dateTo);
         }
 
         return $this;
@@ -428,12 +431,12 @@ abstract class AbstractReport extends \Magento\Core\Model\Resource\Db\AbstractDb
         $tzTransitions = array();
         try {
             if (!empty($from)) {
-                $from = new \Zend_Date($from, \Magento\Date::DATETIME_INTERNAL_FORMAT);
+                $from = new \Zend_Date($from, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
                 $from = $from->getTimestamp();
             }
 
-            $to = new \Zend_Date($to, \Magento\Date::DATETIME_INTERNAL_FORMAT);
-            $nextPeriod = $this->_getWriteAdapter()->formatDate($to->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT));
+            $to = new \Zend_Date($to, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
+            $nextPeriod = $this->_getWriteAdapter()->formatDate($to->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT));
             $to = $to->getTimestamp();
 
             $dtz = new \DateTimeZone($timezone);
@@ -448,7 +451,7 @@ abstract class AbstractReport extends \Magento\Core\Model\Resource\Db\AbstractDb
 
                 $dateTimeObject->set($tr['time']);
                 $tr['time'] = $this->_getWriteAdapter()
-                    ->formatDate($dateTimeObject->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT));
+                    ->formatDate($dateTimeObject->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT));
                 $tzTransitions[$tr['offset']][] = array('from' => $tr['time'], 'to' => $nextPeriod);
 
                 if (!empty($from) && $tr['ts'] < $from) {
diff --git a/app/code/Magento/Reports/Model/Resource/Report/Collection.php b/app/code/Magento/Reports/Model/Resource/Report/Collection.php
index dd98e09775c..dd47253cc36 100644
--- a/app/code/Magento/Reports/Model/Resource/Report/Collection.php
+++ b/app/code/Magento/Reports/Model/Resource/Report/Collection.php
@@ -93,7 +93,7 @@ class Collection extends \Magento\Data\Collection
     protected $_reportCollection = null;
 
     /**
-     * @var  \Zend_DateFactory
+     * @var  \Magento\Reports\Model\DateFactory
      */
     protected $_dateFactory;
 
@@ -109,13 +109,13 @@ class Collection extends \Magento\Data\Collection
 
     /**
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Zend_DateFactory $dateFactory
-     * @param \Magento\Reports\Model\Resource\Report\Collection\Factory $collectionFactory
+     * @param \Magento\Reports\Model\DateFactory $dateFactory
+     * @param Collection\Factory $collectionFactory
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      */
     public function __construct(
         \Magento\Core\Model\LocaleInterface $locale,
-        \Zend_DateFactory $dateFactory,
+        \Magento\Reports\Model\DateFactory $dateFactory,
         \Magento\Reports\Model\Resource\Report\Collection\Factory $collectionFactory,
         \Magento\Core\Model\EntityFactory $entityFactory
     ) {
@@ -164,8 +164,8 @@ class Collection extends \Magento\Data\Collection
             if (!$this->_from && !$this->_to) {
                 return $this->_intervals;
             }
-            $dateStart  =  $this->_dateFactory->create(array('date' => $this->_from));
-            $dateEnd    =  $this->_dateFactory->create(array('date' => $this->_to));
+            $dateStart  =  $this->_dateFactory->create($this->_from);
+            $dateEnd    =  $this->_dateFactory->create($this->_to);
 
             $interval = array();
             $firstInterval = true;
@@ -392,8 +392,8 @@ class Collection extends \Magento\Data\Collection
     public function timeShift($datetime)
     {
         return $this->_locale
-            ->utcDate(null, $datetime, true, \Magento\Date::DATETIME_INTERNAL_FORMAT)
-            ->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT);
+            ->utcDate(null, $datetime, true, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)
+            ->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
     }
 
     /**
diff --git a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php
index ce8f95c901f..057332551ed 100644
--- a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php
+++ b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed.php
@@ -62,22 +62,24 @@ class Viewed extends \Magento\Sales\Model\Resource\Report\AbstractReport
     protected $_helperFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Logger $logger
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Reports\Model\FlagFactory $reportsFlagFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Catalog\Model\Resource\Product $productResource
      * @param \Magento\Reports\Model\Resource\HelperFactory $helperFactory
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\Logger $logger,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Reports\Model\FlagFactory $reportsFlagFactory,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Catalog\Model\Resource\Product $productResource,
         \Magento\Reports\Model\Resource\HelperFactory $helperFactory
     ) {
-        parent::__construct($logger, $resource, $locale, $reportsFlagFactory);
+        parent::__construct($logger, $resource, $locale, $reportsFlagFactory, $dateTime);
         $this->_productResource = $productResource;
         $this->_helperFactory = $helperFactory;
     }
diff --git a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php
index ebdd74a71cc..59a053cf2bf 100644
--- a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php
+++ b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php
@@ -49,14 +49,14 @@ class Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
@@ -226,7 +226,7 @@ class Collection
             $selectUnions = array();
 
             // apply date boundaries (before calling $this->_applyDateRangeFilter())
-            $dtFormat   = \Magento\Date::DATE_INTERNAL_FORMAT;
+            $dtFormat   = \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT;
             $periodFrom = (!is_null($this->_from) ? new \Zend_Date($this->_from, $dtFormat) : null);
             $periodTo   = (!is_null($this->_to)   ? new \Zend_Date($this->_to,   $dtFormat) : null);
             if ('year' == $this->_period) {
diff --git a/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php b/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php
index 77380a7f39f..4a99ca15354 100644
--- a/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php
+++ b/app/code/Magento/Reports/Model/Resource/Review/Customer/Collection.php
@@ -43,7 +43,7 @@ class Collection extends \Magento\Review\Model\Resource\Review\Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Review\Helper\Data $reviewData
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
@@ -54,7 +54,7 @@ class Collection extends \Magento\Review\Model\Resource\Review\Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Review\Helper\Data $reviewData,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
diff --git a/app/code/Magento/Reports/Model/Resource/Wishlist/Collection.php b/app/code/Magento/Reports/Model/Resource/Wishlist/Collection.php
index 24ed7cc5a23..69f27ede6ee 100644
--- a/app/code/Magento/Reports/Model/Resource/Wishlist/Collection.php
+++ b/app/code/Magento/Reports/Model/Resource/Wishlist/Collection.php
@@ -50,7 +50,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerResFactory
@@ -58,7 +58,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerResFactory,
diff --git a/app/code/Magento/Reports/etc/adminhtml/di.xml b/app/code/Magento/Reports/etc/adminhtml/di.xml
index 353c9c47da6..78baa2be87a 100644
--- a/app/code/Magento/Reports/etc/adminhtml/di.xml
+++ b/app/code/Magento/Reports/etc/adminhtml/di.xml
@@ -24,20 +24,9 @@
  */
 -->
 <config>
-    <virtualType name="Magento\Reports\Model\Session" type="Magento\Core\Model\Session\Generic">
-        <param name="sessionNamespace">
-            <value>reports</value>
-        </param>
+    <virtualType name="Magento\Reports\Model\Session">
         <param name="sessionName">
             <value>adminhtml</value>
         </param>
     </virtualType>
-    <type name="Magento\Core\Model\Session\Generic">
-        <param name="sessionNamespace">
-            <value>reports</value>
-        </param>
-        <param name="sessionName">
-            <value>adminhtml</value>
-        </param>
-    </type>
 </config>
diff --git a/app/code/Magento/Reports/etc/di.xml b/app/code/Magento/Reports/etc/di.xml
index 2b2880ac3f0..e94a86e861a 100644
--- a/app/code/Magento/Reports/etc/di.xml
+++ b/app/code/Magento/Reports/etc/di.xml
@@ -27,11 +27,21 @@
     <type name="Magento\Log\Model\Resource\Log">
         <plugin name="reportLog" type="Magento\Reports\Model\Plugin\Log" />
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <reports_setup>Magento\Reports\Model\Resource\Setup</reports_setup>
             </value>
         </param>
     </type>
+    <virtualType name="Magento\Reports\Model\Session" type="Magento\Core\Model\Session\Generic">
+        <param name="sessionNamespace">
+            <value>reports</value>
+        </param>
+    </virtualType>
+    <type name="Magento\Reports\Model\Product\Index\AbstractIndex">
+        <param name="reportSession">
+            <instance type="Magento\Reports\Model\Session" />
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Reports/etc/frontend/di.xml b/app/code/Magento/Reports/etc/frontend/di.xml
index 7481807f4b6..5ddf4912602 100644
--- a/app/code/Magento/Reports/etc/frontend/di.xml
+++ b/app/code/Magento/Reports/etc/frontend/di.xml
@@ -24,20 +24,9 @@
  */
 -->
 <config>
-    <virtualType name="Magento\Reports\Model\Session" type="Magento\Core\Model\Session\Generic">
-        <param name="sessionNamespace">
-            <value>reports</value>
-        </param>
+    <virtualType name="Magento\Reports\Model\Session">
         <param name="sessionName">
             <value>frontend</value>
         </param>
     </virtualType>
-    <type name="Magento\Core\Model\Session\Generic">
-        <param name="sessionNamespace">
-            <value>reports</value>
-        </param>
-        <param name="sessionName">
-            <value>frontend</value>
-        </param>
-    </type>
 </config>
diff --git a/app/code/Magento/Reports/view/adminhtml/layout/adminhtml_report_review_customer_grid.xml b/app/code/Magento/Reports/view/adminhtml/layout/adminhtml_report_review_customer_grid.xml
index c0e434dfd7b..5214043360a 100644
--- a/app/code/Magento/Reports/view/adminhtml/layout/adminhtml_report_review_customer_grid.xml
+++ b/app/code/Magento/Reports/view/adminhtml/layout/adminhtml_report_review_customer_grid.xml
@@ -51,7 +51,7 @@
                     <argument name="filter_visibility" xsi:type="string">0</argument>
                     <argument name="id" xsi:type="string">customers_grid</argument>
                     <argument name="rowUrl" xsi:type="array">
-                        <item name="path" xsi:type="string">*/catalog_product_review</item>
+                        <item name="path" xsi:type="string">catalog/product_review</item>
                         <item name="extraParamsTemplate" xsi:type="array">
                             <item name="customerid" xsi:type="string">getCustomerId</item>
                         </item>
diff --git a/app/code/Magento/Reports/view/adminhtml/layout/adminhtml_report_review_product_grid.xml b/app/code/Magento/Reports/view/adminhtml/layout/adminhtml_report_review_product_grid.xml
index d48fdf00bb5..74f9de7b8b8 100644
--- a/app/code/Magento/Reports/view/adminhtml/layout/adminhtml_report_review_product_grid.xml
+++ b/app/code/Magento/Reports/view/adminhtml/layout/adminhtml_report_review_product_grid.xml
@@ -51,7 +51,7 @@
                     <argument name="filter_visibility" xsi:type="string">0</argument>
                     <argument name="id" xsi:type="string">gridProducts</argument>
                     <argument name="rowUrl" xsi:type="array">
-                        <item name="path" xsi:type="string">*/catalog_product_review</item>
+                        <item name="path" xsi:type="string">catalog/product_review</item>
                         <item name="extraParamsTemplate" xsi:type="array">
                             <item name="productId" xsi:type="string">getrId</item>
                         </item>
diff --git a/app/code/Magento/Review/Block/Customer/Recent.php b/app/code/Magento/Review/Block/Customer/Recent.php
index 66846821528..ffb789472d3 100644
--- a/app/code/Magento/Review/Block/Customer/Recent.php
+++ b/app/code/Magento/Review/Block/Customer/Recent.php
@@ -24,18 +24,16 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Review\Block\Customer;
+
 /**
  * Recent Customer Reviews Block
- *
- * @category   Magento
- * @package    Magento_Review
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-
-namespace Magento\Review\Block\Customer;
-
 class Recent extends \Magento\Core\Block\Template
 {
+    /**
+     * @var string
+     */
     protected $_template = 'customer/list.phtml';
 
     /**
@@ -55,12 +53,20 @@ class Recent extends \Magento\Core\Block\Template
      */
     protected $_storeManager;
 
+    /**
+     * Filter manager
+     *
+     * @var \Magento\Filter\FilterManager
+     */
+    protected $filter;
+
     /**
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Block\Template\Context $context
      * @param \Magento\Review\Model\Resource\Review\Product\CollectionFactory $collectionFactory
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Filter\FilterManager $filter
      * @param array $data
      */
     public function __construct(
@@ -69,14 +75,36 @@ class Recent extends \Magento\Core\Block\Template
         \Magento\Review\Model\Resource\Review\Product\CollectionFactory $collectionFactory,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Filter\FilterManager $filter,
         array $data = array()
     ) {
         $this->_collection = $collectionFactory->create();
         $this->_customerSession = $customerSession;
         $this->_storeManager = $storeManager;
+        $this->filter = $filter;
         parent::__construct($coreData, $context, $data);
     }
 
+    /**
+     * Truncate string
+     *
+     * @param string $value
+     * @param int $length
+     * @param string $etc
+     * @param string &$remainder
+     * @param bool $breakWords
+     * @return string
+     */
+    public function truncateString($value, $length = 80, $etc = '...', &$remainder = '', $breakWords = true)
+    {
+        return $this->filter->truncate($value, array(
+            'length' => $length,
+            'etc' => $etc,
+            'remainder' => $remainder,
+            'breakWords' => $breakWords
+        ));
+    }
+
     protected function _initCollection()
     {
         $this->_collection
diff --git a/app/code/Magento/Review/Block/Product/View.php b/app/code/Magento/Review/Block/Product/View.php
index a556a4b6e74..129d2c25027 100644
--- a/app/code/Magento/Review/Block/Product/View.php
+++ b/app/code/Magento/Review/Block/Product/View.php
@@ -46,15 +46,13 @@ class View extends \Magento\Catalog\Block\Product\View
     protected $_reviewsColFactory;
 
     /**
-     * Construct
-     *
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Config $catalogConfig
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Tax\Model\Calculation $taxCalculation
      * @param \Magento\Core\Model\Registry $coreRegistry
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param \Magento\Core\Helper\Data $coreData
@@ -71,7 +69,7 @@ class View extends \Magento\Catalog\Block\Product\View
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Tax\Model\Calculation $taxCalculation,
         \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Catalog\Helper\Data $catalogData,
         \Magento\Core\Helper\Data $coreData,
@@ -81,7 +79,7 @@ class View extends \Magento\Catalog\Block\Product\View
     ) {
         $this->_reviewsColFactory = $collectionFactory;
         parent::__construct($storeManager, $catalogConfig, $productFactory, $locale, $taxCalculation, $coreRegistry,
-            $coreString, $taxData, $catalogData, $coreData, $context, $data);
+            $string, $taxData, $catalogData, $coreData, $context, $data);
     }
 
     /**
diff --git a/app/code/Magento/Review/Controller/Product.php b/app/code/Magento/Review/Controller/Product.php
index 31ab87e6b2b..e4dabd672c6 100644
--- a/app/code/Magento/Review/Controller/Product.php
+++ b/app/code/Magento/Review/Controller/Product.php
@@ -75,7 +75,7 @@ class Product extends \Magento\Core\Controller\Front\Action
     protected $_categoryFactory;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -111,7 +111,7 @@ class Product extends \Magento\Core\Controller\Front\Action
      * @param \Magento\UrlInterface $urlModel
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Review\Model\ReviewFactory $reviewFactory
      * @param \Magento\Rating\Model\RatingFactory $ratingFactory
@@ -126,7 +126,7 @@ class Product extends \Magento\Core\Controller\Front\Action
         \Magento\UrlInterface $urlModel,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Review\Model\ReviewFactory $reviewFactory,
         \Magento\Rating\Model\RatingFactory $ratingFactory,
diff --git a/app/code/Magento/Review/Helper/Data.php b/app/code/Magento/Review/Helper/Data.php
index 32f782b1830..4133b1a655d 100644
--- a/app/code/Magento/Review/Helper/Data.php
+++ b/app/code/Magento/Review/Helper/Data.php
@@ -24,23 +24,21 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Review\Helper;
+
 /**
  * Default review helper
- *
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Review\Helper;
-
 class Data extends \Magento\Core\Helper\AbstractHelper
 {
     const XML_REVIEW_GUETS_ALLOW = 'catalog/review/allow_guest';
 
     /**
-     * Core string
+     * Filter manager
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Filter\FilterManager
      */
-    protected $_coreString = null;
+    protected $filter;
 
     /**
      * Core store config
@@ -50,23 +48,35 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     protected $_coreStoreConfig;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
+    /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
+     * @param \Magento\Escaper $escaper
+     * @param \Magento\Filter\FilterManager $filter
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
         \Magento\Core\Helper\Context $context,
-        \Magento\Core\Model\Store\Config $coreStoreConfig
+        \Magento\Core\Model\Store\Config $coreStoreConfig,
+        \Magento\Escaper $escaper,
+        \Magento\Filter\FilterManager $filter
     ) {
-        $this->_coreString = $coreString;
         $this->_coreStoreConfig = $coreStoreConfig;
+        $this->_escaper = $escaper;
+        $this->filter = $filter;
         parent::__construct($context);
     }
 
+    /**
+     * @param string $origDetail
+     * @return string
+     */
     public function getDetail($origDetail)
     {
-        return nl2br($this->_coreString->truncate($origDetail, 50));
+        return nl2br($this->filter->truncate($origDetail, array('length' => 50)));
     }
 
     /**
@@ -76,7 +86,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function getDetailHtml($origDetail)
     {
-        return nl2br($this->_coreString->truncate($this->escapeHtml($origDetail), 50));
+        return nl2br($this->filter->truncate($this->_escaper->escapeHtml($origDetail), array('length' => 50)));
     }
 
     /**
@@ -109,8 +119,8 @@ class Data extends \Magento\Core\Helper\AbstractHelper
     public function getReviewStatusesOptionArray()
     {
         $result = array();
-        foreach ($this->getReviewStatuses() as $k => $v) {
-            $result[] = array('value' => $k, 'label' => $v);
+        foreach ($this->getReviewStatuses() as $value => $label) {
+            $result[] = array('value' => $value, 'label' => $label);
         }
 
         return $result;
diff --git a/app/code/Magento/Review/Model/Resource/Review.php b/app/code/Magento/Review/Model/Resource/Review.php
index 306b3ffde74..967267de2f6 100644
--- a/app/code/Magento/Review/Model/Resource/Review.php
+++ b/app/code/Magento/Review/Model/Resource/Review.php
@@ -106,14 +106,14 @@ class Review extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_ratingOptions;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Date $date
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Rating\Model\RatingFactory $ratingFactory
      * @param \Magento\Rating\Model\Resource\Rating\Option $ratingOptions
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\Date $date,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Rating\Model\RatingFactory $ratingFactory,
@@ -429,12 +429,9 @@ class Review extends \Magento\Core\Model\Resource\Db\AbstractDb
         if ($ratingIds && !is_array($ratingIds)) {
             $ratingIds = array((int)$ratingIds);
         }
-        $resource = $this->_ratingOptions;
-        if ($ratingIds && $entityPkValue && $resource) {
+        if ($ratingIds && $entityPkValue) {
             foreach ($ratingIds as $ratingId) {
-                $this->_ratingOption->aggregateEntityByRatingId(
-                    $ratingId, $entityPkValue
-                );
+                $this->_ratingOptions->aggregateEntityByRatingId($ratingId, $entityPkValue);
             }
         }
         return $this;
diff --git a/app/code/Magento/Review/Model/Resource/Review/Collection.php b/app/code/Magento/Review/Model/Resource/Review/Collection.php
index d43ea819a42..093bade1e48 100644
--- a/app/code/Magento/Review/Model/Resource/Review/Collection.php
+++ b/app/code/Magento/Review/Model/Resource/Review/Collection.php
@@ -96,7 +96,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Review\Helper\Data $reviewData
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
@@ -106,7 +106,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Review\Helper\Data $reviewData,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
diff --git a/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php b/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php
index 63df93d72e4..2e23cbf34b0 100644
--- a/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php
+++ b/app/code/Magento/Review/Model/Resource/Review/Product/Collection.php
@@ -65,11 +65,6 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      */
     protected $_storesIds           = array();
 
-    /**
-     * @var \Magento\Core\Model\Resource
-     */
-    protected $_resourceModel;
-
     /**
      * @var \Magento\Rating\Model\RatingFactory
      */
@@ -81,14 +76,12 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
     protected $_voteFactory;
 
     /**
-     * Construct
-     *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -100,19 +93,19 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
-     * @param \Magento\Core\Model\Resource $resourceModel
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Rating\Model\RatingFactory $ratingFactory
      * @param \Magento\Rating\Model\Rating\Option\VoteFactory $voteFactory
-     *
+     * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Eav\Model\Config $eavConfig,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $resource,
         \Magento\Eav\Model\EntityFactory $eavEntityFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -124,16 +117,15 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\Resource\Helper $resourceHelper,
-        \Magento\Core\Model\Resource $resourceModel,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Rating\Model\RatingFactory $ratingFactory,
         \Magento\Rating\Model\Rating\Option\VoteFactory $voteFactory
     ) {
-        $this->_resourceModel = $resourceModel;
         $this->_ratingFactory = $ratingFactory;
         $this->_voteFactory = $voteFactory;
-        parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource,
+        parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $resource,
             $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig,
-            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper
+            $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime
         );
     }
 
@@ -144,7 +136,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
     {
         $this->_init('Magento\Catalog\Model\Product', 'Magento\Catalog\Model\Resource\Product');
         $this->setRowIdFieldName('review_id');
-        $this->_reviewStoreTable = $this->_resourceModel->getTableName('review_store');
+        $this->_reviewStoreTable = $this->_resource->getTableName('review_store');
         $this->_initTables();
     }
 
@@ -347,8 +339,8 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      */
     protected function _joinFields()
     {
-        $reviewTable = $this->_resourceModel->getTableName('review');
-        $reviewDetailTable = $this->_resourceModel->getTableName('review_detail');
+        $reviewTable = $this->_resource->getTableName('review');
+        $reviewDetailTable = $this->_resource->getTableName('review_detail');
 
         $this->addAttributeToSelect('name')
             ->addAttributeToSelect('sku');
diff --git a/app/code/Magento/Review/Model/Resource/Review/Summary/Collection.php b/app/code/Magento/Review/Model/Resource/Review/Summary/Collection.php
index c25c8ea8caf..cef26369d3a 100644
--- a/app/code/Magento/Review/Model/Resource/Review/Summary/Collection.php
+++ b/app/code/Magento/Review/Model/Resource/Review/Summary/Collection.php
@@ -42,16 +42,16 @@ class Collection extends \Magento\Data\Collection\Db
     protected $_summaryTable;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_setIdFieldName('primary_id');
 
diff --git a/app/code/Magento/Rss/Block/Catalog/NewCatalog.php b/app/code/Magento/Rss/Block/Catalog/NewCatalog.php
index 475e99cb216..48c7ffca0c2 100644
--- a/app/code/Magento/Rss/Block/Catalog/NewCatalog.php
+++ b/app/code/Magento/Rss/Block/Catalog/NewCatalog.php
@@ -111,11 +111,11 @@ class NewCatalog extends \Magento\Rss\Block\Catalog\AbstractCatalog
         $product = $this->_productFactory->create();
         $todayStartOfDayDate  = $this->_locale->date()
             ->setTime('00:00:00')
-            ->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT);
+            ->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
 
         $todayEndOfDayDate  = $this->_locale->date()
             ->setTime('23:59:59')
-            ->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT);
+            ->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
 
         /** @var $products \Magento\Catalog\Model\Resource\Product\Collection */
         $products = $product->getCollection();
diff --git a/app/code/Magento/Rss/Block/Catalog/NotifyStock.php b/app/code/Magento/Rss/Block/Catalog/NotifyStock.php
index eb89ad8bbe8..b3d53567932 100644
--- a/app/code/Magento/Rss/Block/Catalog/NotifyStock.php
+++ b/app/code/Magento/Rss/Block/Catalog/NotifyStock.php
@@ -25,26 +25,12 @@
  */
 
 /**
- * Review form block
+ * Catalog low stock RSS block
  */
 namespace Magento\Rss\Block\Catalog;
 
-class NotifyStock extends \Magento\Core\Block\AbstractBlock
+class NotifyStock extends \Magento\Backend\Block\AbstractBlock
 {
-    /**
-     * Rss data
-     *
-     * @var \Magento\Rss\Helper\Data
-     */
-    protected $_rssData;
-
-    /**
-     * Adminhtml data
-     *
-     * @var \Magento\Backend\Helper\Data
-     */
-    protected $_adminhtmlData;
-
     /**
      * @var \Magento\Rss\Model\RssFactory
      */
@@ -71,9 +57,7 @@ class NotifyStock extends \Magento\Core\Block\AbstractBlock
     protected $_resourceIterator;
 
     /**
-     * @param \Magento\Backend\Helper\Data $adminhtmlData
-     * @param \Magento\Rss\Helper\Data $rssData
-     * @param \Magento\Core\Block\Context $context
+     * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Rss\Model\RssFactory $rssFactory
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\CatalogInventory\Model\Resource\StockFactory $stockFactory
@@ -82,9 +66,7 @@ class NotifyStock extends \Magento\Core\Block\AbstractBlock
      * @param array $data
      */
     public function __construct(
-        \Magento\Backend\Helper\Data $adminhtmlData,
-        \Magento\Rss\Helper\Data $rssData,
-        \Magento\Core\Block\Context $context,
+        \Magento\Backend\Block\Context $context,
         \Magento\Rss\Model\RssFactory $rssFactory,
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\CatalogInventory\Model\Resource\StockFactory $stockFactory,
@@ -92,8 +74,6 @@ class NotifyStock extends \Magento\Core\Block\AbstractBlock
         \Magento\Core\Model\Resource\Iterator $resourceIterator,
         array $data = array()
     ) {
-        $this->_adminhtmlData = $adminhtmlData;
-        $this->_rssData = $rssData;
         $this->_rssFactory = $rssFactory;
         $this->_productFactory = $productFactory;
         $this->_stockFactory = $stockFactory;
@@ -109,7 +89,7 @@ class NotifyStock extends \Magento\Core\Block\AbstractBlock
      */
     protected function _toHtml()
     {
-        $newUrl = $this->_urlBuilder->getUrl('rss/catalog/notifystock');
+        $newUrl = $this->getUrl('rss/catalog/notifystock', array('_secure' => true, '_nosecret' => true));
         $title = __('Low Stock Products');
         /** @var $rssObj \Magento\Rss\Model\Rss */
         $rssObj = $this->_rssFactory->create();
@@ -123,7 +103,6 @@ class NotifyStock extends \Magento\Core\Block\AbstractBlock
         $globalNotifyStockQty = (float)$this->_storeConfig->getConfig(
             \Magento\CatalogInventory\Model\Stock\Item::XML_PATH_NOTIFY_STOCK_QTY
         );
-        $this->_rssData->disableFlat();
         /* @var $product \Magento\Catalog\Model\Product */
         $product = $this->_productFactory->create();
         /* @var $collection \Magento\Catalog\Model\Resource\Product\Collection */
@@ -167,7 +146,7 @@ class NotifyStock extends \Magento\Core\Block\AbstractBlock
         /* @var $product \Magento\Catalog\Model\Product */
         $product = $args['product'];
         $product->setData($args['row']);
-        $url = $this->_adminhtmlData->getUrl('catalog/product/edit/',
+        $url = $this->getUrl('catalog/product/edit',
             array('id' => $product->getId(), '_secure' => true, '_nosecret' => true));
         $qty = 1 * $product->getQty();
         $description = __('%1 has reached a quantity of %2.', $product->getName(), $qty);
diff --git a/app/code/Magento/Rss/Block/Catalog/Review.php b/app/code/Magento/Rss/Block/Catalog/Review.php
index 34270e271c8..b05fe1492f0 100644
--- a/app/code/Magento/Rss/Block/Catalog/Review.php
+++ b/app/code/Magento/Rss/Block/Catalog/Review.php
@@ -29,22 +29,8 @@
  */
 namespace Magento\Rss\Block\Catalog;
 
-class Review extends \Magento\Core\Block\AbstractBlock
+class Review extends \Magento\Backend\Block\AbstractBlock
 {
-    /**
-     * Rss data
-     *
-     * @var \Magento\Rss\Helper\Data
-     */
-    protected $_rssData = null;
-
-    /**
-     * Adminhtml data
-     *
-     * @var \Magento\Backend\Helper\Data
-     */
-    protected $_adminhtmlData = null;
-
     /**
      * @var \Magento\Rss\Model\RssFactory
      */
@@ -66,31 +52,33 @@ class Review extends \Magento\Core\Block\AbstractBlock
     protected $_storeManager;
 
     /**
-     * @param \Magento\Backend\Helper\Data $adminhtmlData
-     * @param \Magento\Rss\Helper\Data $rssData
-     * @param \Magento\Core\Block\Context $context
+     * @var \Magento\Core\Model\Url
+     */
+    protected $_urlModel;
+
+    /**
+     * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Rss\Model\RssFactory $rssFactory
      * @param \Magento\Core\Model\Resource\Iterator $resourceIterator
      * @param \Magento\Review\Model\ReviewFactory $reviewFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Core\Model\Url $urlModel
      * @param array $data
      */
     public function __construct(
-        \Magento\Backend\Helper\Data $adminhtmlData,
-        \Magento\Rss\Helper\Data $rssData,
-        \Magento\Core\Block\Context $context,
+        \Magento\Backend\Block\Context $context,
         \Magento\Rss\Model\RssFactory $rssFactory,
         \Magento\Core\Model\Resource\Iterator $resourceIterator,
         \Magento\Review\Model\ReviewFactory $reviewFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Core\Model\Url $urlModel,
         array $data = array()
     ) {
-        $this->_adminhtmlData = $adminhtmlData;
-        $this->_rssData = $rssData;
         $this->_rssFactory = $rssFactory;
         $this->_resourceIterator = $resourceIterator;
         $this->_reviewFactory = $reviewFactory;
         $this->_storeManager = $storeManager;
+        $this->_urlModel = $urlModel;
         parent::__construct($context, $data);
     }
 
@@ -101,9 +89,8 @@ class Review extends \Magento\Core\Block\AbstractBlock
      */
     protected function _toHtml()
     {
-        $newUrl = $this->_urlBuilder->getUrl('rss/catalog/review');
+        $newUrl = $this->getUrl('rss/catalog/review', array('_secure' => true, '_nosecret' => true));
         $title = __('Pending product review(s)');
-        $this->_rssData->disableFlat();
 
         /** @var $rssObj \Magento\Rss\Model\Rss */
         $rssObj = $this->_rssFactory->create();
@@ -143,13 +130,14 @@ class Review extends \Magento\Core\Block\AbstractBlock
         $rssObj = $args['rssObj'];
         $row = $args['row'];
 
-        $store = $this->_storeManager->getStore($row['store_id']);
-        $productUrl = $store->getUrl('catalog/product/view', array('id' => $row['entity_id']));
-        $reviewUrl = $this->_adminhtmlData->getUrl(
+        $productUrl = $this->_urlModel
+            ->setStore($row['store_id'])
+            ->getUrl('catalog/product/view', array('id' => $row['entity_id']));
+        $reviewUrl = $this->getUrl(
             'catalog/product_review/edit/',
             array('id' => $row['review_id'], '_secure' => true, '_nosecret' => true)
         );
-        $storeName = $store->getName();
+        $storeName = $this->_storeManager->getStore($row['store_id'])->getName();
         $description = '<p>'
              . __('Product: <a href="%1">%2</a> <br/>', $productUrl, $row['name'])
              . __('Summary of review: %1 <br/>', $row['title'])
diff --git a/app/code/Magento/Rss/Block/Catalog/Special.php b/app/code/Magento/Rss/Block/Catalog/Special.php
index 3cd3c591008..0a57b1efc39 100644
--- a/app/code/Magento/Rss/Block/Catalog/Special.php
+++ b/app/code/Magento/Rss/Block/Catalog/Special.php
@@ -212,7 +212,7 @@ class Special extends \Magento\Rss\Block\Catalog\AbstractCatalog
             && $row['allowed_price_in_rss']
         ) {
             $compareDate = self::$_currentDate->compareDate($row['special_to_date'],
-                \Magento\Date::DATE_INTERNAL_FORMAT);
+                \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT);
             if (-1 === $compareDate || 0 === $compareDate) {
                 $row['use_special'] = true;
             }
diff --git a/app/code/Magento/Rss/Block/Order/NewOrder.php b/app/code/Magento/Rss/Block/Order/NewOrder.php
index de10f9deb93..3e678c837a4 100644
--- a/app/code/Magento/Rss/Block/Order/NewOrder.php
+++ b/app/code/Magento/Rss/Block/Order/NewOrder.php
@@ -29,15 +29,8 @@
  */
 namespace Magento\Rss\Block\Order;
 
-class NewOrder extends \Magento\Core\Block\AbstractBlock
+class NewOrder extends \Magento\Backend\Block\AbstractBlock
 {
-    /**
-     * Adminhtml data
-     *
-     * @var \Magento\Backend\Helper\Data
-     */
-    protected $_adminhtmlData = null;
-
     /**
      * @var \Magento\Rss\Model\RssFactory
      */
@@ -54,25 +47,30 @@ class NewOrder extends \Magento\Core\Block\AbstractBlock
     protected $_resourceIterator;
 
     /**
-     * @param \Magento\Backend\Helper\Data $adminhtmlData
-     * @param \Magento\Core\Block\Context $context
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
+    /**
+     * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Rss\Model\RssFactory $rssFactory
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
      * @param \Magento\Core\Model\Resource\Iterator $resourceIterator
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param array $data
      */
     public function __construct(
-        \Magento\Backend\Helper\Data $adminhtmlData,
-        \Magento\Core\Block\Context $context,
+        \Magento\Backend\Block\Context $context,
         \Magento\Rss\Model\RssFactory $rssFactory,
         \Magento\Sales\Model\OrderFactory $orderFactory,
         \Magento\Core\Model\Resource\Iterator $resourceIterator,
+        \Magento\Stdlib\DateTime $dateTime,
         array $data = array()
     ) {
-        $this->_adminhtmlData = $adminhtmlData;
         $this->_rssFactory = $rssFactory;
         $this->_orderFactory = $orderFactory;
         $this->_resourceIterator = $resourceIterator;
+        $this->_dateTime = $dateTime;
         parent::__construct($context, $data);
     }
 
@@ -80,10 +78,8 @@ class NewOrder extends \Magento\Core\Block\AbstractBlock
     {
         /** @var $order \Magento\Sales\Model\Order */
         $order = $this->_orderFactory->create();
-        $passDate = $order->getResource()->formatDate(mktime(0, 0, 0, date('m'), date('d')-7));
-        $newUrl = $this->_adminhtmlData->getUrl(
-            'adminhtml/sales_order', array('_secure' => true, '_nosecret' => true)
-        );
+        $passDate = $this->_dateTime->formatDate(mktime(0, 0, 0, date('m'), date('d')-7));
+        $newUrl = $this->getUrl('rss/order/new', array('_secure' => true, '_nosecret' => true));
         $title = __('New Orders');
 
         /** @var $rssObj \Magento\Rss\Model\Rss */
@@ -121,13 +117,8 @@ class NewOrder extends \Magento\Core\Block\AbstractBlock
         $order->reset()->load($args['row']['entity_id']);
         if ($order && $order->getId()) {
             $title = __('Order #%1 created at %2', $order->getIncrementId(), $this->formatDate($order->getCreatedAt()));
-            $url = $this->_adminhtmlData->getUrl(
-                'sales/order/view',
-                array(
-                    '_secure' => true,
-                    'order_id' => $order->getId(),
-                    '_nosecret' => true
-                )
+            $url = $this->getUrl('sales/order/view',
+                array('_secure' => true, 'order_id' => $order->getId(), '_nosecret' => true)
             );
             $detailBlock->setOrder($order);
             $rssObj->_addEntry(array(
diff --git a/app/code/Magento/Rss/Controller/Adminhtml/Authenticate.php b/app/code/Magento/Rss/Controller/Adminhtml/Authenticate.php
new file mode 100644
index 00000000000..0626a74c085
--- /dev/null
+++ b/app/code/Magento/Rss/Controller/Adminhtml/Authenticate.php
@@ -0,0 +1,94 @@
+<?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_Rss
+ * @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)
+ */
+
+/**
+ * RSS Controller with HTTP Basic authentication
+ */
+namespace Magento\Rss\Controller\Adminhtml;
+
+class Authenticate extends \Magento\Backend\Controller\Adminhtml\Action
+{
+    /**
+     * @var \Magento\Core\Model\Logger
+     */
+    protected $_logger;
+
+    /**
+     * @param \Magento\Backend\Controller\Context $context
+     */
+    public function __construct(\Magento\Backend\Controller\Context $context)
+    {
+        $this->_logger = $context->getLogger();
+        parent::__construct($context);
+        $this->_objectManager->get('Magento\Backend\Model\Url')->turnOffSecretKey();
+    }
+
+    /**
+     * Return required ACL resource for current action
+     * @return string
+     */
+    protected function _getActionAclResource()
+    {
+        return 'Magento_Rss::rss';
+    }
+
+    /**
+     * Replace standard admin login form with HTTP Basic authentication
+     * @return bool|\Magento\Backend\Controller\AbstractAction
+     */
+    protected function _initAuthentication()
+    {
+        $aclResource = $this->_getActionAclResource();
+        if (!$aclResource) {
+            return parent::_initAuthentication();
+        }
+
+        /** @var $auth \Magento\Backend\Model\Auth */
+        $auth = $this->_objectManager->create('Magento\Backend\Model\Auth');
+        $session = $auth->getAuthStorage();
+
+        // Try to login using HTTP-authentication
+        if (!$session->isLoggedIn()) {
+            list($login, $password) = $this->_objectManager->get('Magento\HTTP\Authentication')->getCredentials();
+            try {
+                $auth->login($login, $password);
+            } catch (\Magento\Backend\Model\Auth\Exception $e) {
+                $this->_logger->logException($e);
+            }
+        }
+
+        // Verify if logged in and authorized
+        if (!$session->isLoggedIn()
+            || !$this->_objectManager->get('Magento\AuthorizationInterface')->isAllowed($aclResource)
+        ) {
+            $this->_objectManager->get('Magento\HTTP\Authentication')->setAuthenticationFailed('RSS Feeds');
+            $this->setFlag('', self::FLAG_NO_DISPATCH, true);
+            return false;
+        }
+
+        return true;
+    }
+}
diff --git a/app/code/Magento/Rss/Controller/Adminhtml/Catalog.php b/app/code/Magento/Rss/Controller/Adminhtml/Catalog.php
new file mode 100644
index 00000000000..1a6edf76dad
--- /dev/null
+++ b/app/code/Magento/Rss/Controller/Adminhtml/Catalog.php
@@ -0,0 +1,68 @@
+<?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_Rss
+ * @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)
+ */
+
+/**
+ * RSS Controller for Catalog feeds in Admin
+ */
+namespace Magento\Rss\Controller\Adminhtml;
+
+class Catalog extends \Magento\Rss\Controller\Adminhtml\Authenticate
+{
+    /**
+     * Return required ACL resource for current action
+     *
+     * @return bool|string
+     */
+    protected function _getActionAclResource()
+    {
+        $acl = array(
+            'notifystock' => 'Magento_Catalog::products',
+            'review' => 'Magento_Review::reviews_all'
+        );
+        $action = $this->getRequest()->getActionName();
+        return isset($acl[$action]) ? $acl[$action] : false;
+    }
+
+    /**
+     * Notify stock action
+     */
+    public function notifystockAction()
+    {
+        $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8');
+        $this->loadLayout(false);
+        $this->renderLayout();
+    }
+
+    /**
+     * Review action
+     */
+    public function reviewAction()
+    {
+        $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8');
+        $this->loadLayout(false);
+        $this->renderLayout();
+    }
+}
diff --git a/app/code/Magento/Rss/Controller/Adminhtml/Order.php b/app/code/Magento/Rss/Controller/Adminhtml/Order.php
new file mode 100644
index 00000000000..b11470376fd
--- /dev/null
+++ b/app/code/Magento/Rss/Controller/Adminhtml/Order.php
@@ -0,0 +1,53 @@
+<?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_Rss
+ * @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)
+ */
+
+/**
+ * RSS Controller for Orders feed in Admin
+ */
+namespace Magento\Rss\Controller\Adminhtml;
+
+class Order extends \Magento\Rss\Controller\Adminhtml\Authenticate
+{
+    /**
+     * Return required ACL resource for current action
+     *
+     * @return string
+     */
+    protected function _getActionAclResource()
+    {
+        return 'Magento_Sales::sales_order';
+    }
+
+    /**
+     * New orders action
+     */
+    public function newAction()
+    {
+        $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8');
+        $this->loadLayout(false);
+        $this->renderLayout();
+    }
+}
diff --git a/app/code/Magento/Rss/Controller/Catalog.php b/app/code/Magento/Rss/Controller/Catalog.php
index cd849b309d4..a75bea291bf 100644
--- a/app/code/Magento/Rss/Controller/Catalog.php
+++ b/app/code/Magento/Rss/Controller/Catalog.php
@@ -25,65 +25,29 @@
  */
 
 /**
- * Customer reviews controller
+ * RSS Controller for Catalog feeds
  */
 namespace Magento\Rss\Controller;
 
 class Catalog extends \Magento\Core\Controller\Front\Action
 {
-    /**
-     * @var \Magento\Config\Scope
-     */
-    protected $_configScope;
-
     /**
      * @var \Magento\Core\Model\Store\Config
      */
     protected $_storeConfig;
 
-    /**
-     * @var \Magento\Core\Model\Logger
-     */
-    protected $_logger;
-
     /**
      * @param \Magento\Core\Controller\Varien\Action\Context $context
-     * @param \Magento\Config\Scope $configScope
      * @param \Magento\Core\Model\Store\Config $storeConfig
      */
     public function __construct(
         \Magento\Core\Controller\Varien\Action\Context $context,
-        \Magento\Config\Scope $configScope,
         \Magento\Core\Model\Store\Config $storeConfig
     ) {
-        $this->_configScope = $configScope;
         $this->_storeConfig = $storeConfig;
-        $this->_logger = $context->getLogger();
         parent::__construct($context);
     }
 
-    /**
-     * Emulate admin area for certain actions
-     */
-    public function preDispatch()
-    {
-        $action = $this->getRequest()->getActionName();
-        /**
-         * Format actionName => acrResourceId
-         */
-        $acl = array(
-            'notifystock' => 'Magento_Catalog::products',
-            'review' => 'Magento_Review::reviews_all',
-        );
-        if (isset($acl[$action])) {
-            $this->_configScope->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
-            if ($this->authenticateAndAuthorizeAdmin($acl[$action], $this->_logger)) {
-                return;
-            }
-        }
-        parent::preDispatch();
-    }
-
     public function newAction()
     {
         $this->_genericAction('new');
@@ -99,16 +63,6 @@ class Catalog extends \Magento\Core\Controller\Front\Action
         $this->_genericAction('salesrule');
     }
 
-    public function notifystockAction()
-    {
-        $this->_render();
-    }
-
-    public function reviewAction()
-    {
-        $this->_render();
-    }
-
     public function categoryAction()
     {
          $this->_genericAction('category');
diff --git a/app/code/Magento/Rss/Controller/Index.php b/app/code/Magento/Rss/Controller/Index.php
index e9bfd7f75a3..a96c00e2590 100644
--- a/app/code/Magento/Rss/Controller/Index.php
+++ b/app/code/Magento/Rss/Controller/Index.php
@@ -24,7 +24,6 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-
 namespace Magento\Rss\Controller;
 
 class Index extends \Magento\Core\Controller\Front\Action
diff --git a/app/code/Magento/Rss/Controller/Order.php b/app/code/Magento/Rss/Controller/Order.php
index d325e19d368..d1095096092 100644
--- a/app/code/Magento/Rss/Controller/Order.php
+++ b/app/code/Magento/Rss/Controller/Order.php
@@ -25,17 +25,12 @@
  */
 
 /**
- * Customer reviews controller
+ * RSS Controller for Order feed
  */
 namespace Magento\Rss\Controller;
 
 class Order extends \Magento\Core\Controller\Front\Action
 {
-    /**
-     * @var \Magento\Config\Scope
-     */
-    protected $_configScope;
-
     /**
      * Core registry
      *
@@ -43,45 +38,18 @@ class Order extends \Magento\Core\Controller\Front\Action
      */
     protected $_coreRegistry = null;
 
-    /**
-     * @var \Magento\Core\Model\Logger
-     */
-    protected $_logger;
-
     /**
      * @param \Magento\Core\Controller\Varien\Action\Context $context
      * @param \Magento\Core\Model\Registry $coreRegistry
-     * @param \Magento\Config\Scope $configScope
      */
     public function __construct(
         \Magento\Core\Controller\Varien\Action\Context $context,
-        \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Config\Scope $configScope
+        \Magento\Core\Model\Registry $coreRegistry
     ) {
         $this->_coreRegistry = $coreRegistry;
-        $this->_configScope = $configScope;
-        $this->_logger = $context->getLogger();
         parent::__construct($context);
     }
 
-    public function preDispatch()
-    {
-        if ('new' === $this->getRequest()->getActionName()) {
-            $this->_configScope->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
-            if (!$this->authenticateAndAuthorizeAdmin('Magento_Sales::sales_order', $this->_logger)) {
-                return;
-            }
-        }
-        parent::preDispatch();
-    }
-
-    public function newAction()
-    {
-        $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8');
-        $this->loadLayout(false);
-        $this->renderLayout();
-    }
-
     /**
      * Order status action
      */
diff --git a/app/code/Magento/Rss/Helper/Data.php b/app/code/Magento/Rss/Helper/Data.php
deleted file mode 100644
index a5d951d0e38..00000000000
--- a/app/code/Magento/Rss/Helper/Data.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_Rss
- * @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)
- */
-
-
-/**
- * Rss data helper
- *
- * @category   Magento
- * @package    Magento_Rss
- * @author     Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Rss\Helper;
-
-class Data extends \Magento\Core\Helper\AbstractHelper
-{
-    /**
-     * Catalog product flat
-     *
-     * @var \Magento\Catalog\Helper\Product\Flat
-     */
-    protected $_catalogProductFlat;
-
-    /**
-     * @var \Magento\Core\Model\App\EmulationFactory
-     */
-    protected $_emulationFactory;
-
-    /**
-     * @param \Magento\Catalog\Helper\Product\Flat $catalogProductFlat
-     * @param \Magento\Core\Helper\Context $context
-     * @param \Magento\Core\Model\App\EmulationFactory $emulationFactory
-     */
-    public function __construct(
-        \Magento\Catalog\Helper\Product\Flat $catalogProductFlat,
-        \Magento\Core\Helper\Context $context,
-        \Magento\Core\Model\App\EmulationFactory $emulationFactory
-    ) {
-        $this->_catalogProductFlat = $catalogProductFlat;
-        $this->_emulationFactory = $emulationFactory;
-        parent::__construct($context);
-    }
-
-    /**
-     * Disable using of flat catalog and/or product model to prevent limiting results to single store. Probably won't
-     * work inside a controller.
-     *
-     * @return null
-     */
-    public function disableFlat()
-    {
-        if ($this->_catalogProductFlat->isAvailable()) {
-            /* @var $emulationModel \Magento\Core\Model\App\Emulation */
-            $emulationModel = $this->_emulationFactory->create();
-            // Emulate admin environment to disable using flat model - otherwise we won't get global stats
-            // for all stores
-            $emulationModel->startEnvironmentEmulation(0, \Magento\Core\Model\App\Area::AREA_ADMIN);
-        }
-    }
-}
diff --git a/app/code/Magento/Rss/Model/Resource/Order.php b/app/code/Magento/Rss/Model/Resource/Order.php
index 80b95c552b5..9ae2b0d64a4 100644
--- a/app/code/Magento/Rss/Model/Resource/Order.php
+++ b/app/code/Magento/Rss/Model/Resource/Order.php
@@ -37,14 +37,14 @@ namespace Magento\Rss\Model\Resource;
 class Order
 {
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
-    public function __construct(\Magento\Core\Model\Resource $resource)
+    public function __construct(\Magento\App\Resource $resource)
     {
         $this->_resource = $resource;
     }
@@ -57,7 +57,7 @@ class Order
      */
     public function getAllCommentCollection($orderId)
     {
-        /** @var $res \Magento\Core\Model\Resource */
+        /** @var $res \Magento\App\Resource */
         $res = $this->_resource;
         $read = $res->getConnection('core_read');
 
diff --git a/app/code/Magento/Rss/etc/adminhtml/routes.xml b/app/code/Magento/Rss/etc/adminhtml/routes.xml
new file mode 100644
index 00000000000..7811ed68a45
--- /dev/null
+++ b/app/code/Magento/Rss/etc/adminhtml/routes.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Magento
+ * @package     Magento_Rss
+ * @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>
+    <router id="admin">
+        <route id="rss" frontName="rss">
+            <module name="Magento_Rss_Adminhtml" before="Magento_Adminhtml" />
+        </route>
+    </router>
+</config>
diff --git a/app/code/Magento/Rss/etc/frontend/routes.xml b/app/code/Magento/Rss/etc/frontend/routes.xml
index 2353f26cea6..0e7ccc89658 100644
--- a/app/code/Magento/Rss/etc/frontend/routes.xml
+++ b/app/code/Magento/Rss/etc/frontend/routes.xml
@@ -19,6 +19,8 @@
  * 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_Rss
  * @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)
  */
@@ -29,4 +31,4 @@
             <module name="Magento_Rss" />
         </route>
     </router>
-</config>
\ No newline at end of file
+</config>
diff --git a/app/code/Magento/Rss/etc/module.xml b/app/code/Magento/Rss/etc/module.xml
index 72869146b27..ec96b30ed73 100755
--- a/app/code/Magento/Rss/etc/module.xml
+++ b/app/code/Magento/Rss/etc/module.xml
@@ -19,6 +19,8 @@
  * 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_Rss
  * @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)
  */
diff --git a/app/code/Magento/Rule/Block/Editable.php b/app/code/Magento/Rule/Block/Editable.php
index 4dbe1321a0c..31a84265bdb 100644
--- a/app/code/Magento/Rule/Block/Editable.php
+++ b/app/code/Magento/Rule/Block/Editable.php
@@ -24,7 +24,6 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-
 namespace Magento\Rule\Block;
 
 class Editable
@@ -36,29 +35,29 @@ class Editable
      *
      * @var \Magento\Core\Helper\Data
      */
-    protected $_coreData = null;
+    protected $_coreData;
 
     /**
-     * Core string
+     * Filter manager
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Filter\FilterManager
      */
-    protected $_coreString = null;
+    protected $filter;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Block\Context $context
+     * @param \Magento\Filter\FilterManager $filter
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Block\Context $context,
+        \Magento\Filter\FilterManager $filter,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
         $this->_coreData = $coreData;
+        $this->filter = $filter;
         parent::__construct($context, $data);
     }
 
@@ -88,9 +87,9 @@ class Editable
                 . '<a href="javascript:void(0)" class="label">';
 
             if ($this->_translator->isAllowed()) {
-                $html .= $this->_coreData->escapeHtml($valueName);
+                $html .= $this->escapeHtml($valueName);
             } else {
-                $html .= $this->_coreData->escapeHtml($this->_coreString->truncate($valueName, 33, '...'));
+                $html .= $this->escapeHtml($this->filter->truncate($valueName, array('length' => 33, 'etc' => '...')));
             }
 
             $html .= '</a><span class="element"> ' . $element->getElementHtml();
diff --git a/app/code/Magento/Rule/Model/AbstractModel.php b/app/code/Magento/Rule/Model/AbstractModel.php
index fc3ac88a0a6..ee4a13dbb46 100644
--- a/app/code/Magento/Rule/Model/AbstractModel.php
+++ b/app/code/Magento/Rule/Model/AbstractModel.php
@@ -81,7 +81,7 @@ abstract class AbstractModel extends \Magento\Core\Model\AbstractModel
     abstract public function getActionsInstance();
 
     /**
-     * @var \Magento\Data\Form\Factory
+     * @var \Magento\Data\FormFactory
      */
     protected $_formFactory;
 
@@ -91,7 +91,7 @@ abstract class AbstractModel extends \Magento\Core\Model\AbstractModel
     protected $_locale;
 
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -100,7 +100,7 @@ abstract class AbstractModel extends \Magento\Core\Model\AbstractModel
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\LocaleInterface $locale,
@@ -346,7 +346,7 @@ abstract class AbstractModel extends \Magento\Core\Model\AbstractModel
                 if (in_array($key, array('from_date', 'to_date')) && $value) {
                     $value = $this->_locale->date(
                         $value,
-                        \Magento\Date::DATE_INTERNAL_FORMAT,
+                        \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT,
                         null,
                         false
                     );
@@ -388,8 +388,8 @@ abstract class AbstractModel extends \Magento\Core\Model\AbstractModel
         }
 
         if ($fromDate && $toDate) {
-            $fromDate = new \Zend_Date($fromDate, \Magento\Date::DATE_INTERNAL_FORMAT);
-            $toDate = new \Zend_Date($toDate, \Magento\Date::DATE_INTERNAL_FORMAT);
+            $fromDate = new \Zend_Date($fromDate, \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT);
+            $toDate = new \Zend_Date($toDate, \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT);
 
             if ($fromDate->compare($toDate) === 1) {
                 $result[] = __('End Date must follow Start Date.');
diff --git a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php
index be07f40687a..7e36121993a 100644
--- a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php
+++ b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php
@@ -363,7 +363,7 @@ abstract class AbstractCondition
             // date format intentionally hard-coded
             $this->setValue(
                 $this->_locale->date($this->getData('value'),
-                \Magento\Date::DATE_INTERNAL_FORMAT, null, false)->toString(\Magento\Date::DATE_INTERNAL_FORMAT)
+                \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT, null, false)->toString(\Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT)
             );
             $this->setIsValueParsed(true);
         }
@@ -564,8 +564,8 @@ abstract class AbstractCondition
         );
         if ($this->getInputType() == 'date') {
             // date format intentionally hard-coded
-            $elementParams['input_format'] = \Magento\Date::DATE_INTERNAL_FORMAT;
-            $elementParams['date_format']  = \Magento\Date::DATE_INTERNAL_FORMAT;
+            $elementParams['input_format'] = \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT;
+            $elementParams['date_format']  = \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT;
         }
         return $this->getForm()->addField($this->getPrefix() . '__' . $this->getId() . '__value',
             $this->getValueElementType(),
diff --git a/app/code/Magento/Rule/Model/Condition/Combine.php b/app/code/Magento/Rule/Model/Condition/Combine.php
index dd62340571a..32ec82ed150 100644
--- a/app/code/Magento/Rule/Model/Condition/Combine.php
+++ b/app/code/Magento/Rule/Model/Condition/Combine.php
@@ -42,7 +42,7 @@ class Combine extends \Magento\Rule\Model\Condition\AbstractCondition
     protected $_conditionFactory;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
diff --git a/app/code/Magento/Rule/Model/Condition/Context.php b/app/code/Magento/Rule/Model/Condition/Context.php
index 4413e8d3ef5..0e7f37f0362 100644
--- a/app/code/Magento/Rule/Model/Condition/Context.php
+++ b/app/code/Magento/Rule/Model/Condition/Context.php
@@ -51,7 +51,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_conditionFactory;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -60,14 +60,14 @@ class Context implements \Magento\ObjectManager\ContextInterface
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\View\LayoutInterface $layout
      * @param \Magento\Rule\Model\ConditionFactory $conditionFactory
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */
     public function __construct(
         \Magento\Core\Model\View\Url $viewUrl,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\View\LayoutInterface $layout,
         \Magento\Rule\Model\ConditionFactory $conditionFactory,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger
     ) {
         $this->_viewUrl = $viewUrl;
         $this->_locale = $locale;
@@ -109,7 +109,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Core\Model\Logger
+     * @return \Magento\Logger
      */
     public function getLogger()
     {
diff --git a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php
index 16943800ead..2144586eb27 100644
--- a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php
+++ b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php
@@ -423,7 +423,7 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon
         switch ($this->getAttribute()) {
             case 'sku':
             case 'category_ids':
-                $url = 'adminhtml/promo_widget/chooser/attribute/' . $this->getAttribute();
+                $url = '*/promo_widget/chooser/attribute/' . $this->getAttribute();
                 if ($this->getJsFormObject()) {
                     $url .= '/form/' . $this->getJsFormObject();
                 }
diff --git a/app/code/Magento/Rule/Model/Resource/AbstractResource.php b/app/code/Magento/Rule/Model/Resource/AbstractResource.php
index 133b5c7dc1f..8dc446d4de5 100644
--- a/app/code/Magento/Rule/Model/Resource/AbstractResource.php
+++ b/app/code/Magento/Rule/Model/Resource/AbstractResource.php
@@ -68,14 +68,14 @@ abstract class AbstractResource extends \Magento\Core\Model\Resource\Db\Abstract
     {
         $fromDate = $object->getFromDate();
         if ($fromDate instanceof \Zend_Date) {
-            $object->setFromDate($fromDate->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT));
+            $object->setFromDate($fromDate->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT));
         } elseif (!is_string($fromDate) || empty($fromDate)) {
             $object->setFromDate(null);
         }
 
         $toDate = $object->getToDate();
         if ($toDate instanceof \Zend_Date) {
-            $object->setToDate($toDate->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT));
+            $object->setToDate($toDate->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT));
         } elseif (!is_string($toDate) || empty($toDate)) {
             $object->setToDate(null);
         }
diff --git a/app/code/Magento/Rule/Model/Rule.php b/app/code/Magento/Rule/Model/Rule.php
index e5911776baa..b45da837cb5 100644
--- a/app/code/Magento/Rule/Model/Rule.php
+++ b/app/code/Magento/Rule/Model/Rule.php
@@ -48,7 +48,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel
     protected $_actions;
 
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -59,7 +59,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\LocaleInterface $locale,
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/promo/rules.js b/app/code/Magento/Rule/view/adminhtml/rules.js
similarity index 99%
rename from app/code/Magento/Adminhtml/view/adminhtml/promo/rules.js
rename to app/code/Magento/Rule/view/adminhtml/rules.js
index d7bbcbefd29..f3ca673e392 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/promo/rules.js
+++ b/app/code/Magento/Rule/view/adminhtml/rules.js
@@ -18,7 +18,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Mage
- * @package     Magento_Adminhtml
+ * @package     Magento_Rule
  * @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)
  */
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php b/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php
index 7638bd3efa6..bfab978fab1 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php
@@ -130,7 +130,7 @@ class Info extends \Magento\Backend\Block\Template
         $this->setReferenceId($agreement->getReferenceId());
         $customer = $this->_customerFactory->create()->load($agreement->getCustomerId());
         $this->setCustomerUrl(
-            $this->getUrl('adminhtml/customer/edit', array('id' => $customer->getId()))
+            $this->getUrl('customer/index/edit', array('id' => $customer->getId()))
         );
         $this->setCustomerEmail($customer->getEmail());
         $this->setStatus($agreement->getStatusLabel());
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php b/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php
index 280c401694e..1a0c85d96bd 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php
@@ -24,43 +24,58 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Sales\Block\Adminhtml\Items\Column;
 
 /**
  * Sales Order items name column renderer
- *
- * @category   Magento
- * @package    Magento_Sales
- * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Block\Adminhtml\Items\Column;
-
 class Name extends \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn
 {
     /**
      * Core string
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Filter\FilterManager
      */
-    protected $_coreString = null;
+    protected $filter;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
      * @param \Magento\Catalog\Model\Product\OptionFactory $optionFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
+     * @param \Magento\Filter\FilterManager $filter
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
         \Magento\Catalog\Model\Product\OptionFactory $optionFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
+        \Magento\Filter\FilterManager $filter,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->filter = $filter;
         parent::__construct($optionFactory, $coreData, $context, $data);
     }
 
+    /**
+     * Truncate string
+     *
+     * @param string $value
+     * @param int $length
+     * @param string $etc
+     * @param string &$remainder
+     * @param bool $breakWords
+     * @return string
+     */
+    public function truncateString($value, $length = 80, $etc = '...', &$remainder = '', $breakWords = true)
+    {
+        return $this->filter->truncate($value, array(
+            'length' => $length,
+            'etc' => $etc,
+            'remainder' => $remainder,
+            'breakWords' => $breakWords
+        ));
+    }
+
     /**
      * Add line breaks and truncate value
      *
@@ -69,11 +84,11 @@ class Name extends \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn
      */
     public function getFormattedOption($value)
     {
-        $_remainder = '';
-        $value = $this->_coreString->truncate($value, 55, '', $_remainder);
+        $remainder = '';
+        $value = $this->truncateString($value, 55, '', $remainder);
         $result = array(
             'value' => nl2br($value),
-            'remainder' => nl2br($_remainder)
+            'remainder' => nl2br($remainder)
         );
 
         return $result;
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php
index 8b3838ba241..fc9c5150196 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php
@@ -49,7 +49,7 @@ class Form
      * @param \Magento\Customer\Model\AddressFactory $addressFactory
      * @param \Magento\Customer\Model\FormFactory $customerFormFactory
      * @param \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote
      * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate
      * @param \Magento\Core\Helper\Data $coreData
@@ -63,7 +63,7 @@ class Form
         \Magento\Customer\Model\AddressFactory $addressFactory,
         \Magento\Customer\Model\FormFactory $customerFormFactory,
         \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Adminhtml\Model\Session\Quote $sessionQuote,
         \Magento\Sales\Model\AdminOrder\Create $orderCreate,
         \Magento\Core\Helper\Data $coreData,
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php
index fc4149e0ce2..826fe3f5870 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php
@@ -38,7 +38,7 @@ abstract class AbstractForm
     extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate
 {
     /**
-     * @var \Magento\Data\Form\Factory
+     * @var \Magento\Data\FormFactory
      */
     protected $_formFactory;
 
@@ -50,7 +50,7 @@ abstract class AbstractForm
     protected $_form;
 
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote
      * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate
      * @param \Magento\Core\Helper\Data $coreData
@@ -58,7 +58,7 @@ abstract class AbstractForm
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Adminhtml\Model\Session\Quote $sessionQuote,
         \Magento\Sales\Model\AdminOrder\Create $orderCreate,
         \Magento\Core\Helper\Data $coreData,
@@ -130,9 +130,9 @@ abstract class AbstractForm
     protected function _getAdditionalFormElementTypes()
     {
         return array(
-            'file'      => 'Magento\Adminhtml\Block\Customer\Form\Element\File',
-            'image'     => 'Magento\Adminhtml\Block\Customer\Form\Element\Image',
-            'boolean'   => 'Magento\Adminhtml\Block\Customer\Form\Element\Boolean',
+            'file'      => 'Magento\Customer\Block\Adminhtml\Form\Element\File',
+            'image'     => 'Magento\Customer\Block\Adminhtml\Form\Element\Image',
+            'boolean'   => 'Magento\Customer\Block\Adminhtml\Form\Element\Boolean',
         );
     }
 
@@ -144,7 +144,7 @@ abstract class AbstractForm
     protected function _getAdditionalFormElementRenderers()
     {
         return array(
-            'region'    => $this->getLayout()->createBlock('Magento\Adminhtml\Block\Customer\Edit\Renderer\Region'),
+            'region'    => $this->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Edit\Renderer\Region'),
         );
     }
 
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php
index 253b286b722..7d1f082a730 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php
@@ -46,7 +46,7 @@ class Account extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\AbstractF
     /**
      * @param \Magento\Customer\Model\CustomerFactory $customerFactory
      * @param \Magento\Customer\Model\FormFactory $customerFormFactory
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote
      * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate
      * @param \Magento\Core\Helper\Data $coreData
@@ -56,7 +56,7 @@ class Account extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\AbstractF
     public function __construct(
         \Magento\Customer\Model\CustomerFactory $customerFactory,
         \Magento\Customer\Model\FormFactory $customerFormFactory,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Adminhtml\Model\Session\Quote $sessionQuote,
         \Magento\Sales\Model\AdminOrder\Create $orderCreate,
         \Magento\Core\Helper\Data $coreData,
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php
index 70b06cb9662..d266e918204 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php
@@ -64,7 +64,7 @@ class Address
      * @param \Magento\Customer\Model\AddressFactory $addressFactory
      * @param \Magento\Customer\Model\FormFactory $customerFormFactory
      * @param \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote
      * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate
      * @param \Magento\Core\Helper\Data $coreData
@@ -75,7 +75,7 @@ class Address
         \Magento\Customer\Model\AddressFactory $addressFactory,
         \Magento\Customer\Model\FormFactory $customerFormFactory,
         \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Adminhtml\Model\Session\Quote $sessionQuote,
         \Magento\Sales\Model\AdminOrder\Create $orderCreate,
         \Magento\Core\Helper\Data $coreData,
@@ -234,7 +234,7 @@ class Address
         if ($vatIdElement && $this->getDisplayVatValidationButton() !== false) {
             $vatIdElement->setRenderer(
                 $this->getLayout()
-                    ->createBlock('Magento\Adminhtml\Block\Customer\Sales\Order\Address\Form\Renderer\Vat')
+                    ->createBlock('Magento\Customer\Block\Adminhtml\Sales\Order\Address\Form\Renderer\Vat')
                     ->setJsVariablePrefix($this->getJsVariablePrefix())
             );
         }
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php
index 2841261a3f0..0ce354e5cfa 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php
@@ -61,7 +61,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -69,7 +69,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     public function __construct(
         \Magento\Adminhtml\Model\Session\Quote $sessionQuote,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php
index 84444706e47..9b3b72e27fc 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php
@@ -100,7 +100,7 @@ class Totals extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate
         $blockName = $code.'_total_renderer';
         $block = $this->getLayout()->getBlock($blockName);
         if (!$block) {
-            $configRenderer = $this->_salesConfig->getTotalsRenderer('quote', 'totals', $code, 'adminhtml');
+            $configRenderer = $this->_salesConfig->getTotalsRenderer('quote', 'totals', $code);
             if (empty($configRenderer)) {
                 $block = $this->_defaultRenderer;
             } else {
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php
index c806582f6a1..6f2cf6d6789 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php
@@ -45,7 +45,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Sales\Model\Order\Config $orderConfig
      * @param \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $collectionFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -54,7 +54,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Sales\Model\Order\Config $orderConfig,
         \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $collectionFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php
index d1562b4f729..94fa4523465 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php
@@ -46,7 +46,7 @@ class Tax extends \Magento\Tax\Block\Sales\Order\Tax
     protected $_taxCalculation;
 
     /**
-     * @var \Magento\Tax\Model\Sales\Order\Tax\Factory
+     * @var \Magento\Tax\Model\Sales\Order\TaxFactory
      */
     protected $_taxOrderFactory;
 
@@ -61,7 +61,7 @@ class Tax extends \Magento\Tax\Block\Sales\Order\Tax
      * @param \Magento\Tax\Model\Config $taxConfig
      * @param \Magento\Tax\Helper\Data $taxHelper
      * @param \Magento\Tax\Model\Calculation $taxCalculation
-     * @param \Magento\Tax\Model\Sales\Order\Tax\Factory $taxOrderFactory
+     * @param \Magento\Tax\Model\Sales\Order\TaxFactory $taxOrderFactory
      * @param array $data
      */
     public function __construct(
@@ -70,7 +70,7 @@ class Tax extends \Magento\Tax\Block\Sales\Order\Tax
         \Magento\Tax\Model\Config $taxConfig,
         \Magento\Tax\Helper\Data $taxHelper,
         \Magento\Tax\Model\Calculation $taxCalculation,
-        \Magento\Tax\Model\Sales\Order\Tax\Factory $taxOrderFactory,
+        \Magento\Tax\Model\Sales\Order\TaxFactory $taxOrderFactory,
         array $data = array()
     ) {
         $this->_taxHelper = $taxHelper;
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php
index 4a865a7f871..38a023d3cc9 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php
@@ -134,7 +134,7 @@ class Info extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
         if ($this->getOrder()->getCustomerIsGuest() || !$this->getOrder()->getCustomerId()) {
             return false;
         }
-        return $this->getUrl('adminhtml/customer/edit', array('id' => $this->getOrder()->getCustomerId()));
+        return $this->getUrl('customer/index/edit', array('id' => $this->getOrder()->getCustomerId()));
     }
 
     public function getViewUrl($orderId)
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Edit/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Edit/Form.php
index 450f3aafecd..e5aee0c6bd6 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Edit/Form.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Edit/Form.php
@@ -59,7 +59,7 @@ class Form extends \Magento\Backend\Block\AbstractBlock
     protected $_product = null;
 
     /**
-     * @var \Magento\Data\Form\Factory
+     * @var \Magento\Data\FormFactory
      */
     protected $_formFactory;
 
@@ -69,13 +69,13 @@ class Form extends \Magento\Backend\Block\AbstractBlock
     protected $_recurringProfile;
 
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Sales\Model\Recurring\Profile $recurringProfile
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Backend\Block\Context $context,
         \Magento\Sales\Model\Recurring\Profile $recurringProfile,
         array $data = array()
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php
index e6423793554..e74f37b9cc7 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php
@@ -42,7 +42,7 @@ class Form extends \Magento\Adminhtml\Block\Report\Filter\Form
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Sales\Model\Order\ConfigFactory $orderConfig
@@ -50,7 +50,7 @@ class Form extends \Magento\Adminhtml\Block\Report\Filter\Form
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Sales\Model\Order\ConfigFactory $orderConfig,
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php
index f2cffa17bb6..d9cffa1ab27 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php
@@ -49,7 +49,7 @@ class Coupon extends \Magento\Sales\Block\Adminhtml\Report\Filter\Form
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Sales\Model\Order\ConfigFactory $orderConfig
@@ -58,7 +58,7 @@ class Coupon extends \Magento\Sales\Block\Adminhtml\Report\Filter\Form
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Sales\Model\Order\ConfigFactory $orderConfig,
diff --git a/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php b/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php
index 775782b7931..6b44b07343c 100644
--- a/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php
+++ b/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php
@@ -24,23 +24,26 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Sales\Block\Order\Item\Renderer;
+
 /**
  * Order item render block
- *
- * @category    Magento
- * @package     Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Block\Order\Item\Renderer;
-
 class DefaultRenderer extends \Magento\Core\Block\Template
 {
     /**
-     * Core string
+     * Filter manager
+     *
+     * @var \Magento\Filter\FilterManager
+     */
+    protected $filter;
+
+    /**
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
      * @var \Magento\Catalog\Model\Product\OptionFactory
@@ -48,21 +51,25 @@ class DefaultRenderer extends \Magento\Core\Block\Template
     protected $_productOptionFactory;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Block\Template\Context $context
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory
+     * @param \Magento\Filter\FilterManager $filter
+     * @param \Magento\Stdlib\String $string
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Block\Template\Context $context,
+        \Magento\Stdlib\String $string,
         \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory,
+        \Magento\Filter\FilterManager $filter,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         $this->_productOptionFactory = $productOptionFactory;
+        $this->filter = $filter;
         parent::__construct($coreData, $context, $data);
     }
 
@@ -168,17 +175,17 @@ class DefaultRenderer extends \Magento\Core\Block\Template
         // truncate standard view
         $result = array();
         if (is_array($optionValue)) {
-            $_truncatedValue = implode("\n", $optionValue);
-            $_truncatedValue = nl2br($_truncatedValue);
-            return array('value' => $_truncatedValue);
+            $truncatedValue = implode("\n", $optionValue);
+            $truncatedValue = nl2br($truncatedValue);
+            return array('value' => $truncatedValue);
         } else {
-            $_truncatedValue = $this->_coreString->truncate($optionValue, 55, '');
-            $_truncatedValue = nl2br($_truncatedValue);
+            $truncatedValue = $this->filter->truncate($optionValue, array('length' => 55, 'etc' => ''));
+            $truncatedValue = nl2br($truncatedValue);
         }
 
-        $result = array('value' => $_truncatedValue);
+        $result = array('value' => $truncatedValue);
 
-        if ($this->_coreString->strlen($optionValue) > 55) {
+        if ($this->string->strlen($optionValue) > 55) {
             $result['value'] = $result['value'] . ' <a href="#" class="dots" onclick="return false">...</a>';
             $optionValue = nl2br($optionValue);
             $result = array_merge($result, array('full_view' => $optionValue));
@@ -206,4 +213,15 @@ class DefaultRenderer extends \Magento\Core\Block\Template
     {
         return $this->getLayout()->getBlock('additional.product.info');
     }
+
+    /**
+     * Prepare SKU
+     *
+     * @param string $sku
+     * @return string
+     */
+    public function prepareSku($sku)
+    {
+        return $this->escapeHtml($this->string->splitInjection($sku));
+    }
 }
diff --git a/app/code/Magento/Sales/Block/Order/Link.php b/app/code/Magento/Sales/Block/Order/Link.php
index 915285b2e5c..705d7472155 100644
--- a/app/code/Magento/Sales/Block/Order/Link.php
+++ b/app/code/Magento/Sales/Block/Order/Link.php
@@ -36,15 +36,17 @@ class Link extends \Magento\Page\Block\Link\Current
      * @param \Magento\Core\Block\Template\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\App\DefaultPathInterface $defaultPath
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Block\Template\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Helper\Data $coreData,
+        \Magento\App\DefaultPathInterface $defaultPath,
         array $data = array()
     ) {
-        parent::__construct($coreData, $context, $data);
+        parent::__construct($coreData, $context, $defaultPath, $data);
         $this->_registry = $registry;
     }
 
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Billing/Agreement.php b/app/code/Magento/Sales/Controller/Adminhtml/Billing/Agreement.php
index b2d82c9ec4d..2c23216d1be 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Billing/Agreement.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Billing/Agreement.php
@@ -135,7 +135,7 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_getSession()->addError($e->getMessage());
             } catch (\Exception $e) {
                 $this->_getSession()->addError(__('We could not cancel the billing agreement.'));
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
             }
             $this->_redirect('sales/*/view', array('_current' => true));
         }
@@ -159,7 +159,7 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_getSession()->addError($e->getMessage());
             } catch (\Exception $e) {
                 $this->_getSession()->addError(__('We could not delete the billing agreement.'));
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
             }
             $this->_redirect('sales/*/view', array('_current' => true));
         }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order.php b/app/code/Magento/Sales/Controller/Adminhtml/Order.php
index b74815b3d96..bcb3048c40e 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order.php
@@ -149,7 +149,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_getSession()->addError($e->getMessage());
             } catch (\Exception $e) {
                 $this->_getSession()->addError(__('We couldn\'t send the email order.'));
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
             }
         }
         $this->_redirect('sales/order/view', array('order_id' => $order->getId()));
@@ -172,7 +172,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action
                 $this->_getSession()->addError($e->getMessage());
             } catch (\Exception $e) {
                 $this->_getSession()->addError(__('You have not canceled the item.'));
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
             }
             $this->_redirect('sales/order/view', array('order_id' => $order->getId()));
         }
@@ -258,7 +258,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getSession()->addError(__('We couldn\'t update the payment.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->_redirect('sales/order/view', array('order_id' => $order->getId()));
     }
@@ -669,7 +669,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getSession()->addError(__('We couldn\'t void the payment.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->_redirect('sales/*/view', array('order_id' => $order->getId()));
     }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php
index 9ce5f8e247b..4516a53e762 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php
@@ -298,7 +298,8 @@ class Create extends \Magento\Backend\Controller\Adminhtml\Action
         if (!empty($couponCode)) {
             if ($this->_getQuote()->getCouponCode() !== $couponCode) {
                 $this->_getSession()->addError(
-                    __('"%1" coupon code is not valid.', $this->_getHelper()->escapeHtml($couponCode)));
+                    __('"%1" coupon code is not valid.', $this->_objectManager->get('Magento\Escaper')
+                            ->escapeHtml($couponCode)));
             } else {
                 $this->_getSession()->addSuccess(__('The coupon code has been accepted.'));
             }
@@ -446,7 +447,7 @@ class Create extends \Magento\Backend\Controller\Adminhtml\Action
 
         $updateResult->setJsVarName($this->getRequest()->getParam('as_js_varname'));
         $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setCompositeProductResult($updateResult);
-        $this->_redirect('sales/product/showUpdateResult');
+        $this->_redirect('catalog/product/showUpdateResult');
     }
 
     /**
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo.php
index 00af8725cc5..1dc4cf18ba4 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo.php
@@ -340,7 +340,7 @@ class Creditmemo
             $this->_getSession()->addError($e->getMessage());
             $this->_getSession()->setFormData($data);
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_getSession()->addError(__('Cannot save the credit memo.'));
         }
         $this->_redirect('sales/*/new', array('_current' => true));
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice.php
index 8400e96948c..05f55d07f0c 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice.php
@@ -311,14 +311,14 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic
                 try {
                     $invoice->sendEmail(!empty($data['send_email']), $comment);
                 } catch (\Exception $e) {
-                    $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                    $this->_objectManager->get('Magento\Logger')->logException($e);
                     $this->_getSession()->addError(__('We can\'t send the invoice email.'));
                 }
                 if ($shipment) {
                     try {
                         $shipment->sendEmail(!empty($data['send_email']));
                     } catch (\Exception $e) {
-                        $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                        $this->_objectManager->get('Magento\Logger')->logException($e);
                         $this->_getSession()->addError(__('We can\'t send the shipment.'));
                     }
                 }
@@ -332,7 +332,7 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getSession()->addError(__('We can\'t save the invoice.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->_redirect('sales/*/new', array('order_id' => $orderId));
     }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Shipment.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Shipment.php
index 32e23dd8ed2..a63326e3c96 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Shipment.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Shipment.php
@@ -259,7 +259,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
                 $this->_redirect('sales/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
             }
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             if ($isNeedCreateLabel) {
                 $responseAjax->setError(true);
                 $responseAjax->setMessage(
@@ -539,7 +539,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
             $response->setError(true);
             $response->setMessage($e->getMessage());
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $response->setError(true);
             $response->setMessage(__('An error occurred while creating shipping label.'));
         }
@@ -581,7 +581,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
         } catch (\Magento\Core\Exception $e) {
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_getSession()
                 ->addError(__('An error occurred while creating shipping label.'));
        }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php
index ab0420d0c7c..3cc88cfed64 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php
@@ -128,14 +128,14 @@ class Status extends \Magento\Backend\Controller\Adminhtml\Action
             $statusCode = $this->getRequest()->getParam('status');
 
             //filter tags in labels/status
-            /** @var $helper \Magento\Adminhtml\Helper\Data */
-            $helper = $this->_objectManager->get('Magento\Adminhtml\Helper\Data');
+            /** @var $filterManager \Magento\Filter\FilterManager */
+            $filterManager = $this->_objectManager->get('Magento\Filter\FilterManager');
             if ($isNew) {
-                $statusCode = $data['status'] = $helper->stripTags($data['status']);
+                $statusCode = $data['status'] = $filterManager->stripTags($data['status']);
             }
-            $data['label'] = $helper->stripTags($data['label']);
+            $data['label'] = $filterManager->stripTags($data['label']);
             foreach ($data['store_labels'] as &$label) {
-                $label = $helper->stripTags($label);
+                $label = $filterManager->stripTags($label);
             }
 
             $status = $this->_objectManager->create('Magento\Sales\Model\Order\Status')
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Recurring/Profile.php b/app/code/Magento/Sales/Controller/Adminhtml/Recurring/Profile.php
index fa37b0ad3c4..94e36507b95 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Recurring/Profile.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Recurring/Profile.php
@@ -80,7 +80,7 @@ class Profile extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Magento\Core\Exception $e) {
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->_redirect('sales/*/');
     }
@@ -96,7 +96,7 @@ class Profile extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Magento\Core\Exception $e) {
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->_redirect('sales/*/');
     }
@@ -110,7 +110,7 @@ class Profile extends \Magento\Backend\Controller\Adminhtml\Action
             $this->_initProfile();
             $this->loadLayout()->renderLayout();
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->norouteAction();
         }
     }
@@ -140,7 +140,7 @@ class Profile extends \Magento\Backend\Controller\Adminhtml\Action
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getSession()->addError(__('We could not update the profile.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         if ($profile) {
             $this->_redirect('sales/*/view', array('profile' => $profile->getId()));
@@ -168,7 +168,7 @@ class Profile extends \Magento\Backend\Controller\Adminhtml\Action
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getSession()->addError(__('We could not update the profile.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         if ($profile) {
             $this->_redirect('sales/*/view', array('profile' => $profile->getId()));
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Transactions.php b/app/code/Magento/Sales/Controller/Adminhtml/Transactions.php
index 7f8d80ac1fe..d0447eb1fb8 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Transactions.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Transactions.php
@@ -138,7 +138,7 @@ class Transactions extends \Magento\Backend\Controller\Adminhtml\Action
             $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(
                 __('We can\'t update the transaction details.')
             );
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->_redirect('sales/transactions/view', array('_current' => true));
     }
diff --git a/app/code/Magento/Sales/Controller/Billing/Agreement.php b/app/code/Magento/Sales/Controller/Billing/Agreement.php
index 2e8de062a76..050f959ceb7 100644
--- a/app/code/Magento/Sales/Controller/Billing/Agreement.php
+++ b/app/code/Magento/Sales/Controller/Billing/Agreement.php
@@ -121,7 +121,7 @@ class Agreement extends \Magento\Core\Controller\Front\Action
             } catch (\Magento\Core\Exception $e) {
                 $this->_getSession()->addError($e->getMessage());
             } catch (\Exception $e) {
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
                 $this->_getSession()->addError(__('We couldn\'t start the billing agreement wizard.'));
             }
         }
@@ -153,7 +153,7 @@ class Agreement extends \Magento\Core\Controller\Front\Action
             } catch (\Magento\Core\Exception $e) {
                 $this->_getSession()->addError($e->getMessage());
             } catch (\Exception $e) {
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
                 $this->_getSession()->addError(__('We couldn\'t finish the billing agreement wizard.'));
             }
             $this->_redirect('*/*/index');
@@ -186,7 +186,7 @@ class Agreement extends \Magento\Core\Controller\Front\Action
             } catch (\Magento\Core\Exception $e) {
                 $this->_getSession()->addError($e->getMessage());
             } catch (\Exception $e) {
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
                 $this->_getSession()->addError(__('We couldn\'t cancel the billing agreement.'));
             }
         }
diff --git a/app/code/Magento/Sales/Controller/Recurring/Profile.php b/app/code/Magento/Sales/Controller/Recurring/Profile.php
index b3ecbfd6753..74cff74a97e 100644
--- a/app/code/Magento/Sales/Controller/Recurring/Profile.php
+++ b/app/code/Magento/Sales/Controller/Recurring/Profile.php
@@ -118,7 +118,7 @@ class Profile extends \Magento\Core\Controller\Front\Action
             $this->_session->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_session->addError(__('We couldn\'t update the profile.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         if ($profile) {
             $this->_redirect('*/*/view', array('profile' => $profile->getId()));
@@ -146,7 +146,7 @@ class Profile extends \Magento\Core\Controller\Front\Action
             $this->_session->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_session->addError(__('We couldn\'t update the profile.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         if ($profile) {
             $this->_redirect('*/*/view', array('profile' => $profile->getId()));
@@ -174,7 +174,7 @@ class Profile extends \Magento\Core\Controller\Front\Action
         } catch (\Magento\Core\Exception $e) {
             $this->_session->addError($e->getMessage());
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->_redirect('*/*/');
     }
diff --git a/app/code/Magento/Sales/Helper/Guest.php b/app/code/Magento/Sales/Helper/Guest.php
index 7a704edae4b..900a724e08c 100644
--- a/app/code/Magento/Sales/Helper/Guest.php
+++ b/app/code/Magento/Sales/Helper/Guest.php
@@ -23,12 +23,11 @@
  * @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\Sales\Helper;
 
 /**
  * Sales module base helper
  */
-namespace Magento\Sales\Helper;
-
 class Guest extends \Magento\Core\Helper\Data
 {
     /**
@@ -81,14 +80,11 @@ class Guest extends \Magento\Core\Helper\Data
     /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Encryption $encryptor
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Core\Model\Cookie $coreCookie
@@ -100,14 +96,11 @@ class Guest extends \Magento\Core\Helper\Data
     public function __construct(
         \Magento\Core\Helper\Context $context,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\Core\Model\Date $dateModel,
         \Magento\App\State $appState,
-        \Magento\Core\Model\Encryption $encryptor,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Core\Model\Cookie $coreCookie,
@@ -115,16 +108,22 @@ class Guest extends \Magento\Core\Helper\Data
         \Magento\Core\Model\Session $coreSession,
         \Magento\Sales\Model\OrderFactory $orderFactory,
         $dbCompatibleMode = true
-    )
-    {
+    ) {
         $this->_coreRegistry = $coreRegistry;
         $this->_customerSession = $customerSession;
         $this->_coreCookie = $coreCookie;
         $this->_coreApp = $coreApp;
         $this->_coreSession = $coreSession;
         $this->_orderFactory = $orderFactory;
-        parent::__construct($context, $eventManager, $coreHttp, $config, $coreStoreConfig, $storeManager,
-            $locale, $dateModel, $appState, $encryptor, $dbCompatibleMode
+        parent::__construct(
+            $context,
+            $eventManager,
+            $coreStoreConfig,
+            $storeManager,
+            $locale,
+            $dateModel,
+            $appState,
+            $dbCompatibleMode
         );
     }
 
@@ -149,7 +148,7 @@ class Guest extends \Magento\Core\Helper\Data
         if (empty($post) && !$this->_coreCookie->get($this->_cookieName)) {
             $this->_coreApp->getResponse()->setRedirect($this->_urlBuilder->getUrl('sales/guest/form'));
             return false;
-        } elseif (!empty($post) && isset($post['oar_order_id']) && isset($post['oar_type']))  {
+        } elseif (!empty($post) && isset($post['oar_order_id']) && isset($post['oar_type'])) {
             $type           = $post['oar_type'];
             $incrementId    = $post['oar_order_id'];
             $lastName       = $post['oar_billing_lastname'];
diff --git a/app/code/Magento/Sales/Helper/Reorder.php b/app/code/Magento/Sales/Helper/Reorder.php
index a8938a8a668..3a43e685440 100644
--- a/app/code/Magento/Sales/Helper/Reorder.php
+++ b/app/code/Magento/Sales/Helper/Reorder.php
@@ -41,35 +41,35 @@ class Reorder extends \Magento\Core\Helper\Data
     /**
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Http $coreHttp
-     * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\Core\Model\Date $dateModel
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\Encryption $encryptor
      * @param \Magento\Customer\Model\Session $customerSession
      * @param bool $dbCompatibleMode
      */
     public function __construct(
         \Magento\Core\Helper\Context $context,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Http $coreHttp,
-        \Magento\Core\Model\Config $config,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\Core\Model\Date $dateModel,
         \Magento\App\State $appState,
-        \Magento\Core\Model\Encryption $encryptor,
         \Magento\Customer\Model\Session $customerSession,
         $dbCompatibleMode = true
-    )
-    {
+    ) {
         $this->_customerSession = $customerSession;
-        parent::__construct($context, $eventManager, $coreHttp, $config, $coreStoreConfig, $storeManager,
-            $locale, $dateModel, $appState, $encryptor, $dbCompatibleMode
+        parent::__construct(
+            $context,
+            $eventManager,
+            $coreStoreConfig,
+            $storeManager,
+            $locale,
+            $dateModel,
+            $appState,
+            $dbCompatibleMode
         );
     }
 
diff --git a/app/code/Magento/Sales/Model/AbstractModel.php b/app/code/Magento/Sales/Model/AbstractModel.php
index 1dbf87136eb..84c3806bb0a 100644
--- a/app/code/Magento/Sales/Model/AbstractModel.php
+++ b/app/code/Magento/Sales/Model/AbstractModel.php
@@ -37,10 +37,16 @@ abstract class AbstractModel extends \Magento\Core\Model\AbstractModel
      */
     protected $_coreLocale;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\LocaleInterface $coreLocale
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -49,15 +55,16 @@ abstract class AbstractModel extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
-    )
-    {
+    ) {
         parent::__construct(
             $context, $registry, $resource, $resourceCollection, $data
         );
         $this->_coreLocale = $coreLocale;
+        $this->dateTime = $dateTime;
     }
 
     /**
@@ -89,7 +96,7 @@ abstract class AbstractModel extends \Magento\Core\Model\AbstractModel
     public function getCreatedAtDate()
     {
         return $this->_coreLocale->date(
-            \Magento\Date::toTimestamp($this->getCreatedAt()),
+            $this->dateTime->toTimestamp($this->getCreatedAt()),
             null,
             null,
             true
@@ -105,7 +112,7 @@ abstract class AbstractModel extends \Magento\Core\Model\AbstractModel
     {
         return $this->_coreLocale->storeDate(
             $this->getStore(),
-            \Magento\Date::toTimestamp($this->getCreatedAt()),
+            $this->dateTime->toTimestamp($this->getCreatedAt()),
             true
         );
     }
diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php
index c27aac7a249..6131f9f0446 100644
--- a/app/code/Magento/Sales/Model/AdminOrder/Create.php
+++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php
@@ -135,7 +135,7 @@ class Create extends \Magento\Object implements \Magento\Checkout\Model\Cart\Car
     protected $_coreData = null;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -163,7 +163,7 @@ class Create extends \Magento\Object implements \Magento\Checkout\Model\Cart\Car
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Sales\Model\Config $salesConfig
      * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param array $data
      */
     public function __construct(
@@ -173,7 +173,7 @@ class Create extends \Magento\Object implements \Magento\Checkout\Model\Cart\Car
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Sales\Model\Config $salesConfig,
         \Magento\Adminhtml\Model\Session\Quote $sessionQuote,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         array $data = array()
     ) {
         $this->_objectManager = $objectManager;
diff --git a/app/code/Magento/Sales/Model/Config.php b/app/code/Magento/Sales/Model/Config.php
index 5e2ca79b640..1473264b1fb 100644
--- a/app/code/Magento/Sales/Model/Config.php
+++ b/app/code/Magento/Sales/Model/Config.php
@@ -38,12 +38,21 @@ class Config implements \Magento\Sales\Model\ConfigInterface
      */
     protected $_dataContainer;
 
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
     /**
      * @param \Magento\Sales\Model\Config\Data $dataContainer
+     * @param \Magento\App\State $appState
      */
-    public function __construct(\Magento\Sales\Model\Config\Data $dataContainer)
-    {
+    public function __construct(
+        \Magento\Sales\Model\Config\Data $dataContainer,
+        \Magento\App\State $appState
+    ) {
         $this->_dataContainer = $dataContainer;
+        $this->_appState = $appState;
     }
 
     /**
@@ -52,12 +61,11 @@ class Config implements \Magento\Sales\Model\ConfigInterface
      * @param string $section
      * @param string $group
      * @param string $code
-     * @param string $area
      * @return array
      */
-    public function getTotalsRenderer($section, $group, $code, $area)
+    public function getTotalsRenderer($section, $group, $code)
     {
-        $path = implode('/', array($section, $group, $code, 'renderers', $area));
+        $path = implode('/', array($section, $group, $code, 'renderers', $this->_appState->getAreaCode()));
         return $this->_dataContainer->get($path);
     }
 
diff --git a/app/code/Magento/Sales/Model/Config/Ordered.php b/app/code/Magento/Sales/Model/Config/Ordered.php
index 40e0517c886..749293f3d3b 100644
--- a/app/code/Magento/Sales/Model/Config/Ordered.php
+++ b/app/code/Magento/Sales/Model/Config/Ordered.php
@@ -83,7 +83,7 @@ abstract class Ordered extends \Magento\Core\Model\Config\Base
     protected $_configCacheType;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -94,13 +94,13 @@ abstract class Ordered extends \Magento\Core\Model\Config\Base
 
     /**
      * @param \Magento\Core\Model\Cache\Type\Config $configCacheType
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Sales\Model\Config $salesConfig
      * @param \Magento\Simplexml\Element $sourceData
      */
     public function __construct(
         \Magento\Core\Model\Cache\Type\Config $configCacheType,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Sales\Model\Config $salesConfig,
         $sourceData = null
     ) {
diff --git a/app/code/Magento/Sales/Model/Config/SchemaLocator.php b/app/code/Magento/Sales/Model/Config/SchemaLocator.php
index 58dee4f9ffe..d128faa68d0 100644
--- a/app/code/Magento/Sales/Model/Config/SchemaLocator.php
+++ b/app/code/Magento/Sales/Model/Config/SchemaLocator.php
@@ -46,9 +46,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Sales') . '/' . 'sales.xsd';
     }
diff --git a/app/code/Magento/Sales/Model/ConfigInterface.php b/app/code/Magento/Sales/Model/ConfigInterface.php
index d18dae87eff..4253a95c943 100644
--- a/app/code/Magento/Sales/Model/ConfigInterface.php
+++ b/app/code/Magento/Sales/Model/ConfigInterface.php
@@ -34,10 +34,9 @@ interface ConfigInterface
      * @param string $section
      * @param string $group
      * @param string $code
-     * @param string $area
      * @return array
      */
-    public function getTotalsRenderer($section, $group, $code, $area);
+    public function getTotalsRenderer($section, $group, $code);
 
     /**
      * Retrieve totals for group
diff --git a/app/code/Magento/Sales/Model/Observer.php b/app/code/Magento/Sales/Model/Observer.php
index ce1f6fa184b..884563bf248 100644
--- a/app/code/Magento/Sales/Model/Observer.php
+++ b/app/code/Magento/Sales/Model/Observer.php
@@ -50,33 +50,26 @@ class Observer
      *
      * @var \Magento\Customer\Helper\Address
      */
-    protected $_customerAddress = null;
+    protected $_customerAddress;
 
     /**
      * Customer data
      *
      * @var \Magento\Customer\Helper\Data
      */
-    protected $_customerData = null;
-
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
+    protected $_customerData;
 
     /**
      * Core event manager proxy
      *
      * @var \Magento\Event\ManagerInterface
      */
-    protected $_eventManager = null;
+    protected $_eventManager;
 
     /**
-     * @var \Magento\Core\Model\Config
+     * @var \Magento\Core\Model\Store\Config
      */
-    protected $_coreConfig;
+    protected $_storeConfig;
 
     /**
      * @var \Magento\Sales\Model\Resource\Quote\CollectionFactory
@@ -95,32 +88,29 @@ class Observer
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Customer\Helper\Data $customerData
      * @param \Magento\Customer\Helper\Address $customerAddress
      * @param \Magento\Catalog\Helper\Data $catalogData
-     * @param \Magento\Core\Model\Config $coreConfig
+     * @param \Magento\Core\Model\Store\Config $storeConfig
      * @param \Magento\Sales\Model\Resource\Quote\CollectionFactory $quoteFactory
      * @param \Magento\Core\Model\LocaleInterface $coreLocale
      * @param \Magento\Sales\Model\ResourceFactory $resourceFactory
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Customer\Helper\Data $customerData,
         \Magento\Customer\Helper\Address $customerAddress,
         \Magento\Catalog\Helper\Data $catalogData,
-        \Magento\Core\Model\Config $coreConfig,
+        \Magento\Core\Model\Store\Config $storeConfig,
         \Magento\Sales\Model\Resource\Quote\CollectionFactory $quoteFactory,
         \Magento\Core\Model\LocaleInterface $coreLocale,
         \Magento\Sales\Model\ResourceFactory $resourceFactory
     ) {
         $this->_eventManager = $eventManager;
-        $this->_coreData = $coreData;
         $this->_customerData = $customerData;
         $this->_customerAddress = $customerAddress;
         $this->_catalogData = $catalogData;
-        $this->_coreConfig = $coreConfig;
+        $this->_storeConfig = $storeConfig;
         $this->_quoteCollectionFactory = $quoteFactory;
         $this->_coreLocale = $coreLocale;
         $this->_resourceFactory = $resourceFactory;
@@ -136,7 +126,7 @@ class Observer
     {
         $this->_eventManager->dispatch('clear_expired_quotes_before', array('sales_observer' => $this));
 
-        $lifetimes = $this->_coreConfig->getStoresConfigByPath('checkout/cart/delete_quote_after');
+        $lifetimes = $this->_storeConfig->getStoresConfigByPath('checkout/cart/delete_quote_after');
         foreach ($lifetimes as $storeId=>$lifetime) {
             $lifetime *= 86400;
 
@@ -379,14 +369,11 @@ class Observer
             return;
         }
 
-        /** @var $customerHelper \Magento\Customer\Helper\Data */
-        $customerHelper = $this->_customerData;
-
         $customerCountryCode = $quoteAddress->getCountryId();
         $customerVatNumber = $quoteAddress->getVatId();
 
-        if (empty($customerVatNumber) || !$this->_coreData->isCountryInEU($customerCountryCode)) {
-            $groupId = ($customerInstance->getId()) ? $customerHelper->getDefaultCustomerGroupId($storeId)
+        if (empty($customerVatNumber) || !$this->_customerData->isCountryInEU($customerCountryCode)) {
+            $groupId = ($customerInstance->getId()) ? $this->_customerData->getDefaultCustomerGroupId($storeId)
                 : \Magento\Customer\Model\Group::NOT_LOGGED_IN_ID;
 
             $quoteAddress->setPrevQuoteCustomerGroupId($quoteInstance->getCustomerGroupId());
@@ -396,10 +383,8 @@ class Observer
             return;
         }
 
-        /** @var $coreHelper \Magento\Core\Helper\Data */
-        $coreHelper = $this->_coreData;
-        $merchantCountryCode = $coreHelper->getMerchantCountryCode();
-        $merchantVatNumber = $coreHelper->getMerchantVatNumber();
+        $merchantCountryCode = $this->_customerData->getMerchantCountryCode();
+        $merchantVatNumber = $this->_customerData->getMerchantVatNumber();
 
         $gatewayResponse = null;
         if ($addressHelper->getValidateOnEachTransaction($storeId)
@@ -407,7 +392,7 @@ class Observer
             || $customerVatNumber != $quoteAddress->getValidatedVatNumber()
         ) {
             // Send request to gateway
-            $gatewayResponse = $customerHelper->checkVatNumber(
+            $gatewayResponse = $this->_customerData->checkVatNumber(
                 $customerCountryCode,
                 $customerVatNumber,
                 ($merchantVatNumber !== '') ? $merchantCountryCode : '',
@@ -433,7 +418,7 @@ class Observer
         }
 
         // Magento always has to emulate group even if customer uses default billing/shipping address
-        $groupId = $customerHelper->getCustomerGroupIdBasedOnVatNumber(
+        $groupId = $this->_customerData->getCustomerGroupIdBasedOnVatNumber(
             $customerCountryCode, $gatewayResponse, $customerInstance->getStore()
         );
 
diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php
index b16cbce4bf0..cfa2c04f78b 100644
--- a/app/code/Magento/Sales/Model/Order.php
+++ b/app/code/Magento/Sales/Model/Order.php
@@ -521,6 +521,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\LocaleInterface $coreLocale
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Sales\Model\ResourceFactory $resourceFactory
      * @param \Magento\Sales\Model\Order\Config $orderConfig
@@ -551,6 +552,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Sales\Model\ResourceFactory $resourceFactory,
         \Magento\Sales\Model\Order\Config $orderConfig,
@@ -590,7 +592,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
         $this->_orderHistoryFactory = $orderHistoryFactory;
         $this->_orderTaxCollFactory = $orderTaxCollFactory;
         $this->_carrierFactory = $carrierFactory;
-        parent::__construct($context, $registry, $coreLocale, $resource, $resourceCollection, $data);
+        parent::__construct($context, $registry, $coreLocale, $dateTime, $resource, $resourceCollection, $data);
     }
 
     /**
diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Creditmemo.php
index df67a3c6e52..91408d289e2 100644
--- a/app/code/Magento/Sales/Model/Order/Creditmemo.php
+++ b/app/code/Magento/Sales/Model/Order/Creditmemo.php
@@ -269,6 +269,7 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Sales\Model\Order\Creditmemo\Config $creditmemoConfig,
         \Magento\Sales\Model\OrderFactory $orderFactory,
         \Magento\Sales\Model\Resource\Order\Creditmemo\Item\CollectionFactory $cmItemCollFactory,
@@ -295,7 +296,7 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel
         $this->_commentCollFactory = $commentCollFactory;
         $this->_templateMailerFactory = $templateMailerFactory;
         $this->_emailInfoFactory = $emailInfoFactory;
-        parent::__construct($context, $registry, $coreLocale, $resource, $resourceCollection, $data);
+        parent::__construct($context, $registry, $coreLocale, $dateTime, $resource, $resourceCollection, $data);
     }
 
     /**
diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php b/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php
index c5653c25d4c..5d5d1c9635d 100644
--- a/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php
+++ b/app/code/Magento/Sales/Model/Order/Creditmemo/Comment.php
@@ -58,6 +58,7 @@ class Comment extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\LocaleInterface $coreLocale
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -67,13 +68,14 @@ class Comment extends \Magento\Sales\Model\AbstractModel
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         parent::__construct(
-            $context, $registry, $coreLocale, $resource, $resourceCollection, $data
+            $context, $registry, $coreLocale, $dateTime, $resource, $resourceCollection, $data
         );
         $this->_storeManager = $storeManager;
     }
diff --git a/app/code/Magento/Sales/Model/Order/Invoice.php b/app/code/Magento/Sales/Model/Order/Invoice.php
index f2ec9791457..25e21dccd3f 100644
--- a/app/code/Magento/Sales/Model/Order/Invoice.php
+++ b/app/code/Magento/Sales/Model/Order/Invoice.php
@@ -275,6 +275,7 @@ class Invoice extends \Magento\Sales\Model\AbstractModel
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Sales\Model\Order\Invoice\Config $invoiceConfig,
         \Magento\Sales\Model\OrderFactory $orderFactory,
         \Magento\Sales\Model\Resource\OrderFactory $orderResourceFactory,
@@ -301,7 +302,7 @@ class Invoice extends \Magento\Sales\Model\AbstractModel
         $this->_commentCollFactory = $commentCollFactory;
         $this->_templateMailerFactory = $templateMailerFactory;
         $this->_emailInfoFactory = $emailInfoFactory;
-        parent::__construct($context, $registry, $coreLocale, $resource, $resourceCollection, $data);
+        parent::__construct($context, $registry, $coreLocale, $dateTime, $resource, $resourceCollection, $data);
     }
 
     /**
diff --git a/app/code/Magento/Sales/Model/Order/Invoice/Comment.php b/app/code/Magento/Sales/Model/Order/Invoice/Comment.php
index 28ed7dd53a4..8d0a9f431b5 100644
--- a/app/code/Magento/Sales/Model/Order/Invoice/Comment.php
+++ b/app/code/Magento/Sales/Model/Order/Invoice/Comment.php
@@ -58,6 +58,7 @@ class Comment extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\LocaleInterface $coreLocale
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -67,13 +68,14 @@ class Comment extends \Magento\Sales\Model\AbstractModel
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         parent::__construct(
-            $context, $registry, $coreLocale, $resource, $resourceCollection, $data
+            $context, $registry, $coreLocale, $dateTime, $resource, $resourceCollection, $data
         );
         $this->_storeManager = $storeManager;
     }
diff --git a/app/code/Magento/Sales/Model/Order/Payment.php b/app/code/Magento/Sales/Model/Order/Payment.php
index e18714a3471..3fc93e3b8fa 100644
--- a/app/code/Magento/Sales/Model/Order/Payment.php
+++ b/app/code/Magento/Sales/Model/Order/Payment.php
@@ -218,11 +218,11 @@ class Payment extends \Magento\Payment\Model\Info
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Sales\Model\Service\Order $serviceOrderFactory
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
+     * @param \Magento\Sales\Model\Service\OrderFactory $serviceOrderFactory
      * @param \Magento\Sales\Model\Order\Payment\TransactionFactory $transactionFactory
      * @param \Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory $transactionCollFactory
      * @param \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory
@@ -233,11 +233,11 @@ class Payment extends \Magento\Payment\Model\Info
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Sales\Model\Service\Order $serviceOrderFactory,
+        \Magento\Encryption\EncryptorInterface $encryptor,
+        \Magento\Sales\Model\Service\OrderFactory $serviceOrderFactory,
         \Magento\Sales\Model\Order\Payment\TransactionFactory $transactionFactory,
         \Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory $transactionCollFactory,
         \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory,
@@ -252,7 +252,7 @@ class Payment extends \Magento\Payment\Model\Info
         $this->_transactionCollFactory = $transactionCollFactory;
         $this->_agreementFactory = $agreementFactory;
         $this->_storeManager = $storeManager;
-        parent::__construct($coreData, $paymentData, $context, $registry, $resource, $resourceCollection, $data);
+        parent::__construct($paymentData, $context, $registry, $encryptor, $resource, $resourceCollection, $data);
     }
 
     /**
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php
index 7d458f828dd..ce738275119 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php
@@ -77,11 +77,9 @@ abstract class AbstractPdf extends \Magento\Object
     protected $_paymentData;
 
     /**
-     * Core string
-     *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString;
+    protected $string;
 
     /**
      * Core data
@@ -130,7 +128,7 @@ abstract class AbstractPdf extends \Magento\Object
     /**
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\Translate $translate
      * @param \Magento\App\Dir $coreDir
@@ -145,7 +143,7 @@ abstract class AbstractPdf extends \Magento\Object
     public function __construct(
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\Translate $translate,
         \Magento\App\Dir $coreDir,
@@ -157,7 +155,7 @@ abstract class AbstractPdf extends \Magento\Object
     ) {
         $this->_paymentData = $paymentData;
         $this->_coreData = $coreData;
-        $this->_coreString = $coreString;
+        $this->string = $string;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_translate = $translate;
         $this->_coreDir = $coreDir;
@@ -294,7 +292,7 @@ abstract class AbstractPdf extends \Magento\Object
         foreach (explode("\n", $this->_coreStoreConfig->getConfig('sales/identity/address', $store)) as $value) {
             if ($value !== '') {
                 $value = preg_replace('/<br[^>]*>/i', "\n", $value);
-                foreach ($this->_coreString->strSplit($value, 45, true, true) as $_value) {
+                foreach ($this->string->split($value, 45, true, true) as $_value) {
                     $page->drawText(trim(strip_tags($_value)),
                         $this->getAlignRight($_value, 130, 440, $font, 10),
                         $top,
@@ -316,7 +314,7 @@ abstract class AbstractPdf extends \Magento\Object
     {
         $return = array();
         foreach (explode('|', $address) as $str) {
-            foreach ($this->_coreString->strSplit($str, 45, true, true) as $part) {
+            foreach ($this->string->split($str, 45, true, true) as $part) {
                 if (empty($part)) {
                     continue;
                 }
@@ -338,7 +336,7 @@ abstract class AbstractPdf extends \Magento\Object
         foreach ($address as $value) {
             if ($value !== '') {
                 $text = array();
-                foreach ($this->_coreString->strSplit($value, 55, true, true) as $_value) {
+                foreach ($this->string->split($value, 55, true, true) as $_value) {
                     $text[] = $_value;
                 }
                 foreach ($text as $part) {
@@ -447,7 +445,7 @@ abstract class AbstractPdf extends \Magento\Object
         foreach ($billingAddress as $value) {
             if ($value !== '') {
                 $text = array();
-                foreach ($this->_coreString->strSplit($value, 45, true, true) as $_value) {
+                foreach ($this->string->split($value, 45, true, true) as $_value) {
                     $text[] = $_value;
                 }
                 foreach ($text as $part) {
@@ -464,7 +462,7 @@ abstract class AbstractPdf extends \Magento\Object
             foreach ($shippingAddress as $value) {
                 if ($value!=='') {
                     $text = array();
-                    foreach ($this->_coreString->strSplit($value, 45, true, true) as $_value) {
+                    foreach ($this->string->split($value, 45, true, true) as $_value) {
                         $text[] = $_value;
                     }
                     foreach ($text as $part) {
@@ -505,7 +503,7 @@ abstract class AbstractPdf extends \Magento\Object
             if (trim($value) != '') {
                 //Printing "Payment Method" lines
                 $value = preg_replace('/<br[^>]*>/i', "\n", $value);
-                foreach ($this->_coreString->strSplit($value, 45, true, true) as $_value) {
+                foreach ($this->string->split($value, 45, true, true) as $_value) {
                     $page->drawText(strip_tags(trim($_value)), $paymentLeft, $yPayments, 'UTF-8');
                     $yPayments -= 15;
                 }
@@ -525,7 +523,7 @@ abstract class AbstractPdf extends \Magento\Object
             $methodStartY = $this->y;
             $this->y     -= 15;
 
-            foreach ($this->_coreString->strSplit($shippingMethod, 45, true, true) as $_value) {
+            foreach ($this->string->split($shippingMethod, 45, true, true) as $_value) {
                 $page->drawText(strip_tags(trim($_value)), 285, $this->y, 'UTF-8');
                 $this->y -= 15;
             }
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Config/SchemaLocator.php b/app/code/Magento/Sales/Model/Order/Pdf/Config/SchemaLocator.php
index a4886a8350f..e9d9b5fe0a9 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Config/SchemaLocator.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Config/SchemaLocator.php
@@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     private $_schemaFile;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $dir = $moduleReader->getModuleDir('etc', 'Magento_Sales');
         $this->_schema = $dir . '/pdf.xsd';
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php
index 75544a3f8ba..e135af8641e 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php
@@ -44,7 +44,7 @@ class Creditmemo extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
     /**
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\Translate $translate
      * @param \Magento\App\Dir $coreDir
@@ -61,7 +61,7 @@ class Creditmemo extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
     public function __construct(
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\Translate $translate,
         \Magento\App\Dir $coreDir,
@@ -78,7 +78,7 @@ class Creditmemo extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
         parent::__construct(
             $paymentData,
             $coreData,
-            $coreString,
+            $string,
             $coreStoreConfig,
             $translate,
             $coreDir,
@@ -113,41 +113,41 @@ class Creditmemo extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
         );
 
         $lines[0][] = array(
-            'text'  => $this->_coreString->strSplit(__('SKU'), 12, true, true),
+            'text'  => $this->string->split(__('SKU'), 12, true, true),
             'feed'  => 255,
             'align' => 'right'
         );
 
         $lines[0][] = array(
-            'text'  => $this->_coreString->strSplit(__('Total (ex)'), 12, true, true),
+            'text'  => $this->string->split(__('Total (ex)'), 12, true, true),
             'feed'  => 330,
             'align' => 'right',
             //'width' => 50,
         );
 
         $lines[0][] = array(
-            'text'  => $this->_coreString->strSplit(__('Discount'), 12, true, true),
+            'text'  => $this->string->split(__('Discount'), 12, true, true),
             'feed'  => 380,
             'align' => 'right',
             //'width' => 50,
         );
 
         $lines[0][] = array(
-            'text'  => $this->_coreString->strSplit(__('Qty'), 12, true, true),
+            'text'  => $this->string->split(__('Qty'), 12, true, true),
             'feed'  => 445,
             'align' => 'right',
             //'width' => 30,
         );
 
         $lines[0][] = array(
-            'text'  => $this->_coreString->strSplit(__('Tax'), 12, true, true),
+            'text'  => $this->string->split(__('Tax'), 12, true, true),
             'feed'  => 495,
             'align' => 'right',
             //'width' => 45,
         );
 
         $lines[0][] = array(
-            'text'  => $this->_coreString->strSplit(__('Total (inc)'), 12, true, true),
+            'text'  => $this->string->split(__('Total (inc)'), 12, true, true),
             'feed'  => 565,
             'align' => 'right'
         );
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php b/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php
index da2b956eeb3..79774eb3087 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php
@@ -44,7 +44,7 @@ class Invoice extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
     /**
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\Translate $translate
      * @param \Magento\App\Dir $coreDir
@@ -61,7 +61,7 @@ class Invoice extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
     public function __construct(
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\Translate $translate,
         \Magento\App\Dir $coreDir,
@@ -78,7 +78,7 @@ class Invoice extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
         parent::__construct(
             $paymentData,
             $coreData,
-            $coreString,
+            $string,
             $coreStoreConfig,
             $translate,
             $coreDir,
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php
index c5d1f7bd831..de69a8580a1 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php
@@ -38,12 +38,12 @@ class DefaultCreditmemo extends \Magento\Sales\Model\Order\Pdf\Items\AbstractIte
     /**
      * Core string
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -53,7 +53,7 @@ class DefaultCreditmemo extends \Magento\Sales\Model\Order\Pdf\Items\AbstractIte
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
@@ -62,7 +62,7 @@ class DefaultCreditmemo extends \Magento\Sales\Model\Order\Pdf\Items\AbstractIte
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct($taxData, $context, $registry, $coreDir, $resource, $resourceCollection, $data);
     }
 
@@ -79,13 +79,13 @@ class DefaultCreditmemo extends \Magento\Sales\Model\Order\Pdf\Items\AbstractIte
 
         // draw Product name
         $lines[0] = array(array(
-            'text' => $this->_coreString->strSplit($item->getName(), 35, true, true),
+            'text' => $this->string->split($item->getName(), 35, true, true),
             'feed' => 35,
         ));
 
         // draw SKU
         $lines[0][] = array(
-            'text'  => $this->_coreString->strSplit($this->getSku($item), 17),
+            'text'  => $this->string->split($this->getSku($item), 17),
             'feed'  => 255,
             'align' => 'right'
         );
@@ -138,7 +138,7 @@ class DefaultCreditmemo extends \Magento\Sales\Model\Order\Pdf\Items\AbstractIte
             foreach ($options as $option) {
                 // draw options label
                 $lines[][] = array(
-                    'text' => $this->_coreString->strSplit(strip_tags($option['label']), 40, true, true),
+                    'text' => $this->string->split(strip_tags($option['label']), 40, true, true),
                     'font' => 'italic',
                     'feed' => 35
                 );
@@ -146,7 +146,7 @@ class DefaultCreditmemo extends \Magento\Sales\Model\Order\Pdf\Items\AbstractIte
                 // draw options value
                 $_printValue = isset($option['print_value']) ? $option['print_value'] : strip_tags($option['value']);
                 $lines[][] = array(
-                    'text' => $this->_coreString->strSplit($_printValue, 30, true, true),
+                    'text' => $this->string->split($_printValue, 30, true, true),
                     'feed' => 40
                 );
             }
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php
index 2c24cbce0f5..b4f36c5d9ae 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php
@@ -36,10 +36,10 @@ class DefaultInvoice extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
      *
      * @var \Magento\Core\Helper\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -49,7 +49,7 @@ class DefaultInvoice extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
@@ -58,7 +58,7 @@ class DefaultInvoice extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct($taxData, $context, $registry, $coreDir, $resource, $resourceCollection, $data);
     }
 
@@ -75,13 +75,13 @@ class DefaultInvoice extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
 
         // draw Product name
         $lines[0] = array(array(
-            'text' => $this->_coreString->strSplit($item->getName(), 35, true, true),
+            'text' => $this->string->split($item->getName(), 35, true, true),
             'feed' => 35,
         ));
 
         // draw SKU
         $lines[0][] = array(
-            'text'  => $this->_coreString->strSplit($this->getSku($item), 17),
+            'text'  => $this->string->split($this->getSku($item), 17),
             'feed'  => 290,
             'align' => 'right'
         );
@@ -145,7 +145,7 @@ class DefaultInvoice extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
             foreach ($options as $option) {
                 // draw options label
                 $lines[][] = array(
-                    'text' => $this->_coreString->strSplit(strip_tags($option['label']), 40, true, true),
+                    'text' => $this->string->split(strip_tags($option['label']), 40, true, true),
                     'font' => 'italic',
                     'feed' => 35
                 );
@@ -159,7 +159,7 @@ class DefaultInvoice extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
                     $values = explode(', ', $_printValue);
                     foreach ($values as $value) {
                         $lines[][] = array(
-                            'text' => $this->_coreString->strSplit($value, 30, true, true),
+                            'text' => $this->string->split($value, 30, true, true),
                             'feed' => 40
                         );
                     }
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php
index cdd0c19b5f0..c2d8acc6ab6 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php
@@ -34,12 +34,12 @@ class DefaultShipment extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
     /**
      * Core string
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -49,7 +49,7 @@ class DefaultShipment extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
@@ -58,7 +58,7 @@ class DefaultShipment extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         parent::__construct($taxData, $context, $registry, $coreDir, $resource, $resourceCollection, $data);
     }
 
@@ -73,9 +73,9 @@ class DefaultShipment extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
         $lines  = array();
 
         // draw Product name
-        $stringHelper = $this->_coreString;
+        $stringHelper = $this->string;
         $lines[0] = array(array(
-            'text' => $this->_coreString->strSplit($item->getName(), 60, true, true),
+            'text' => $this->string->split($item->getName(), 60, true, true),
             'feed' => 100,
         ));
 
@@ -87,7 +87,7 @@ class DefaultShipment extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
 
         // draw SKU
         $lines[0][] = array(
-            'text'  => $this->_coreString->strSplit($this->getSku($item), 25),
+            'text'  => $this->string->split($this->getSku($item), 25),
             'feed'  => 565,
             'align' => 'right'
         );
@@ -98,7 +98,7 @@ class DefaultShipment extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
             foreach ($options as $option) {
                 // draw options label
                 $lines[][] = array(
-                    'text' => $stringHelper->strSplit(strip_tags($option['label']), 70, true, true),
+                    'text' => $stringHelper->split(strip_tags($option['label']), 70, true, true),
                     'font' => 'italic',
                     'feed' => 110
                 );
@@ -111,7 +111,7 @@ class DefaultShipment extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
                     $values = explode(', ', $_printValue);
                     foreach ($values as $value) {
                         $lines[][] = array(
-                            'text' => $this->_coreString->strSplit($value, 50, true, true),
+                            'text' => $this->string->split($value, 50, true, true),
                             'feed' => 115
                         );
                     }
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php b/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php
index 7c2ca422ac6..9096e98fddc 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php
@@ -44,7 +44,7 @@ class Shipment extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
     /**
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\Translate $translate
      * @param \Magento\App\Dir $coreDir
@@ -61,7 +61,7 @@ class Shipment extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
     public function __construct(
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\Translate $translate,
         \Magento\App\Dir $coreDir,
@@ -78,7 +78,7 @@ class Shipment extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
         parent::__construct(
             $paymentData,
             $coreData,
-            $coreString,
+            $string,
             $coreStoreConfig,
             $translate,
             $coreDir,
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Shipment/Packaging.php b/app/code/Magento/Sales/Model/Order/Pdf/Shipment/Packaging.php
index ea890cc2635..d82a1daebe5 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Shipment/Packaging.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Shipment/Packaging.php
@@ -56,7 +56,7 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
     /**
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\Translate $translate
      * @param \Magento\App\Dir $coreDir
@@ -75,7 +75,7 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
     public function __construct(
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\Translate $translate,
         \Magento\App\Dir $coreDir,
@@ -93,7 +93,7 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
         $this->_locale = $locale;
         $this->_storeManager = $storeManager;
         $this->_layout = $layout;
-        parent::__construct($paymentData, $coreData, $coreString, $coreStoreConfig, $translate, $coreDir,
+        parent::__construct($paymentData, $coreData, $string, $coreStoreConfig, $translate, $coreDir,
             $shippingConfig, $pdfConfig, $pdfTotalFactory, $pdfItemsFactory, $data);
     }
 
diff --git a/app/code/Magento/Sales/Model/Order/Shipment.php b/app/code/Magento/Sales/Model/Order/Shipment.php
index 36ef462406c..4f3c69a50f6 100644
--- a/app/code/Magento/Sales/Model/Order/Shipment.php
+++ b/app/code/Magento/Sales/Model/Order/Shipment.php
@@ -153,6 +153,7 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\LocaleInterface $coreLocale
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
      * @param \Magento\Sales\Model\Resource\Order\Shipment\Item\CollectionFactory $shipmentItemCollFactory
      * @param \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollFactory
@@ -173,6 +174,7 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Sales\Model\OrderFactory $orderFactory,
         \Magento\Sales\Model\Resource\Order\Shipment\Item\CollectionFactory $shipmentItemCollFactory,
         \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollFactory,
@@ -194,7 +196,7 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
         $this->_commentCollFactory = $commentCollFactory;
         $this->_templateMailerFactory = $templateMailerFactory;
         $this->_emailInfoFactory = $emailInfoFactory;
-        parent::__construct($context, $registry, $coreLocale, $resource, $resourceCollection, $data);
+        parent::__construct($context, $registry, $coreLocale, $dateTime, $resource, $resourceCollection, $data);
     }
 
     /**
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Comment.php b/app/code/Magento/Sales/Model/Order/Shipment/Comment.php
index acfaf040d21..625a8efb88b 100644
--- a/app/code/Magento/Sales/Model/Order/Shipment/Comment.php
+++ b/app/code/Magento/Sales/Model/Order/Shipment/Comment.php
@@ -58,6 +58,7 @@ class Comment extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\LocaleInterface $coreLocale
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -67,6 +68,7 @@ class Comment extends \Magento\Sales\Model\AbstractModel
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
@@ -76,6 +78,7 @@ class Comment extends \Magento\Sales\Model\AbstractModel
             $context,
             $registry,
             $coreLocale,
+            $dateTime,
             $resource,
             $resourceCollection,
             $data
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Track.php b/app/code/Magento/Sales/Model/Order/Shipment/Track.php
index cc75016efc2..dd272384554 100644
--- a/app/code/Magento/Sales/Model/Order/Shipment/Track.php
+++ b/app/code/Magento/Sales/Model/Order/Shipment/Track.php
@@ -83,6 +83,7 @@ class Track extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\LocaleInterface $coreLocale
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Shipping\Model\Config $shippingConfig
      * @param \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory
@@ -94,6 +95,7 @@ class Track extends \Magento\Sales\Model\AbstractModel
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Shipping\Model\Config $shippingConfig,
         \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory,
@@ -105,6 +107,7 @@ class Track extends \Magento\Sales\Model\AbstractModel
             $context,
             $registry,
             $coreLocale,
+            $dateTime,
             $resource,
             $resourceCollection,
             $data
diff --git a/app/code/Magento/Sales/Model/Order/Status/History.php b/app/code/Magento/Sales/Model/Order/Status/History.php
index b87727c9c72..a901dfff452 100644
--- a/app/code/Magento/Sales/Model/Order/Status/History.php
+++ b/app/code/Magento/Sales/Model/Order/Status/History.php
@@ -66,6 +66,7 @@ class History extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\LocaleInterface $coreLocale
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -75,6 +76,7 @@ class History extends \Magento\Sales\Model\AbstractModel
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
@@ -84,6 +86,7 @@ class History extends \Magento\Sales\Model\AbstractModel
             $context,
             $registry,
             $coreLocale,
+            $dateTime,
             $resource,
             $resourceCollection,
             $data
diff --git a/app/code/Magento/Sales/Model/Order/Total/Config/Base.php b/app/code/Magento/Sales/Model/Order/Total/Config/Base.php
index a47177b1160..0edca3ce0b9 100644
--- a/app/code/Magento/Sales/Model/Order/Total/Config/Base.php
+++ b/app/code/Magento/Sales/Model/Order/Total/Config/Base.php
@@ -59,14 +59,14 @@ class Base extends \Magento\Sales\Model\Config\Ordered
 
     /**
      * @param \Magento\Core\Model\Cache\Type\Config $configCacheType
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Sales\Model\Order\TotalFactory $orderTotalFactory
      * @param \Magento\Sales\Model\Config $salesConfig,
      * @param null $sourceData
      */
     public function __construct(
         \Magento\Core\Model\Cache\Type\Config $configCacheType,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Sales\Model\Order\TotalFactory $orderTotalFactory,
         \Magento\Sales\Model\Config $salesConfig,
         $sourceData = null
diff --git a/app/code/Magento/Sales/Model/Payment/Method/Converter.php b/app/code/Magento/Sales/Model/Payment/Method/Converter.php
index 580a5738565..cc437fe2fa4 100644
--- a/app/code/Magento/Sales/Model/Payment/Method/Converter.php
+++ b/app/code/Magento/Sales/Model/Payment/Method/Converter.php
@@ -51,14 +51,17 @@ class Converter
     );
 
     /**
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Encryption\EncryptorInterface
      */
     protected $_encryptor;
 
+    /**
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
+     */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData
+        \Magento\Encryption\EncryptorInterface $encryptor
     ) {
-        $this->_encryptor = $coreData;
+        $this->_encryptor = $encryptor;
     }
 
     /**
@@ -75,7 +78,6 @@ class Converter
             $this->_encryptFields[$method][$filedName];
     }
 
-
     /**
      * Decode data
      *
diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php b/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php
index f5664da02ab..168c4ddb795 100644
--- a/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php
+++ b/app/code/Magento/Sales/Model/Quote/Address/Total/Collector.php
@@ -85,7 +85,7 @@ class Collector extends \Magento\Sales\Model\Config\Ordered
      * Init corresponding total models
      *
      * @param \Magento\Core\Model\Cache\Type\Config $configCacheType
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Sales\Model\Config $salesConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -95,7 +95,7 @@ class Collector extends \Magento\Sales\Model\Config\Ordered
      */
     public function __construct(
         \Magento\Core\Model\Cache\Type\Config $configCacheType,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Sales\Model\Config $salesConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Sales/Model/Quote/Payment.php b/app/code/Magento/Sales/Model/Quote/Payment.php
index 7c0b1634430..296a061d490 100644
--- a/app/code/Magento/Sales/Model/Quote/Payment.php
+++ b/app/code/Magento/Sales/Model/Quote/Payment.php
@@ -86,26 +86,26 @@ class Payment extends \Magento\Payment\Model\Info
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
+        \Magento\Encryption\EncryptorInterface $encryptor,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         $this->_eventManager = $eventManager;
-        parent::__construct($coreData, $paymentData, $context, $registry, $resource, $resourceCollection, $data);
+        parent::__construct($paymentData, $context, $registry, $encryptor, $resource, $resourceCollection, $data);
     }
 
     /**
diff --git a/app/code/Magento/Sales/Model/Recurring/Profile.php b/app/code/Magento/Sales/Model/Recurring/Profile.php
index b3245922a49..40c28f1bc47 100644
--- a/app/code/Magento/Sales/Model/Recurring/Profile.php
+++ b/app/code/Magento/Sales/Model/Recurring/Profile.php
@@ -131,13 +131,6 @@ class Profile extends \Magento\Payment\Model\Recurring\Profile
      */
     protected $_workflow = null;
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
-
     /**
      * @var \Magento\Sales\Model\OrderFactory
      */
@@ -159,7 +152,11 @@ class Profile extends \Magento\Payment\Model\Recurring\Profile
     protected $_orderItemFactory;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
+    /**
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -167,6 +164,7 @@ class Profile extends \Magento\Payment\Model\Recurring\Profile
      * @param \Magento\Sales\Model\Order\AddressFactory $addressFactory
      * @param \Magento\Sales\Model\Order\PaymentFactory $paymentFactory
      * @param \Magento\Sales\Model\Order\ItemFactory $orderItemFactory
+     * @param \Magento\Math\Random $mathRandom
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -174,7 +172,6 @@ class Profile extends \Magento\Payment\Model\Recurring\Profile
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
@@ -182,15 +179,16 @@ class Profile extends \Magento\Payment\Model\Recurring\Profile
         \Magento\Sales\Model\Order\AddressFactory $addressFactory,
         \Magento\Sales\Model\Order\PaymentFactory $paymentFactory,
         \Magento\Sales\Model\Order\ItemFactory $orderItemFactory,
+        \Magento\Math\Random $mathRandom,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
         $this->_orderFactory = $orderFactory;
         $this->_addressFactory = $addressFactory;
         $this->_paymentFactory = $paymentFactory;
         $this->_orderItemFactory = $orderItemFactory;
+        $this->mathRandom = $mathRandom;
         parent::__construct($paymentData, $context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -213,9 +211,9 @@ class Profile extends \Magento\Payment\Model\Recurring\Profile
     {
         $this->_getResource()->beginTransaction();
         try {
-            $this->setInternalReferenceId($this->_coreData->uniqHash('temporary-'));
+            $this->setInternalReferenceId($this->mathRandom->getUniqueHash('temporary-'));
             $this->save();
-            $this->setInternalReferenceId($this->_coreData->uniqHash($this->getId() . '-'));
+            $this->setInternalReferenceId($this->mathRandom->getUniqueHash($this->getId() . '-'));
             $this->getMethodInstance()->submitRecurringProfile($this, $this->getQuote()->getPayment());
             $this->save();
             $this->_getResource()->commit();
diff --git a/app/code/Magento/Sales/Model/Resource/AbstractResource.php b/app/code/Magento/Sales/Model/Resource/AbstractResource.php
index a09f8ac40c0..eb9dddaa481 100644
--- a/app/code/Magento/Sales/Model/Resource/AbstractResource.php
+++ b/app/code/Magento/Sales/Model/Resource/AbstractResource.php
@@ -43,6 +43,23 @@ abstract class AbstractResource extends \Magento\Core\Model\Resource\Db\Abstract
      */
     protected $_converter = null;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
+     */
+    public function __construct(
+        \Magento\App\Resource $resource,
+        \Magento\Stdlib\DateTime $dateTime
+    ) {
+        $this->dateTime = $dateTime;
+        parent::__construct($resource);
+    }
+
     /**
      * Prepare data for save
      *
@@ -51,7 +68,7 @@ abstract class AbstractResource extends \Magento\Core\Model\Resource\Db\Abstract
      */
     protected function _prepareDataForSave(\Magento\Core\Model\AbstractModel $object)
     {
-        $currentTime = \Magento\Date::now();
+        $currentTime = $this->dateTime->now();
         if ((!$object->getId() || $object->isObjectNew()) && !$object->getCreatedAt()) {
             $object->setCreatedAt($currentTime);
         }
diff --git a/app/code/Magento/Sales/Model/Resource/Billing/Agreement/Collection.php b/app/code/Magento/Sales/Model/Resource/Billing/Agreement/Collection.php
index a35bdbd104d..81695dcb94b 100644
--- a/app/code/Magento/Sales/Model/Resource/Billing/Agreement/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Billing/Agreement/Collection.php
@@ -52,7 +52,7 @@ class Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Customer\Model\Resource\Customer $customerResource
@@ -60,7 +60,7 @@ class Collection
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Customer\Model\Resource\Customer $customerResource,
diff --git a/app/code/Magento/Sales/Model/Resource/Helper.php b/app/code/Magento/Sales/Model/Resource/Helper.php
index 3dac870f5dd..41c75a214cf 100644
--- a/app/code/Magento/Sales/Model/Resource/Helper.php
+++ b/app/code/Magento/Sales/Model/Resource/Helper.php
@@ -38,12 +38,12 @@ class Helper extends \Magento\Core\Model\Resource\Helper
     protected $_reportsResourceHelper;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Reports\Model\Resource\Helper $reportsResourceHelper
      * @param string $modulePrefix
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Reports\Model\Resource\Helper $reportsResourceHelper,
         $modulePrefix = 'sales'
     ) {
diff --git a/app/code/Magento/Sales/Model/Resource/Order/AbstractOrder.php b/app/code/Magento/Sales/Model/Resource/Order/AbstractOrder.php
index 4dc27d23f9e..21c549330d1 100644
--- a/app/code/Magento/Sales/Model/Resource/Order/AbstractOrder.php
+++ b/app/code/Magento/Sales/Model/Resource/Order/AbstractOrder.php
@@ -24,11 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Sales\Model\Resource\Order;
+
 /**
  * Flat sales resource abstract
  */
-namespace Magento\Sales\Model\Resource\Order;
-
 abstract class AbstractOrder extends \Magento\Sales\Model\Resource\AbstractResource
 {
     /**
@@ -101,17 +101,19 @@ abstract class AbstractOrder extends \Magento\Sales\Model\Resource\AbstractResou
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Eav\Model\Entity\TypeFactory $eavEntityTypeFactory
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Eav\Model\Entity\TypeFactory $eavEntityTypeFactory
     ) {
         $this->_eventManager = $eventManager;
         $this->_eavEntityTypeFactory = $eavEntityTypeFactory;
-        parent::__construct($resource);
+        parent::__construct($resource, $dateTime);
     }
 
     /**
diff --git a/app/code/Magento/Sales/Model/Resource/Order/Address.php b/app/code/Magento/Sales/Model/Resource/Order/Address.php
index 2b83f8ddc4b..cedb9e98ea2 100644
--- a/app/code/Magento/Sales/Model/Resource/Order/Address.php
+++ b/app/code/Magento/Sales/Model/Resource/Order/Address.php
@@ -45,17 +45,19 @@ class Address extends \Magento\Sales\Model\Resource\Order\AbstractOrder
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Eav\Model\Entity\TypeFactory $eavEntityTypeFactory
      * @param \Magento\Sales\Model\Resource\Factory $salesResourceFactory
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Eav\Model\Entity\TypeFactory $eavEntityTypeFactory,
         \Magento\Sales\Model\Resource\Factory $salesResourceFactory
     ) {
-        parent::__construct($eventManager, $resource, $eavEntityTypeFactory);
+        parent::__construct($eventManager, $resource, $dateTime, $eavEntityTypeFactory);
         $this->_salesResourceFactory = $salesResourceFactory;
     }
 
diff --git a/app/code/Magento/Sales/Model/Resource/Order/Collection.php b/app/code/Magento/Sales/Model/Resource/Order/Collection.php
index e80a83337da..d69c0878d71 100644
--- a/app/code/Magento/Sales/Model/Resource/Order/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Order/Collection.php
@@ -57,7 +57,7 @@ class Collection extends \Magento\Sales\Model\Resource\Collection\AbstractCollec
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Helper $coreResourceHelper
@@ -65,7 +65,7 @@ class Collection extends \Magento\Sales\Model\Resource\Collection\AbstractCollec
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Helper $coreResourceHelper,
diff --git a/app/code/Magento/Sales/Model/Resource/Order/Payment.php b/app/code/Magento/Sales/Model/Resource/Order/Payment.php
index b8a4ec6c56f..75fb12c3b55 100644
--- a/app/code/Magento/Sales/Model/Resource/Order/Payment.php
+++ b/app/code/Magento/Sales/Model/Resource/Order/Payment.php
@@ -24,11 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Sales\Model\Resource\Order;
+
 /**
  * Flat sales order payment resource
  */
-namespace Magento\Sales\Model\Resource\Order;
-
 class Payment extends \Magento\Sales\Model\Resource\Order\AbstractOrder
 {
     /**
@@ -54,23 +54,24 @@ class Payment extends \Magento\Sales\Model\Resource\Order\AbstractOrder
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Eav\Model\Entity\TypeFactory $eavEntityTypeFactory
      * @param \Magento\Sales\Model\Payment\Method\Converter $paymentConverter
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Eav\Model\Entity\TypeFactory $eavEntityTypeFactory,
         \Magento\Sales\Model\Payment\Method\Converter $paymentConverter
     ) {
         $this->_paymentConverter = $paymentConverter;
-        parent::__construct($eventManager, $resource, $eavEntityTypeFactory);
+        parent::__construct($eventManager, $resource, $dateTime, $eavEntityTypeFactory);
     }
 
     /**
      * Model initialization
-     *
      */
     protected function _construct()
     {
diff --git a/app/code/Magento/Sales/Model/Resource/Order/Payment/Collection.php b/app/code/Magento/Sales/Model/Resource/Order/Payment/Collection.php
index 5af83d740b7..6b2985b98da 100644
--- a/app/code/Magento/Sales/Model/Resource/Order/Payment/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Order/Payment/Collection.php
@@ -52,7 +52,7 @@ class Collection extends \Magento\Sales\Model\Resource\Order\Collection\Abstract
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Payment\Method\Converter $converter
@@ -60,7 +60,7 @@ class Collection extends \Magento\Sales\Model\Resource\Order\Collection\Abstract
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Payment\Method\Converter $converter,
diff --git a/app/code/Magento/Sales/Model/Resource/Quote.php b/app/code/Magento/Sales/Model/Resource/Quote.php
index bafe56dbd98..22f95944d03 100644
--- a/app/code/Magento/Sales/Model/Resource/Quote.php
+++ b/app/code/Magento/Sales/Model/Resource/Quote.php
@@ -24,11 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Sales\Model\Resource;
+
 /**
  * Quote resource model
  */
-namespace Magento\Sales\Model\Resource;
-
 class Quote extends \Magento\Sales\Model\Resource\AbstractResource
 {
     /**
@@ -37,14 +37,16 @@ class Quote extends \Magento\Sales\Model\Resource\AbstractResource
     protected $_config;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Eav\Model\Config $config
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Eav\Model\Config $config
     ) {
-        parent::__construct($resource);
+        parent::__construct($resource, $dateTime);
         $this->_config = $config;
     }
 
diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend/Region.php b/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend/Region.php
index 8859541a16a..437747b3ac5 100644
--- a/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend/Region.php
+++ b/app/code/Magento/Sales/Model/Resource/Quote/Address/Attribute/Backend/Region.php
@@ -38,11 +38,11 @@ class Region
     protected $_regionFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Directory\Model\RegionFactory $regionFactory
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Directory\Model\RegionFactory $regionFactory
     ) {
         $this->_regionFactory = $regionFactory;
diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php b/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php
index fe6db927036..7b4de1b1ad7 100644
--- a/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php
@@ -62,7 +62,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Quote\Item\Option\CollectionFactory $itemOptionCollFactory
@@ -72,7 +72,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Quote\Item\Option\CollectionFactory $itemOptionCollFactory,
diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Payment.php b/app/code/Magento/Sales/Model/Resource/Quote/Payment.php
index 2cf823a7115..03635de2e44 100644
--- a/app/code/Magento/Sales/Model/Resource/Quote/Payment.php
+++ b/app/code/Magento/Sales/Model/Resource/Quote/Payment.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Sales\Model\Resource\Quote;
 
 /**
  * Quote payment resource model
- *
- * @category    Magento
- * @package     Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Model\Resource\Quote;
-
 class Payment extends \Magento\Sales\Model\Resource\AbstractResource
 {
     /**
@@ -51,15 +46,17 @@ class Payment extends \Magento\Sales\Model\Resource\AbstractResource
     protected $_paymentConverter;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Sales\Model\Payment\Method\Converter $paymentConverter
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Sales\Model\Payment\Method\Converter $paymentConverter
     ) {
         $this->_paymentConverter = $paymentConverter;
-        parent::__construct($resource);
+        parent::__construct($resource, $dateTime);
     }
 
     /**
diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Payment/Collection.php b/app/code/Magento/Sales/Model/Resource/Quote/Payment/Collection.php
index a278e255c46..0bf37626e08 100644
--- a/app/code/Magento/Sales/Model/Resource/Quote/Payment/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Quote/Payment/Collection.php
@@ -38,7 +38,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Payment\Method\Converter $converter
@@ -46,7 +46,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Payment\Method\Converter $converter,
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php
index f6934a27156..b7ec10b886a 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php
@@ -46,22 +46,24 @@ class Bestsellers extends \Magento\Sales\Model\Resource\Report\AbstractReport
     protected $_salesResourceHelper;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Logger $logger
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Reports\Model\FlagFactory $reportsFlagFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Catalog\Model\Resource\Product $productResource
      * @param \Magento\Sales\Model\Resource\Helper $salesResourceHelper
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\Logger $logger,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Reports\Model\FlagFactory $reportsFlagFactory,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Catalog\Model\Resource\Product $productResource,
         \Magento\Sales\Model\Resource\Helper $salesResourceHelper
     ) {
-        parent::__construct($logger, $resource, $locale, $reportsFlagFactory);
+        parent::__construct($logger, $resource, $locale, $reportsFlagFactory, $dateTime);
         $this->_productResource = $productResource;
         $this->_salesResourceHelper = $salesResourceHelper;
     }
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php
index 7a3bede3d88..d6ce3bf58bb 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers/Collection.php
@@ -53,14 +53,14 @@ class Collection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
@@ -230,7 +230,7 @@ class Collection
             $selectUnions = array();
 
             // apply date boundaries (before calling $this->_applyDateRangeFilter())
-            $dtFormat   = \Magento\Date::DATE_INTERNAL_FORMAT;
+            $dtFormat   = \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT;
             $periodFrom = (!is_null($this->_from) ? new \Zend_Date($this->_from, $dtFormat) : null);
             $periodTo   = (!is_null($this->_to)   ? new \Zend_Date($this->_to,   $dtFormat) : null);
             if ('year' == $this->_period) {
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Collection/AbstractCollection.php b/app/code/Magento/Sales/Model/Resource/Report/Collection/AbstractCollection.php
index 129d3cd399e..54016b5e96e 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Collection/AbstractCollection.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Collection/AbstractCollection.php
@@ -46,14 +46,14 @@ class AbstractCollection
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Invoiced/Collection/Invoiced.php b/app/code/Magento/Sales/Model/Resource/Report/Invoiced/Collection/Invoiced.php
index 4e36236bfd4..84f420d7b9e 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Invoiced/Collection/Invoiced.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Invoiced/Collection/Invoiced.php
@@ -39,14 +39,14 @@ class Invoiced
 {
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Invoiced/Collection/Order.php b/app/code/Magento/Sales/Model/Resource/Report/Invoiced/Collection/Order.php
index 2d36eaf0ed3..c5c4ef2824d 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Invoiced/Collection/Order.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Invoiced/Collection/Order.php
@@ -53,14 +53,14 @@ class Order
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Order.php b/app/code/Magento/Sales/Model/Resource/Report/Order.php
index 92922270a1d..44ef6292d2c 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Order.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Order.php
@@ -42,22 +42,24 @@ class Order extends \Magento\Sales\Model\Resource\Report\AbstractReport
     protected $_updateDatFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Logger $logger
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Reports\Model\FlagFactory $reportsFlagFactory
-     * @param \Magento\Sales\Model\Resource\Report\Order\CreatedatFactory $createDatFactory
-     * @param \Magento\Sales\Model\Resource\Report\Order\UpdatedatFactory $updateDatFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param Order\CreatedatFactory $createDatFactory
+     * @param Order\UpdatedatFactory $updateDatFactory
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\Logger $logger,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Reports\Model\FlagFactory $reportsFlagFactory,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Sales\Model\Resource\Report\Order\CreatedatFactory $createDatFactory,
         \Magento\Sales\Model\Resource\Report\Order\UpdatedatFactory $updateDatFactory
     ) {
-        parent::__construct($logger, $resource, $locale, $reportsFlagFactory);
+        parent::__construct($logger, $resource, $locale, $reportsFlagFactory, $dateTime);
         $this->_createDatFactory = $createDatFactory;
         $this->_updateDatFactory = $updateDatFactory;
     }
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Order/Collection.php b/app/code/Magento/Sales/Model/Resource/Report/Order/Collection.php
index 792d5fba8ed..56d4e5f062c 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Order/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Order/Collection.php
@@ -59,14 +59,14 @@ class Collection extends \Magento\Sales\Model\Resource\Report\Collection\Abstrac
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Refunded/Collection/Order.php b/app/code/Magento/Sales/Model/Resource/Report/Refunded/Collection/Order.php
index 0c830145576..4f9375aa708 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Refunded/Collection/Order.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Refunded/Collection/Order.php
@@ -53,14 +53,14 @@ class Order
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Refunded/Collection/Refunded.php b/app/code/Magento/Sales/Model/Resource/Report/Refunded/Collection/Refunded.php
index 04bdf59eefc..123c79040c9 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Refunded/Collection/Refunded.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Refunded/Collection/Refunded.php
@@ -39,14 +39,14 @@ class Refunded
 {
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Shipping/Collection/Order.php b/app/code/Magento/Sales/Model/Resource/Report/Shipping/Collection/Order.php
index 4b9ec8cae71..9022ed9d8dd 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Shipping/Collection/Order.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Shipping/Collection/Order.php
@@ -53,14 +53,14 @@ class Order
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Shipping/Collection/Shipment.php b/app/code/Magento/Sales/Model/Resource/Report/Shipping/Collection/Shipment.php
index 06b973e480a..f335ab4b22e 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Shipping/Collection/Shipment.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Shipping/Collection/Shipment.php
@@ -39,14 +39,14 @@ class Shipment
 {
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
diff --git a/app/code/Magento/Sales/Model/Resource/Sale/Collection.php b/app/code/Magento/Sales/Model/Resource/Sale/Collection.php
index a8a6dbc34ae..334220fcec5 100644
--- a/app/code/Magento/Sales/Model/Resource/Sale/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Sale/Collection.php
@@ -90,7 +90,7 @@ class Collection extends \Magento\Data\Collection\Db
      * Set sales order entity and establish read connection
      *
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Order $resource
@@ -99,7 +99,7 @@ class Collection extends \Magento\Data\Collection\Db
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Order $resource,
diff --git a/app/code/Magento/Sales/Model/Resource/Setup.php b/app/code/Magento/Sales/Model/Resource/Setup.php
index 21164e58fdc..3bcc41506e1 100644
--- a/app/code/Magento/Sales/Model/Resource/Setup.php
+++ b/app/code/Magento/Sales/Model/Resource/Setup.php
@@ -32,20 +32,19 @@ namespace Magento\Sales\Model\Resource;
 class Setup extends \Magento\Eav\Model\Entity\Setup
 {
     /**
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Core\Model\Config
      */
-    protected $_coreData;
+    protected $_config;
 
     /**
-     * @var \Magento\Core\Model\Config
+     * @var \Magento\Encryption\EncryptorInterface
      */
-    protected $_config;
+    protected $_encryptor;
 
     /**
      * @param \Magento\Core\Model\Resource\Setup\Context $context
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
-     * @param \Magento\Core\Helper\Data $coreHelper
      * @param \Magento\Core\Model\Config $config
      * @param string $resourceName
      * @param string $moduleName
@@ -53,16 +52,15 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
      */
     public function __construct(
         \Magento\Core\Model\Resource\Setup\Context $context,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
-        \Magento\Core\Helper\Data $coreHelper,
         \Magento\Core\Model\Config $config,
         $resourceName,
         $moduleName = 'Magento_Sales',
         $connectionName = ''
     ) {
         $this->_config = $config;
-        $this->_coreData = $coreHelper;
+        $this->_encryptor = $context->getEncryptor();
         parent::__construct($context, $cache, $attrGrCollFactory, $resourceName, $moduleName, $connectionName);
     }
 
@@ -260,22 +258,20 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
     }
 
     /**
-     * Get Core Helper
+     * Get config model
      *
-     * @return \Magento\Core\Helper\Data
+     * @return \Magento\Core\Model\Config
      */
-    public function getCoreData()
+    public function getConfigModel()
     {
-        return $this->_coreData;
+        return $this->_config;
     }
 
     /**
-     * Get config model
-     *
-     * @return \Magento\Core\Model\Config
+     * @return \Magento\Encryption\EncryptorInterface
      */
-    public function getConfigModel()
+    public function getEncryptor()
     {
-        return $this->_config;
+        return $this->_encryptor;
     }
 }
diff --git a/app/code/Magento/Sales/data/sales_setup/data-upgrade-1.6.0.8-1.6.0.9.php b/app/code/Magento/Sales/data/sales_setup/data-upgrade-1.6.0.8-1.6.0.9.php
index d9960aefe61..09c3db4ecd2 100644
--- a/app/code/Magento/Sales/data/sales_setup/data-upgrade-1.6.0.8-1.6.0.9.php
+++ b/app/code/Magento/Sales/data/sales_setup/data-upgrade-1.6.0.8-1.6.0.9.php
@@ -50,9 +50,9 @@ do {
             ->update(
                 $installer->getTable('sales_flat_order_payment'),
                 array(
-                    'cc_exp_month' => $installer->getCoreData()->encrypt($order['cc_exp_month']),
-                    'cc_exp_year' => $installer->getCoreData()->encrypt($order['cc_exp_year']),
-                    'cc_owner' => $installer->getCoreData()->encrypt($order['cc_owner']),
+                    'cc_exp_month' => $installer->getEncryptor()->encrypt($order['cc_exp_month']),
+                    'cc_exp_year' => $installer->getEncryptor()->encrypt($order['cc_exp_year']),
+                    'cc_owner' => $installer->getEncryptor()->encrypt($order['cc_owner']),
                 ),
                 array('entity_id = ?' => $order['entity_id'])
         );
@@ -80,9 +80,9 @@ do {
             ->update(
                 $installer->getTable('sales_flat_quote_payment'),
                 array(
-                    'cc_exp_month' => $installer->getCoreData()->encrypt($quote['cc_exp_month']),
-                    'cc_exp_year' => $installer->getCoreData()->encrypt($quote['cc_exp_year']),
-                    'cc_owner' => $installer->getCoreData()->encrypt($quote['cc_owner']),
+                    'cc_exp_month' => $installer->getEncryptor()->encrypt($quote['cc_exp_month']),
+                    'cc_exp_year' => $installer->getEncryptor()->encrypt($quote['cc_exp_year']),
+                    'cc_owner' => $installer->getEncryptor()->encrypt($quote['cc_owner']),
                 ),
                 array('payment_id = ?' => $quote['payment_id'])
         );
diff --git a/app/code/Magento/Sales/etc/di.xml b/app/code/Magento/Sales/etc/di.xml
index 713cbb77489..177ef2c69cc 100644
--- a/app/code/Magento/Sales/etc/di.xml
+++ b/app/code/Magento/Sales/etc/di.xml
@@ -56,7 +56,7 @@
             </value>
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <sales_setup>Magento\Sales\Model\Resource\Setup</sales_setup>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/items/grid.phtml b/app/code/Magento/Sales/view/adminhtml/order/create/items/grid.phtml
index 14e119ba8f6..1a62e302864 100644
--- a/app/code/Magento/Sales/view/adminhtml/order/create/items/grid.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/order/create/items/grid.phtml
@@ -26,7 +26,7 @@
 ?>
 <?php
 /**
- * @see \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid
+ * @var $this \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid
  */
 ?>
 
@@ -115,7 +115,7 @@
                             <?php if($_item->getMessage(false)): ?>
                                 <?php foreach ($_item->getMessage(false) as $message): ?>
                                 <div class="<?php if($_item->getHasError()): ?>error<?php else: ?>notice<?php endif; ?>">
-                                    <div style="font-size:95%"><?php echo $this->helper('Magento\Core\Helper\Data')->escapeHtml($message); ?></div>
+                                    <div style="font-size:95%"><?php echo $this->escapeHtml($message); ?></div>
                                 </div>
                                 <?php endforeach; ?>
                             <?php endif; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/sidebar.phtml b/app/code/Magento/Sales/view/adminhtml/order/create/sidebar.phtml
index 1a37deec88a..f58874f8c87 100644
--- a/app/code/Magento/Sales/view/adminhtml/order/create/sidebar.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/order/create/sidebar.phtml
@@ -49,7 +49,7 @@ function addSidebarCompositeListType() {
         urlConfirm: '<?php echo $this->getUrl('sales/order_create/addConfigured') ?>'
     });
     productConfigure.addListType('sidebar_wishlist', {
-        urlFetch: '<?php echo $this->getUrl('*/customer_wishlist_product_composite_wishlist/configure') ?>',
+        urlFetch: '<?php echo $this->getUrl('customer/wishlist_product_composite_wishlist/configure') ?>',
         urlConfirm: '<?php echo $this->getUrl('sales/order_create/addConfigured') ?>'
     });
 }
diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_printorder.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_print.xml
similarity index 100%
rename from app/code/Magento/Sales/view/frontend/layout/sales_order_printorder.xml
rename to app/code/Magento/Sales/view/frontend/layout/sales_order_print.xml
diff --git a/app/code/Magento/Sales/view/frontend/order/creditmemo/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/order/creditmemo/items/renderer/default.phtml
index 176a8772f7c..255e77327ec 100644
--- a/app/code/Magento/Sales/view/frontend/order/creditmemo/items/renderer/default.phtml
+++ b/app/code/Magento/Sales/view/frontend/order/creditmemo/items/renderer/default.phtml
@@ -74,7 +74,7 @@
                data-item-id="<?php echo $_item->getId() ?>"><?php echo __('Gift Message') ?></a>
         <?php endif; ?>
     </td>
-    <td class="col sku"><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td class="col sku"><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="col price">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
             <span class="price-excl-tax">
diff --git a/app/code/Magento/Sales/view/frontend/order/invoice/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/order/invoice/items/renderer/default.phtml
index 435ebe03f6b..c4245425b82 100644
--- a/app/code/Magento/Sales/view/frontend/order/invoice/items/renderer/default.phtml
+++ b/app/code/Magento/Sales/view/frontend/order/invoice/items/renderer/default.phtml
@@ -65,7 +65,7 @@
             </a>
         <?php endif; ?>
     </td>
-    <td class="col sku"><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td class="col sku"><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="col price">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
             <span class="price-excl-tax">
diff --git a/app/code/Magento/Sales/view/frontend/order/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/order/items/renderer/default.phtml
index 70a7964512e..721f0d8d013 100644
--- a/app/code/Magento/Sales/view/frontend/order/items/renderer/default.phtml
+++ b/app/code/Magento/Sales/view/frontend/order/items/renderer/default.phtml
@@ -67,7 +67,7 @@
             </a>
         <?php endif; ?>
     </td>
-    <td class="col sku"><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td class="col sku"><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="col price">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
             <span class="price-excl-tax">
diff --git a/app/code/Magento/Sales/view/frontend/order/shipment/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/order/shipment/items/renderer/default.phtml
index 1cca16162d4..83f40610983 100644
--- a/app/code/Magento/Sales/view/frontend/order/shipment/items/renderer/default.phtml
+++ b/app/code/Magento/Sales/view/frontend/order/shipment/items/renderer/default.phtml
@@ -66,6 +66,6 @@
             </a>
         <?php endif; ?>
     </td>
-    <td class="col sku"><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td class="col sku"><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="col qty"><?php echo $_item->getQty()*1 ?></td>
 </tr>
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote.php
index 6290260e80a..e4466f646f4 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote.php
@@ -33,7 +33,7 @@
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 
-namespace Magento\Adminhtml\Block\Promo;
+namespace Magento\SalesRule\Block\Adminhtml\Promo;
 
 class Quote extends \Magento\Adminhtml\Block\Widget\Grid\Container
 {
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit.php
similarity index 94%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit.php
index 46fafcaffbc..ad87f52d5b0 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit.php
@@ -28,7 +28,7 @@
  * Shopping cart rule edit form block
  */
 
-namespace Magento\Adminhtml\Block\Promo\Quote;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote;
 
 class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
 {
@@ -63,7 +63,8 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
     protected function _construct()
     {
         $this->_objectId = 'id';
-        $this->_controller = 'promo_quote';
+        $this->_controller = 'adminhtml_promo_quote';
+        $this->_blockGroup = 'Magento_SalesRule';
 
         parent::_construct();
 
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Form.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Form.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Form.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Form.php
index 75c70032e24..c0e6d88504e 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Form.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Form.php
@@ -32,7 +32,7 @@
  * @package    Magento_Adminhtml
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit;
 
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
@@ -49,7 +49,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         $form = $this->_formFactory->create(array(
             'attributes' => array(
                 'id' => 'edit_form',
-                'action' => $this->getData('action'),
+                'action' => $this->getUrl('sales_rule/promo_quote/save'),
                 'method' => 'post',
             ))
         );
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php
index c28d674c100..514c8ce38b0 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php
@@ -24,7 +24,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit\Tab;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab;
 
 class Actions
     extends \Magento\Backend\Block\Widget\Form\Generic
@@ -52,7 +52,7 @@ class Actions
      * @param \Magento\Rule\Block\Actions $ruleActions
      * @param \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -62,7 +62,7 @@ class Actions
         \Magento\Rule\Block\Actions $ruleActions,
         \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -183,8 +183,8 @@ class Actions
         ));
 
         $renderer = $this->_rendererFieldset
-            ->setTemplate('Magento_Adminhtml::promo/fieldset.phtml')
-            ->setNewChildUrl($this->getUrl('adminhtml/promo_quote/newActionHtml/form/rule_actions_fieldset'));
+            ->setTemplate('Magento_CatalogRule::promo/fieldset.phtml')
+            ->setNewChildUrl($this->getUrl('sales_rule/promo_quote/newActionHtml/form/rule_actions_fieldset'));
 
         $fieldset = $form->addFieldset('actions_fieldset', array(
             'legend'=>__('Apply the rule only to cart items matching the following conditions '
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Conditions.php
similarity index 91%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Conditions.php
index bc721411129..0cf0c968e63 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Conditions.php
@@ -24,7 +24,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit\Tab;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab;
 
 class Conditions
     extends \Magento\Backend\Block\Widget\Form\Generic
@@ -46,7 +46,7 @@ class Conditions
      * @param \Magento\Rule\Block\Conditions $conditions
      * @param \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -55,7 +55,7 @@ class Conditions
         \Magento\Rule\Block\Conditions $conditions,
         \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -114,8 +114,8 @@ class Conditions
         $form->setHtmlIdPrefix('rule_');
 
         $renderer = $this->_rendererFieldset
-            ->setTemplate('Magento_Adminhtml::promo/fieldset.phtml')
-            ->setNewChildUrl($this->getUrl('adminhtml/promo_quote/newConditionHtml/form/rule_conditions_fieldset'));
+            ->setTemplate('Magento_CatalogRule::promo/fieldset.phtml')
+            ->setNewChildUrl($this->getUrl('sales_rule/promo_quote/newConditionHtml/form/rule_conditions_fieldset'));
 
         $fieldset = $form->addFieldset('conditions_fieldset', array(
             'legend'=>__('Apply the rule only if the following conditions are met (leave blank for all products).')
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons.php
similarity index 97%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons.php
index f3d3535f21a..db45eaec6f7 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons.php
@@ -31,7 +31,7 @@
  * @package     Magento_Adminhtml
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit\Tab;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab;
 
 class Coupons
     extends \Magento\Adminhtml\Block\Text\ListText
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Form.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Form.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php
index 83f3e2d3162..651cf4d5d5c 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Form.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php
@@ -32,7 +32,7 @@
  * @package     Magento_Adminhtml
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons;
 
 class Form
     extends \Magento\Backend\Block\Widget\Form\Generic
@@ -45,7 +45,7 @@ class Form
     protected $_salesRuleCoupon = null;
 
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\SalesRule\Helper\Coupon $salesRuleCoupon
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
@@ -53,7 +53,7 @@ class Form
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\SalesRule\Helper\Coupon $salesRuleCoupon,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
@@ -174,6 +174,6 @@ class Form
      */
     public function getGenerateUrl()
     {
-        return $this->getUrl('adminhtml/*/generate');
+        return $this->getUrl('sales_rule/*/generate');
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php
similarity index 92%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php
index 0afc803e579..e6946a597ee 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php
@@ -32,7 +32,7 @@
  * @package     Magento_Adminhtml
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons;
 
 class Grid extends \Magento\Adminhtml\Block\Widget\Grid
 {
@@ -131,7 +131,7 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
                 __('No'),
                 __('Yes')
             ),
-            'renderer' => 'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons\Grid\Column\Renderer\Used',
+            'renderer' => 'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid\Column\Renderer\Used',
             'filter_condition_callback' => array(
                 $this->_salesRuleCoupon->create(), 'addIsUsedFilterCallback'
             )
@@ -152,7 +152,7 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
     /**
      * Configure grid mass actions
      *
-     * @return \Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons\Grid
+     * @return \Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid
      */
     protected function _prepareMassaction()
     {
@@ -163,7 +163,7 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
 
         $this->getMassactionBlock()->addItem('delete', array(
              'label'=> __('Delete'),
-             'url'  => $this->getUrl('adminhtml/*/couponsMassDelete', array('_current' => true)),
+             'url'  => $this->getUrl('sales_rule/*/couponsMassDelete', array('_current' => true)),
              'confirm' => __('Are you sure you want to delete the selected coupon(s)?'),
              'complete' => 'refreshCouponCodesGrid'
         ));
@@ -178,6 +178,6 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
      */
     public function getGridUrl()
     {
-        return $this->getUrl('adminhtml/*/couponsGrid', array('_current'=> true));
+        return $this->getUrl('sales_rule/*/couponsGrid', array('_current'=> true));
     }
 }
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php
similarity index 93%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php
index 1509334ccf5..e4e60d31ae6 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php
@@ -31,7 +31,7 @@
  * @package     Magento_Adminhtml
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons\Grid\Column\Renderer;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid\Column\Renderer;
 
 class Used
     extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Text
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Labels.php
similarity index 97%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Labels.php
index d1f3b062e49..ddfca9b85f3 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Labels.php
@@ -24,7 +24,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit\Tab;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab;
 
 class Labels
     extends \Magento\Backend\Block\Widget\Form\Generic
@@ -38,7 +38,7 @@ class Labels
     protected $_storeManager;
     
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -46,7 +46,7 @@ class Labels
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php
similarity index 96%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php
index 8f8a0011ae3..349b0a53de9 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php
@@ -31,7 +31,7 @@
  * @package Magento_Adminhtml
  * @author Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit\Tab;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab;
 
 class Main
     extends \Magento\Backend\Block\Widget\Form\Generic
@@ -64,7 +64,7 @@ class Main
      * @param \Magento\Customer\Model\Resource\Group\CollectionFactory $customerGroup
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -74,7 +74,7 @@ class Main
         \Magento\Customer\Model\Resource\Group\CollectionFactory $customerGroup,
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
@@ -241,7 +241,7 @@ class Main
         ));
 
         $autoGenerationCheckbox->setRenderer(
-            $this->getLayout()->createBlock('Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Main\Renderer\Checkbox')
+            $this->getLayout()->createBlock('Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Main\Renderer\Checkbox')
         );
 
         $usesPerCouponFiled = $fieldset->addField('uses_per_coupon', 'text', array(
@@ -260,7 +260,7 @@ class Main
             'label'  => __('From Date'),
             'title'  => __('From Date'),
             'image'  => $this->getViewFileUrl('images/grid-cal.gif'),
-            'input_format' => \Magento\Date::DATE_INTERNAL_FORMAT,
+            'input_format' => \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT,
             'date_format'  => $dateFormat
         ));
         $fieldset->addField('to_date', 'date', array(
@@ -268,7 +268,7 @@ class Main
             'label'  => __('To Date'),
             'title'  => __('To Date'),
             'image'  => $this->getViewFileUrl('images/grid-cal.gif'),
-            'input_format' => \Magento\Date::DATE_INTERNAL_FORMAT,
+            'input_format' => \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT,
             'date_format'  => $dateFormat
         ));
 
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php
similarity index 97%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php
index ac3a3b15bf8..9f6aee1ea66 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php
@@ -31,7 +31,7 @@
  * @package    Magento_Adminhtml
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Main\Renderer;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Main\Renderer;
 
 class Checkbox
     extends \Magento\Backend\Block\AbstractBlock
diff --git a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tabs.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tabs.php
similarity index 95%
rename from app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tabs.php
rename to app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tabs.php
index 733423dbb88..3edb6cb149e 100644
--- a/app/code/Magento/Adminhtml/Block/Promo/Quote/Edit/Tabs.php
+++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tabs.php
@@ -32,7 +32,7 @@
  * @package    Magento_Adminhtml
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit;
 
 class Tabs extends \Magento\Adminhtml\Block\Widget\Tabs
 {
diff --git a/app/code/Magento/Adminhtml/Controller/Promo/Quote.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php
similarity index 89%
rename from app/code/Magento/Adminhtml/Controller/Promo/Quote.php
rename to app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php
index 33905536871..887d8847b79 100644
--- a/app/code/Magento/Adminhtml/Controller/Promo/Quote.php
+++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php
@@ -24,7 +24,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Controller\Promo;
+namespace Magento\SalesRule\Controller\Adminhtml\Promo;
 
 class Quote extends \Magento\Backend\Controller\Adminhtml\Action
 {
@@ -96,7 +96,7 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action
             if (! $model->getRuleId()) {
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(
                     __('This rule no longer exists.'));
-                $this->_redirect('adminhtml/*');
+                $this->_redirect('sales_rule/*');
                 return;
             }
         }
@@ -115,7 +115,7 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action
         $this->_coreRegistry->register('current_promo_quote_rule', $model);
 
         $this->_initAction()->getLayout()->getBlock('promo_quote_edit')
-             ->setData('action', $this->getUrl('adminhtml/*/save'));
+            ->setData('action', $this->getUrl('sales_rule/*/save'));
 
         $this
             ->_addBreadcrumb(
@@ -158,7 +158,7 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action
                         $session->addError($errorMessage);
                     }
                     $session->setPageData($data);
-                    $this->_redirect('adminhtml/*/edit', array('id'=>$model->getId()));
+                    $this->_redirect('sales_rule/*/edit', array('id'=>$model->getId()));
                     return;
                 }
 
@@ -185,31 +185,31 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action
                 $session->addSuccess(__('The rule has been saved.'));
                 $session->setPageData(false);
                 if ($this->getRequest()->getParam('back')) {
-                    $this->_redirect('adminhtml/*/edit', array('id' => $model->getId()));
+                    $this->_redirect('sales_rule/*/edit', array('id' => $model->getId()));
                     return;
                 }
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('sales_rule/*/');
                 return;
             } catch (\Magento\Core\Exception $e) {
                 $this->_getSession()->addError($e->getMessage());
                 $id = (int)$this->getRequest()->getParam('rule_id');
                 if (!empty($id)) {
-                    $this->_redirect('adminhtml/*/edit', array('id' => $id));
+                    $this->_redirect('sales_rule/*/edit', array('id' => $id));
                 } else {
-                    $this->_redirect('adminhtml/*/new');
+                    $this->_redirect('sales_rule/*/new');
                 }
                 return;
 
             } catch (\Exception $e) {
                 $this->_getSession()->addError(
                     __('An error occurred while saving the rule data. Please review the log and try again.'));
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setPageData($data);
-                $this->_redirect('adminhtml/*/edit', array('id' => $this->getRequest()->getParam('rule_id')));
+                $this->_redirect('sales_rule/*/edit', array('id' => $this->getRequest()->getParam('rule_id')));
                 return;
             }
         }
-        $this->_redirect('adminhtml/*/');
+        $this->_redirect('sales_rule/*/');
     }
 
     public function deleteAction()
@@ -222,21 +222,21 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action
                 $model->delete();
                 $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addSuccess(
                     __('The rule has been deleted.'));
-                $this->_redirect('adminhtml/*/');
+                $this->_redirect('sales_rule/*/');
                 return;
             } catch (\Magento\Core\Exception $e) {
                 $this->_getSession()->addError($e->getMessage());
             } catch (\Exception $e) {
                 $this->_getSession()->addError(
                     __('An error occurred while deleting the rule. Please review the log and try again.'));
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
-                $this->_redirect('adminhtml/*/edit', array('id' => $this->getRequest()->getParam('id')));
+                $this->_objectManager->get('Magento\Logger')->logException($e);
+                $this->_redirect('sales_rule/*/edit', array('id' => $this->getRequest()->getParam('id')));
                 return;
             }
         }
         $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(
             __('We can\'t find a rule to delete.'));
-        $this->_redirect('adminhtml/*/');
+        $this->_redirect('sales_rule/*/');
     }
 
     public function newConditionHtmlAction()
@@ -314,11 +314,11 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action
         if ($rule->getId()) {
             $fileName = 'coupon_codes.xml';
             $content = $this->getLayout()
-                ->createBlock('Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons\Grid')
+                ->createBlock('Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid')
                 ->getExcelFile($fileName);
             $this->_prepareDownloadResponse($fileName, $content);
         } else {
-            $this->_redirect('adminhtml/*/detail', array('_current' => true));
+            $this->_redirect('sales_rule/*/detail', array('_current' => true));
             return;
         }
     }
@@ -335,11 +335,11 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action
         if ($rule->getId()) {
             $fileName = 'coupon_codes.csv';
             $content = $this->getLayout()
-                ->createBlock('Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons\Grid')
+                ->createBlock('Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid')
                 ->getCsvFile();
             $this->_prepareDownloadResponse($fileName, $content);
         } else {
-            $this->_redirect('adminhtml/*/detail', array('_current' => true));
+            $this->_redirect('sales_rule/*/detail', array('_current' => true));
             return;
         }
     }
@@ -409,7 +409,7 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action
                 $result['error'] = $e->getMessage();
             } catch (\Exception $e) {
                 $result['error'] = __('Something went wrong while generating coupons. Please review the log and try again.');
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
             }
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
@@ -422,7 +422,7 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action
     {
         $uniqId = $this->getRequest()->getParam('uniq_id');
         $chooserBlock = $this->getLayout()
-            ->createBlock('Magento\Adminhtml\Block\Promo\Widget\Chooser', '', array('data' => array('id' => $uniqId)));
+            ->createBlock('Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser', '', array('data' => array('id' => $uniqId)));
         $this->getResponse()->setBody($chooserBlock->toHtml());
     }
 
diff --git a/app/code/Magento/SalesRule/Model/Coupon/Massgenerator.php b/app/code/Magento/SalesRule/Model/Coupon/Massgenerator.php
index 5b33ea8bfc6..62b1e861aea 100644
--- a/app/code/Magento/SalesRule/Model/Coupon/Massgenerator.php
+++ b/app/code/Magento/SalesRule/Model/Coupon/Massgenerator.php
@@ -68,12 +68,18 @@ class Massgenerator extends \Magento\Core\Model\AbstractModel
      */
     protected $_couponFactory;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\SalesRule\Helper\Coupon $salesRuleCoupon
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\SalesRule\Model\CouponFactory $couponFactory
      * @param \Magento\Core\Model\Date $date
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -84,6 +90,7 @@ class Massgenerator extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\Registry $registry,
         \Magento\SalesRule\Model\CouponFactory $couponFactory,
         \Magento\Core\Model\Date $date,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -91,6 +98,7 @@ class Massgenerator extends \Magento\Core\Model\AbstractModel
         $this->_salesRuleCoupon = $salesRuleCoupon;
         $this->_date = $date;
         $this->_couponFactory = $couponFactory;
+        $this->dateTime = $dateTime;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -180,7 +188,7 @@ class Massgenerator extends \Magento\Core\Model\AbstractModel
             $this->setLength($length);
         }
 
-        $now = $this->getResource()->formatDate($this->_date->gmtTimestamp());
+        $now = $this->dateTime->formatDate($this->_date->gmtTimestamp());
 
         for ($i = 0; $i < $size; $i++) {
             $attempt = 0;
@@ -194,7 +202,7 @@ class Massgenerator extends \Magento\Core\Model\AbstractModel
 
             $expirationDate = $this->getToDate();
             if ($expirationDate instanceof \Zend_Date) {
-                $expirationDate = $expirationDate->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT);
+                $expirationDate = $expirationDate->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
             }
 
             $coupon->setId(null)
diff --git a/app/code/Magento/SalesRule/Model/Resource/Coupon.php b/app/code/Magento/SalesRule/Model/Resource/Coupon.php
index 622a66ed048..5f4aa6ddcc5 100644
--- a/app/code/Magento/SalesRule/Model/Resource/Coupon.php
+++ b/app/code/Magento/SalesRule/Model/Resource/Coupon.php
@@ -59,7 +59,7 @@ class Coupon extends \Magento\Core\Model\Resource\Db\AbstractDb
         if (!$object->getExpirationDate()) {
             $object->setExpirationDate(null);
         } else if ($object->getExpirationDate() instanceof \Zend_Date) {
-            $object->setExpirationDate($object->getExpirationDate()->toString(\Magento\Date::DATETIME_INTERNAL_FORMAT));
+            $object->setExpirationDate($object->getExpirationDate()->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT));
         }
 
         // maintain single primary coupon per rule
diff --git a/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php b/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php
index ddc9cd413f3..95e51f2d5f7 100644
--- a/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php
+++ b/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php
@@ -67,7 +67,7 @@ class Collection extends \Magento\Sales\Model\Resource\Report\Collection\Abstrac
     /**
      * @param \Magento\SalesRule\Model\Resource\Report\RuleFactory $ruleFactory
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
@@ -75,7 +75,7 @@ class Collection extends \Magento\Sales\Model\Resource\Report\Collection\Abstrac
     public function __construct(
         \Magento\SalesRule\Model\Resource\Report\RuleFactory $ruleFactory,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
diff --git a/app/code/Magento/SalesRule/Model/Resource/Report/Rule.php b/app/code/Magento/SalesRule/Model/Resource/Report/Rule.php
index 2e7f00eafc3..446ac6af551 100644
--- a/app/code/Magento/SalesRule/Model/Resource/Report/Rule.php
+++ b/app/code/Magento/SalesRule/Model/Resource/Report/Rule.php
@@ -47,22 +47,24 @@ class Rule extends \Magento\Reports\Model\Resource\Report\AbstractReport
     protected $_updatedatFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Logger $logger
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Reports\Model\FlagFactory $reportsFlagFactory
-     * @param \Magento\SalesRule\Model\Resource\Report\Rule\CreatedatFactory $createdatFactory
-     * @param \Magento\SalesRule\Model\Resource\Report\Rule\UpdatedatFactory $updatedatFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param Rule\CreatedatFactory $createdatFactory
+     * @param Rule\UpdatedatFactory $updatedatFactory
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\Logger $logger,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Reports\Model\FlagFactory $reportsFlagFactory,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\SalesRule\Model\Resource\Report\Rule\CreatedatFactory $createdatFactory,
         \Magento\SalesRule\Model\Resource\Report\Rule\UpdatedatFactory $updatedatFactory
     ) {
-        parent::__construct($logger, $resource, $locale, $reportsFlagFactory);
+        parent::__construct($logger, $resource, $locale, $reportsFlagFactory, $dateTime);
         $this->_createdatFactory = $createdatFactory;
         $this->_updatedatFactory = $updatedatFactory;
     }
diff --git a/app/code/Magento/SalesRule/Model/Resource/Rule.php b/app/code/Magento/SalesRule/Model/Resource/Rule.php
index b3343cae3a3..6867c439781 100644
--- a/app/code/Magento/SalesRule/Model/Resource/Rule.php
+++ b/app/code/Magento/SalesRule/Model/Resource/Rule.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\SalesRule\Model\Resource;
 
 /**
  * Sales Rule resource model
- *
- * @category Magento
- * @package Magento_SalesRule
- * @author Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\SalesRule\Model\Resource;
-
 class Rule extends \Magento\Rule\Model\Resource\AbstractResource
 {
     /**
@@ -55,11 +50,11 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource
     );
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
      * @var \Magento\SalesRule\Model\Resource\Coupon
@@ -67,16 +62,16 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource
     protected $_resourceCoupon;
 
     /**
-     * @param \Magento\Core\Helper\String $coreString
-     * @param \Magento\Core\Model\Resource $resource
-     * @param \Magento\SalesRule\Model\Resource\Coupon $resourceCoupon
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Stdlib\String $string
+     * @param Coupon $resourceCoupon
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
+        \Magento\Stdlib\String $string,
         \Magento\SalesRule\Model\Resource\Coupon $resourceCoupon
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         $this->_resourceCoupon = $resourceCoupon;
         parent::__construct($resource);
     }
@@ -202,7 +197,7 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource
 
         $data    = array();
         foreach ($labels as $storeId => $label) {
-            if ($this->_coreString->strlen($label)) {
+            if ($this->string->strlen($label)) {
                 $data[] = array('rule_id' => $ruleId, 'store_id' => $storeId, 'label' => $label);
             } else {
                 $deleteByStoreIds[] = $storeId;
@@ -336,7 +331,7 @@ class Rule extends \Magento\Rule\Model\Resource\AbstractResource
         $result = array();
         if (preg_match_all('~s:32:"salesrule/rule_condition_product";s:9:"attribute";s:\d+:"(.*?)"~s',
             $serializedString, $matches)){
-            foreach ($matches[1] as $offset => $attributeCode) {
+            foreach ($matches[1] as $attributeCode) {
                 $result[] = $attributeCode;
             }
         }
diff --git a/app/code/Magento/SalesRule/Model/Resource/Rule/Collection.php b/app/code/Magento/SalesRule/Model/Resource/Rule/Collection.php
index 7abb61b1d40..9349188efe8 100644
--- a/app/code/Magento/SalesRule/Model/Resource/Rule/Collection.php
+++ b/app/code/Magento/SalesRule/Model/Resource/Rule/Collection.php
@@ -61,7 +61,7 @@ class Collection extends \Magento\Rule\Model\Resource\Rule\Collection\AbstractCo
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Date $date
@@ -69,7 +69,7 @@ class Collection extends \Magento\Rule\Model\Resource\Rule\Collection\AbstractCo
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Date $date,
diff --git a/app/code/Magento/SalesRule/Model/Rule.php b/app/code/Magento/SalesRule/Model/Rule.php
index 856b6198ee3..a75c144cb94 100644
--- a/app/code/Magento/SalesRule/Model/Rule.php
+++ b/app/code/Magento/SalesRule/Model/Rule.php
@@ -216,7 +216,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\SalesRule\Model\CouponFactory $couponFactory
@@ -232,7 +232,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\SalesRule\Model\CouponFactory $couponFactory,
diff --git a/app/code/Magento/SalesRule/etc/adminhtml/menu.xml b/app/code/Magento/SalesRule/etc/adminhtml/menu.xml
index 4b807151afe..64edb34a567 100644
--- a/app/code/Magento/SalesRule/etc/adminhtml/menu.xml
+++ b/app/code/Magento/SalesRule/etc/adminhtml/menu.xml
@@ -27,6 +27,6 @@
 -->
 <config>
     <menu>
-        <add id="Magento_SalesRule::promo_quote" title="Cart Price Rules" module="Magento_SalesRule" parent="Magento_CatalogRule::promo" sortOrder="30" action="adminhtml/promo_quote/" dependsOnModule="Magento_Sales" resource="Magento_SalesRule::quote"/>
+        <add id="Magento_SalesRule::promo_quote" title="Cart Price Rules" module="Magento_SalesRule" parent="Magento_CatalogRule::promo" sortOrder="30" action="sales_rule/promo_quote/" dependsOnModule="Magento_Sales" resource="Magento_SalesRule::quote"/>
     </menu>
 </config>
diff --git a/app/code/Magento/SalesRule/etc/adminhtml/routes.xml b/app/code/Magento/SalesRule/etc/adminhtml/routes.xml
new file mode 100644
index 00000000000..3c89225e3cc
--- /dev/null
+++ b/app/code/Magento/SalesRule/etc/adminhtml/routes.xml
@@ -0,0 +1,32 @@
+<?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>
+    <router id="admin">
+        <route id="sales_rule" frontName="sales_rule">
+            <module name="Magento_SalesRule_Adminhtml" before="Magento_Adminhtml" />
+        </route>
+    </router>
+</config>
diff --git a/app/code/Magento/SalesRule/etc/di.xml b/app/code/Magento/SalesRule/etc/di.xml
index 5b7b9e81705..5faa35ed43a 100644
--- a/app/code/Magento/SalesRule/etc/di.xml
+++ b/app/code/Magento/SalesRule/etc/di.xml
@@ -33,7 +33,7 @@
             <instance type="Magento\Backend\Model\Session\Proxy" />
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <salesrule_setup>Magento\SalesRule\Model\Resource\Setup</salesrule_setup>
diff --git a/app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_couponsgrid.xml b/app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_couponsgrid.xml
new file mode 100644
index 00000000000..545538d2a87
--- /dev/null
+++ b/app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_couponsgrid.xml
@@ -0,0 +1,30 @@
+<?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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <container name="root" label="Root" output="1">
+        <block class="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid" name="sales_rule_quote_edit_tab_coupons_grid"/>
+    </container>
+</layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_edit.xml b/app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_edit.xml
similarity index 69%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_edit.xml
rename to app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_edit.xml
index d8592195547..18d9e36951a 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_edit.xml
+++ b/app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_edit.xml
@@ -33,14 +33,14 @@
         </action>
     </referenceBlock>
     <referenceContainer name="left">
-        <block class="Magento\Adminhtml\Block\Promo\Quote\Edit\Tabs" name="promo_quote_edit_tabs">
-            <block class="Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Main" name="promo_quote_edit_tab_main"/>
-            <block class="Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Conditions" name="promo_quote_edit_tab_conditions"/>
-            <block class="Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Actions" name="promo_quote_edit_tab_actions"/>
-            <block class="Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Labels" name="promo_quote_edit_tab_labels"/>
-            <block class="Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons" name="promo_quote_edit_tab_coupons">
-                <block class="Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons\Form" name="promo_quote_edit_tab_coupons_form"/>
-                <block class="Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons\Grid" name="promo_quote_edit_tab_coupons_grid"/>
+        <block class="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tabs" name="promo_quote_edit_tabs">
+            <block class="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Main" name="promo_quote_edit_tab_main"/>
+            <block class="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Conditions" name="promo_quote_edit_tab_conditions"/>
+            <block class="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Actions" name="promo_quote_edit_tab_actions"/>
+            <block class="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Labels" name="promo_quote_edit_tab_labels"/>
+            <block class="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons" name="promo_quote_edit_tab_coupons">
+                <block class="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Form" name="promo_quote_edit_tab_coupons_form"/>
+                <block class="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid" name="promo_quote_edit_tab_coupons_grid"/>
             </block>
             <action method="addTab">
                 <argument name="name" xsi:type="string">main_section</argument>
@@ -63,9 +63,9 @@
                 <argument name="block" xsi:type="string">promo_quote_edit_tab_coupons</argument>
             </action>
         </block>
-        <block class="Magento\Adminhtml\Block\Template" template="promo/salesrulejs.phtml" name="promo_quote_edit_jsinit"/>
+        <block class="Magento\Adminhtml\Block\Template" template="Magento_SalesRule::promo/salesrulejs.phtml" name="promo_quote_edit_jsinit"/>
     </referenceContainer>
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Promo\Quote\Edit" name="promo_quote_edit"/>
+        <block class="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit" name="promo_quote_edit"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_index.xml b/app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_index.xml
similarity index 98%
rename from app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_index.xml
rename to app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_index.xml
index e4d417cb8e4..a9df29eddce 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_promo_quote_index.xml
+++ b/app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_index.xml
@@ -25,7 +25,7 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceContainer name="content">
-        <block class="Magento\Adminhtml\Block\Promo\Quote" name="adminhtml.block.promo.quote.grid.container">
+        <block class="Magento\SalesRule\Block\Adminhtml\Promo\Quote" name="adminhtml.block.promo.quote.grid.container">
             <block class="Magento\Backend\Block\Widget\Grid" name="adminhtml.block.promo.quote.grid" as="grid">
                 <arguments>
                     <argument name="id" xsi:type="string">promo_quote_grid</argument>
@@ -37,7 +37,7 @@
                 <block class="Magento\Backend\Block\Widget\Grid\ColumnSet" as="grid.columnSet" name="adminhtml.promo.quote.grid.columnSet">
                     <arguments>
                         <argument name="rowUrl" xsi:type="array">
-                            <item name="path" xsi:type="string">adminhtml/*/edit</item>
+                            <item name="path" xsi:type="string">sales_rule/*/edit</item>
                             <item name="extraParamsTemplate" xsi:type="array">
                                 <item name="id" xsi:type="string">getRuleId</item>
                             </item>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/promo/salesrulejs.phtml b/app/code/Magento/SalesRule/view/adminhtml/promo/salesrulejs.phtml
similarity index 100%
rename from app/code/Magento/Adminhtml/view/adminhtml/promo/salesrulejs.phtml
rename to app/code/Magento/SalesRule/view/adminhtml/promo/salesrulejs.phtml
diff --git a/app/code/Magento/Sendfriend/Controller/Product.php b/app/code/Magento/Sendfriend/Controller/Product.php
index 67a3b73b915..3c70dc469fc 100644
--- a/app/code/Magento/Sendfriend/Controller/Product.php
+++ b/app/code/Magento/Sendfriend/Controller/Product.php
@@ -118,15 +118,20 @@ class Product extends \Magento\Core\Controller\Front\Action
      */
     protected function _initSendToFriendModel()
     {
+        /** @var \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress */
+        $remoteAddress = $this->_objectManager->get('Magento\HTTP\PhpEnvironment\RemoteAddress');
+
+        /** @var \Magento\Core\Model\Cookie $cookie */
+        $cookie = $this->_objectManager->get('Magento\Core\Model\Cookie');
+
+        /** @var \Magento\Core\Model\StoreManagerInterface $store */
+        $store = $this->_objectManager->get('Magento\Core\Model\StoreManagerInterface');
+
+        /** @var \Magento\Sendfriend\Model\Sendfriend $model */
         $model  = $this->_objectManager->create('Magento\Sendfriend\Model\Sendfriend');
-        $model->setRemoteAddr($this->_objectManager->get('Magento\Core\Helper\Http')->getRemoteAddr(true));
-        $model->setCookie($this->_objectManager->get('Magento\Core\Model\Cookie'));
-        $model->setWebsiteId(
-            $this->_objectManager
-                ->get('Magento\Core\Model\StoreManagerInterface')
-                ->getStore()
-                ->getWebsiteId()
-        );
+        $model->setRemoteAddr($remoteAddress->getRemoteAddress(true));
+        $model->setCookie($cookie);
+        $model->setWebsiteId($store->getStore()->getWebsiteId());
 
         $this->_coreRegistry->register('send_to_friend_model', $model);
 
diff --git a/app/code/Magento/Sendfriend/Model/Sendfriend.php b/app/code/Magento/Sendfriend/Model/Sendfriend.php
index 58fb509322c..d38fd027750 100644
--- a/app/code/Magento/Sendfriend/Model/Sendfriend.php
+++ b/app/code/Magento/Sendfriend/Model/Sendfriend.php
@@ -108,6 +108,11 @@ class Sendfriend extends \Magento\Core\Model\AbstractModel
      */
     protected $_storeManager;
 
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
     /**
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Email\TemplateFactory $templateFactory
@@ -116,6 +121,7 @@ class Sendfriend extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Sendfriend\Helper\Data $sendfriendData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -128,6 +134,7 @@ class Sendfriend extends \Magento\Core\Model\AbstractModel
         \Magento\Sendfriend\Helper\Data $sendfriendData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
+        \Magento\Escaper $escaper,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -137,6 +144,7 @@ class Sendfriend extends \Magento\Core\Model\AbstractModel
         $this->_translate = $translate;
         $this->_catalogImage = $catalogImage;
         $this->_sendfriendData = $sendfriendData;
+        $this->_escaper = $escaper;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -176,8 +184,8 @@ class Sendfriend extends \Magento\Core\Model\AbstractModel
 
         $message = nl2br(htmlspecialchars($this->getSender()->getMessage()));
         $sender  = array(
-            'name'  => $this->_getHelper()->escapeHtml($this->getSender()->getName()),
-            'email' => $this->_getHelper()->escapeHtml($this->getSender()->getEmail())
+            'name'  => $this->_escaper->escapeHtml($this->getSender()->getName()),
+            'email' => $this->_escaper->escapeHtml($this->getSender()->getEmail())
         );
 
         $mailTemplate->setDesignConfig(array(
diff --git a/app/code/Magento/Sendfriend/view/frontend/send.phtml b/app/code/Magento/Sendfriend/view/frontend/send.phtml
index 3a8f01f2314..e429a397b44 100644
--- a/app/code/Magento/Sendfriend/view/frontend/send.phtml
+++ b/app/code/Magento/Sendfriend/view/frontend/send.phtml
@@ -32,7 +32,7 @@
 ?>
 <script id="add-recipient-tmpl" type="text/x-jQuery-tmpl">
     <p id="btn-remove${_index_}">
-        <a href="delete_email" class="btn-remove" title="<?php echo $this->jsQuoteEscape(__('Remove Email')) ?>"><?php echo $this->jsQuoteEscape(__('Remove Email')) ?>"</a>
+        <a href="delete_email" class="btn-remove" title="<?php echo $this->escapeJsQuote(__('Remove Email')) ?>"><?php echo $this->escapeJsQuote(__('Remove Email')) ?>"</a>
     </p>
     <div class="field">
         <label for="recipients-name${_index_}" class="required"><em>*</em> <?php echo __('Name:')?></label>
diff --git a/app/code/Magento/Service/AuthorizationException.php b/app/code/Magento/Service/AuthorizationException.php
index 353f92dff84..72b3d5a95a8 100644
--- a/app/code/Magento/Service/AuthorizationException.php
+++ b/app/code/Magento/Service/AuthorizationException.php
@@ -34,6 +34,7 @@ class AuthorizationException extends \Magento\Service\Exception
      * @param int $code
      * @param \Exception $previous
      * @param array $parameters
+     * @param string $name
      * @param string|int|null $userId
      * @param string|int|null $resourceId
      */
@@ -42,7 +43,8 @@ class AuthorizationException extends \Magento\Service\Exception
         // TODO Specify default exception code when Service \Exception Handling policy is defined
         $code = 0,
         \Exception $previous = null,
-        $parameters = array(),
+        array $parameters = array(),
+        $name = 'authorization',
         $userId = null,
         $resourceId = null
     ) {
@@ -52,6 +54,6 @@ class AuthorizationException extends \Magento\Service\Exception
                 $message = "User with ID '{$userId}' is not authorized to access resource with ID '{$resourceId}'.";
             }
         }
-        parent::__construct($message, $code, $previous, $parameters);
+        parent::__construct($message, $code, $previous, $parameters, $name);
     }
 }
diff --git a/app/code/Magento/Service/Exception.php b/app/code/Magento/Service/Exception.php
index 2f8b59f089d..b24c8839722 100644
--- a/app/code/Magento/Service/Exception.php
+++ b/app/code/Magento/Service/Exception.php
@@ -30,14 +30,27 @@ class Exception extends \Magento\Core\Exception
     /** @var array */
     protected $_parameters;
 
+    /**
+     * Exception name.
+     *
+     * @var string
+     */
+    protected $_name;
+
     /**
      * {@inheritdoc}
      * @param array $parameters - Array of optional exception parameters.
      */
-    public function __construct($message = "", $code = 0, Exception $previous = null, $parameters = array())
-    {
+    public function __construct(
+        $message = "",
+        $code = 0,
+        \Exception $previous = null,
+        array $parameters = array(),
+        $name = ''
+    ) {
         parent::__construct($message, $code, $previous);
         $this->_parameters = $parameters;
+        $this->_name = $name;
     }
 
     /**
@@ -49,4 +62,12 @@ class Exception extends \Magento\Core\Exception
     {
         return $this->_parameters;
     }
+
+    /**
+     * Retrieve exception name.
+     */
+    public function getName()
+    {
+        return $this->_name;
+    }
 }
diff --git a/app/code/Magento/Service/ResourceNotFoundException.php b/app/code/Magento/Service/ResourceNotFoundException.php
index 9ae5ff77f4a..d10fe8f8189 100644
--- a/app/code/Magento/Service/ResourceNotFoundException.php
+++ b/app/code/Magento/Service/ResourceNotFoundException.php
@@ -34,6 +34,7 @@ class ResourceNotFoundException extends \Magento\Service\Exception
      * @param int $code
      * @param \Exception $previous
      * @param array $parameters
+     * @param string $name
      * @param string|int|null $resourceId
      */
     public function __construct(
@@ -41,7 +42,8 @@ class ResourceNotFoundException extends \Magento\Service\Exception
         // TODO Specify default exception code when Service \Exception Handling policy is defined
         $code = 0,
         \Exception $previous = null,
-        $parameters = array(),
+        array $parameters = array(),
+        $name = 'resourceNotFound',
         $resourceId = null
     ) {
         if ($resourceId) {
@@ -50,6 +52,6 @@ class ResourceNotFoundException extends \Magento\Service\Exception
                 $message = "Resource with ID '{$resourceId}' not found.";
             }
         }
-        parent::__construct($message, $code, $previous, $parameters);
+        parent::__construct($message, $code, $previous, $parameters, $name);
     }
 }
diff --git a/app/code/Magento/Shipping/Model/Carrier/Factory.php b/app/code/Magento/Shipping/Model/Carrier/Factory.php
index e3fcb024822..961c01f09fa 100644
--- a/app/code/Magento/Shipping/Model/Carrier/Factory.php
+++ b/app/code/Magento/Shipping/Model/Carrier/Factory.php
@@ -36,7 +36,7 @@ class Factory
     protected $_coreStoreConfig;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -47,12 +47,12 @@ class Factory
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\ObjectManager $objectManager
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\ObjectManager $objectManager
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
diff --git a/app/code/Magento/Shipping/Model/Resource/Carrier/Tablerate.php b/app/code/Magento/Shipping/Model/Resource/Carrier/Tablerate.php
index 9064ae06b18..e7da13e0cb7 100644
--- a/app/code/Magento/Shipping/Model/Resource/Carrier/Tablerate.php
+++ b/app/code/Magento/Shipping/Model/Resource/Carrier/Tablerate.php
@@ -105,7 +105,7 @@ class Tablerate extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_coreConfig;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -131,10 +131,8 @@ class Tablerate extends \Magento\Core\Model\Resource\Db\AbstractDb
 
 
     /**
-     * Class constructor
-     *
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Logger $logger
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Config $coreConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Shipping\Model\Carrier\Tablerate $carrierTablerate
@@ -142,8 +140,8 @@ class Tablerate extends \Magento\Core\Model\Resource\Db\AbstractDb
      * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\Logger $logger,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\Config $coreConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Shipping\Model\Carrier\Tablerate $carrierTablerate,
diff --git a/app/code/Magento/Shipping/Model/Shipping.php b/app/code/Magento/Shipping/Model/Shipping.php
index 17a292f1195..4fec3925601 100644
--- a/app/code/Magento/Shipping/Model/Shipping.php
+++ b/app/code/Magento/Shipping/Model/Shipping.php
@@ -60,13 +60,6 @@ class Shipping
      */
     protected $_availabilityConfigField = 'active';
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
-
     /**
      * Core store config
      *
@@ -110,7 +103,11 @@ class Shipping
     protected $_regionFactory;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @var \Magento\Math\Division
+     */
+    protected $mathDivision;
+
+    /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Shipping\Model\Config $shippingConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -119,9 +116,9 @@ class Shipping
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory
      * @param \Magento\Shipping\Model\Rate\RequestFactory $rateRequestFactory
      * @param \Magento\Directory\Model\RegionFactory $regionFactory
+     * @param \Magento\Math\Division $mathDivision
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Shipping\Model\Config $shippingConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
@@ -129,9 +126,9 @@ class Shipping
         \Magento\Shipping\Model\Carrier\Factory $carrierFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory,
         \Magento\Shipping\Model\Rate\RequestFactory $rateRequestFactory,
-        \Magento\Directory\Model\RegionFactory $regionFactory
+        \Magento\Directory\Model\RegionFactory $regionFactory,
+        \Magento\Math\Division $mathDivision
     ) {
-        $this->_coreData = $coreData;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_shippingConfig = $shippingConfig;
         $this->_storeManager = $storeManager;
@@ -140,6 +137,7 @@ class Shipping
         $this->_rateResultFactory = $rateResultFactory;
         $this->_rateRequestFactory = $rateRequestFactory;
         $this->_regionFactory = $regionFactory;
+        $this->mathDivision = $mathDivision;
     }
 
     /**
@@ -355,7 +353,7 @@ class Shipping
                        if ($itemWeight > $maxWeight) {
                            $qtyItem = floor($itemWeight / $maxWeight);
                            $decimalItems[] = array('weight' => $maxWeight, 'qty' => $qtyItem);
-                           $weightItem = $this->_coreData->getExactDivision($itemWeight, $maxWeight);
+                           $weightItem = $this->mathDivision->getExactDivision($itemWeight, $maxWeight);
                            if ($weightItem) {
                                $decimalItems[] = array('weight' => $weightItem, 'qty' => 1);
                            }
diff --git a/app/code/Magento/Sitemap/Model/Resource/Catalog/Category.php b/app/code/Magento/Sitemap/Model/Resource/Catalog/Category.php
index c8f79fca874..753e4250246 100644
--- a/app/code/Magento/Sitemap/Model/Resource/Catalog/Category.php
+++ b/app/code/Magento/Sitemap/Model/Resource/Catalog/Category.php
@@ -61,12 +61,12 @@ class Category extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_categoryResource;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Resource\Category $categoryResource
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Resource\Category $categoryResource
     ) {
diff --git a/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php b/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php
index 8535f5a72c5..184f77343be 100644
--- a/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php
+++ b/app/code/Magento/Sitemap/Model/Resource/Catalog/Product.php
@@ -105,7 +105,7 @@ class Product extends \Magento\Core\Model\Resource\Db\AbstractDb
 
     public function __construct(
         \Magento\Sitemap\Helper\Data $sitemapData,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Catalog\Model\Resource\Product $productResource,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Product\Visibility $productVisibility,
diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php
index a039fe8e276..26108921026 100644
--- a/app/code/Magento/Sitemap/Model/Sitemap.php
+++ b/app/code/Magento/Sitemap/Model/Sitemap.php
@@ -24,6 +24,8 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Sitemap\Model;
+
 /**
  * Sitemap model
  *
@@ -39,13 +41,7 @@
  * @method \Magento\Sitemap\Model\Sitemap setSitemapTime(string $value)
  * @method int getStoreId()
  * @method \Magento\Sitemap\Model\Sitemap setStoreId(int $value)
- *
- * @category    Magento
- * @package     Magento_Sitemap
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sitemap\Model;
-
 class Sitemap extends \Magento\Core\Model\AbstractModel
 {
     const OPEN_TAG_KEY = 'start';
@@ -123,11 +119,9 @@ class Sitemap extends \Magento\Core\Model\AbstractModel
     protected $_sitemapData;
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Escaper
      */
-    protected $_coreData;
+    protected $_escaper;
 
     /**
      * @var \Magento\Sitemap\Model\Resource\Catalog\CategoryFactory
@@ -165,7 +159,12 @@ class Sitemap extends \Magento\Core\Model\AbstractModel
     protected $_request;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Sitemap\Helper\Data $sitemapData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Filesystem $filesystem
@@ -177,12 +176,13 @@ class Sitemap extends \Magento\Core\Model\AbstractModel
      * @param \Magento\App\Dir $dirModel
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\App\RequestInterface $request
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Sitemap\Helper\Data $sitemapData,
         \Magento\Core\Model\Context $context,
         \Magento\Filesystem $filesystem,
@@ -194,11 +194,12 @@ class Sitemap extends \Magento\Core\Model\AbstractModel
         \Magento\App\Dir $dirModel,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\App\RequestInterface $request,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
+        $this->_escaper = $escaper;
         $this->_sitemapData = $sitemapData;
         $this->_filesystem = $filesystem;
         $this->_categoryFactory = $categoryFactory;
@@ -208,6 +209,7 @@ class Sitemap extends \Magento\Core\Model\AbstractModel
         $this->_dirModel = $dirModel;
         $this->_storeManager = $storeManager;
         $this->_request = $request;
+        $this->dateTime = $dateTime;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -301,7 +303,7 @@ class Sitemap extends \Magento\Core\Model\AbstractModel
          */
         if (!$file->fileExists($realPath, false)) {
             throw new \Magento\Core\Exception(__('Please create the specified folder "%1" before saving the sitemap.',
-                $this->_coreData->escapeHtml($this->getSitemapPath())));
+                $this->_escaper->escapeHtml($this->getSitemapPath())));
         }
 
         if (!$file->isWriteable($realPath)) {
@@ -400,8 +402,7 @@ class Sitemap extends \Magento\Core\Model\AbstractModel
      */
     protected function _getCurrentDateTime()
     {
-        $date = new \Magento\Date();
-        return $date->now();
+        return $this->dateTime->now();
     }
 
     /**
@@ -500,7 +501,7 @@ class Sitemap extends \Magento\Core\Model\AbstractModel
      *
      * @param string $fileName
      * @param string $type
-     * @return void
+     * @throws \Magento\Core\Exception
      */
     protected function _createSitemap($fileName = null, $type = self::TYPE_URL)
     {
diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php
index c1a878029c9..5316acc056b 100644
--- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php
+++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php
@@ -82,7 +82,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Tax\Model\Calculation\Rate $rate
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -95,7 +95,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Tax\Model\Calculation\Rate $rate,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Title/Fieldset.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Title/Fieldset.php
index aadfa9144b3..e5670437888 100644
--- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Title/Fieldset.php
+++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Title/Fieldset.php
@@ -41,20 +41,20 @@ class Fieldset extends \Magento\Data\Form\Element\Fieldset
 
     /**
      * @param \Magento\Tax\Block\Adminhtml\Rate\Title $title
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
         \Magento\Tax\Block\Adminhtml\Rate\Title $title,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
         $this->_title = $title;
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
     }
 
     public function getBasicChildrenHtml()
diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php
index 7a1e8e439a6..4902c5520df 100644
--- a/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php
+++ b/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php
@@ -39,7 +39,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * @param \Magento\Tax\Model\Calculation\RateFactory $rateFactory
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -47,7 +47,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     public function __construct(
         \Magento\Tax\Model\Calculation\RateFactory $rateFactory,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Tax/Controller/Adminhtml/Tax.php b/app/code/Magento/Tax/Controller/Adminhtml/Tax.php
index acf972ee6b5..ee63bfce948 100644
--- a/app/code/Magento/Tax/Controller/Adminhtml/Tax.php
+++ b/app/code/Magento/Tax/Controller/Adminhtml/Tax.php
@@ -131,7 +131,7 @@ class Tax extends \Magento\Backend\Controller\Adminhtml\Action
      */
     protected function _processClassName($className)
     {
-        $className = trim($this->_objectManager->get('Magento\Tax\Helper\Data')->escapeHtml($className));
+        $className = trim($this->_objectManager->get('Magento\Escaper')->escapeHtml($className));
         if ($className == '') {
             throw new \Magento\Core\Exception(__('Invalid name of tax class specified.'));
         }
diff --git a/app/code/Magento/Tax/Model/Calculation.php b/app/code/Magento/Tax/Model/Calculation.php
index 140bd00ef61..59748ea26dc 100644
--- a/app/code/Magento/Tax/Model/Calculation.php
+++ b/app/code/Magento/Tax/Model/Calculation.php
@@ -352,8 +352,8 @@ class Calculation extends \Magento\Core\Model\AbstractModel
         $shippingAddress = null,
         $billingAddress = null,
         $customerTaxClass = null,
-        $store = null)
-    {
+        $store = null
+    ) {
         if ($shippingAddress === false && $billingAddress === false && $customerTaxClass === false) {
             return $this->getRateOriginRequest($store);
         }
@@ -407,6 +407,8 @@ class Calculation extends \Magento\Core\Model\AbstractModel
                         \Magento\Tax\Model\Config::CONFIG_XML_PATH_DEFAULT_POSTCODE,
                         $store));
                 break;
+            default:
+                break;
         }
 
         if (is_null($customerTaxClass) && $customer) {
@@ -492,9 +494,6 @@ class Calculation extends \Magento\Core\Model\AbstractModel
         /** @var $classes \Magento\Tax\Model\Resource\TaxClass\Collection */
         $classes = $this->_classesFactory->create();
         $classes->addFieldToFilter('class_type', $type)->load();
-        /** @var $namespace Magento\Tax\Model;
-
-class ClassModel */
         foreach ($classes as $class) {
             $request->setData($fieldName, $class->getId());
             $result[$class->getId()] = $this->getRate($request);
@@ -556,9 +555,9 @@ class ClassModel */
         $taxRate = $taxRate/100;
 
         if ($priceIncludeTax) {
-            $amount = $price*(1-1/(1+$taxRate));
+            $amount = $price * (1 - 1 / (1 + $taxRate));
         } else {
-            $amount = $price*$taxRate;
+            $amount = $price * $taxRate;
         }
 
         if ($round) {
@@ -575,10 +574,10 @@ class ClassModel */
      * @param   int $precision
      * @return  float
      */
-    public function truncate($price, $precision=4)
+    public function truncate($price, $precision = 4)
     {
-        $exp = pow(10,$precision);
-        $price = floor($price*$exp)/$exp;
+        $exp = pow(10, $precision);
+        $price = floor($price * $exp) / $exp;
         return $price;
     }
 
@@ -601,6 +600,6 @@ class ClassModel */
      */
     public function roundUp($price)
     {
-        return ceil($price*100)/100;
+        return ceil($price * 100) / 100;
     }
 }
diff --git a/app/code/Magento/Tax/Model/Resource/Calculation.php b/app/code/Magento/Tax/Model/Resource/Calculation.php
index 9569ab79a6e..1f5cd8bcd9b 100644
--- a/app/code/Magento/Tax/Model/Resource/Calculation.php
+++ b/app/code/Magento/Tax/Model/Resource/Calculation.php
@@ -63,12 +63,12 @@ class Calculation extends \Magento\Core\Model\Resource\Db\AbstractDb
      *
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_taxData = $taxData;
         $this->_storeManager = $storeManager;
diff --git a/app/code/Magento/Tax/Model/Resource/Calculation/Rate/Collection.php b/app/code/Magento/Tax/Model/Resource/Calculation/Rate/Collection.php
index 9bd5ec15ec5..b027c1d2239 100644
--- a/app/code/Magento/Tax/Model/Resource/Calculation/Rate/Collection.php
+++ b/app/code/Magento/Tax/Model/Resource/Calculation/Rate/Collection.php
@@ -39,7 +39,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
@@ -47,7 +47,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
diff --git a/app/code/Magento/Tax/Model/Resource/Report/Collection.php b/app/code/Magento/Tax/Model/Resource/Report/Collection.php
index 59befbb9f76..24953e6543b 100644
--- a/app/code/Magento/Tax/Model/Resource/Report/Collection.php
+++ b/app/code/Magento/Tax/Model/Resource/Report/Collection.php
@@ -55,14 +55,14 @@ class Collection extends \Magento\Sales\Model\Resource\Report\Collection\Abstrac
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Sales\Model\Resource\Report $resource
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Sales\Model\Resource\Report $resource
diff --git a/app/code/Magento/Tax/Model/Resource/Report/Tax.php b/app/code/Magento/Tax/Model/Resource/Report/Tax.php
index 28616a75db7..80dbdc669f5 100644
--- a/app/code/Magento/Tax/Model/Resource/Report/Tax.php
+++ b/app/code/Magento/Tax/Model/Resource/Report/Tax.php
@@ -42,24 +42,26 @@ class Tax extends \Magento\Reports\Model\Resource\Report\AbstractReport
     protected $_updatedAtFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Logger $logger
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Reports\Model\FlagFactory $reportsFlagFactory
-     * @param \Magento\Tax\Model\Resource\Report\Tax\CreatedatFactory $createdAtFactory
-     * @param \Magento\Tax\Model\Resource\Report\Tax\UpdatedatFactory $updatedAtFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param Tax\CreatedatFactory $createdAtFactory
+     * @param Tax\UpdatedatFactory $updatedAtFactory
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\Logger $logger,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Reports\Model\FlagFactory $reportsFlagFactory,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Tax\Model\Resource\Report\Tax\CreatedatFactory $createdAtFactory,
         \Magento\Tax\Model\Resource\Report\Tax\UpdatedatFactory $updatedAtFactory
     ) {
         $this->_createdAtFactory = $createdAtFactory;
         $this->_updatedAtFactory = $updatedAtFactory;
-        parent::__construct($logger, $resource, $locale, $reportsFlagFactory);
+        parent::__construct($logger, $resource, $locale, $reportsFlagFactory, $dateTime);
     }
 
     /**
diff --git a/app/code/Magento/Tax/Model/Resource/Setup.php b/app/code/Magento/Tax/Model/Resource/Setup.php
index da4554f7713..32c0ca9fb2a 100644
--- a/app/code/Magento/Tax/Model/Resource/Setup.php
+++ b/app/code/Magento/Tax/Model/Resource/Setup.php
@@ -38,9 +38,8 @@ class Setup extends \Magento\Sales\Model\Resource\Setup
 
     /**
      * @param \Magento\Core\Model\Resource\Setup\Context $context
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
-     * @param \Magento\Core\Helper\Data $coreHelper
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Catalog\Model\Resource\SetupFactory $setupFactory
      * @param string $resourceName
@@ -49,9 +48,8 @@ class Setup extends \Magento\Sales\Model\Resource\Setup
      */
     public function __construct(
         \Magento\Core\Model\Resource\Setup\Context $context,
-        \Magento\Core\Model\CacheInterface $cache,
+        \Magento\App\CacheInterface $cache,
         \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
-        \Magento\Core\Helper\Data $coreHelper,
         \Magento\Core\Model\Config $config,
         \Magento\Catalog\Model\Resource\SetupFactory $setupFactory,
         $resourceName,
@@ -60,7 +58,7 @@ class Setup extends \Magento\Sales\Model\Resource\Setup
     ) {
         $this->_setupFactory = $setupFactory;
         parent::__construct(
-            $context, $cache, $attrGrCollFactory, $coreHelper, $config, $resourceName, $moduleName, $connectionName
+            $context, $cache, $attrGrCollFactory, $config, $resourceName, $moduleName, $connectionName
         );
     }
 
diff --git a/app/code/Magento/Tax/Model/Sales/Order/Tax.php b/app/code/Magento/Tax/Model/Sales/Order/Tax.php
index 7f39510114a..58ebb382b0d 100644
--- a/app/code/Magento/Tax/Model/Sales/Order/Tax.php
+++ b/app/code/Magento/Tax/Model/Sales/Order/Tax.php
@@ -24,6 +24,8 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Tax\Model\Sales\Order;
+
 /**
  * @method \Magento\Tax\Model\Resource\Sales\Order\Tax _getResource()
  * @method \Magento\Tax\Model\Resource\Sales\Order\Tax getResource()
@@ -49,13 +51,7 @@
  * @method \Magento\Tax\Model\Sales\Order\Tax setBaseRealAmount(float $value)
  * @method int getHidden()
  * @method \Magento\Tax\Model\Sales\Order\Tax setHidden(int $value)
- *
- * @category    Magento
- * @package     Magento_Tax
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Tax\Model\Sales\Order;
-
 class Tax extends \Magento\Core\Model\AbstractModel
 {
     protected function _construct()
diff --git a/app/code/Magento/Tax/Model/System/Config/Source/Tax/Region.php b/app/code/Magento/Tax/Model/System/Config/Source/Tax/Region.php
index dd5528c0998..75320418876 100644
--- a/app/code/Magento/Tax/Model/System/Config/Source/Tax/Region.php
+++ b/app/code/Magento/Tax/Model/System/Config/Source/Tax/Region.php
@@ -31,14 +31,14 @@ class Region implements \Magento\Core\Model\Option\ArrayInterface
     protected $_options;
 
     /**
-     * @var \Magento\Directory\Model\Resource\Region\Collection\Factory
+     * @var \Magento\Directory\Model\Resource\Region\CollectionFactory
      */
     protected $_regionsFactory;
 
     /**
-     * @param \Magento\Directory\Model\Resource\Region\Collection\Factory $regionsFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionsFactory
      */
-    public function __construct(\Magento\Directory\Model\Resource\Region\Collection\Factory $regionsFactory)
+    public function __construct(\Magento\Directory\Model\Resource\Region\CollectionFactory $regionsFactory)
     {
         $this->_regionsFactory = $regionsFactory;
     }
diff --git a/app/code/Magento/Tax/etc/di.xml b/app/code/Magento/Tax/etc/di.xml
index 1c1db1c00b2..d65374234b6 100644
--- a/app/code/Magento/Tax/etc/di.xml
+++ b/app/code/Magento/Tax/etc/di.xml
@@ -26,10 +26,10 @@
 <config>
     <type name="Magento\Tax\Helper\Data">
         <param name="taxConfig">
-            <instance type="Magento\Tax\Model\ConfigProxy" />
+            <instance type="Magento\Tax\Model\Config\Proxy" />
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <tax_setup>Magento\Tax\Model\Resource\Setup</tax_setup>
diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php
index 7eb0a5dc700..ab2abbc1440 100644
--- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php
+++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php
@@ -49,7 +49,7 @@ abstract class AbstractTab
     protected $_coreRegistry = null;
 
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -57,7 +57,7 @@ abstract class AbstractTab
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Core\Model\Registry $registry,
diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Image.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Image.php
index 508abefa80f..61a16e2a6c0 100644
--- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Image.php
+++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Image.php
@@ -37,7 +37,7 @@ class Image extends \Magento\Data\Form\Element\Image
     protected $_imagePath;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\UrlInterface $urlBuilder
@@ -45,7 +45,7 @@ class Image extends \Magento\Data\Form\Element\Image
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\UrlInterface $urlBuilder,
@@ -54,7 +54,7 @@ class Image extends \Magento\Data\Form\Element\Image
     ) {
         $this->_imagePath = $imagePath;
         parent::__construct(
-            $coreData,
+            $escaper,
             $factoryElement,
             $factoryCollection,
             $urlBuilder,
diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Links.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Links.php
index a75c4134a8f..713751ad80e 100644
--- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Links.php
+++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Links.php
@@ -35,18 +35,18 @@ class Links
     extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('links');
     }
 
diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php
index 7451577aa51..a05732f064f 100644
--- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php
+++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php
@@ -53,7 +53,7 @@ class Css
     protected $_customCssFile;
 
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -62,7 +62,7 @@ class Css
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Core\Model\Registry $registry,
@@ -204,7 +204,7 @@ class Css
                         \Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE
                 ))
                 . "', null, null,'"
-                . $this->quoteEscape(
+                . $this->escapeQuote(
                     __('Upload Images'), true
                 )
                 . "');"
@@ -228,7 +228,7 @@ class Css
                     \Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE => \Magento\Theme\Model\Wysiwyg\Storage::TYPE_FONT
                 ))
                 . "', null, null,'"
-                . $this->quoteEscape(
+                . $this->escapeQuote(
                     __('Upload Fonts'), true
                 )
                 . "');",
diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php
index 7cf6e9486f7..cc6c7279f2d 100644
--- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php
+++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php
@@ -52,7 +52,7 @@ class General
     protected $_fileSize;
 
     /**
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -62,7 +62,7 @@ class General
      * @param array $data
      */
     public function __construct(
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Core\Model\Registry $registry,
diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php
index 22aeb30ec45..6644a2b938a 100644
--- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php
+++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php
@@ -55,7 +55,6 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action
      */
     public function indexAction()
     {
-        $this->_eventManager->dispatch('theme_registration_from_filesystem');
         $this->loadLayout();
         $this->_setActiveMenu('Magento_Theme::system_design_theme');
         $this->renderLayout();
@@ -109,7 +108,7 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action
             $this->_redirect('adminhtml/*/');
         } catch (\Exception $e) {
             $this->_getSession()->addError(__('We cannot find the theme.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_redirect('adminhtml/*/');
         }
     }
@@ -164,7 +163,7 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action
             $redirectBack = true;
         } catch (\Exception $e) {
             $this->_getSession()->addError('The theme was not saved');
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $redirectBack
             ? $this->_redirect('adminhtml/*/edit', array('id' => $theme->getId()))
@@ -197,7 +196,7 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action
             $this->_getSession()->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->_getSession()->addException($e, __('We cannot delete the theme.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         /**
          * @todo Temporary solution. Theme module should not know about the existence of editor module.
@@ -219,7 +218,7 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action
             $result = array('error' => true, 'message' => $e->getMessage());
         } catch (\Exception $e) {
             $result = array('error' => true, 'message' => __('We cannot upload the CSS file.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
     }
@@ -259,7 +258,7 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action
             $result = array('error' => true, 'message' => $e->getMessage());
         } catch (\Exception $e) {
             $result = array('error' => true, 'message' => __('We cannot upload the JS file.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
     }
@@ -295,7 +294,7 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Exception $e) {
             $this->_getSession()->addException($e, __('We cannot find file'));
             $this->_redirectUrl($this->_getRefererUrl());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
     }
 
@@ -331,7 +330,7 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action
         } catch (\Exception $e) {
             $this->_getSession()->addException($e, __('We cannot find file "%1".', $fileName));
             $this->_redirectUrl($this->_getRefererUrl());
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
     }
 
diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php
index 9a96b37897c..ccff57a2870 100644
--- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php
+++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php
@@ -51,7 +51,7 @@ class Files extends \Magento\Backend\Controller\Adminhtml\Action
                     ->getTreeJson($this->_getStorage()->getTreeArray())
             );
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode(array()));
         }
     }
@@ -69,7 +69,7 @@ class Files extends \Magento\Backend\Controller\Adminhtml\Action
             $result = array('error' => true, 'message' => $e->getMessage());
         } catch (\Exception $e) {
             $result = array('error' => true, 'message' => __('Sorry, there was an unknown error.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
     }
@@ -135,7 +135,7 @@ class Files extends \Magento\Backend\Controller\Adminhtml\Action
                 'value' => $helper->getThumbnailPath($file)
             ));
         } catch (\Exception $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_redirect('core/index/notfound');
         }
     }
diff --git a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
index 709dc0fb192..7929bdb736c 100644
--- a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
+++ b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
@@ -163,7 +163,7 @@ class Storage
             $image->resize(self::THUMBNAIL_WIDTH, self::THUMBNAIL_HEIGHT);
             $image->save($thumbnailPath);
         } catch (\Magento\Filesystem\FilesystemException $e) {
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             return false;
         }
 
diff --git a/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_wysiwyg_files_index.xml b/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_wysiwyg_files_index.xml
index fe1a7f0658c..20268273479 100644
--- a/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_wysiwyg_files_index.xml
+++ b/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_wysiwyg_files_index.xml
@@ -27,7 +27,7 @@
     <remove name="footer"/>
     <remove name="head"/>
     <referenceContainer name="left">
-        <block class="Magento\Theme\Block\Adminhtml\Wysiwyg\Files\Tree" name="wysiwyg_files.tree" template="Magento_Adminhtml::cms/browser/tree.phtml"/>
+        <block class="Magento\Theme\Block\Adminhtml\Wysiwyg\Files\Tree" name="wysiwyg_files.tree" template="Magento_Cms::browser/tree.phtml"/>
     </referenceContainer>
     <referenceContainer name="content">
         <block class="Magento\Theme\Block\Adminhtml\Wysiwyg\Files\Content" name="wysiwyg_files.content" template="browser/content.phtml">
diff --git a/app/code/Magento/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php b/app/code/Magento/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php
index 2efb59c5ae1..71676825d0b 100644
--- a/app/code/Magento/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php
+++ b/app/code/Magento/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php
@@ -80,17 +80,17 @@ class Unitofmeasure extends \Magento\Backend\Block\System\Config\Form\Field
 
         $carrierModel = $this->_shippingDhl;
 
-        $this->setInch($this->jsQuoteEscape($carrierModel->getCode('unit_of_dimension_cut', 'I')));
-        $this->setCm($this->jsQuoteEscape($carrierModel->getCode('unit_of_dimension_cut', 'C')));
+        $this->setInch($this->escapeJsQuote($carrierModel->getCode('unit_of_dimension_cut', 'I')));
+        $this->setCm($this->escapeJsQuote($carrierModel->getCode('unit_of_dimension_cut', 'C')));
 
-        $this->setHeight($this->jsQuoteEscape($carrierModel->getCode('dimensions', 'height')));
-        $this->setDepth($this->jsQuoteEscape($carrierModel->getCode('dimensions', 'depth')));
-        $this->setWidth($this->jsQuoteEscape($carrierModel->getCode('dimensions', 'width')));
+        $this->setHeight($this->escapeJsQuote($carrierModel->getCode('dimensions', 'height')));
+        $this->setDepth($this->escapeJsQuote($carrierModel->getCode('dimensions', 'depth')));
+        $this->setWidth($this->escapeJsQuote($carrierModel->getCode('dimensions', 'width')));
 
         $kgWeight = 70;
 
         $this->setDivideOrderWeightNoteKg(
-            $this->jsQuoteEscape(__('This allows breaking total order weight into smaller pieces if it exceeds %1 %2 to ensure accurate calculation of shipping charges.', $kgWeight, 'kg'))
+            $this->escapeJsQuote(__('This allows breaking total order weight into smaller pieces if it exceeds %1 %2 to ensure accurate calculation of shipping charges.', $kgWeight, 'kg'))
         );
 
         $weight = round(
@@ -98,7 +98,7 @@ class Unitofmeasure extends \Magento\Backend\Block\System\Config\Form\Field
                 $kgWeight, \Zend_Measure_Weight::KILOGRAM, \Zend_Measure_Weight::POUND), 3);
 
         $this->setDivideOrderWeightNoteLbp(
-            $this->jsQuoteEscape(__('This allows breaking total order weight into smaller pieces if it exceeds %1 %2 to ensure accurate calculation of shipping charges.', $weight, 'pounds'))
+            $this->escapeJsQuote(__('This allows breaking total order weight into smaller pieces if it exceeds %1 %2 to ensure accurate calculation of shipping charges.', $weight, 'pounds'))
         );
 
         $this->setTemplate('dhl/unitofmeasure.phtml');
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php
index be0ce2b8ee4..192ef5a1199 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php
@@ -24,16 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Usa\Model\Shipping\Carrier;
 
 /**
  * DHL shipping implementation
- *
- * @category   Magento
- * @package    Magento_Usa
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Usa\Model\Shipping\Carrier;
-
 class Dhl
     extends \Magento\Usa\Model\Shipping\Carrier\AbstractCarrier
     implements \Magento\Shipping\Model\Carrier\CarrierInterface
@@ -121,19 +116,18 @@ class Dhl
      *
      * @var \Magento\Usa\Helper\Data
      */
-    protected $_usaData = null;
+    protected $_usaData;
 
     /**
-     * Core string
+     * Magento string lib
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
      * Dhl constructor
      *
-     * @param \Magento\Core\Helper\String $coreString
      * @param \Magento\Usa\Helper\Data $usaData
      * @param \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory
@@ -148,11 +142,12 @@ class Dhl
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
+     * @param \Magento\Stdlib\String $string
      * @param array $data
+     *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
         \Magento\Usa\Helper\Data $usaData,
         \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateFactory,
@@ -167,9 +162,10 @@ class Dhl
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
+        \Magento\Stdlib\String $string,
         array $data = array()
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         $this->_usaData = $usaData;
         parent::__construct(
             $xmlElFactory, $rateFactory, $rateMethodFactory, $trackFactory, $trackErrorFactory, $trackStatusFactory,
@@ -394,9 +390,7 @@ class Dhl
         $r->setValue(round($request->getPackageValue(), 2));
         $r->setValueWithDiscount($request->getPackageValueWithDiscount());
         $r->setCustomsValue($request->getPackageCustomsValue());
-        $r->setDestStreet(
-            $this->_coreString->substr(str_replace("\n", '', $request->getDestStreet()), 0, 35)
-        );
+        $r->setDestStreet($this->string->substr(str_replace("\n", '', $request->getDestStreet()), 0, 35));
         $r->setDestStreetLine2($request->getDestStreetLine2());
         $r->setDestCity($request->getDestCity());
         $r->setOrigCompanyName($request->getOrigCompanyName());
@@ -406,8 +400,10 @@ class Dhl
         $r->setOrigEmail($this->_coreStoreConfig->getConfig('trans_email/ident_general/email', $r->getStoreId()));
         $r->setOrigCity($request->getOrigCity());
         $r->setOrigPostal($request->getOrigPostal());
-        $originStreet1 = $this->_coreStoreConfig->getConfig(\Magento\Shipping\Model\Shipping::XML_PATH_STORE_ADDRESS1,$r->getStoreId());
-        $originStreet2 = $this->_coreStoreConfig->getConfig(\Magento\Shipping\Model\Shipping::XML_PATH_STORE_ADDRESS2, $r->getStoreId());
+        $originStreet1 = $this->_coreStoreConfig
+            ->getConfig(\Magento\Shipping\Model\Shipping::XML_PATH_STORE_ADDRESS1, $r->getStoreId());
+        $originStreet2 = $this->_coreStoreConfig
+            ->getConfig(\Magento\Shipping\Model\Shipping::XML_PATH_STORE_ADDRESS2, $r->getStoreId());
         $r->setOrigStreet($request->getOrigStreet() ? $request->getOrigStreet() : $originStreet2);
         $r->setOrigStreetLine2($request->getOrigStreetLine2());
         $r->setDestPhoneNumber($request->getDestPhoneNumber());
@@ -430,7 +426,7 @@ class Dhl
         //for DHL, puero rico state for US will assume as puerto rico country
         //for puerto rico, dhl will ship as international
         if ($destCountry == self::USA_COUNTRY_ID && ($request->getDestPostcode() == '00912'
-                                                     || $request->getDestRegionCode() == self::PUERTORICO_COUNTRY_ID)
+            || $request->getDestRegionCode() == self::PUERTORICO_COUNTRY_ID)
         ) {
             $destCountry = self::PUERTORICO_COUNTRY_ID;
         }
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 2b3e4bbeb9f..8dc452b343f 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/International.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/International.php
@@ -24,15 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Usa\Model\Shipping\Carrier\Dhl;
+
 /**
  * DHL International (API v1.4)
- *
- * @category Magento
- * @package  Magento_Usa
- * @author   Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Usa\Model\Shipping\Carrier\Dhl;
-
 class International
     extends \Magento\Usa\Model\Shipping\Carrier\AbstractCarrier
     implements \Magento\Shipping\Model\Carrier\CarrierInterface
@@ -158,23 +154,16 @@ class International
     /**
      * Core string
      *
-     * @var \Magento\Core\Helper\String
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreString = null;
+    protected $string;
 
     /**
      * Usa data
      *
      * @var \Magento\Usa\Helper\Data
      */
-    protected $_usaData = null;
-
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
+    protected $_usaData;
 
     /**
      * @var \Magento\Core\Model\Date
@@ -192,21 +181,29 @@ class International
     protected $_storeManager;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_configReader;
 
+    /**
+     * @var \Magento\Math\Division
+     */
+    protected $mathDivision;
+
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * Dhl International Class constructor
      *
      * Sets necessary data
      *
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Usa\Helper\Data $usaData
-     * @param \Magento\Core\Helper\String $coreString
      * @param \Magento\Core\Model\Date $coreDate
      * @param \Magento\Usa\Model\Shipping\Carrier\Dhl\Label\PdfFactory $pdfFactory
-     * @param \Magento\Core\Model\Config\Modules\Reader $configReader
+     * @param \Magento\Module\Dir\Reader $configReader
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory
@@ -221,16 +218,17 @@ class International
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
+     * @param \Magento\Stdlib\String $string
+     * @param \Magento\Math\Division $mathDivision
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param array $data
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Usa\Helper\Data $usaData,
-        \Magento\Core\Helper\String $coreString,
         \Magento\Core\Model\Date $coreDate,
         \Magento\Usa\Model\Shipping\Carrier\Dhl\Label\PdfFactory $pdfFactory,
-        \Magento\Core\Model\Config\Modules\Reader $configReader,
+        \Magento\Module\Dir\Reader $configReader,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateFactory,
@@ -245,15 +243,19 @@ class International
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
+        \Magento\Stdlib\String $string,
+        \Magento\Math\Division $mathDivision,
+        \Magento\Stdlib\DateTime $dateTime,
         array $data = array()
     ) {
-        $this->_coreData = $coreData;
         $this->_usaData = $usaData;
-        $this->_coreString = $coreString;
         $this->_coreDate = $coreDate;
         $this->_pdfFactory = $pdfFactory;
         $this->_storeManager = $storeManager;
         $this->_configReader = $configReader;
+        $this->string = $string;
+        $this->mathDivision = $mathDivision;
+        $this->dateTime = $dateTime;
         parent::__construct(
             $xmlElFactory, $rateFactory, $rateMethodFactory, $trackFactory, $trackErrorFactory, $trackStatusFactory,
             $regionFactory, $countryFactory, $currencyFactory, $directoryData, $coreStoreConfig, $rateErrorFactory,
@@ -414,8 +416,7 @@ class International
         $requestObject->setValue(round($request->getPackageValue(), 2))
             ->setValueWithDiscount($request->getPackageValueWithDiscount())
             ->setCustomsValue($request->getPackageCustomsValue())
-            ->setDestStreet(
-                $this->_coreString->substr(str_replace("\n", '', $request->getDestStreet()), 0, 35))
+            ->setDestStreet($this->string->substr(str_replace("\n", '', $request->getDestStreet()), 0, 35))
             ->setDestStreetLine2($request->getDestStreetLine2())
             ->setDestCity($request->getDestCity())
             ->setOrigCompanyName($request->getOrigCompanyName())
@@ -713,7 +714,7 @@ class International
                        if ($itemWeight > $maxWeight) {
                            $qtyItem = floor($itemWeight / $maxWeight);
                            $decimalItems[] = array('weight' => $maxWeight, 'qty' => $qtyItem);
-                           $weightItem = $this->_coreData->getExactDivision($itemWeight, $maxWeight);
+                           $weightItem = $this->mathDivision->getExactDivision($itemWeight, $maxWeight);
                            if ($weightItem) {
                                $decimalItems[] = array('weight' => $weightItem, 'qty' => 1);
                            }
@@ -904,7 +905,7 @@ class International
 
         $nodeBkgDetails = $nodeGetQuote->addChild('BkgDetails');
         $nodeBkgDetails->addChild('PaymentCountryCode', $rawRequest->getOrigCountryId());
-        $nodeBkgDetails->addChild('Date', \Magento\Date::now(true));
+        $nodeBkgDetails->addChild('Date', $this->dateTime->now(true));
         $nodeBkgDetails->addChild('ReadyTime', 'PT' . (int)(string)$this->getConfigData('ready_time') . 'H00M');
 
         $nodeBkgDetails->addChild('DimensionUnit', $this->_getDimensionUnit());
@@ -1374,7 +1375,7 @@ class International
         $nodeConsignee->addChild('CompanyName', substr($companyName, 0, 35));
 
         $address = $rawRequest->getRecipientAddressStreet1(). ' ' . $rawRequest->getRecipientAddressStreet2();
-        $address = $this->_coreString->strSplit($address, 35, false, true);
+        $address = $this->string->split($address, 35, false, true);
         if (is_array($address)) {
             foreach ($address as $addressLine) {
                 $nodeConsignee->addChild('AddressLine', $addressLine);
@@ -1433,7 +1434,7 @@ class International
         $nodeShipper->addChild('RegisteredAccount', (string)$this->getConfigData('account'));
 
         $address = $rawRequest->getShipperAddressStreet1(). ' ' . $rawRequest->getShipperAddressStreet2();
-        $address = $this->_coreString->strSplit($address, 35, false, true);
+        $address = $this->string->split($address, 35, false, true);
         if (is_array($address)) {
             foreach ($address as $addressLine) {
                 $nodeShipper->addChild('AddressLine', $addressLine);
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/Page.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/Page.php
index c813d6a761e..b1a6ee177fc 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/Page.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/Page.php
@@ -43,37 +43,27 @@ class Page extends \Zend_Pdf_Page
     const ALIGN_CENTER = 'center';
 
     /**
-     * Dhl International Label Creation Class Pdf Page constructor
-     * Create/Make a copy of pdf page
-     *
-     * @param \Magento\Usa\Model\Shipping\Carrier\Dhl\Label\Pdf\Page|string $param1
-     * @param null $param2
-     * @param null $param3
+     * @var \Magento\Stdlib\String
      */
+    protected $string;
+
     /**
      * Dhl International Label Creation Class Pdf Page constructor
      *
      * Create/Make a copy of pdf page
      *
-     * @param \Magento\Core\Helper\String $coreString
+     * @param \Magento\Stdlib\String $string
      * @param \Magento\Usa\Model\Shipping\Carrier\Dhl\Label\Pdf\Page|string $param1
      * @param null $param2
      * @param null $param3
      */
-    /**
-     * Core string
-     *
-     * @var \Magento\Core\Helper\String
-     */
-    protected $_coreString = null;
-
     public function __construct(
-        \Magento\Core\Helper\String $coreString,
+        \Magento\Stdlib\String $string,
         $param1,
         $param2 = null,
         $param3 = null
     ) {
-        $this->_coreString = $coreString;
+        $this->string = $string;
         if ($param1 instanceof \Magento\Usa\Model\Shipping\Carrier\Dhl\Label\Pdf\Page
             && $param2 === null && $param3 === null
         ) {
@@ -162,7 +152,7 @@ class Page extends \Zend_Pdf_Page
     {
         foreach ($lines as $line) {
             if (strlen($line) > $maxWidth) {
-                $subLines = $this->_coreString->strSplit($line, $maxWidth, true, true);
+                $subLines = $this->string->split($line, $maxWidth, true, true);
                 $y = $this->drawLines(array_filter($subLines), $x, $y, $maxWidth, $align);
                 continue;
             }
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php
index 18a8665a6fd..29135f27d94 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php
@@ -121,7 +121,7 @@ class Fedex
     protected $_storeManager;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -131,9 +131,9 @@ class Fedex
     protected $_productCollFactory;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Model\Config\Modules\Reader $configReader
+     * @param \Magento\Module\Dir\Reader $configReader
      * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory
      * @param \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory
@@ -152,9 +152,9 @@ class Fedex
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Model\Config\Modules\Reader $configReader,
+        \Magento\Module\Dir\Reader $configReader,
         \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory,
         \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateFactory,
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php
index d2d6c912936..8e1da409304 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php
@@ -130,12 +130,12 @@ class Ups
     protected $_locale;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Usa\Model\Simplexml\ElementFactory $simpleXmlElementFactory
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory
@@ -156,7 +156,7 @@ class Ups
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Usa\Model\Simplexml\ElementFactory $simpleXmlElementFactory,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory,
diff --git a/app/code/Magento/User/Block/User/Edit/Tab/Main.php b/app/code/Magento/User/Block/User/Edit/Tab/Main.php
index f7f6410a4b0..8d13d2014d9 100644
--- a/app/code/Magento/User/Block/User/Edit/Tab/Main.php
+++ b/app/code/Magento/User/Block/User/Edit/Tab/Main.php
@@ -48,7 +48,7 @@ class Main extends \Magento\Backend\Block\Widget\Form\Generic
      *
      * @param \Magento\Backend\Model\Auth\Session $authSession
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -56,7 +56,7 @@ class Main extends \Magento\Backend\Block\Widget\Form\Generic
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Backend\Model\Auth\Session $authSession,
diff --git a/app/code/Magento/User/Controller/Adminhtml/Auth.php b/app/code/Magento/User/Controller/Adminhtml/Auth.php
index d01a33e2fdf..428ac09fa86 100644
--- a/app/code/Magento/User/Controller/Adminhtml/Auth.php
+++ b/app/code/Magento/User/Controller/Adminhtml/Auth.php
@@ -82,7 +82,7 @@ class Auth extends \Magento\Backend\Controller\AbstractAction
                 }
                 // @codingStandardsIgnoreStart
                 $this->_getSession()
-                    ->addSuccess(__('If there is an account associated with %1 you will receive an email with a link to reset your password.', $this->_objectManager->get('Magento\User\Helper\Data')->escapeHtml($email)));
+                    ->addSuccess(__('If there is an account associated with %1 you will receive an email with a link to reset your password.', $this->_objectManager->get('Magento\Escaper')->escapeHtml($email)));
                 // @codingStandardsIgnoreEnd
                 $this->getResponse()->setRedirect(
                     $this->_objectManager->get('Magento\Backend\Helper\Data')->getHomePageUrl()
diff --git a/app/code/Magento/User/Helper/Data.php b/app/code/Magento/User/Helper/Data.php
index d21a961faff..b5df4417d5b 100644
--- a/app/code/Magento/User/Helper/Data.php
+++ b/app/code/Magento/User/Helper/Data.php
@@ -42,29 +42,27 @@ class Data extends \Magento\Core\Helper\AbstractHelper
         = 'admin/emails/password_reset_link_expiration_period';
 
     /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Core\Model\Config
      */
-    protected $_coreData = null;
+    protected $_coreConfig;
 
     /**
-     * @var \Magento\Core\Model\Config
+     * @var \Magento\Math\Random
      */
-    protected $_coreConfig;
+    protected $mathRandom;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\Context $context
      * @param \Magento\Core\Model\Config $coreConfig
+     * @param \Magento\Math\Random $mathRandom
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\Context $context,
-        \Magento\Core\Model\Config $coreConfig
+        \Magento\Core\Model\Config $coreConfig,
+        \Magento\Math\Random $mathRandom
     ) {
-        $this->_coreData = $coreData;
         $this->_coreConfig = $coreConfig;
+        $this->mathRandom = $mathRandom;
         parent::__construct($context);
     }
 
@@ -75,7 +73,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
      */
     public function generateResetPasswordLinkToken()
     {
-        return $this->_coreData->uniqHash();
+        return $this->mathRandom->getUniqueHash();
     }
 
     /**
diff --git a/app/code/Magento/User/Model/Acl/Loader/Role.php b/app/code/Magento/User/Model/Acl/Loader/Role.php
index e07b95396cb..2c41a9960bc 100644
--- a/app/code/Magento/User/Model/Acl/Loader/Role.php
+++ b/app/code/Magento/User/Model/Acl/Loader/Role.php
@@ -28,7 +28,7 @@ namespace Magento\User\Model\Acl\Loader;
 class Role implements \Magento\Acl\LoaderInterface
 {
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
@@ -45,12 +45,12 @@ class Role implements \Magento\Acl\LoaderInterface
     /**
      * @param \Magento\User\Model\Acl\Role\GroupFactory $groupFactory
      * @param \Magento\User\Model\Acl\Role\UserFactory $roleFactory
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\User\Model\Acl\Role\GroupFactory $groupFactory,
         \Magento\User\Model\Acl\Role\UserFactory $roleFactory,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_resource = $resource;
         $this->_groupFactory = $groupFactory;
diff --git a/app/code/Magento/User/Model/Acl/Loader/Rule.php b/app/code/Magento/User/Model/Acl/Loader/Rule.php
index 6886a835a0c..7bcae660016 100644
--- a/app/code/Magento/User/Model/Acl/Loader/Rule.php
+++ b/app/code/Magento/User/Model/Acl/Loader/Rule.php
@@ -29,19 +29,19 @@ namespace Magento\User\Model\Acl\Loader;
 class Rule implements \Magento\Acl\LoaderInterface
 {
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
     /**
      * @param \Magento\Core\Model\Acl\RootResource $rootResource
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param array $data
      * @SuppressWarnings(PHPMD.UnusedFormalParameter):
      */
     public function __construct(
         \Magento\Core\Model\Acl\RootResource $rootResource,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         array $data = array()
     ) {
         $this->_resource = $resource;
diff --git a/app/code/Magento/User/Model/Resource/Role.php b/app/code/Magento/User/Model/Resource/Role.php
index 1d0f6bd887e..67d4dd740ab 100644
--- a/app/code/Magento/User/Model/Resource/Role.php
+++ b/app/code/Magento/User/Model/Resource/Role.php
@@ -51,15 +51,21 @@ class Role extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_cache;
 
     /**
-     * Construct
-     *
-     * @param \Magento\Core\Model\Resource $resource
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\App\CacheInterface $cache
+     * @param \Magento\Stdlib\DateTime $dateTime
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
-        \Magento\Core\Model\CacheInterface $cache
+        \Magento\App\Resource $resource,
+        \Magento\App\CacheInterface $cache,
+        \Magento\Stdlib\DateTime $dateTime
     ) {
+        $this->dateTime = $dateTime;
         parent::__construct($resource);
         $this->_cache = $cache->getFrontend();
     }
@@ -85,9 +91,9 @@ class Role extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected function _beforeSave(\Magento\Core\Model\AbstractModel $role)
     {
         if (!$role->getId()) {
-            $role->setCreated($this->formatDate(true));
+            $role->setCreated($this->dateTime->formatDate(true));
         }
-        $role->setModified($this->formatDate(true));
+        $role->setModified($this->dateTime->formatDate(true));
 
         if ($role->getId() == '') {
             if ($role->getIdFieldName()) {
diff --git a/app/code/Magento/User/Model/Resource/Rules.php b/app/code/Magento/User/Model/Resource/Rules.php
index 41cc2242586..2169c87f0f7 100644
--- a/app/code/Magento/User/Model/Resource/Rules.php
+++ b/app/code/Magento/User/Model/Resource/Rules.php
@@ -56,21 +56,21 @@ class Rules extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected $_aclBuilder;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
     /**
      * @param \Magento\Acl\Builder $aclBuilder
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\Logger $logger
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Core\Model\Acl\RootResource $rootResource
      * @param \Magento\Acl\CacheInterface $aclCache
      */
     public function __construct(
         \Magento\Acl\Builder $aclBuilder,
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Model\Resource $resource,
+        \Magento\Logger $logger,
+        \Magento\App\Resource $resource,
         \Magento\Core\Model\Acl\RootResource $rootResource,
         \Magento\Acl\CacheInterface $aclCache
     ) {
diff --git a/app/code/Magento/User/Model/Resource/User.php b/app/code/Magento/User/Model/Resource/User.php
index 0392936f7fb..3c7b8bf1d25 100644
--- a/app/code/Magento/User/Model/Resource/User.php
+++ b/app/code/Magento/User/Model/Resource/User.php
@@ -22,11 +22,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\User\Model\Resource;
+
 /**
  * ACL user resource
  */
-namespace Magento\User\Model\Resource;
-
 class User extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
     /**
@@ -41,21 +41,29 @@ class User extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected $_roleFactory;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      * @param \Magento\Acl\CacheInterface $aclCache
      * @param \Magento\User\Model\RoleFactory $roleFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
+        \Magento\App\Resource $resource,
         \Magento\Acl\CacheInterface $aclCache,
-        \Magento\User\Model\RoleFactory $roleFactory
+        \Magento\User\Model\RoleFactory $roleFactory,
+        \Magento\Stdlib\DateTime $dateTime
     ) {
         parent::__construct($resource);
         $this->_aclCache = $aclCache;
         $this->_roleFactory = $roleFactory;
+        $this->dateTime = $dateTime;
     }
 
     /**
@@ -98,7 +106,7 @@ class User extends \Magento\Core\Model\Resource\Db\AbstractDb
         $adapter = $this->_getWriteAdapter();
 
         $data = array(
-            'logdate' => now(),
+            'logdate' => $this->dateTime->now(),
             'lognum'  => $user->getLognum() + 1
         );
 
@@ -142,7 +150,7 @@ class User extends \Magento\Core\Model\Resource\Db\AbstractDb
     {
         if (is_numeric($user)) {
             $userId = $user;
-        } else if ($user instanceof \Magento\Core\Model\AbstractModel) {
+        } elseif ($user instanceof \Magento\Core\Model\AbstractModel) {
             $userId = $user->getUserId();
         } else {
             return null;
@@ -176,9 +184,9 @@ class User extends \Magento\Core\Model\Resource\Db\AbstractDb
     protected function _beforeSave(\Magento\Core\Model\AbstractModel $user)
     {
         if ($user->isObjectNew()) {
-            $user->setCreated($this->formatDate(true));
+            $user->setCreated($this->dateTime->formatDate(true));
         }
-        $user->setModified($this->formatDate(true));
+        $user->setModified($this->dateTime->formatDate(true));
 
         return parent::_beforeSave($user);
     }
diff --git a/app/code/Magento/User/Model/Role.php b/app/code/Magento/User/Model/Role.php
index ef2c96fe78f..e85b6503e40 100644
--- a/app/code/Magento/User/Model/Role.php
+++ b/app/code/Magento/User/Model/Role.php
@@ -91,7 +91,7 @@ class Role extends \Magento\Core\Model\AbstractModel
     public function __wakeup()
     {
         parent::__wakeup();
-        $objectManager = \Magento\Core\Model\ObjectManager::getInstance();
+        $objectManager = \Magento\App\ObjectManager::getInstance();
         $this->_userRolesFactory = $objectManager->get('Magento\User\Model\Resource\Role\User\CollectionFactory');
         $this->_resource = $objectManager->get('Magento\User\Model\Resource\Role');
         $this->_resourceCollection = $objectManager->get('Magento\User\Model\Resource\Role\Collection');
diff --git a/app/code/Magento/User/Model/User.php b/app/code/Magento/User/Model/User.php
index 2d2f3b918b1..67afa0368fc 100644
--- a/app/code/Magento/User/Model/User.php
+++ b/app/code/Magento/User/Model/User.php
@@ -22,6 +22,8 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\User\Model;
+
 /**
  * Admin user model
  *
@@ -51,11 +53,7 @@
  * @method \Magento\User\Model\User setIsActive(int $value)
  * @method string getExtra()
  * @method \Magento\User\Model\User setExtra(string $value)
- */
-
-namespace Magento\User\Model;
-
-/**
+ *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @SuppressWarnings(PHPMD.LongVariable)
  */
@@ -107,13 +105,6 @@ class User
     /** @var \Magento\Core\Model\Sender */
     protected $_sender;
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData = null;
-
     /**
      * User data
      *
@@ -134,7 +125,7 @@ class User
      * @var \Magento\Core\Model\Store\Config
      */
     protected $_coreStoreConfig;
-    
+
     /**
      * Factory for validator composite object
      *
@@ -157,19 +148,28 @@ class User
     protected $_emailInfoFactory;
 
     /**
-     * Construct
-     *
+     * @var \Magento\Encryption\EncryptorInterface
+     */
+    protected $_encryptor;
+
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\User\Helper\Data $userData
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\Sender $sender
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Validator\Composite\VarienObjectFactory $validatorCompositeFactory
      * @param \Magento\User\Model\RoleFactory $roleFactory
      * @param \Magento\Core\Model\Email\InfoFactory $emailInfoFactory
      * @param \Magento\Core\Model\Email\Template\MailerFactory $mailerFactory
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -181,21 +181,23 @@ class User
         \Magento\Core\Model\Registry $registry,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\User\Helper\Data $userData,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\Sender $sender,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Validator\Composite\VarienObjectFactory $validatorCompositeFactory,
         \Magento\User\Model\RoleFactory $roleFactory,
         \Magento\Core\Model\Email\InfoFactory $emailInfoFactory,
         \Magento\Core\Model\Email\Template\MailerFactory $mailerFactory,
+        \Magento\Encryption\EncryptorInterface $encryptor,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
+        $this->_encryptor = $encryptor;
+        $this->dateTime = $dateTime;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
         $this->_eventManager = $eventManager;
         $this->_userData = $userData;
-        $this->_coreData = $coreData;
         $this->_sender = $sender;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_validatorComposite = $validatorCompositeFactory;
@@ -218,23 +220,22 @@ class User
         return array_diff($properties, array(
             '_eventManager',
             '_sender',
-            '_coreData',
             '_userData',
             '_coreStoreConfig',
             '_validatorComposite',
             '_roleFactory',
             '_emailInfoFactory',
             '_mailer',
+            '_encryptor'
         ));
     }
 
     public function __wakeup()
     {
         parent::__wakeup();
-        $objectManager = \Magento\Core\Model\ObjectManager::getInstance();
+        $objectManager = \Magento\App\ObjectManager::getInstance();
         $this->_eventManager    = $objectManager->get('Magento\Event\ManagerInterface');
         $this->_sender          = $objectManager->get('Magento\Core\Model\Sender');
-        $this->_coreData        = $objectManager->get('Magento\Core\Helper\Data');
         $this->_userData        = $objectManager->get('Magento\User\Helper\Data');
         $this->_coreStoreConfig = $objectManager->get('Magento\Core\Model\Store\Config');
         $this->_coreRegistry    = $objectManager->get('Magento\Core\Model\Registry');
@@ -242,6 +243,7 @@ class User
         $this->_roleFactory = $objectManager->get('Magento\User\Model\RoleFactory');
         $this->_emailInfoFactory = $objectManager->get('Magento\Core\Model\Email\InfoFactory');
         $this->_mailer = $objectManager->get('Magento\Core\Model\Email\Template\MailerFactory');
+        $this->_encryptor = $objectManager->get('Magento\Encryption\EncryptorInterface');
     }
 
     /**
@@ -255,7 +257,7 @@ class User
             'firstname' => $this->getFirstname(),
             'lastname'  => $this->getLastname(),
             'email'     => $this->getEmail(),
-            'modified'  => now(),
+            'modified'  => $this->dateTime->now(),
             'extra'     => serialize($this->getExtra())
         );
 
@@ -554,7 +556,7 @@ class User
 
             if ($sensitive
                 && $this->getId()
-                && $this->_coreData->validateHash($password, $this->getPassword())
+                && $this->_encryptor->validateHash($password, $this->getPassword())
             ) {
                 if ($this->getIsActive() != '1') {
                     throw new \Magento\Backend\Model\Auth\Exception(
@@ -648,7 +650,7 @@ class User
      */
     protected function _getEncodedPassword($password)
     {
-        return $this->_coreData->getHash($password, 2);
+        return $this->_encryptor->getHash($password, 2);
     }
 
     /**
@@ -666,8 +668,7 @@ class User
             throw new \Magento\Core\Exception(__('Please correct the password reset token.'));
         }
         $this->setRpToken($newToken);
-        $currentDate = \Magento\Date::now();
-        $this->setRpTokenCreatedAt($currentDate);
+        $this->setRpTokenCreatedAt($this->dateTime->now());
 
         return $this;
     }
@@ -688,9 +689,8 @@ class User
 
         $expirationPeriod = $this->_userData->getResetPasswordLinkExpirationPeriod();
 
-        $currentDate = \Magento\Date::now();
-        $currentTimestamp = \Magento\Date::toTimestamp($currentDate);
-        $tokenTimestamp = \Magento\Date::toTimestamp($linkTokenCreatedAt);
+        $currentTimestamp = $this->dateTime->toTimestamp($this->dateTime->now());
+        $tokenTimestamp = $this->dateTime->toTimestamp($linkTokenCreatedAt);
         if ($tokenTimestamp > $currentTimestamp) {
             return true;
         }
diff --git a/app/code/Magento/User/etc/di.xml b/app/code/Magento/User/etc/di.xml
index 624736d04c8..24e0ff001b4 100644
--- a/app/code/Magento/User/etc/di.xml
+++ b/app/code/Magento/User/etc/di.xml
@@ -38,7 +38,7 @@
             <instance type="Magento\Core\Model\Acl\Cache\Proxy" />
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <user_setup>Magento\User\Model\Resource\Setup</user_setup>
diff --git a/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/User.php b/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/User.php
index 360a542d7ec..b492bac3412 100644
--- a/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/User.php
+++ b/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/User.php
@@ -103,7 +103,7 @@ class User extends \Magento\Backend\Controller\AbstractAction
 
         // Update title and breadcrumb record.
         $actionTitle = $user->getId()
-            ? $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($user->getApiKey())
+            ? $this->_objectManager->get('Magento\Escaper')->escapeHtml($user->getApiKey())
             : __('New API User');
         $this->_title($actionTitle);
         $this->_addBreadcrumb($actionTitle, $actionTitle);
@@ -158,7 +158,7 @@ class User extends \Magento\Backend\Controller\AbstractAction
                     ->addError($e->getMessage());
                 $redirectBack = true;
             } catch (\Exception $e) {
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
                 $this->_getSession()
                     ->setWebapiUserData($data)
                     ->addError($e->getMessage());
diff --git a/app/code/Magento/Webapi/Controller/ErrorProcessor.php b/app/code/Magento/Webapi/Controller/ErrorProcessor.php
index b9cac601620..5d6971b1ba4 100644
--- a/app/code/Magento/Webapi/Controller/ErrorProcessor.php
+++ b/app/code/Magento/Webapi/Controller/ErrorProcessor.php
@@ -45,7 +45,7 @@ class ErrorProcessor
     /** @var \Magento\Core\Model\App */
     protected $_app;
 
-    /** @var \Magento\Core\Model\Logger */
+    /** @var \Magento\Logger */
     protected $_logger;
 
     /**
@@ -53,12 +53,12 @@ class ErrorProcessor
      *
      * @param \Magento\Core\Helper\Data $helper
      * @param \Magento\Core\Model\App $app
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */
     public function __construct(
         \Magento\Core\Helper\Data $helper,
         \Magento\Core\Model\App $app,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger
     ) {
         $this->_coreHelper = $helper;
         $this->_app = $app;
@@ -90,7 +90,8 @@ class ErrorProcessor
                 $exception->getMessage(),
                 $exception->getCode(),
                 $httpCode,
-                $exception->getParameters()
+                $exception->getParameters(),
+                $exception->getName()
             );
         } else if ($exception instanceof \Magento\Webapi\Exception) {
             $maskedException = $exception;
diff --git a/app/code/Magento/Webapi/Controller/Rest.php b/app/code/Magento/Webapi/Controller/Rest.php
index c90f2a46d9b..6092263c482 100644
--- a/app/code/Magento/Webapi/Controller/Rest.php
+++ b/app/code/Magento/Webapi/Controller/Rest.php
@@ -49,11 +49,9 @@ class Rest implements \Magento\App\FrontControllerInterface
     protected $_oauthHelper;
 
     /**
-     * Initialize dependencies.
-     *
-     * @param \Magento\Webapi\Controller\Rest\Request $request
-     * @param \Magento\Webapi\Controller\Rest\Response $response
-     * @param \Magento\Webapi\Controller\Rest\Router $router
+     * @param Rest\Request $request
+     * @param Rest\Response $response
+     * @param Rest\Router $router
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\App\State $appState
      * @param \Magento\Oauth\Service\OauthV1Interface $oauthService
@@ -91,7 +89,7 @@ class Rest implements \Magento\App\FrontControllerInterface
      * Handle REST request
      *
      * @param \Magento\App\RequestInterface $request
-     * @return $this
+     * @return \Magento\App\ResponseInterface
      */
     public function dispatch(\Magento\App\RequestInterface $request)
     {
@@ -124,7 +122,6 @@ class Rest implements \Magento\App\FrontControllerInterface
         } catch (\Exception $e) {
             $this->_response->setException($e);
         }
-        $this->_response->sendResponse();
-        return $this;
+        return $this->_response;
     }
 }
diff --git a/app/code/Magento/Webapi/Controller/Soap.php b/app/code/Magento/Webapi/Controller/Soap.php
index 174c12e804f..2d689a2a65c 100644
--- a/app/code/Magento/Webapi/Controller/Soap.php
+++ b/app/code/Magento/Webapi/Controller/Soap.php
@@ -73,7 +73,7 @@ class Soap implements \Magento\App\FrontControllerInterface
      * @param \Magento\Webapi\Model\Soap\Server $soapServer
      * @param \Magento\Webapi\Controller\ErrorProcessor $errorProcessor
      * @param \Magento\App\State $appState
-     * @param \Magento\Core\Model\App $application
+     * @param \Magento\Core\Model\AppInterface $application
      * @param \Magento\Oauth\Service\OauthV1Interface $oauthService
      * @param \Magento\Oauth\Helper\Service $oauthHelper
      */
@@ -84,7 +84,7 @@ class Soap implements \Magento\App\FrontControllerInterface
         \Magento\Webapi\Model\Soap\Server $soapServer,
         \Magento\Webapi\Controller\ErrorProcessor $errorProcessor,
         \Magento\App\State $appState,
-        \Magento\Core\Model\App $application,
+        \Magento\Core\Model\AppInterface $application,
         \Magento\Oauth\Service\OauthV1Interface $oauthService,
         \Magento\Oauth\Helper\Service $oauthHelper
     ) {
@@ -111,7 +111,7 @@ class Soap implements \Magento\App\FrontControllerInterface
 
     /**
      * @param \Magento\App\RequestInterface $request
-     * @return $this
+     * @return \Magento\App\ResponseInterface
      */
     public function dispatch(\Magento\App\RequestInterface $request)
     {
@@ -137,8 +137,7 @@ class Soap implements \Magento\App\FrontControllerInterface
         } catch (\Exception $e) {
             $this->_prepareErrorResponse($e);
         }
-        $this->_response->sendResponse();
-        return $this;
+        return $this->_response;
     }
 
     /**
@@ -171,7 +170,6 @@ class Soap implements \Magento\App\FrontControllerInterface
     protected function _prepareErrorResponse($exception)
     {
         $maskedException = $this->_errorProcessor->maskException($exception);
-        $soapFault = new \Magento\Webapi\Model\Soap\Fault($this->_application, $maskedException);
         if ($this->_isWsdlRequest()) {
             $httpCode = $maskedException->getHttpCode();
             $contentType = self::CONTENT_TYPE_WSDL_REQUEST;
@@ -181,6 +179,7 @@ class Soap implements \Magento\App\FrontControllerInterface
         }
         $this->_setResponseContentType($contentType);
         $this->_response->setHttpResponseCode($httpCode);
+        $soapFault = new \Magento\Webapi\Model\Soap\Fault($this->_application, $this->_soapServer, $maskedException);
         // TODO: Generate list of available URLs when invalid WSDL URL specified
         $this->_setResponseBody($soapFault->toXml());
     }
diff --git a/app/code/Magento/Webapi/Controller/Soap/Handler.php b/app/code/Magento/Webapi/Controller/Soap/Handler.php
index 6b29872f75a..ec4a301ceed 100644
--- a/app/code/Magento/Webapi/Controller/Soap/Handler.php
+++ b/app/code/Magento/Webapi/Controller/Soap/Handler.php
@@ -63,7 +63,7 @@ class Handler
      * @param string $operation
      * @param array $arguments
      * @return \stdClass|null
-     * @throws \Magento\Webapi\Exception|LogicException
+     * @throws \Magento\Webapi\Exception|\LogicException
      */
     public function __call($operation, $arguments)
     {
diff --git a/app/code/Magento/Webapi/Exception.php b/app/code/Magento/Webapi/Exception.php
index d61a12f731b..81dd1fb4f47 100644
--- a/app/code/Magento/Webapi/Exception.php
+++ b/app/code/Magento/Webapi/Exception.php
@@ -53,6 +53,13 @@ class Exception extends \RuntimeException
      */
     protected $_httpCode;
 
+    /**
+     * Exception name is used for SOAP faults generation.
+     *
+     * @var string
+     */
+    protected $_name;
+
     /**
      * Initialize exception with HTTP code.
      *
@@ -60,10 +67,16 @@ class Exception extends \RuntimeException
      * @param int $httpCode
      * @param int $code Error code
      * @param array $details Additional exception details
+     * @param string $name Exception name
      * @throws \InvalidArgumentException
      */
-    public function __construct($message, $code = 0, $httpCode = self::HTTP_BAD_REQUEST, array $details = array())
-    {
+    public function __construct(
+        $message,
+        $code = 0,
+        $httpCode = self::HTTP_BAD_REQUEST,
+        array $details = array(),
+        $name = ''
+    ) {
         /** Only HTTP error codes are allowed. No success or redirect codes must be used. */
         if ($httpCode < 400 || $httpCode > 599) {
             throw new \InvalidArgumentException(sprintf('The specified HTTP code "%d" is invalid.', $httpCode));
@@ -71,6 +84,7 @@ class Exception extends \RuntimeException
         parent::__construct($message, $code);
         $this->_httpCode = $httpCode;
         $this->_details = $details;
+        $this->_name = $name;
     }
 
     /**
@@ -104,4 +118,14 @@ class Exception extends \RuntimeException
     {
         return $this->_details;
     }
+
+    /**
+     * Retrieve exception name.
+     *
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->_name;
+    }
 }
diff --git a/app/code/Magento/Webapi/Model/Acl/Resource/Config/SchemaLocator.php b/app/code/Magento/Webapi/Model/Acl/Resource/Config/SchemaLocator.php
index 4c8308f109e..80d46cc003b 100644
--- a/app/code/Magento/Webapi/Model/Acl/Resource/Config/SchemaLocator.php
+++ b/app/code/Magento/Webapi/Model/Acl/Resource/Config/SchemaLocator.php
@@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Webapi') . DIRECTORY_SEPARATOR . 'acl.xsd';
     }
diff --git a/app/code/Magento/Webapi/Model/Config.php b/app/code/Magento/Webapi/Model/Config.php
index 083a4f6644a..f87023a891c 100644
--- a/app/code/Magento/Webapi/Model/Config.php
+++ b/app/code/Magento/Webapi/Model/Config.php
@@ -1,10 +1,6 @@
 <?php
 
 /**
- * Web API Config Model.
- *
- * This is a parent class for storing information about Web API. Most of it is needed by REST.
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -28,21 +24,15 @@
  */
 namespace Magento\Webapi\Model;
 
+/**
+ * Web API Config Model.
+ *
+ * This is a parent class for storing information about Web API. Most of it is needed by REST.
+ */
 class Config
 {
     const CACHE_ID = 'webapi';
 
-    /**#@+
-     * Attributes and nodes used in webapi.xml config.
-     */
-    const ATTR_SERVICE_CLASS = 'class';
-    const ATTR_SERVICE_PATH = 'baseUrl';
-    const ATTR_SERVICE_METHOD = 'method';
-    const ATTR_HTTP_METHOD = 'httpMethod';
-    const ATTR_IS_SECURE = 'isSecure';
-    const REST_ROUTE = 'rest-route';
-    /**#@-*/
-
     /**
      * Pattern for Web API interface name.
      */
@@ -56,64 +46,30 @@ class Config
     /**
      * @var \Magento\Webapi\Model\Config\Reader
      */
-    protected $_reader;
+    protected $_configReader;
 
     /**
      * Module configuration reader
      *
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_moduleReader;
 
-    /** @var \Magento\ObjectManager */
-    protected $_objectManager;
-
     /**
      * @var array
      */
     protected $_services;
 
     /**
-     * @param \Magento\Webapi\Model\Cache\Type $configCacheType
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
-     * @param \Magento\ObjectManager $objectManager
+     * @param Cache\Type $configCacheType
+     * @param Config\Reader $configReader
      */
     public function __construct(
         \Magento\Webapi\Model\Cache\Type $configCacheType,
-        \Magento\Core\Model\Config\Modules\Reader $moduleReader,
-        \Magento\ObjectManager $objectManager
+        \Magento\Webapi\Model\Config\Reader $configReader
     ) {
         $this->_configCacheType = $configCacheType;
-        $this->_moduleReader = $moduleReader;
-        $this->_objectManager = $objectManager;
-    }
-
-    /**
-     * Retrieve list of service files from each module
-     *
-     * @return array
-     */
-    protected function _getConfigFile()
-    {
-        $files = $this->_moduleReader->getConfigurationFiles('webapi.xml');
-        return (array)$files;
-    }
-
-    /**
-     * Reader object initialization
-     *
-     * @return \Magento\Webapi\Model\Config\Reader
-     */
-    protected function _getReader()
-    {
-        if (null === $this->_reader) {
-            $configFiles = $this->_getConfigFile();
-            $this->_reader = $this->_objectManager->create(
-                'Magento\Webapi\Model\Config\Reader',
-                array('configFiles' => $configFiles)
-            );
-        }
-        return $this->_reader;
+        $this->_configReader = $configReader;
     }
 
     /**
@@ -126,13 +82,11 @@ class Config
         if (null === $this->_services) {
             $services = $this->_loadFromCache();
             if ($services && is_string($services)) {
-                $data = unserialize($services);
+                $this->_services = unserialize($services);
             } else {
-                $services = $this->_getReader()->getServices();
-                $data = $this->_toArray($services);
-                $this->_saveToCache(serialize($data));
+                $this->_services = $this->_configReader->read();
+                $this->_saveToCache(serialize($this->_services));
             }
-            $this->_services = isset($data['config']) ? $data['config'] : array();
         }
         return $this->_services;
     }
@@ -156,128 +110,4 @@ class Config
         $this->_configCacheType->save($data, self::CACHE_ID, array(\Magento\Webapi\Model\Cache\Type::CACHE_TAG));
         return $this;
     }
-
-    /**
-     * Get node ID of \DOMNode class
-     *
-     * @param array $children - Child nodes of a \DOMNode
-     * @param \DOMNode $child
-     * @return string
-     */
-    protected function _getNodeId($children, $child)
-    {
-        $nodeId = isset($children[self::ATTR_SERVICE_CLASS]) ? $children[self::ATTR_SERVICE_CLASS] :
-            (isset($children[self::ATTR_SERVICE_METHOD]) ? $children[self::ATTR_SERVICE_METHOD] : $child->nodeName);
-
-        return $nodeId;
-    }
-
-    /**
-     * Convert attributes of a \DOMNode into an associative array.
-     *
-     * @param \DOMNode $node
-     * @return array
-     */
-    protected function _getAttributes($node)
-    {
-        $attributes = array();
-
-        if ($node->hasAttributes()) {
-            foreach ($node->attributes as $attribute) {
-                $attributes[$attribute->name] = $attribute->value;
-            }
-        }
-
-        return $attributes;
-    }
-
-    /**
-     * Check the first \DOMNode in a \DOMNodeList of size 1 to see if it's an XML_TEXT_NODE and store it's value.
-     *
-     * @param array $result - Associative array of attributes from a \DOMNode
-     * @param \DOMNodeList $children - Child nodes of a \DOMNode
-     * @return array|string|null
-     */
-    protected function _checkForTextNode($result, $children)
-    {
-        if ($children->length == 1) {
-            $child = $children->item(0);
-            if ($child->nodeType == XML_TEXT_NODE) {
-                $result['value'] = $child->nodeValue;
-                return count($result) == 1 ? $result['value'] : $result;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Process all child nodes of a root \DOMNode, establishing all operations, routes, etc.
-     *
-     * @param array $result
-     * @param \DOMNodeList $children
-     * @return array
-     */
-    protected function _processChildren($result, $children)
-    {
-        $group = array();
-
-        for ($i = 0; $i < $children->length; $i++) {
-            $child = $children->item($i);
-            $childAsArray = $this->_toArray($child);
-
-            $nodeId = $this->_getNodeId($childAsArray, $child);
-
-            if (self::REST_ROUTE === $child->nodeName) {
-                if (!isset($result['methods'])) {
-                    $result['methods'] = array();
-                }
-
-                $result['methods'][$nodeId] = isset($result['methods'][$nodeId])
-                    ? array_merge($result['methods'][$nodeId], $childAsArray)
-                    : $childAsArray;
-
-                if (isset($result['methods'][$nodeId]['value'])) {
-                    $result['methods'][$nodeId]['route'] = $result['methods'][$nodeId]['value'];
-                    unset($result['methods'][$nodeId]['value']);
-                }
-            } else {
-                if (!isset($result[$nodeId])) {
-                    $result[$nodeId] = $childAsArray;
-                } else {
-                    if (!isset($group[$nodeId])) {
-                        $tmp = $result[$nodeId];
-                        $result[$nodeId] = array($tmp);
-                        $group[$nodeId] = 1;
-                    }
-                    $result[$nodeId][] = $childAsArray;
-                }
-            }
-        }
-
-        return $result;
-    }
-    /**
-     * Convert elements to array
-     *
-     * @param \DOMNode $root
-     * @return array|string
-     */
-    protected function _toArray($root)
-    {
-        $result = $this->_getAttributes($root);
-
-        $children = $root->childNodes;
-        if ($children) {
-            $checkResult = $this->_checkForTextNode($result, $children);
-            if ($checkResult != null) {
-                return $checkResult;
-            }
-
-            $result = $this->_processChildren($result, $children);
-        }
-        unset($result['#text']);
-
-        return $result;
-    }
 }
diff --git a/app/code/Magento/Webapi/Model/Config/Converter.php b/app/code/Magento/Webapi/Model/Config/Converter.php
new file mode 100644
index 00000000000..9a513f74208
--- /dev/null
+++ b/app/code/Magento/Webapi/Model/Config/Converter.php
@@ -0,0 +1,91 @@
+<?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\Webapi\Model\Config;
+
+/**
+ * Converter of webapi.xml content into array format.
+ */
+class Converter implements \Magento\Config\ConverterInterface
+{
+    /**#@+
+     * Array keys for config internal representation.
+     */
+    const KEY_SERVICE_CLASS = 'class';
+    const KEY_BASE_URL = 'baseUrl';
+    const KEY_SERVICE_METHOD = 'method';
+    const KEY_IS_SECURE = 'isSecure';
+    const KEY_HTTP_METHOD = 'httpMethod';
+    const KEY_SERVICE_METHODS = 'methods';
+    const KEY_METHOD_ROUTE = 'route';
+    /**#@-*/
+
+    /**
+     * {@inheritdoc}
+     */
+    public function convert($source)
+    {
+        $result = array();
+        /** @var \DOMNodeList $services */
+        $services = $source->getElementsByTagName('service');
+        /** @var \DOMElement $service */
+        foreach ($services as $service) {
+            if ($service->nodeType != XML_ELEMENT_NODE) {
+                continue;
+            }
+            $serviceClass = $service->attributes->getNamedItem('class')->nodeValue;
+            $result[$serviceClass] = array(
+                self::KEY_SERVICE_CLASS => $serviceClass,
+                self::KEY_SERVICE_METHODS => array()
+            );
+
+            /** @var \DOMAttr $baseUrlNode */
+            $baseUrlNode = $service->attributes->getNamedItem('baseUrl');
+            if ($baseUrlNode) {
+                $result[$serviceClass][self::KEY_BASE_URL] = $baseUrlNode->nodeValue;
+            }
+
+            /** @var \DOMNodeList $restRoutes */
+            $restRoutes = $service->getElementsByTagName('rest-route');
+            /** @var \DOMElement $restRoute */
+            foreach ($restRoutes as $restRoute) {
+                if ($restRoute->nodeType != XML_ELEMENT_NODE) {
+                    continue;
+                }
+                $httpMethod = $restRoute->attributes->getNamedItem('httpMethod')->nodeValue;
+                $method = $restRoute->attributes->getNamedItem('method')->nodeValue;
+                $isSecureAttribute = $restRoute->attributes->getNamedItem('isSecure');
+                $isSecure = $isSecureAttribute ? true : false;
+                $path = (string)$restRoute->nodeValue;
+
+                $result[$serviceClass][self::KEY_SERVICE_METHODS][$method] = array(
+                    self::KEY_HTTP_METHOD => $httpMethod,
+                    self::KEY_SERVICE_METHOD => $method,
+                    self::KEY_METHOD_ROUTE => $path,
+                    self::KEY_IS_SECURE => $isSecure
+                );
+            }
+        }
+        return $result;
+    }
+}
diff --git a/app/code/Magento/Webapi/Model/Config/Reader.php b/app/code/Magento/Webapi/Model/Config/Reader.php
index c0ef43d2b7e..345ba22dc3b 100644
--- a/app/code/Magento/Webapi/Model/Config/Reader.php
+++ b/app/code/Magento/Webapi/Model/Config/Reader.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Service config data reader.
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,80 +23,35 @@
  */
 namespace Magento\Webapi\Model\Config;
 
-class Reader extends \Magento\Config\AbstractXml
+/**
+ * Service config data reader.
+ */
+class Reader extends \Magento\Config\Reader\Filesystem
 {
     /**
-     * Get absolute path to the XML-schema file
-     *
-     * @return string
-     */
-    public function getSchemaFile()
-    {
-        return __DIR__ . '/../etc/webapi.xsd';
-    }
-
-    /**
-     * Extract configuration data from the DOM structure
-     *
-     * @param \DOMDocument $dom
-     * @return array
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    protected function _extractData(\DOMDocument $dom)
-    {
-        return array();
-    }
-
-    /**
-     * Get XML-contents, initial for merging
+     * List of id attributes for merge
      *
-     * @return string
+     * @var array
      */
-    protected function _getInitialXml()
-    {
-        return '<?xml version="1.0" encoding="utf-8"?><config></config>';
-    }
-
-    /**
-     * Get list of paths to identifiable nodes
-     *
-     * @return array
-     */
-    protected function _getIdAttributes()
-    {
-        return array();
-    }
-
-    /**
-     * Get Dom configuration model
-     * @return \Magento\Config\Dom
-     */
-    protected function _getDomConfigModel()
-    {
-        if (is_null($this->_domConfig)) {
-            $this->_domConfig = new \Magento\Webapi\Model\Config\Dom(
-                $this->_getInitialXml(),
-                $this->_getIdAttributes()
-            );
-        }
-        return $this->_domConfig;
-    }
-
-    /**
-     * Get if xml files must be runtime validated
-     * @return boolean
-     */
-    protected function _isRuntimeValidated()
-    {
-        return false;
-    }
+    protected $_idAttributes = array(
+        '/config/service' => 'class',
+        '/config/service/rest-route' => 'method',
+    );
 
     /**
-     * Retrieve services
-     * @return \DOMDocument
+     * @param \Magento\Config\FileResolverInterface $fileResolver
+     * @param \Magento\Webapi\Model\Config\Converter $converter
+     * @param \Magento\Webapi\Model\Config\SchemaLocator $schemeLocator
+     * @param \Magento\Config\ValidationStateInterface $validationState
+     * @param string $fileName
      */
-    public function getServices()
-    {
-        return $this->_getDomConfigModel()->getDom();
+    public function __construct(
+        \Magento\Config\FileResolverInterface $fileResolver,
+        \Magento\Webapi\Model\Config\Converter $converter,
+        \Magento\Webapi\Model\Config\SchemaLocator $schemeLocator,
+        \Magento\Config\ValidationStateInterface $validationState,
+        $fileName = 'webapi.xml'
+    ) {
+        parent::__construct($fileResolver, $converter, $schemeLocator, $validationState, $fileName);
     }
 }
diff --git a/app/code/Magento/Core/Model/Resource/Config/SchemaLocator.php b/app/code/Magento/Webapi/Model/Config/SchemaLocator.php
similarity index 85%
rename from app/code/Magento/Core/Model/Resource/Config/SchemaLocator.php
rename to app/code/Magento/Webapi/Model/Config/SchemaLocator.php
index a66b53ddaa7..7bab4e94acc 100644
--- a/app/code/Magento/Core/Model/Resource/Config/SchemaLocator.php
+++ b/app/code/Magento/Webapi/Model/Config/SchemaLocator.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Resource configuration schema locator
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -23,8 +21,11 @@
  * @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\Resource\Config;
+namespace Magento\Webapi\Model\Config;
 
+/**
+ * Web API config schema locator.
+ */
 class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
 {
     /**
@@ -42,30 +43,30 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
-        $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Core') . DIRECTORY_SEPARATOR . 'resources.xsd';
+        $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Webapi') . DIRECTORY_SEPARATOR . 'webapi.xsd';
     }
 
     /**
-     * Get path to per file validation schema
+     * Get path to merged config schema
      *
      * @return string|null
      */
-    public function getPerFileSchema()
+    public function getSchema()
     {
-        return $this->_perFileSchema;
+        return $this->_schema;
     }
 
     /**
-     * Get path to merged config schema
+     * Get path to per file validation schema
      *
      * @return string|null
      */
-    public function getSchema()
+    public function getPerFileSchema()
     {
-        return $this->_schema;
+        return $this->_perFileSchema;
     }
 }
diff --git a/app/code/Magento/Webapi/Model/Resource/Acl/Role.php b/app/code/Magento/Webapi/Model/Resource/Acl/Role.php
index 18659ae4207..91191d8f165 100644
--- a/app/code/Magento/Webapi/Model/Resource/Acl/Role.php
+++ b/app/code/Magento/Webapi/Model/Resource/Acl/Role.php
@@ -30,9 +30,9 @@ class Role extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Class constructor.
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
-    public function __construct(\Magento\Core\Model\Resource $resource)
+    public function __construct(\Magento\App\Resource $resource)
     {
         parent::__construct($resource);
     }
diff --git a/app/code/Magento/Webapi/Model/Resource/Acl/User.php b/app/code/Magento/Webapi/Model/Resource/Acl/User.php
index 4380d41d3c3..19c31bbe61a 100644
--- a/app/code/Magento/Webapi/Model/Resource/Acl/User.php
+++ b/app/code/Magento/Webapi/Model/Resource/Acl/User.php
@@ -30,9 +30,9 @@ class User extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Class constructor.
      *
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
-    public function __construct(\Magento\Core\Model\Resource $resource)
+    public function __construct(\Magento\App\Resource $resource)
     {
         parent::__construct($resource);
     }
diff --git a/app/code/Magento/Webapi/Model/Rest/Config.php b/app/code/Magento/Webapi/Model/Rest/Config.php
index a353fff9714..a9945dd7603 100644
--- a/app/code/Magento/Webapi/Model/Rest/Config.php
+++ b/app/code/Magento/Webapi/Model/Rest/Config.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Webapi Config Model for Rest.
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,6 +23,11 @@
  */
 namespace Magento\Webapi\Model\Rest;
 
+use \Magento\Webapi\Model\Config\Converter;
+
+/**
+ * Webapi Config Model for Rest.
+ */
 class Config
 {
     /**#@+
@@ -117,27 +120,19 @@ class Config
         $routes = array();
         foreach ($this->_config->getServices() as $serviceName => $serviceData) {
             // skip if baseurl is not null and does not match
-            if (
-                !isset($serviceData[\Magento\Webapi\Model\Config::ATTR_SERVICE_PATH])
-                || !$serviceBaseUrl
-                || strcasecmp(
-                    trim($serviceBaseUrl, '/'),
-                    trim($serviceData[\Magento\Webapi\Model\Config::ATTR_SERVICE_PATH], '/')
-                ) !== 0
+            if (!isset($serviceData[Converter::KEY_BASE_URL]) || !$serviceBaseUrl
+                || strcasecmp(trim($serviceBaseUrl, '/'), trim($serviceData[Converter::KEY_BASE_URL], '/')) !== 0
             ) {
                 // baseurl does not match, just skip this service
                 continue;
             }
-            foreach ($serviceData['methods'] as $methodName => $methodInfo) {
-                if (strtoupper($methodInfo[\Magento\Webapi\Model\Config::ATTR_HTTP_METHOD])
-                    == strtoupper($httpMethod)) {
-                    $secure = isset($methodInfo[\Magento\Webapi\Model\Config::ATTR_IS_SECURE])
-                        ? $methodInfo[\Magento\Webapi\Model\Config::ATTR_IS_SECURE] : false;
-                    $methodRoute = isset($methodInfo['route']) ? $methodInfo['route'] : '';
+            foreach ($serviceData[Converter::KEY_SERVICE_METHODS] as $methodName => $methodInfo) {
+                if (strtoupper($methodInfo[Converter::KEY_HTTP_METHOD]) == strtoupper($httpMethod)) {
+                    $secure = $methodInfo[Converter::KEY_IS_SECURE];
+                    $methodRoute = $methodInfo[Converter::KEY_METHOD_ROUTE];
                     $routes[] = $this->_createRoute(
                         array(
-                            self::KEY_ROUTE_PATH =>
-                                $serviceData[\Magento\Webapi\Model\Config::ATTR_SERVICE_PATH] . $methodRoute,
+                            self::KEY_ROUTE_PATH => $serviceData[Converter::KEY_BASE_URL] . $methodRoute,
                             self::KEY_CLASS => $serviceName,
                             self::KEY_METHOD => $methodName,
                             self::KEY_IS_SECURE => $secure
diff --git a/app/code/Magento/Webapi/Model/Soap/Config.php b/app/code/Magento/Webapi/Model/Soap/Config.php
index dc1053dbdcf..ba7e4285cfa 100644
--- a/app/code/Magento/Webapi/Model/Soap/Config.php
+++ b/app/code/Magento/Webapi/Model/Soap/Config.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Webapi Config Model for Soap.
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,6 +23,11 @@
  */
 namespace Magento\Webapi\Model\Soap;
 
+use \Magento\Webapi\Model\Config\Converter;
+
+/**
+ * Webapi Config Model for Soap.
+ */
 class Config
 {
     /**#@+
@@ -45,7 +48,7 @@ class Config
     /** @var \Magento\Webapi\Model\Config */
     protected $_config;
 
-    /** @var \Magento\Core\Model\ObjectManager */
+    /** @var \Magento\ObjectManager */
     protected $_objectManager;
 
     /**
@@ -64,13 +67,13 @@ class Config
     protected $_soapOperations;
 
     /**
-     * @param \Magento\Core\Model\ObjectManager $objectManager
+     * @param \Magento\ObjectManager $objectManager
      * @param \Magento\Filesystem $filesystem
      * @param \Magento\App\Dir $dir
      * @param \Magento\Webapi\Model\Config $config
      */
     public function __construct(
-        \Magento\Core\Model\ObjectManager $objectManager,
+        \Magento\ObjectManager $objectManager,
         \Magento\Filesystem $filesystem,
         \Magento\App\Dir $dir,
         \Magento\Webapi\Model\Config $config
@@ -100,13 +103,14 @@ class Config
         if (null == $this->_soapOperations) {
             $this->_soapOperations = array();
             foreach ($this->getRequestedSoapServices($requestedService) as $serviceData) {
-                foreach ($serviceData['methods'] as $method => $methodData) {
-                    $class = $serviceData[\Magento\Webapi\Model\Config::ATTR_SERVICE_CLASS];
+                foreach ($serviceData[Converter::KEY_SERVICE_METHODS] as $methodData) {
+                    $method = $methodData[Converter::KEY_SERVICE_METHOD];
+                    $class = $serviceData[Converter::KEY_SERVICE_CLASS];
                     $operationName = $this->getSoapOperation($class, $method);
                     $this->_soapOperations[$operationName] = array(
                         self::KEY_CLASS => $class,
                         self::KEY_METHOD => $method,
-                        self::KEY_IS_SECURE => $methodData[\Magento\Webapi\Model\Config::ATTR_IS_SECURE]
+                        self::KEY_IS_SECURE => $methodData[Converter::KEY_IS_SECURE]
                     );
                 }
             }
@@ -127,17 +131,12 @@ class Config
         if (is_null($this->_soapServices)) {
             $this->_soapServices = array();
             foreach ($this->_config->getServices() as $serviceData) {
-                $serviceClass = $serviceData[\Magento\Webapi\Model\Config::ATTR_SERVICE_CLASS];
+                $serviceClass = $serviceData[Converter::KEY_SERVICE_CLASS];
                 $reflection = new \ReflectionClass($serviceClass);
                 foreach ($reflection->getMethods() as $method) {
                     // find if method is secure, assume operation is not secure by default
-                    $isSecure = false;
                     $methodName = $method->getName();
-                    if (isset($serviceData['methods'][$methodName][\Magento\Webapi\Model\Config::ATTR_IS_SECURE])) {
-                        $methodData = $serviceData['methods'][$methodName];
-                        $isSecure = strtolower($methodData[\Magento\Webapi\Model\Config::ATTR_IS_SECURE]) === 'true';
-                    }
-
+                    $isSecure = $serviceData[Converter::KEY_SERVICE_METHODS][$methodName][Converter::KEY_IS_SECURE];
                     // TODO: Simplify the structure in SOAP. Currently it is unified in SOAP and REST
                     $this->_soapServices[$serviceClass]['methods'][$methodName] = array(
                         self::KEY_METHOD => $methodName,
@@ -179,14 +178,10 @@ class Config
     /**
      * Retrieve the list of services corresponding to specified services and their versions.
      *
-     * @param array $requestedServices <pre>
-     * array(
-     *     'catalogProduct' => 'V1'
-     *     'customer' => 'V2
-     * )<pre/>
+     * @param array $requestedServices array('FooBarV1', 'OtherBazV2', ...)
      * @return array Filtered list of services
      */
-    public function getRequestedSoapServices($requestedServices)
+    public function getRequestedSoapServices(array $requestedServices)
     {
         $services = array();
         foreach ($requestedServices as $serviceName) {
diff --git a/app/code/Magento/Webapi/Model/Soap/Fault.php b/app/code/Magento/Webapi/Model/Soap/Fault.php
index 598c18e081a..5e37f8130a6 100644
--- a/app/code/Magento/Webapi/Model/Soap/Fault.php
+++ b/app/code/Magento/Webapi/Model/Soap/Fault.php
@@ -38,10 +38,10 @@ class Fault extends \RuntimeException
     /**#@+
      * Nodes that can appear in Detail node of SOAP fault.
      */
-    const NODE_ERROR_DETAIL_CODE = 'Code';
-    const NODE_ERROR_DETAIL_PARAMETERS = 'Parameters';
-    const NODE_ERROR_DETAIL_TRACE = 'Trace';
-    const NODE_ERROR_DETAILS = 'ErrorDetails';
+    const NODE_DETAIL_CODE = 'Code';
+    const NODE_DETAIL_PARAMETERS = 'Parameters';
+    const NODE_DETAIL_TRACE = 'Trace';
+    const NODE_DETAIL_WRAPPER = 'DefaultFault';
     /**#@-*/
 
     /** @var string */
@@ -55,7 +55,14 @@ class Fault extends \RuntimeException
      *
      * @var array
      */
-    protected $_parameters;
+    protected $_parameters = array();
+
+    /**
+     * Fault name is used for details wrapper node name generation.
+     *
+     * @var string
+     */
+    protected $_faultName = '';
 
     /**
      * Details that are used to generate 'Detail' node of SoapFault.
@@ -67,14 +74,19 @@ class Fault extends \RuntimeException
     /** @var \Magento\Core\Model\App */
     protected $_application;
 
+    /** @var \Magento\Webapi\Model\Soap\Server */
+    protected $_soapServer;
+
     /**
      * Construct exception.
      *
      * @param \Magento\Core\Model\App $application
      * @param \Magento\Webapi\Exception $previousException
+     * @param \Magento\Webapi\Model\Soap\Server $soapServer
      */
     public function __construct(
         \Magento\Core\Model\App $application,
+        \Magento\Webapi\Model\Soap\Server $soapServer,
         \Magento\Webapi\Exception $previousException
     ) {
         parent::__construct($previousException->getMessage(), $previousException->getCode(), $previousException);
@@ -82,6 +94,8 @@ class Fault extends \RuntimeException
         $this->_parameters = $previousException->getDetails();
         $this->_errorCode = $previousException->getCode();
         $this->_application = $application;
+        $this->_soapServer = $soapServer;
+        $this->_setFaultName($previousException->getName());
     }
 
     /**
@@ -92,13 +106,13 @@ class Fault extends \RuntimeException
     public function toXml()
     {
         if ($this->_application->isDeveloperMode()) {
-            $this->addDetails(array(self::NODE_ERROR_DETAIL_TRACE => "<![CDATA[{$this->getTraceAsString()}]]>"));
+            $this->addDetails(array(self::NODE_DETAIL_TRACE => "<![CDATA[{$this->getTraceAsString()}]]>"));
         }
         if ($this->getParameters()) {
-            $this->addDetails(array(self::NODE_ERROR_DETAIL_PARAMETERS => $this->getParameters()));
+            $this->addDetails(array(self::NODE_DETAIL_PARAMETERS => $this->getParameters()));
         }
         if ($this->getErrorCode()) {
-            $this->addDetails(array(self::NODE_ERROR_DETAIL_CODE => $this->getErrorCode()));
+            $this->addDetails(array(self::NODE_DETAIL_CODE => $this->getErrorCode()));
         }
 
         return $this->getSoapFaultMessage($this->getMessage(), $this->getSoapCode(), $this->getDetails());
@@ -114,6 +128,33 @@ class Fault extends \RuntimeException
         return $this->_parameters;
     }
 
+    /**
+     * Receive SOAP fault name.
+     *
+     * @return string
+     */
+    public function getFaultName()
+    {
+        return $this->_faultName;
+    }
+
+    /**
+     * Define current SOAP fault name. It is used as a name of the wrapper node for SOAP fault details.
+     *
+     * @param $exceptionName
+     */
+    protected function _setFaultName($exceptionName)
+    {
+        if ($exceptionName) {
+            $contentType = $this->_application->getRequest()->getHeader('Content-Type');
+            /** SOAP action is specified in content type header if content type is application/soap+xml */
+            if (preg_match('|application/soap\+xml.+action="(.+)".*|', $contentType, $matches)) {
+                $soapAction = $matches[1];
+                $this->_faultName = ucfirst($soapAction) . ucfirst($exceptionName) . 'Fault';
+            }
+        }
+    }
+
     /**
      * Retrieve error code.
      *
@@ -174,19 +215,13 @@ class Fault extends \RuntimeException
      * @param array|null $details Detailed reason message(s)
      * @return string
      */
-    public function getSoapFaultMessage($reason, $code, $details)
+    public function getSoapFaultMessage($reason, $code, $details = null)
     {
-        if (is_array($details) && !empty($details)) {
-            $detailsXml = $this->_convertDetailsToXml($details);
-            $errorDetailsNode = self::NODE_ERROR_DETAILS;
-            $detailsXml = $detailsXml
-                ? "<env:Detail><m:{$errorDetailsNode}>" . $detailsXml . "</m:{$errorDetailsNode}></env:Detail>"
-                : '';
-        } else {
-            $detailsXml = '';
-        }
+        $detailXml = $this->_generateDetailXml($details);
         $language = $this->getLanguage();
-        $detailsNamespace = !empty($detailsXml) ? 'xmlns:m="http://magento.com"': '';
+        $detailsNamespace = !empty($detailXml)
+            ? 'xmlns:m="' . urlencode($this->_soapServer->generateUri(true)) . '"'
+            : '';
         $reason = htmlentities($reason);
         $message = <<<FAULT_MESSAGE
 <?xml version="1.0" encoding="utf-8" ?>
@@ -199,7 +234,7 @@ class Fault extends \RuntimeException
          <env:Reason>
             <env:Text xml:lang="$language">$reason</env:Text>
          </env:Reason>
-         $detailsXml
+         $detailXml
       </env:Fault>
    </env:Body>
 </env:Envelope>
@@ -207,6 +242,30 @@ FAULT_MESSAGE;
         return $message;
     }
 
+    /**
+     * Generate 'Detail' node content.
+     *
+     * In case when fault name is undefined, no 'Detail' node is generated.
+     *
+     * @param array $details
+     * @return string
+     */
+    protected function _generateDetailXml($details)
+    {
+        $detailsXml = '';
+        if (is_array($details) && !empty($details)) {
+            $detailsXml = $this->_convertDetailsToXml($details);
+            if ($detailsXml) {
+                $errorDetailsNode = $this->getFaultName() ? $this->getFaultName() :self::NODE_DETAIL_WRAPPER;
+                $detailsXml = "<env:Detail><m:{$errorDetailsNode}>"
+                    . $detailsXml . "</m:{$errorDetailsNode}></env:Detail>";
+            } else {
+                $detailsXml = '';
+            }
+        }
+        return $detailsXml;
+    }
+
     /**
      * Recursively convert details array into XML structure.
      *
diff --git a/app/code/Magento/Webapi/Model/Soap/Wsdl.php b/app/code/Magento/Webapi/Model/Soap/Wsdl.php
index c6ba865570d..3269b529a8b 100644
--- a/app/code/Magento/Webapi/Model/Soap/Wsdl.php
+++ b/app/code/Magento/Webapi/Model/Soap/Wsdl.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Magento-specific WSDL builder.
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,6 +23,11 @@
  */
 namespace Magento\Webapi\Model\Soap;
 
+use DOMElement;
+
+/**
+ * Magento-specific WSDL builder.
+ */
 class Wsdl extends \Zend\Soap\Wsdl
 {
     /**
@@ -58,4 +61,83 @@ class Wsdl extends \Zend\Soap\Wsdl
         // delegates the detection of a complex type to the current strategy
         return $strategy->addComplexType($complexTypeNode);
     }
+
+    /**
+     * Add an operation to port type.
+     *
+     * Multiple faults generation is allowed, while it is not allowed in parent.
+     *
+     * @param DOMElement $portType
+     * @param string $name Operation name
+     * @param string|bool $input Input Message
+     * @param string|bool $output Output Message
+     * @param array|bool $fault array of Fault messages in the format: array(array('message' => ..., 'name' => ...))
+     * @return object The new operation's XML_Tree_Node
+     */
+    public function addPortOperation($portType, $name, $input = false, $output = false, $fault = false)
+    {
+        $operation = parent::addPortOperation($portType, $name, $input, $output, false);
+        if (is_array($fault)) {
+            foreach ($fault as $faultInfo) {
+                $isMessageValid = isset($faultInfo['message']) && is_string($faultInfo['message'])
+                    && strlen(trim($faultInfo['message']));
+                $isNameValid = isset($faultInfo['name']) && is_string($faultInfo['name'])
+                    && strlen(trim($faultInfo['name']));
+
+                if ($isNameValid && $isMessageValid) {
+                    $node = $this->toDomDocument()->createElement('fault');
+                    $node->setAttribute('name', $faultInfo['name']);
+                    $node->setAttribute('message', $faultInfo['message']);
+                    $operation->appendChild($node);
+                }
+            }
+        }
+        return $operation;
+    }
+
+    /**
+     * Add an operation to a binding element.
+     *
+     * Multiple faults binding is allowed, while it is not allowed in parent.
+     *
+     * @param DOMElement $binding
+     * @param string $name Operation name
+     * @param bool|array $input An array of attributes for the input element,
+     *      allowed keys are: 'use', 'namespace', 'encodingStyle'.
+     * @param bool|array $output An array of attributes for the output element,
+     *      allowed keys are: 'use', 'namespace', 'encodingStyle'.
+     * @param bool|array $fault An array of arrays which contain fault names: array(array('name' => ...))).
+     * @param int $soapVersion SOAP version to be used in binding operation. 1.1 used by default.
+     * @return DOMElement The new Operation's XML_Tree_Node
+     */
+    public function addBindingOperation(
+        $binding,
+        $name,
+        $input = false,
+        $output = false,
+        $fault = false,
+        $soapVersion = SOAP_1_1
+    ) {
+        $operation = parent::addBindingOperation($binding, $name, $input, $output, false, $soapVersion);
+        if (is_array($fault)) {
+            foreach ($fault as $faultInfo) {
+                $isNameValid = isset($faultInfo['name']) && is_string($faultInfo['name'])
+                    && strlen(trim($faultInfo['name']));
+
+                if ($isNameValid) {
+                    $faultInfo['use'] = 'literal';
+                    $wsdlFault = $this->toDomDocument()->createElement('fault');
+                    $wsdlFault->setAttribute('name', $faultInfo['name']);
+
+                    $soapFault = $this->toDomDocument()->createElement('soap:fault');
+                    $soapFault->setAttribute('name', $faultInfo['name']);
+                    $soapFault->setAttribute('use', 'literal');
+
+                    $wsdlFault->appendChild($soapFault);
+                    $operation->appendChild($wsdlFault);
+                }
+            }
+        }
+        return $operation;
+    }
 }
diff --git a/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php b/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php
index 57c5e80b257..85ef89fd749 100644
--- a/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php
+++ b/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php
@@ -26,7 +26,8 @@
  */
 namespace Magento\Webapi\Model\Soap\Wsdl;
 
-use Zend\Soap\Wsdl;
+use Magento\Webapi\Model\Soap\Wsdl;
+use Magento\Webapi\Model\Soap\Fault;
 
 class Generator
 {
@@ -50,9 +51,6 @@ class Generator
      */
     protected $_apiConfig;
 
-    /** @var \Magento\DomDocument\Factory */
-    protected $_domDocumentFactory;
-
     /**
      * The list of registered complex types.
      *
@@ -66,18 +64,15 @@ class Generator
      * @param \Magento\Webapi\Model\Soap\Config $apiConfig
      * @param \Magento\Webapi\Model\Soap\Wsdl\Factory $wsdlFactory
      * @param \Magento\Webapi\Model\Cache\Type $cache
-     * @param \Magento\DomDocument\Factory $domDocumentFactory
      */
     public function __construct(
         \Magento\Webapi\Model\Soap\Config $apiConfig,
         \Magento\Webapi\Model\Soap\Wsdl\Factory $wsdlFactory,
-        \Magento\Webapi\Model\Cache\Type $cache,
-        \Magento\DomDocument\Factory $domDocumentFactory
+        \Magento\Webapi\Model\Cache\Type $cache
     ) {
         $this->_apiConfig = $apiConfig;
         $this->_wsdlFactory = $wsdlFactory;
         $this->_cache = $cache;
-        $this->_domDocumentFactory = $domDocumentFactory;
     }
 
     /**
@@ -128,16 +123,16 @@ class Generator
 
         $wsdl = $this->_wsdlFactory->create(self::WSDL_NAME, $endPointUrl);
         $wsdl->addSchemaTypeSection();
-
+        $this->_addDefaultFaultComplexTypeNodes($wsdl);
         foreach ($services as $serviceClass => $serviceData) {
             $portTypeName = $this->getPortTypeName($serviceClass);
             $bindingName = $this->getBindingName($serviceClass);
             $portType = $wsdl->addPortType($portTypeName);
-            $binding = $wsdl->addBinding($bindingName, \Magento\Webapi\Model\Soap\Wsdl::TYPES_NS . ':' . $portTypeName);
+            $binding = $wsdl->addBinding($bindingName, Wsdl::TYPES_NS . ':' . $portTypeName);
             $wsdl->addSoapBinding($binding, 'document', 'http://schemas.xmlsoap.org/soap/http', SOAP_1_2);
             $portName = $this->getPortName($serviceClass);
             $serviceName = $this->getServiceName($serviceClass);
-            $wsdl->addService($serviceName, $portName, \Magento\Webapi\Model\Soap\Wsdl::TYPES_NS
+            $wsdl->addService($serviceName, $portName, Wsdl::TYPES_NS
                 . ':' . $bindingName, $endPointUrl, SOAP_1_2);
 
             foreach ($serviceData['methods'] as $methodName => $methodData) {
@@ -148,21 +143,40 @@ class Generator
                 $outputMessageName = false;
                 $outputBinding = false;
                 if (isset($methodData['interface']['outputComplexTypes'])) {
-                    $outputBinding = $inputBinding;
+                    $outputBinding = array('use' => 'literal');
                     $outputMessageName = $this->_createOperationOutput($wsdl, $operationName, $methodData);
                 }
 
-                $wsdl->addPortOperation($portType, $operationName, $inputMessageName, $outputMessageName);
+                /** Default SOAP fault should be added to each operation declaration */
+                $faultsInfo = array(
+                    array(
+                        'name' => Fault::NODE_DETAIL_WRAPPER,
+                        'message' => Wsdl::TYPES_NS . ':' . $this->_getDefaultFaultMessageName()
+                    )
+                );
+                if (isset($methodData['interface']['faultComplexTypes'])) {
+                    $faultsInfo = array_merge(
+                        $faultsInfo,
+                        $this->_createOperationFaults($wsdl, $operationName, $methodData)
+                    );
+                }
+
+                $wsdl->addPortOperation(
+                    $portType,
+                    $operationName,
+                    $inputMessageName,
+                    $outputMessageName,
+                    $faultsInfo
+                );
                 $bindingOperation = $wsdl->addBindingOperation(
                     $binding,
                     $operationName,
                     $inputBinding,
                     $outputBinding,
-                    false,
+                    $faultsInfo,
                     SOAP_1_2
                 );
                 $wsdl->addSoapOperation($bindingOperation, $operationName, SOAP_1_2);
-                // @TODO: implement faults binding
             }
         }
         return $wsdl->toXML();
@@ -198,7 +212,7 @@ class Generator
                 ) {
                     $response += $this->getComplexTypeNodes($serviceName, $referencedTypeName, $domDocument);
                     /** Add target namespace to the referenced type name */
-                    $referencedType->value = \Magento\Webapi\Model\Soap\Wsdl::TYPES_NS . ':' . $prefixedRefTypeName;
+                    $referencedType->value = Wsdl::TYPES_NS . ':' . $prefixedRefTypeName;
                 }
             }
             $complexTypeNode->setAttribute(
@@ -228,17 +242,17 @@ class Generator
     /**
      * Create input message and corresponding element and complex types in WSDL.
      *
-     * @param \Magento\Webapi\Model\Soap\Wsdl $wsdl
+     * @param Wsdl $wsdl
      * @param string $operationName
      * @param array $methodData
      * @return string input message name
      */
-    protected function _createOperationInput(\Magento\Webapi\Model\Soap\Wsdl $wsdl, $operationName, $methodData)
+    protected function _createOperationInput(Wsdl $wsdl, $operationName, $methodData)
     {
         $inputMessageName = $this->getInputMessageName($operationName);
         $elementData = array(
             'name' => $inputMessageName,
-            'type' => \Magento\Webapi\Model\Soap\Wsdl::TYPES_NS . ':' . $inputMessageName
+            'type' => Wsdl::TYPES_NS . ':' . $inputMessageName
         );
         if (isset($methodData['interface']['inputComplexTypes'])) {
             foreach ($methodData['interface']['inputComplexTypes'] as $complexTypeNode) {
@@ -252,28 +266,28 @@ class Generator
             $inputMessageName,
             array(
                 'messageParameters' => array(
-                    'element' => \Magento\Webapi\Model\Soap\Wsdl::TYPES_NS . ':' . $inputMessageName
+                    'element' => Wsdl::TYPES_NS . ':' . $inputMessageName
                 )
             )
         );
-        return \Magento\Webapi\Model\Soap\Wsdl::TYPES_NS . ':' . $inputMessageName;
+        return Wsdl::TYPES_NS . ':' . $inputMessageName;
     }
 
     /**
-     * Create output message and corresponding element and complex types in WSDL.
+     * Create output message, corresponding element and complex types in WSDL.
      *
-     * @param \Magento\Webapi\Model\Soap\Wsdl $wsdl
+     * @param Wsdl $wsdl
      * @param string $operationName
      * @param array $methodData
      * @return string output message name
      */
-    protected function _createOperationOutput(\Magento\Webapi\Model\Soap\Wsdl $wsdl, $operationName, $methodData)
+    protected function _createOperationOutput(Wsdl $wsdl, $operationName, $methodData)
     {
         $outputMessageName = $this->getOutputMessageName($operationName);
         $wsdl->addElement(
             array(
                 'name' => $outputMessageName,
-                'type' => \Magento\Webapi\Model\Soap\Wsdl::TYPES_NS . ':' . $outputMessageName
+                'type' => Wsdl::TYPES_NS . ':' . $outputMessageName
             )
         );
         if (isset($methodData['interface']['outputComplexTypes'])) {
@@ -285,11 +299,51 @@ class Generator
             $outputMessageName,
             array(
                 'messageParameters' => array(
-                    'element' => \Magento\Webapi\Model\Soap\Wsdl::TYPES_NS . ':' . $outputMessageName
+                    'element' => Wsdl::TYPES_NS . ':' . $outputMessageName
                 )
             )
         );
-        return \Magento\Webapi\Model\Soap\Wsdl::TYPES_NS . ':' . $outputMessageName;
+        return Wsdl::TYPES_NS . ':' . $outputMessageName;
+    }
+
+    /**
+     * Create an array of items that contain information about method faults.
+     *
+     * @param Wsdl $wsdl
+     * @param string $operationName
+     * @param array $methodData
+     * @return array array(array('name' => ..., 'message' => ...))
+     */
+    protected function _createOperationFaults(Wsdl $wsdl, $operationName, $methodData)
+    {
+        $faults = array();
+        if (isset($methodData['interface']['faultComplexTypes'])) {
+            foreach ($methodData['interface']['faultComplexTypes'] as $faultName => $faultComplexTypes) {
+                $faultMessageName = $this->getFaultMessageName($operationName, $faultName);
+                $wsdl->addElement(
+                    array(
+                        'name' => $faultMessageName,
+                        'type' => Wsdl::TYPES_NS . ':' . $faultMessageName
+                    )
+                );
+                foreach ($faultComplexTypes as $complexTypeNode) {
+                    $wsdl->addComplexType($complexTypeNode);
+                }
+                $wsdl->addMessage(
+                    $faultMessageName,
+                    array(
+                        'messageParameters' => array(
+                            'element' => Wsdl::TYPES_NS . ':' . $faultMessageName
+                        )
+                    )
+                );
+                $faults[] = array(
+                    'name' => $operationName . $faultName,
+                    'message' => Wsdl::TYPES_NS . ':' . $faultMessageName
+                );
+            }
+        }
+        return $faults;
     }
 
     /**
@@ -381,6 +435,18 @@ class Generator
         return $operationName . 'Response';
     }
 
+    /**
+     * Get fault message node name for operation.
+     *
+     * @param string $operationName
+     * @param string $faultName
+     * @return string
+     */
+    public function getFaultMessageName($operationName, $faultName)
+    {
+        return $operationName . $faultName . 'Fault';
+    }
+
     /**
      * Get complexType name defined in the XSD for requests
      *
@@ -403,6 +469,30 @@ class Generator
         return ucfirst($serviceMethod) . "Response";
     }
 
+    /**
+     * Get info about complex types defined in the XSD for the service method faults.
+     *
+     * @param string $serviceMethod
+     * @param \DOMDocument $domDocument
+     * @return array array(array('complexTypeName' => ..., 'faultName' => ...))
+     */
+    public function getXsdFaultTypeNames($serviceMethod, $domDocument)
+    {
+        $faultTypeNames = array();
+        $xpath = new \DOMXPath($domDocument);
+        $serviceMethod = ucfirst($serviceMethod);
+        $typeXPath = "//xsd:complexType[starts-with(@name,'{$serviceMethod}') and contains(@name,'Fault')]";
+        $complexTypeNodes = $xpath->query($typeXPath);
+        /** @var \DOMElement $complexTypeNode */
+        foreach ($complexTypeNodes as $complexTypeNode) {
+            $complexTypeName = $complexTypeNode->getAttribute('name');
+            if (preg_match("/^{$serviceMethod}(\w+)Fault$/", $complexTypeName, $matches)) {
+                $faultTypeNames[] = array('complexTypeName' => $complexTypeName, 'faultName' => $matches[1]);
+            }
+        }
+        return $faultTypeNames;
+    }
+
     /**
      * Prepare data about requested service for WSDL generator.
      *
@@ -426,14 +516,19 @@ class Generator
         $serviceDataTypes = array('methods' => array());
         $serviceClass = $serviceData[\Magento\Webapi\Model\Soap\Config::KEY_CLASS];
         foreach ($serviceData['methods'] as $operationData) {
+            $methodInterface = array();
             $serviceMethod = $operationData[\Magento\Webapi\Model\Soap\Config::KEY_METHOD];
             /** @var $payloadSchemaDom \DOMDocument */
             $payloadSchemaDom = $this->_apiConfig->getServiceSchemaDOM($serviceClass);
             $operationName = $this->getOperationName($serviceName, $serviceMethod);
+
+            /** Process input complex type */
             $inputParameterName = $this->getInputMessageName($operationName);
-            $inputComplexTypes = $this->getComplexTypeNodes($serviceName,
+            $inputComplexTypes = $this->getComplexTypeNodes(
+                $serviceName,
                 $this->getXsdRequestTypeName($serviceMethod),
-                $payloadSchemaDom);
+                $payloadSchemaDom
+            );
             if (empty($inputComplexTypes)) {
                 if ($operationData[\Magento\Webapi\Model\Soap\Config::KEY_IS_REQUIRED]) {
                     throw new \LogicException(
@@ -442,35 +537,106 @@ class Generator
                     );
                 } else {
                     /** Generate empty input request to make WSDL compliant with WS-I basic profile */
-                    $inputComplexTypes[] = $this->_generateEmptyComplexType($inputParameterName);
+                    $inputComplexTypes[] = $this->_generateEmptyComplexType($inputParameterName, $payloadSchemaDom);
                 }
             }
-            $serviceDataTypes['methods'][$serviceMethod]['interface']['inputComplexTypes'] = $inputComplexTypes;
+            $methodInterface['inputComplexTypes'] = $inputComplexTypes;
+
+            /** Process output complex type */
             $outputParameterName = $this->getOutputMessageName($operationName);
-            $outputComplexTypes = $this->getComplexTypeNodes($serviceName,
+            $outputComplexTypes = $this->getComplexTypeNodes(
+                $serviceName,
                 $this->getXsdResponseTypeName($serviceMethod),
-                $payloadSchemaDom);
+                $payloadSchemaDom
+            );
             if (!empty($outputComplexTypes)) {
-                $serviceDataTypes['methods'][$serviceMethod]['interface']['outputComplexTypes'] = $outputComplexTypes;
+                $methodInterface['outputComplexTypes'] = $outputComplexTypes;
             } else {
                 throw new \LogicException(
                     sprintf('The method "%s" of service "%s" must have "%s" complex type defined in its schema.',
                         $serviceMethod, $serviceName, $outputParameterName)
                 );
             }
+
+            /** Process fault complex types */
+            foreach ($this->getXsdFaultTypeNames($serviceMethod, $payloadSchemaDom) as $faultComplexType) {
+                $faultComplexTypes = $this->_getFaultComplexTypeNodes(
+                    $serviceName,
+                    $faultComplexType['complexTypeName'],
+                    $payloadSchemaDom
+                );
+                if (!empty($faultComplexTypes)) {
+                    $methodInterface['faultComplexTypes'][$faultComplexType['faultName']] = $faultComplexTypes;
+                }
+            }
+            $serviceDataTypes['methods'][$serviceMethod]['interface'] = $methodInterface;
         }
         return $serviceDataTypes;
     }
 
+    /**
+     * Add WSDL elements related to default SOAP fault, which are common for all operations: element, type and message.
+     *
+     * @param Wsdl $wsdl
+     * @return \DOMNode[]
+     */
+    protected function _addDefaultFaultComplexTypeNodes($wsdl)
+    {
+        $domDocument = new \DOMDocument();
+        $typeName = Fault::NODE_DETAIL_WRAPPER;
+        $defaultFault = $this->_generateEmptyComplexType($typeName, $domDocument);
+        $elementName = Fault::NODE_DETAIL_WRAPPER;
+        $wsdl->addElement(array('name' => $elementName, 'type' => Wsdl::TYPES_NS . ':' . $typeName));
+        $wsdl->addMessage(
+            $this->_getDefaultFaultMessageName(),
+            array('messageParameters' => array('element' => Wsdl::TYPES_NS . ':' . $elementName))
+        );
+        $this->_addDefaultFaultElements($defaultFault);
+        $wsdl->addComplexType($defaultFault);
+    }
+
+    /**
+     * Generate all necessary complex types for the fault of specified type.
+     *
+     * @param string $serviceName
+     * @param string $typeName
+     * @param \DOMDocument $domDocument
+     * @return \DOMNode[]
+     */
+    protected function _getFaultComplexTypeNodes($serviceName, $typeName, $domDocument)
+    {
+        $complexTypesNodes = $this->getComplexTypeNodes($serviceName, $typeName, $domDocument);
+        $faultTypeName = $serviceName . $typeName;
+        $paramsTypeName = $faultTypeName . 'Params';
+        if (isset($complexTypesNodes[$faultTypeName])) {
+            /** Rename fault complex type to fault param complex type */
+            $faultComplexType = $complexTypesNodes[$faultTypeName];
+            $faultComplexType->setAttribute('name', $paramsTypeName);
+            $complexTypesNodes[$paramsTypeName] = $complexTypesNodes[$faultTypeName];
+
+            /** Create new fault complex type, which will contain reference to fault param complex type */
+            $newFaultComplexType = $this->_generateEmptyComplexType($faultTypeName, $domDocument);
+            $this->_addDefaultFaultElements($newFaultComplexType);
+            /** Create 'Parameters' element and use fault param complex type as its type */
+            $parametersElement = $domDocument->createElement('xsd:element');
+            $parametersElement->setAttribute('name', Fault::NODE_DETAIL_PARAMETERS);
+            $parametersElement->setAttribute('type', Wsdl::TYPES_NS . ':' . $paramsTypeName);
+            $newFaultComplexType->firstChild->appendChild($parametersElement);
+
+            $complexTypesNodes[$faultTypeName] = $newFaultComplexType;
+        }
+        return $complexTypesNodes;
+    }
+
     /**
      * Generate empty complex type with the specified name.
      *
      * @param string $complexTypeName
+     * @param \DOMDocument $domDocument
      * @return \DOMElement
      */
-    protected function _generateEmptyComplexType($complexTypeName)
+    protected function _generateEmptyComplexType($complexTypeName, $domDocument)
     {
-        $domDocument = $this->_domDocumentFactory->createDomDocument();
         $complexTypeNode = $domDocument->createElement('xsd:complexType');
         $complexTypeNode->setAttribute('name', $complexTypeName);
         $xsdNamespace = 'http://www.w3.org/2001/XMLSchema';
@@ -480,4 +646,35 @@ class Generator
         $complexTypeNode->appendChild($sequenceNode);
         return $complexTypeNode;
     }
+
+    /**
+     * Add 'Detail' and 'Trace' elements to the fault element.
+     *
+     * @param \DOMElement $faultElement
+     */
+    protected function _addDefaultFaultElements($faultElement)
+    {
+        /** Create 'Code' element */
+        $codeElement = $faultElement->ownerDocument->createElement('xsd:element');
+        $codeElement->setAttribute('name', Fault::NODE_DETAIL_CODE);
+        $codeElement->setAttribute('type', 'xsd:int');
+        $faultElement->firstChild->appendChild($codeElement);
+
+        /** Create 'Trace' element */
+        $traceElement = $faultElement->ownerDocument->createElement('xsd:element');
+        $traceElement->setAttribute('name', Fault::NODE_DETAIL_TRACE);
+        $traceElement->setAttribute('type', 'xsd:string');
+        $traceElement->setAttribute('minOccurs', '0');
+        $faultElement->firstChild->appendChild($traceElement);
+    }
+
+    /**
+     * Retrieve name of default SOAP fault message name in WSDL.
+     *
+     * @return string
+     */
+    protected function _getDefaultFaultMessageName()
+    {
+        return Fault::NODE_DETAIL_WRAPPER;
+    }
 }
diff --git a/app/code/Magento/Webapi/etc/di.xml b/app/code/Magento/Webapi/etc/di.xml
index f217e427c6b..eb2e6b5fd1e 100644
--- a/app/code/Magento/Webapi/etc/di.xml
+++ b/app/code/Magento/Webapi/etc/di.xml
@@ -147,4 +147,29 @@
             </value>
         </param>
     </type>
+    <type name="Magento\Webapi\Controller\Rest">
+        <param name="request">
+            <instance type="Magento\Webapi\Controller\Rest\Request\Proxy"/>
+        </param>
+        <param name="response">
+            <instance type="Magento\Webapi\Controller\Rest\Response\Proxy"/>
+        </param>
+        <param name="router">
+            <instance type="Magento\Webapi\Controller\Rest\Router\Proxy"/>
+        </param>
+        <param name="oauthHelper">
+            <instance type="Magento\Oauth\Helper\Data\Proxy"/>
+        </param>
+    </type>
+    <type name="Magento\Webapi\Controller\Soap">
+        <param name="soapServer">
+            <instance type="Magento\Webapi\Model\Soap\Server\Proxy"/>
+        </param>
+        <param name="errorProcessor">
+            <instance type="Magento\Webapi\Controller\ErrorProcessor\Proxy"/>
+        </param>
+        <param name="oauthHelper">
+            <instance type="Magento\Oauth\Helper\Service\Proxy"/>
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Webapi/etc/webapi.xsd b/app/code/Magento/Webapi/etc/webapi.xsd
index 58f489a0ad1..23a46959412 100644
--- a/app/code/Magento/Webapi/etc/webapi.xsd
+++ b/app/code/Magento/Webapi/etc/webapi.xsd
@@ -1,6 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 /**
- * Structure description for webapi.xml services file.
+ * Structure description for webapi.xml configuration files.
  *
  * Magento
  *
@@ -25,38 +26,35 @@
  */
 -->
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-  <xs:element name="config">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element name="service">
-          <xs:complexType>
-            <xs:sequence>
-              <xs:element name="rest-route">
-                <xs:complexType>
-                  <xs:simpleContent>
-                    <xs:extension base="xs:string">
-                      <xs:attribute name="httpMethod">
-                        <xs:simpleType>
-                          <xs:restriction base="xs:string">
+    <xs:element name="config" type="configType"/>
+    <xs:complexType name="configType">
+        <xs:sequence>
+            <xs:element type="serviceType" name="service" maxOccurs="unbounded" minOccurs="0"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="serviceType">
+        <xs:sequence>
+            <xs:element type="restRouteType" name="rest-route" maxOccurs="unbounded" minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute type="xs:string" name="class"/>
+        <xs:attribute type="xs:string" name="baseUrl"/>
+    </xs:complexType>
+    <xs:complexType name="restRouteType">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="httpMethod">
+                    <xs:simpleType>
+                        <xs:restriction base="xs:string">
                             <xs:enumeration value="GET"/>
                             <xs:enumeration value="PUT"/>
                             <xs:enumeration value="POST"/>
                             <xs:enumeration value="DELETE"/>
-                          </xs:restriction>
-                        </xs:simpleType>
-                      </xs:attribute>
-                      <xs:attribute type="xs:string" name="method"/>
-                      <xs:attribute type="xs:boolean" name="secure" default="false"/>
-                    </xs:extension>
-                  </xs:simpleContent>
-                </xs:complexType>
-              </xs:element>
-            </xs:sequence>
-            <xs:attribute type="xs:string" name="class"/>
-            <xs:attribute type="xs:string" name="baseUrl"/>
-          </xs:complexType>
-        </xs:element>
-      </xs:sequence>
+                        </xs:restriction>
+                    </xs:simpleType>
+                </xs:attribute>
+                <xs:attribute type="xs:string" name="method"/>
+                <xs:attribute type="xs:boolean" name="secure" default="false"/>
+            </xs:extension>
+        </xs:simpleContent>
     </xs:complexType>
-  </xs:element>
 </xs:schema>
diff --git a/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form.php b/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form.php
index 1c93e77a79f..1c63171b3fa 100644
--- a/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form.php
+++ b/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form.php
@@ -115,9 +115,8 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      */
     private function _generateRandomString($length)
     {
-        return $this->_coreData
-            ->getRandomString(
-                $length, \Magento\Core\Helper\Data::CHARS_DIGITS . \Magento\Core\Helper\Data::CHARS_LOWERS
-            );
+        return $this->mathRandom->getRandomString(
+            $length, \Magento\Math\Random::CHARS_DIGITS . \Magento\Math\Random::CHARS_LOWERS
+        );
     }
 }
diff --git a/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php b/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php
index 5586d5df93b..e34c6b81fd8 100644
--- a/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php
+++ b/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php
@@ -54,7 +54,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Webhook\Model\Source\Authentication $authentication
      * @param \Magento\Webhook\Model\Source\Hook $hook
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -64,7 +64,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Webhook\Model\Source\Authentication $authentication,
         \Magento\Webhook\Model\Source\Hook $hook,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Registration.php b/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Registration.php
index a47de9d7570..bf74d87b938 100644
--- a/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Registration.php
+++ b/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Registration.php
@@ -60,16 +60,14 @@ class Registration extends \Magento\Backend\Controller\AbstractAction
      * @param \Magento\Webhook\Service\SubscriptionV1Interface $subscriptionService
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Backend\Controller\Context $context
-     * @param string $areaCode
      */
     public function __construct(
         \Magento\Webhook\Model\Webapi\User\Factory $userFactory,
         \Magento\Webhook\Service\SubscriptionV1Interface $subscriptionService,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Backend\Controller\Context $context,
-        $areaCode = null
+        \Magento\Backend\Controller\Context $context
     ) {
-        parent::__construct($context, $areaCode);
+        parent::__construct($context);
         $this->_userFactory = $userFactory;
         $this->_subscriptionService = $subscriptionService;
         $this->_registry = $registry;
diff --git a/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Subscription.php b/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Subscription.php
index d14864055ca..8a108ca0435 100644
--- a/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Subscription.php
+++ b/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Subscription.php
@@ -59,15 +59,13 @@ class Subscription extends \Magento\Backend\Controller\AbstractAction
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Webhook\Service\SubscriptionV1Interface $subscriptionService
      * @param \Magento\Backend\Controller\Context $context
-     * @param string $areaCode
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
         \Magento\Webhook\Service\SubscriptionV1Interface $subscriptionService,
-        \Magento\Backend\Controller\Context $context,
-        $areaCode = null
+        \Magento\Backend\Controller\Context $context
     ) {
-        parent::__construct($context, $areaCode);
+        parent::__construct($context);
 
         $this->_registry = $registry;
         $this->_subscriptionService = $subscriptionService;
diff --git a/app/code/Magento/Core/Model/Route/ConfigInterface.php b/app/code/Magento/Webhook/Model/Config.php
similarity index 76%
rename from app/code/Magento/Core/Model/Route/ConfigInterface.php
rename to app/code/Magento/Webhook/Model/Config.php
index a56c4cf991e..48945bf3970 100644
--- a/app/code/Magento/Core/Model/Route/ConfigInterface.php
+++ b/app/code/Magento/Webhook/Model/Config.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Routes configuration interface
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -23,17 +21,28 @@
  * @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\Route;
 
-interface ConfigInterface
+namespace Magento\Webhook\Model;
+
+class Config
 {
+    /**
+     * Get webhook list
+     *
+     * @return array
+     */
+    public function getWebhooks()
+    {
+        return array();
+    }
 
     /**
-     * Fetch routes from configs by area code and router id
+     * Get webhook subscriptions
      *
-     * @param string $areaCode
-     * @param string $routerId
      * @return array
      */
-    public function getRoutes($areaCode, $routerId);
-}
+    public function getSubscriptions()
+    {
+        return array();
+    }
+} 
\ No newline at end of file
diff --git a/app/code/Magento/Webhook/Model/Endpoint.php b/app/code/Magento/Webhook/Model/Endpoint.php
index e0299a8e6c4..492e6063026 100644
--- a/app/code/Magento/Webhook/Model/Endpoint.php
+++ b/app/code/Magento/Webhook/Model/Endpoint.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Represents an endpoint to which messages can be sent
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -24,6 +22,12 @@
  * @package     Magento_Webhook
  * @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\Webhook\Model;
+
+/**
+ * Represents an endpoint to which messages can be sent
  *
  * @method string getName()
  * @method \Magento\Webhook\Model\Endpoint setName(string $value)
@@ -36,8 +40,6 @@
  * @method \Magento\Webhook\Model\Endpoint setAuthenticationType(string $value)
  * @method \Magento\Webhook\Model\Endpoint setTimeoutInSecs(string $value)
  */
-namespace Magento\Webhook\Model;
-
 class Endpoint extends \Magento\Core\Model\AbstractModel implements \Magento\Outbound\EndpointInterface
 {
     /**
@@ -46,10 +48,16 @@ class Endpoint extends \Magento\Core\Model\AbstractModel implements \Magento\Out
      */
     private $_userFactory;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
     /**
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Webhook\Model\User\Factory $userFactory
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -58,13 +66,14 @@ class Endpoint extends \Magento\Core\Model\AbstractModel implements \Magento\Out
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Webhook\Model\User\Factory $userFactory,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
-
         $this->_userFactory = $userFactory;
+        $this->_dateTime = $dateTime;
     }
 
     /**
@@ -111,7 +120,7 @@ class Endpoint extends \Magento\Core\Model\AbstractModel implements \Magento\Out
         }
 
         if ($this->hasDataChanges()) {
-            $this->setUpdatedAt($this->_getResource()->formatDate(time()));
+            $this->setUpdatedAt($this->_dateTime->formatDate(time()));
         }
 
         return $this;
diff --git a/app/code/Magento/Webhook/Model/Event.php b/app/code/Magento/Webhook/Model/Event.php
index 5c89bf86fb2..1d3f9ef9157 100644
--- a/app/code/Magento/Webhook/Model/Event.php
+++ b/app/code/Magento/Webhook/Model/Event.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Stores event information in Magento database
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -24,15 +22,44 @@
  * @package     Magento_Webhook
  * @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\Webhook\Model;
+
+/**
+ * Stores event information in Magento database
  *
  * @method \Magento\Webhook\Model\Event setStatus()
  * @method \Magento\Webhook\Model\Event setUpdatedAt()
  * @method \Magento\Webhook\Model\Event setCreatedAt()
  */
-namespace Magento\Webhook\Model;
-
 class Event extends \Magento\Core\Model\AbstractModel implements \Magento\PubSub\EventInterface
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
+    /**
+     * @param \Magento\Core\Model\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Core\Model\Resource\AbstractResource $resource
+     * @param \Magento\Data\Collection\Db $resourceCollection
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Core\Model\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Stdlib\DateTime $dateTime,
+        \Magento\Core\Model\Resource\AbstractResource $resource = null,
+        \Magento\Data\Collection\Db $resourceCollection = null,
+        array $data = array()
+    ) {
+        $this->_dateTime = $dateTime;
+        parent::__construct($context, $registry, $resource, $resourceCollection, $data);
+    }
+
     /**
      * Initialize Model
      */
@@ -52,9 +79,9 @@ class Event extends \Magento\Core\Model\AbstractModel implements \Magento\PubSub
     {
         parent::_beforeSave();
         if ($this->isObjectNew()) {
-            $this->setCreatedAt($this->_getResource()->formatDate(true));
+            $this->setCreatedAt($this->_dateTime->formatDate(true));
         } elseif ($this->getId() && !$this->hasData('updated_at')) {
-            $this->setUpdatedAt($this->_getResource()->formatDate(true));
+            $this->setUpdatedAt($this->_dateTime->formatDate(true));
         }
         return $this;
     }
diff --git a/app/code/Magento/Webhook/Model/Job.php b/app/code/Magento/Webhook/Model/Job.php
index bf4049765cc..d313a0bbfd1 100644
--- a/app/code/Magento/Webhook/Model/Job.php
+++ b/app/code/Magento/Webhook/Model/Job.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Handles HTTP responses, and manages retry schedule
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -24,6 +22,12 @@
  * @package     Magento_Webhook
  * @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\Webhook\Model;
+
+/**
+ * Handles HTTP responses, and manages retry schedule
  *
  * @method bool hasEvent()
  * @method \Magento\Webhook\Model\Job setEventId()
@@ -37,8 +41,6 @@
  * @method \Magento\Webhook\Model\Job setUpdatedAt()
  * @method \Magento\Webhook\Model\Job setCreatedAt()
  */
-namespace Magento\Webhook\Model;
-
 class Job extends \Magento\Core\Model\AbstractModel implements \Magento\PubSub\JobInterface
 {
     /** @var  \Magento\Webhook\Model\Event\Factory */
@@ -47,6 +49,11 @@ class Job extends \Magento\Core\Model\AbstractModel implements \Magento\PubSub\J
     /** @var \Magento\Webhook\Model\Subscription\Factory */
     protected $_subscriptionFactory;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
     /** @var array */
     private $_retryTimeToAdd = array(
         1 => 1,
@@ -64,6 +71,7 @@ class Job extends \Magento\Core\Model\AbstractModel implements \Magento\PubSub\J
      * @param \Magento\Webhook\Model\Subscription\Factory $subscriptionFactory
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $coreRegistry
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -73,12 +81,14 @@ class Job extends \Magento\Core\Model\AbstractModel implements \Magento\PubSub\J
         \Magento\Webhook\Model\Subscription\Factory $subscriptionFactory,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $coreRegistry,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         $this->_eventFactory = $eventFactory;
         $this->_subscriptionFactory = $subscriptionFactory;
+        $this->_dateTime = $dateTime;
         parent::__construct($context, $coreRegistry, $resource, $resourceCollection, $data);
     }
 
@@ -109,9 +119,9 @@ class Job extends \Magento\Core\Model\AbstractModel implements \Magento\PubSub\J
     {
         parent::_beforeSave();
         if ($this->isObjectNew()) {
-            $this->setCreatedAt($this->_getResource()->formatDate(true));
+            $this->setCreatedAt($this->_dateTime->formatDate(true));
         } elseif ($this->getId() && !$this->hasData('updated_at')) {
-            $this->setUpdatedAt($this->_getResource()->formatDate(true));
+            $this->setUpdatedAt($this->_dateTime->formatDate(true));
         }
         return $this;
     }
@@ -182,8 +192,8 @@ class Job extends \Magento\Core\Model\AbstractModel implements \Magento\PubSub\J
         if ($retryCount < count($this->_retryTimeToAdd)) {
             $addedTimeInMinutes = $this->_retryTimeToAdd[$retryCount + 1] * 60 + time();
             $this->setRetryCount($retryCount + 1);
-            $this->setRetryAt(\Magento\Date::formatDate($addedTimeInMinutes));
-            $this->setUpdatedAt(\Magento\Date::formatDate(time(), true));
+            $this->setRetryAt($this->_dateTime->formatDate($addedTimeInMinutes));
+            $this->setUpdatedAt($this->_dateTime->formatDate(time(), true));
             $this->setStatus(\Magento\PubSub\JobInterface::STATUS_RETRY);
         } else {
             $this->setStatus(\Magento\PubSub\JobInterface::STATUS_FAILED);
diff --git a/app/code/Magento/Webhook/Model/Observer.php b/app/code/Magento/Webhook/Model/Observer.php
index 99028d51e98..c36abfac7b5 100644
--- a/app/code/Magento/Webhook/Model/Observer.php
+++ b/app/code/Magento/Webhook/Model/Observer.php
@@ -35,18 +35,18 @@ class Observer
     /** @var  \Magento\Webhook\Model\Resource\Subscription\Collection $_subscriptionSet */
     private $_subscriptionSet;
 
-    /** @var \Magento\Core\Model\Logger */
+    /** @var \Magento\Logger */
     private $_logger;
 
     /**
      * @param \Magento\Webhook\Model\Webapi\EventHandler                        $webapiEventHandler
      * @param \Magento\Webhook\Model\Resource\Subscription\Collection           $subscriptionSet
-     * @param \Magento\Core\Model\Logger                                        $logger
+     * @param \Magento\Logger                                        $logger
      */
     public function __construct(
         \Magento\Webhook\Model\Webapi\EventHandler $webapiEventHandler,
         \Magento\Webhook\Model\Resource\Subscription\Collection $subscriptionSet,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger
     ) {
         $this->_webapiEventHandler = $webapiEventHandler;
         $this->_subscriptionSet = $subscriptionSet;
diff --git a/app/code/Magento/Webhook/Model/Resource/Event/Collection.php b/app/code/Magento/Webhook/Model/Resource/Event/Collection.php
index 6c96625c687..81df66dec32 100644
--- a/app/code/Magento/Webhook/Model/Resource/Event/Collection.php
+++ b/app/code/Magento/Webhook/Model/Resource/Event/Collection.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Event resource Collection
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,8 +23,12 @@
  * @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\Webhook\Model\Resource\Event;
 
+/**
+ * Event resource Collection
+ */
 class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractCollection
 {
     /**
@@ -42,22 +44,30 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     /** @var int timeout to wait until decide that event is failed */
     protected $_timeoutIdling;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
-     * @param \Magento\Core\Model\Resource\Db\Abstract $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
      * @param null $timeoutIdling
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null,
         $timeoutIdling = null
     ) {
+        $this->_dateTime = $dateTime;
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource);
         $this->_timeoutIdling = is_null($timeoutIdling) ?
             self::DEFAULT_TIMEOUT_IDLING_EVENTS : $timeoutIdling;
@@ -151,7 +161,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
             /* if event is in progress state for less than hour we do nothing with it*/
             $okUpdatedTime = time() - $this->_timeoutIdling;
             $this->addFieldToFilter('status', \Magento\PubSub\EventInterface::STATUS_IN_PROGRESS)
-                ->addFieldToFilter('updated_at', array('to' => \Magento\Date::formatDate($okUpdatedTime),
+                ->addFieldToFilter('updated_at', array('to' => $this->_dateTime->formatDate($okUpdatedTime),
                     'datetime' => true));
             $idsToRevoke = $this->_getLoadedIds();
             if (count($idsToRevoke)) {
diff --git a/app/code/Magento/Webhook/Model/Resource/Job/Collection.php b/app/code/Magento/Webhook/Model/Resource/Job/Collection.php
index 604bad8b35b..b8129754f59 100644
--- a/app/code/Magento/Webhook/Model/Resource/Job/Collection.php
+++ b/app/code/Magento/Webhook/Model/Resource/Job/Collection.php
@@ -44,20 +44,23 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
-     * @param \Magento\Core\Model\Resource\Db\Abstract $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
      * @param null $timeoutIdling
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null,
         $timeoutIdling = null
     ) {
+        $this->dateTime = $dateTime;
         parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource);
         $this->_timeoutIdling = is_null($timeoutIdling) ?
             self::DEFAULT_TIMEOUT_IDLING_JOBS : $timeoutIdling;
@@ -87,7 +90,10 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
                     \Magento\PubSub\JobInterface::STATUS_READY_TO_SEND,
                     \Magento\PubSub\JobInterface::STATUS_RETRY
                 )))
-            ->addFieldToFilter('retry_at', array('to' => \Magento\Date::formatDate(true), 'datetime' => true))
+            ->addFieldToFilter(
+                'retry_at',
+                array('to' => $this->dateTime->formatDate(true), 'datetime' => true)
+            )
             ->setOrder('updated_at', \Magento\Data\Collection::SORT_ORDER_ASC)
             ->setPageSize(self::PAGE_SIZE);
         return $this;
@@ -161,7 +167,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
             /* if event is in progress state for less than defined delay we do nothing with it */
             $okUpdatedTime = time() - $this->_timeoutIdling;
             $this->addFieldToFilter('status', \Magento\PubSub\JobInterface::STATUS_IN_PROGRESS)
-                ->addFieldToFilter('updated_at', array('to' => \Magento\Date::formatDate($okUpdatedTime),
+                ->addFieldToFilter('updated_at', array('to' => $this->dateTime->formatDate($okUpdatedTime),
                     'datetime' => true));
 
             if (!count($this->getItems())) {
diff --git a/app/code/Magento/Webhook/Model/Resource/Subscription.php b/app/code/Magento/Webhook/Model/Resource/Subscription.php
index e2bf33e27a1..f6c7ce8e088 100644
--- a/app/code/Magento/Webhook/Model/Resource/Subscription.php
+++ b/app/code/Magento/Webhook/Model/Resource/Subscription.php
@@ -29,19 +29,21 @@ namespace Magento\Webhook\Model\Resource;
 
 class Subscription extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
-    /** @var  \Magento\Core\Model\ConfigInterface $_coreConfig */
-    private $_coreConfig;
+    /**
+     * @var array
+     */
+    private $_webHookList;
 
     /**
-     * @param \Magento\Core\Model\Resource $resource
-     * @param \Magento\Core\Model\ConfigInterface $config
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Webhook\Model\Config $config
      */
     public function __construct(
-        \Magento\Core\Model\Resource $resource,
-        \Magento\Core\Model\ConfigInterface $config
+        \Magento\App\Resource $resource,
+        \Magento\Webhook\Model\Config $config
     ) {
+        $this->_webHookList = $config->getWebhooks();
         parent::__construct($resource);
-        $this->_coreConfig = $config;
     }
 
     /**
@@ -133,24 +135,20 @@ class Subscription extends \Magento\Core\Model\Resource\Db\AbstractDb
     }
 
     /**
-     * Get list of webhook topics defined in config.xml
+     * Get list of webhook topics defined in webhook.xml
      *
      * @return string[]
      */
     protected function _getSupportedTopics()
     {
-        $node = $this->_coreConfig->getNode(\Magento\Webhook\Model\Source\Hook::XML_PATH_WEBHOOK);
         $availableHooks = array();
-        if (!$node) {
-            return $availableHooks;
-        }
-        foreach ($node->asArray() as $key => $hookNode) {
-            foreach ($hookNode as $name => $hook) {
+        foreach ($this->_webHookList as $key => $configData) {
+            foreach ($configData as $name => $hook) {
                 if (is_array($hook)) {
                     $availableHooks[] = $key . '/' . $name;
                 }
             }
-            if (isset($hookNode['label'])) {
+            if (isset($configData['label'])) {
                 $availableHooks[] = $key;
             }
         }
diff --git a/app/code/Magento/Webhook/Model/Resource/Subscription/Collection.php b/app/code/Magento/Webhook/Model/Resource/Subscription/Collection.php
index e8511b73377..9b1ce3657fc 100644
--- a/app/code/Magento/Webhook/Model/Resource/Subscription/Collection.php
+++ b/app/code/Magento/Webhook/Model/Resource/Subscription/Collection.php
@@ -39,7 +39,7 @@ class Collection
     /**
      * @param \Magento\Webhook\Model\Resource\Endpoint $endpointResource
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
@@ -47,7 +47,7 @@ class Collection
     public function __construct(
         \Magento\Webhook\Model\Resource\Endpoint $endpointResource,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
diff --git a/app/code/Magento/Webhook/Model/Resource/Subscription/Grid/Collection.php b/app/code/Magento/Webhook/Model/Resource/Subscription/Grid/Collection.php
index 4fae380813b..2d6c06e4cf1 100644
--- a/app/code/Magento/Webhook/Model/Resource/Subscription/Grid/Collection.php
+++ b/app/code/Magento/Webhook/Model/Resource/Subscription/Grid/Collection.php
@@ -34,7 +34,7 @@ class Collection
      * @param \Magento\Webhook\Model\Subscription\Config $subscriptionConfig
      * @param \Magento\Webhook\Model\Resource\Endpoint $endpointResource
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\Resource\Db\Abstract $resource
@@ -43,7 +43,7 @@ class Collection
         \Magento\Webhook\Model\Subscription\Config $subscriptionConfig,
         \Magento\Webhook\Model\Resource\Endpoint $endpointResource,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
diff --git a/app/code/Magento/Webhook/Model/Source/Hook.php b/app/code/Magento/Webhook/Model/Source/Hook.php
index 48b2cde54e2..d450cfb56a9 100644
--- a/app/code/Magento/Webhook/Model/Source/Hook.php
+++ b/app/code/Magento/Webhook/Model/Source/Hook.php
@@ -29,11 +29,6 @@ namespace Magento\Webhook\Model\Source;
 
 class Hook implements \Magento\Core\Model\Option\ArrayInterface
 {
-    /**
-     * Path to environments section in the config
-     */
-    const XML_PATH_WEBHOOK = 'global/webhook/webhooks';
-
     /**
      * Cache of options
      *
@@ -41,15 +36,12 @@ class Hook implements \Magento\Core\Model\Option\ArrayInterface
      */
     protected $_options = null;
 
-    /** @var  \Magento\Core\Model\Config */
-    private $_config;
-
     /**
-     * @param \Magento\Core\Model\Config $config
+     * @param \Magento\Webhook\Model\Config $config
      */
-    public function __construct(\Magento\Core\Model\Config $config )
+    public function __construct(\Magento\Webhook\Model\Config $config )
     {
-        $this->_config = $config;
+        $this->_options = $config->getWebhooks();
     }
 
     /**
@@ -59,15 +51,6 @@ class Hook implements \Magento\Core\Model\Option\ArrayInterface
      */
     public function toOptionArray()
     {
-        if (!$this->_options) {
-            $this->_options = array();
-
-            $configElement = $this->_config->getNode(self::XML_PATH_WEBHOOK);
-            if ($configElement) {
-                $this->_options = $configElement->asArray();
-            }
-        }
-
         return $this->_options;
     }
 
diff --git a/app/code/Magento/Webhook/Model/Subscription.php b/app/code/Magento/Webhook/Model/Subscription.php
index e78b0d526a3..04969789786 100644
--- a/app/code/Magento/Webhook/Model/Subscription.php
+++ b/app/code/Magento/Webhook/Model/Subscription.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Represents a subscription to one or more topics
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -24,6 +22,12 @@
  * @package     Magento_Webhook
  * @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\Webhook\Model;
+
+/**
+ * Represents a subscription to one or more topics
  *
  * @method string getName()
  * @method \Magento\Webhook\Model\Subscription setName(string $value)
@@ -41,8 +45,6 @@
  * @method bool hasStatus()
  * @method int getSubscriptionId()
  */
-namespace Magento\Webhook\Model;
-
 class Subscription
     extends \Magento\Core\Model\AbstractModel
     implements \Magento\PubSub\SubscriptionInterface
@@ -64,6 +66,11 @@ class Subscription
      */
     private $_endpoint = null;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
     /**
      * Tracks whether or not we've already loaded endpoint data from the DB.
      *
@@ -75,6 +82,7 @@ class Subscription
      * @param \Magento\Webhook\Model\Endpoint $endpoint
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $coreRegistry
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -83,6 +91,7 @@ class Subscription
         \Magento\Webhook\Model\Endpoint $endpoint,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $coreRegistry,
+        \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -92,7 +101,7 @@ class Subscription
             $data['status'] = \Magento\PubSub\SubscriptionInterface::STATUS_INACTIVE;
         }
         parent::__construct($context, $coreRegistry, $resource, $resourceCollection, $data);
-
+        $this->_dateTime = $dateTime;
         $this->_endpoint = $endpoint;
     }
 
@@ -125,7 +134,7 @@ class Subscription
         }
 
         if ($this->hasDataChanges()) {
-            $this->setUpdatedAt($this->_getResource()->formatDate(time()));
+            $this->setUpdatedAt($this->_dateTime->formatDate(time()));
         }
 
         return parent::_beforeSave();
diff --git a/app/code/Magento/Webhook/Model/Subscription/Config.php b/app/code/Magento/Webhook/Model/Subscription/Config.php
index bcc49af8b3a..638168d7eb1 100644
--- a/app/code/Magento/Webhook/Model/Subscription/Config.php
+++ b/app/code/Magento/Webhook/Model/Subscription/Config.php
@@ -29,35 +29,38 @@ namespace Magento\Webhook\Model\Subscription;
 
 class Config
 {
-    /** Webhook subscription configuration path */
-    const XML_PATH_SUBSCRIPTIONS = 'global/webhook/subscriptions';
-
-    /** @var \Magento\Webhook\Model\Resource\Subscription\Collection  */
+    /**
+     * @var \Magento\Webhook\Model\Resource\Subscription\Collection
+     */
     protected $_subscriptionSet;
 
-    /** @var  \Magento\Core\Model\Config */
-    protected $_mageConfig;
+    /**
+     * @var \Magento\Webhook\Model\Config
+     */
+    protected $_config;
 
-    /** @var  \Magento\Webhook\Model\Subscription\Factory */
+    /**
+     * @var Factory
+     */
     protected $_subscriptionFactory;
 
-    /** @var \Magento\Core\Model\Logger */
+    /** @var \Magento\Logger */
     private $_logger;
 
     /**
      * @param \Magento\Webhook\Model\Resource\Subscription\Collection $subscriptionSet
-     * @param \Magento\Core\Model\Config $mageConfig
+     * @param \Magento\Webhook\Model\Config $config
      * @param \Magento\Webhook\Model\Subscription\Factory $subscriptionFactory
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      */
     public function __construct(
         \Magento\Webhook\Model\Resource\Subscription\Collection $subscriptionSet,
-        \Magento\Core\Model\Config $mageConfig,
+        \Magento\Webhook\Model\Config $config,
         \Magento\Webhook\Model\Subscription\Factory $subscriptionFactory,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger
     ) {
         $this->_subscriptionSet = $subscriptionSet;
-        $this->_mageConfig = $mageConfig;
+        $this->_config = $config;
         $this->_subscriptionFactory = $subscriptionFactory;
         $this->_logger = $logger;
     }
@@ -69,17 +72,7 @@ class Config
      */
     public function updateSubscriptionCollection()
     {
-        $subscriptionConfig = $this->_mageConfig->getNode(self::XML_PATH_SUBSCRIPTIONS);
-
-        if (!empty($subscriptionConfig)) {
-            $subscriptionConfig = $subscriptionConfig->asArray();
-        }
-        // It could be no subscriptions have been defined
-        if (!$subscriptionConfig) {
-            return $this;
-        }
-
-        foreach ($subscriptionConfig as $alias => $subscriptionData) {
+        foreach ($this->_config->getSubscriptions() as $alias => $subscriptionData) {
             try {
                 $this->_validateConfigData($subscriptionData, $alias);
                 $subscriptions = $this->_subscriptionSet->getSubscriptionsByAlias($alias);
diff --git a/app/code/Magento/Webhook/Model/Webapi/User/Factory.php b/app/code/Magento/Webhook/Model/Webapi/User/Factory.php
index 8172b022673..6283aa9f5a5 100644
--- a/app/code/Magento/Webhook/Model/Webapi/User/Factory.php
+++ b/app/code/Magento/Webhook/Model/Webapi/User/Factory.php
@@ -53,8 +53,10 @@ class Factory
     /** @var \Magento\Acl\CacheInterface  */
     protected $_cache;
 
-    /** @var \Magento\Core\Helper\Data  */
-    private $_coreHelper;
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $_mathRandom;
 
     /**
      * @param \Magento\Webapi\Model\Acl\Rule\Factory $ruleFactory
@@ -62,7 +64,7 @@ class Factory
      * @param \Magento\Webapi\Model\Acl\Role\Factory $roleFactory
      * @param \Magento\Webapi\Model\Acl\Resource\Provider $resourceProvider
      * @param \Magento\Webapi\Model\Acl\Cache $cache
-     * @param \Magento\Core\Helper\Data $coreHelper
+     * @param \Magento\Math\Random $mathRandom
      */
     public function __construct(
         \Magento\Webapi\Model\Acl\Rule\Factory $ruleFactory,
@@ -70,13 +72,13 @@ class Factory
         \Magento\Webapi\Model\Acl\Role\Factory $roleFactory,
         \Magento\Webapi\Model\Acl\Resource\Provider $resourceProvider,
         \Magento\Webapi\Model\Acl\Cache $cache,
-        \Magento\Core\Helper\Data $coreHelper
+        \Magento\Math\Random $mathRandom
     ) {
         $this->_ruleFactory = $ruleFactory;
         $this->_userFactory = $userFactory;
         $this->_roleFactory = $roleFactory;
-        $this->_coreHelper = $coreHelper;
         $this->_cache = $cache;
+        $this->_mathRandom = $mathRandom;
         $this->_initVirtualResourceMapping($resourceProvider);
     }
 
@@ -122,7 +124,7 @@ class Factory
 
         // Check if a role with this name already exists, we need a new role with a unique name
         if ($role->getId()) {
-            $uniqString = $this->_coreHelper->uniqHash();
+            $uniqString = $this->_mathRandom->getUniqueHash();
             $roleName   = $this->_createRoleName($email, $company, $uniqString);
         }
 
diff --git a/app/code/Magento/Webhook/etc/di.xml b/app/code/Magento/Webhook/etc/di.xml
index f06c00ba068..51dafbf59c8 100644
--- a/app/code/Magento/Webhook/etc/di.xml
+++ b/app/code/Magento/Webhook/etc/di.xml
@@ -24,11 +24,6 @@
  */
 -->
 <config>
-    <type name="Magento\Webhook\Model\Resource\Subscription">
-        <param name="config">
-            <instance type="Magento\Core\Model\Config" />
-        </param>
-    </type>
     <type name="Magento\Outbound\Formatter\Factory">
         <param name="formatterMap">
             <value>
diff --git a/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php b/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php
index b1cd827588f..ecf5d17de3d 100644
--- a/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php
+++ b/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php
@@ -44,7 +44,7 @@ class Tax extends \Magento\Catalog\Model\Product\Attribute\Backend\Price
     protected $_directoryHelper;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Directory\Helper\Data $directoryHelper
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param \Magento\Core\Model\Config $config
@@ -53,7 +53,7 @@ class Tax extends \Magento\Catalog\Model\Product\Attribute\Backend\Price
      * @param \Magento\Weee\Model\Resource\Attribute\Backend\Weee\Tax $attributeTax
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Directory\Helper\Data $directoryHelper,
         \Magento\Catalog\Helper\Data $catalogData,
         \Magento\Core\Model\Config $config,
diff --git a/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php b/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php
index 52bfa596c79..c24d91ff8d6 100644
--- a/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php
+++ b/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php
@@ -43,11 +43,11 @@ class Tax extends \Magento\Core\Model\Resource\Db\AbstractDb
 
     /**
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Core\Model\Resource $resource
+     * @param \Magento\App\Resource $resource
      */
     public function __construct(
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Core\Model\Resource $resource
+        \Magento\App\Resource $resource
     ) {
         $this->_storeManager = $storeManager;
         parent::__construct($resource);
diff --git a/app/code/Magento/Weee/Model/Resource/Tax.php b/app/code/Magento/Weee/Model/Resource/Tax.php
index eff4796d59f..9c3a7b01de7 100644
--- a/app/code/Magento/Weee/Model/Resource/Tax.php
+++ b/app/code/Magento/Weee/Model/Resource/Tax.php
@@ -24,21 +24,32 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Weee\Model\Resource;
 
 /**
  * Wee tax resource model
- *
- * @category    Magento
- * @package     Magento_Weee
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Weee\Model\Resource;
-
 class Tax extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
+    /**
+     * @param \Magento\App\Resource $resource
+     * @param \Magento\Stdlib\DateTime $dateTime
+     */
+    public function __construct(
+        \Magento\App\Resource $resource,
+        \Magento\Stdlib\DateTime $dateTime
+    ) {
+        $this->dateTime = $dateTime;
+        parent::__construct($resource);
+    }
+
     /**
      * Resource initialization
-     *
      */
     protected function _construct()
     {
@@ -96,7 +107,7 @@ class Tax extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected function _updateDiscountPercents($productCondition = null)
     {
-        $now     = \Magento\Date::toTimestamp(\Magento\Date::now());
+        $now     = $this->dateTime->toTimestamp($this->dateTime->now());
         $adapter = $this->_getWriteAdapter();
 
         $select  = $this->_getReadAdapter()->select();
diff --git a/app/code/Magento/Weee/etc/di.xml b/app/code/Magento/Weee/etc/di.xml
index fb4b4836fa5..7d55b785ba7 100644
--- a/app/code/Magento/Weee/etc/di.xml
+++ b/app/code/Magento/Weee/etc/di.xml
@@ -40,7 +40,7 @@
             <instance type="Magento\Weee\Helper\Data\Proxy" />
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <weee_setup>Magento\Sales\Model\Resource\Setup</weee_setup>
diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php
index 76a1cae238f..5914d380b1b 100644
--- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php
+++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php
@@ -43,7 +43,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Widget\Model\WidgetFactory $widgetFactory
@@ -51,7 +51,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Widget\Model\WidgetFactory $widgetFactory,
diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php
index 320dca50de8..b97da01e738 100644
--- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php
+++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php
@@ -24,14 +24,14 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser;
+
 /**
  * Widget Instance layouts chooser
  *
  * @method getArea()
  * @method getTheme()
  */
-namespace Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser;
-
 class Layout extends \Magento\Core\Block\Html\Select
 {
     /**
@@ -44,20 +44,28 @@ class Layout extends \Magento\Core\Block\Html\Select
      */
     protected $_themesFactory;
 
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
     /**
      * @param \Magento\Core\Block\Context $context
      * @param \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory
      * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory
+     * @param \Magento\App\State $appState
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Block\Context $context,
         \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory,
         \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory,
+        \Magento\App\State $appState,
         array $data = array()
     ) {
         $this->_layoutProcessorFactory = $layoutProcessorFactory;
         $this->_themesFactory = $themesFactory;
+        $this->_appState = $appState;
         parent::__construct($context, $data);
     }
 
@@ -73,8 +81,11 @@ class Layout extends \Magento\Core\Block\Html\Select
             $layoutUpdateParams = array(
                 'theme' => $this->_getThemeInstance($this->getTheme()),
             );
-            $pageTypesAll = $this->_getLayoutProcessor($layoutUpdateParams)->getAllPageHandles();
-            $this->_addPageTypeOptions($pageTypesAll);
+            $pageTypes = $this->_appState->emulateAreaCode(
+                'frontend',
+                array($this->_getLayoutProcessor($layoutUpdateParams), 'getAllPageHandles')
+            );
+            $this->_addPageTypeOptions($pageTypes);
         }
         return parent::_beforeToHtml();
     }
@@ -83,10 +94,6 @@ class Layout extends \Magento\Core\Block\Html\Select
      * Retrieve theme instance by its identifier
      *
      * @param int $themeId
-     *
-     *
-     *
-     *
      * @return \Magento\Core\Model\Theme|null
      */
     protected function _getThemeInstance($themeId)
@@ -114,6 +121,7 @@ class Layout extends \Magento\Core\Block\Html\Select
      */
     protected function _addPageTypeOptions(array $pageTypes)
     {
+        $label = array();
         // Sort list of page types by label
         foreach ($pageTypes as $key => $row) {
             $label[$key]  = $row['label'];
diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php
index 7e3e3c5376d..c80a427e492 100644
--- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php
+++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php
@@ -56,7 +56,7 @@ class Main
 
     /**
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -66,7 +66,7 @@ class Main
      */
     public function __construct(
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php
index 3a5ceffa425..7762d5fe86a 100644
--- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php
+++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php
@@ -164,45 +164,45 @@ class Layout
         $options = array();
         $options[] = array(
             'value' => '',
-            'label' => $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('-- Please Select --'))
+            'label' => $this->escapeJsQuote(__('-- Please Select --'))
         );
         $options[] = array(
             'label' => __('Categories'),
             'value' => array(
                 array(
                     'value' => 'anchor_categories',
-                    'label' => $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Anchor Categories'))
+                    'label' => $this->escapeJsQuote(__('Anchor Categories'))
                 ),
                 array(
                     'value' => 'notanchor_categories',
-                    'label' => $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Non-Anchor Categories'))
+                    'label' => $this->escapeJsQuote(__('Non-Anchor Categories'))
                 )
             )
         );
         foreach ($this->_productType->getTypes() as $typeId => $type) {
             $productsOptions[] = array(
                'value' => $typeId.'_products',
-               'label' => $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape($type['label'])
+               'label' => $this->escapeJsQuote($type['label'])
             );
         }
         array_unshift($productsOptions, array(
             'value' => 'all_products',
-            'label' => $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('All Product Types'))
+            'label' => $this->escapeJsQuote(__('All Product Types'))
         ));
         $options[] = array(
-            'label' => $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Products')),
+            'label' => $this->escapeJsQuote(__('Products')),
             'value' => $productsOptions
         );
         $options[] = array(
-            'label' => $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Generic Pages')),
+            'label' => $this->escapeJsQuote(__('Generic Pages')),
             'value' => array(
                 array(
                     'value' => 'all_pages',
-                    'label' => $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('All Pages'))
+                    'label' => $this->escapeJsQuote(__('All Pages'))
                 ),
                 array(
                     'value' => 'pages',
-                    'label' => $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Specified Page'))
+                    'label' => $this->escapeJsQuote(__('Specified Page'))
                 )
             )
         );
@@ -300,7 +300,7 @@ class Layout
     {
         $button = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button')
             ->setData(array(
-                'label'     => $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Remove Layout Update')),
+                'label'     => $this->escapeJsQuote(__('Remove Layout Update')),
                 'onclick'   => 'WidgetInstance.removePageGroup(this)',
                 'class'     => 'action-delete'
             ));
diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php
index c6c932d95b4..6dca42608e3 100644
--- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php
+++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php
@@ -53,7 +53,7 @@ class Settings
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory
      * @param array $data
      */
@@ -61,7 +61,7 @@ class Settings
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory,
         array $data = array()
     ) {
diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php
index 7c973412fe8..1df1752a411 100644
--- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php
+++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php
@@ -57,7 +57,7 @@ class Options extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Core\Model\Option\ArrayPool $sourceModelPool
      * @param \Magento\Widget\Model\Widget $widget
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Data\Form\Factory $formFactory
+     * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
@@ -66,7 +66,7 @@ class Options extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Core\Model\Option\ArrayPool $sourceModelPool,
         \Magento\Widget\Model\Widget $widget,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Data\Form\Factory $formFactory,
+        \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Backend\Block\Template\Context $context,
         array $data = array()
diff --git a/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php b/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php
index 4b7631cb8c8..8eff3d9bbdc 100644
--- a/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php
+++ b/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php
@@ -44,25 +44,33 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action
     protected $_widgetFactory;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
     /**
      * @param \Magento\Backend\Controller\Context $context
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Widget\Model\Widget\InstanceFactory $widgetFactory
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
+     * @param \Magento\Math\Random $mathRandom
      */
     public function __construct(
         \Magento\Backend\Controller\Context $context,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Widget\Model\Widget\InstanceFactory $widgetFactory,
-        \Magento\Core\Model\Logger $logger
+        \Magento\Logger $logger,
+        \Magento\Math\Random $mathRandom
     ) {
         $this->_coreRegistry = $coreRegistry;
         $this->_widgetFactory = $widgetFactory;
         $this->_logger = $logger;
+        $this->mathRandom = $mathRandom;
         parent::__construct($context);
     }
 
@@ -262,7 +270,7 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action
         $chooser = $this->getLayout()
             ->createBlock('Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser')
             ->setUseMassaction(true)
-            ->setId($this->_objectManager->get('Magento\Core\Helper\Data')->uniqHash('categories'))
+            ->setId($this->mathRandom->getUniqueHash('categories'))
             ->setIsAnchorOnly($isAnchorOnly)
             ->setSelectedCategories(explode(',', $selected));
         $this->setBody($chooser->toHtml());
@@ -278,7 +286,7 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action
         $productTypeId = $this->getRequest()->getParam('product_type_id', '');
         $chooser = $this->getLayout()
             ->createBlock('Magento\Catalog\Block\Adminhtml\Product\Widget\Chooser')
-            ->setName($this->_objectManager->get('Magento\Core\Helper\Data')->uniqHash('products_grid_'))
+            ->setName($this->mathRandom->getUniqueHash('products_grid_'))
             ->setUseMassaction(true)
             ->setProductTypeId($productTypeId)
             ->setSelectedProducts(explode(',', $selected));
@@ -303,6 +311,15 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action
      *
      */
     public function blocksAction()
+    {
+        $this->_objectManager->get('Magento\App\State')
+            ->emulateAreaCode('frontend', array($this, 'renderPageContainers'));
+    }
+
+    /**
+     * Render page containers
+     */
+    public function renderPageContainers()
     {
         /* @var $widgetInstance \Magento\Widget\Model\Widget\Instance */
         $widgetInstance = $this->_initWidgetInstance();
diff --git a/app/code/Magento/Widget/Model/Config/FileResolver.php b/app/code/Magento/Widget/Model/Config/FileResolver.php
index 853672872b5..da89fcdd363 100644
--- a/app/code/Magento/Widget/Model/Config/FileResolver.php
+++ b/app/code/Magento/Widget/Model/Config/FileResolver.php
@@ -30,7 +30,7 @@ class FileResolver implements \Magento\Config\FileResolverInterface
     /**
      * Module configuration file reader
      *
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_moduleReader;
 
@@ -40,11 +40,11 @@ class FileResolver implements \Magento\Config\FileResolverInterface
     protected $_applicationDirs;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      * @param \Magento\App\Dir $applicationDirs
      */
     public function __construct(
-        \Magento\Core\Model\Config\Modules\Reader $moduleReader,
+        \Magento\Module\Dir\Reader $moduleReader,
         \Magento\App\Dir $applicationDirs
     ) {
         $this->_moduleReader = $moduleReader;
diff --git a/app/code/Magento/Widget/Model/Config/SchemaLocator.php b/app/code/Magento/Widget/Model/Config/SchemaLocator.php
index ed019cf34be..e628db40728 100644
--- a/app/code/Magento/Widget/Model/Config/SchemaLocator.php
+++ b/app/code/Magento/Widget/Model/Config/SchemaLocator.php
@@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema = null;
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(\Magento\Module\Dir\Reader $moduleReader)
     {
         $this->_schema =  $moduleReader->getModuleDir('etc', 'Magento_Widget') . '/widget.xsd';
         $this->_perFileSchema =  $moduleReader->getModuleDir('etc', 'Magento_Widget') . '/widget_file.xsd';
diff --git a/app/code/Magento/Widget/Model/NamespaceResolver.php b/app/code/Magento/Widget/Model/NamespaceResolver.php
new file mode 100644
index 00000000000..8e377d1abf2
--- /dev/null
+++ b/app/code/Magento/Widget/Model/NamespaceResolver.php
@@ -0,0 +1,93 @@
+<?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\Widget\Model;
+
+class NamespaceResolver
+{
+    /**
+     * List of module namespaces
+     *
+     * @var array
+     */
+    protected $_moduleNamespaces;
+
+    /**
+     * @var \Magento\Module\ModuleListInterface
+     */
+    protected $_moduleList;
+
+    /**
+     * @param \Magento\Module\ModuleListInterface $moduleList
+     */
+    public function __construct(\Magento\Module\ModuleListInterface $moduleList)
+    {
+        $this->_moduleList = $moduleList;
+    }
+
+    /**
+     * Determine whether provided name begins from any available modules, according to namespaces priority
+     * If matched, returns as the matched module "factory" name or a fully qualified module name
+     *
+     * @param string $name
+     * @param bool $asFullModuleName
+     * @return string
+     */
+    public function determineOmittedNamespace($name, $asFullModuleName = false)
+    {
+        if (null === $this->_moduleNamespaces) {
+            $this->_moduleNamespaces = array();
+            foreach ($this->_moduleList->getModules() as $module) {
+                $moduleName = $module['name'];
+                $module = strtolower($moduleName);
+                $this->_moduleNamespaces[substr($module, 0, strpos($module, '_'))][$module] = $moduleName;
+            }
+        }
+
+        $explodeString = (strpos($name, \Magento\Autoload\IncludePath::NS_SEPARATOR) === false) ?
+            '_' :  \Magento\Autoload\IncludePath::NS_SEPARATOR;
+        $name = explode($explodeString, strtolower($name));
+
+        $partsNum = count($name);
+        $defaultNamespaceFlag = false;
+        foreach ($this->_moduleNamespaces as $namespaceName => $namespace) {
+            // assume the namespace is omitted (default namespace only, which comes first)
+            if ($defaultNamespaceFlag === false) {
+                $defaultNamespaceFlag = true;
+                $defaultNS = $namespaceName . '_' . $name[0];
+                if (isset($namespace[$defaultNS])) {
+                    return $asFullModuleName ? $namespace[$defaultNS] : $name[0]; // return omitted as well
+                }
+            }
+            // assume namespace is qualified
+            if (isset($name[1])) {
+                $fullNS = $name[0] . '_' . $name[1];
+                if (2 <= $partsNum && isset($namespace[$fullNS])) {
+                    return $asFullModuleName ? $namespace[$fullNS] : $fullNS;
+                }
+            }
+        }
+        return '';
+    }
+} 
\ No newline at end of file
diff --git a/app/code/Magento/Widget/Model/Template/Filter.php b/app/code/Magento/Widget/Model/Template/Filter.php
index aa5bf71f0ae..c21947dd5ba 100644
--- a/app/code/Magento/Widget/Model/Template/Filter.php
+++ b/app/code/Magento/Widget/Model/Template/Filter.php
@@ -24,15 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Widget\Model\Template;
+
 /**
  * Template Filter Model
- *
- * @category    Magento
- * @package     Magento_Widget
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Widget\Model\Template;
-
 class Filter extends \Magento\Cms\Model\Template\Filter
 {
     /**
@@ -46,8 +42,9 @@ class Filter extends \Magento\Cms\Model\Template\Filter
     protected $_widget;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Stdlib\String $string
+     * @param \Magento\Logger $logger
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Core\Model\View\Url $viewUrl
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\VariableFactory $coreVariableFactory
@@ -56,10 +53,12 @@ class Filter extends \Magento\Cms\Model\Template\Filter
      * @param \Magento\View\LayoutFactory $layoutFactory
      * @param \Magento\Widget\Model\Resource\Widget $widgetResource
      * @param \Magento\Widget\Model\Widget $widget
+     * @param \Magento\App\State $appState
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Stdlib\String $string,
+        \Magento\Logger $logger,
+        \Magento\Escaper $escaper,
         \Magento\Core\Model\View\Url $viewUrl,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\VariableFactory $coreVariableFactory,
@@ -67,13 +66,22 @@ class Filter extends \Magento\Cms\Model\Template\Filter
         \Magento\View\LayoutInterface $layout,
         \Magento\View\LayoutFactory $layoutFactory,
         \Magento\Widget\Model\Resource\Widget $widgetResource,
-        \Magento\Widget\Model\Widget $widget
+        \Magento\Widget\Model\Widget $widget,
+        \Magento\App\State $appState
     ) {
         $this->_widgetResource = $widgetResource;
         $this->_widget = $widget;
         parent::__construct(
-            $logger, $coreData, $viewUrl, $coreStoreConfig, $coreVariableFactory, $storeManager, 
-            $layout, $layoutFactory
+            $string,
+            $logger,
+            $escaper,
+            $viewUrl,
+            $coreStoreConfig,
+            $coreVariableFactory,
+            $storeManager,
+            $layout,
+            $layoutFactory,
+            $appState
         );
     }
 
@@ -103,13 +111,13 @@ class Filter extends \Magento\Cms\Model\Template\Filter
         } else {
             return '';
         }
-        
-        // we have no other way to avoid fatal errors for type like 'cms/widget__link', '_cms/widget_link' etc. 
+
+        // we have no other way to avoid fatal errors for type like 'cms/widget__link', '_cms/widget_link' etc.
         $xml = $this->_widget->getWidgetByClassType($type);
         if ($xml === null) {
             return '';
         }
-        
+
         // define widget block and check the type is instance of Widget Interface
         $widget = $this->_layout->createBlock($type, $name, array('data' => $params));
         if (!$widget instanceof \Magento\Widget\Block\BlockInterface) {
diff --git a/app/code/Magento/Widget/Model/Widget.php b/app/code/Magento/Widget/Model/Widget.php
index eb2139fd6aa..d05254c5799 100644
--- a/app/code/Magento/Widget/Model/Widget.php
+++ b/app/code/Magento/Widget/Model/Widget.php
@@ -58,27 +58,27 @@ class Widget
     /**
      * Core data
      *
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Escaper
      */
-    protected $_coreData = null;
+    protected $_escaper;
 
     /** @var  array */
     protected $_widgetsArray = array();
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Widget\Model\Config\Data $dataStorage
      * @param \Magento\Core\Model\View\Url $viewUrl
      * @param \Magento\Core\Model\View\Url $viewUrl
      * @param \Magento\Core\Model\View\FileSystem $viewFileSystem
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Widget\Model\Config\Data $dataStorage,
         \Magento\Core\Model\View\Url $viewUrl,
         \Magento\Core\Model\View\FileSystem $viewFileSystem
     ) {
-        $this->_coreData = $coreData;
+        $this->_escaper = $escaper;
         $this->_dataStorage = $dataStorage;
         $this->_viewUrl = $viewUrl;
         $this->_viewFileSystem = $viewFileSystem;
@@ -244,7 +244,7 @@ class Widget
      */
     public function getWidgetDeclaration($type, $params = array(), $asIs = true)
     {
-        $directive = '{{widget type="' . $type . '"';
+        $directive = '{{widget type="' . preg_quote($type) . '"';
 
         foreach ($params as $name => $value) {
             // Retrieve default option value if pre-configured
@@ -270,7 +270,7 @@ class Widget
         $html = sprintf('<img id="%s" src="%s" title="%s">',
             $this->_idEncode($directive),
             $this->getPlaceholderImageUrl($type),
-            $this->_coreData->escapeUrl($directive)
+            $this->_escaper->escapeUrl($directive)
         );
         return $html;
     }
diff --git a/app/code/Magento/Widget/Model/Widget/Instance.php b/app/code/Magento/Widget/Model/Widget/Instance.php
index 0c961ffa191..39ec5567ab5 100644
--- a/app/code/Magento/Widget/Model/Widget/Instance.php
+++ b/app/code/Magento/Widget/Model/Widget/Instance.php
@@ -82,8 +82,10 @@ class Instance extends \Magento\Core\Model\AbstractModel
     /** @var  \Magento\Widget\Model\Widget */
     protected $_widgetModel;
 
-    /** @var  \Magento\Core\Model\Config */
-    protected $_coreConfig;
+    /**
+     * @var \Magento\Widget\Model\NamespaceResolver
+     */
+    protected $_namespaceResolver;
 
     /**
      * @var \Magento\Core\Model\Cache\TypeListInterface
@@ -96,8 +98,17 @@ class Instance extends \Magento\Core\Model\AbstractModel
     protected $_relatedCacheTypes;
 
     /**
-     * @param \Magento\Widget\Helper\Data $widgetData
-     * @param \Magento\Core\Helper\Data $coreData
+     * @var \Magento\Escaper
+     */
+    protected $_escaper;
+
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
+    /**
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\View\FileSystem $viewFileSystem
@@ -105,15 +116,15 @@ class Instance extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Catalog\Model\Product\Type $productType
      * @param \Magento\Widget\Model\Config\Reader $reader
      * @param \Magento\Widget\Model\Widget $widgetModel
-     * @param \Magento\Core\Model\Config $coreConfig
+     * @param \Magento\Widget\Model\NamespaceResolver $namespaceResolver
+     * @param \Magento\Math\Random $mathRandom
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $relatedCacheTypes
      * @param array $data
      */
     public function __construct(
-        \Magento\Widget\Helper\Data $widgetData,
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\View\FileSystem $viewFileSystem,
@@ -121,21 +132,22 @@ class Instance extends \Magento\Core\Model\AbstractModel
         \Magento\Catalog\Model\Product\Type $productType,
         \Magento\Widget\Model\Config\Reader $reader,
         \Magento\Widget\Model\Widget $widgetModel,
-        \Magento\Core\Model\Config $coreConfig,
+        \Magento\Widget\Model\NamespaceResolver $namespaceResolver,
+        \Magento\Math\Random $mathRandom,        
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $relatedCacheTypes = array(),
         array $data = array()
     ) {
-        $this->_widgetData = $widgetData;
-        $this->_coreData = $coreData;
+        $this->_escaper = $escaper;
         $this->_viewFileSystem = $viewFileSystem;
         $this->_cacheTypeList = $cacheTypeList;
         $this->_relatedCacheTypes = $relatedCacheTypes;
         $this->_productType = $productType;
         $this->_reader = $reader;
         $this->_widgetModel = $widgetModel;
-        $this->_coreConfig = $coreConfig;
+        $this->mathRandom = $mathRandom;
+        $this->_namespaceResolver = $namespaceResolver;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -397,7 +409,7 @@ class Instance extends \Magento\Core\Model\AbstractModel
                 $configFile = $this->_viewFileSystem->getFilename('widget.xml', array(
                     'area'   => $this->getArea(),
                     'theme'  => $this->getThemeId(),
-                    'module' => $this->_coreConfig->determineOmittedNamespace(
+                    'module' => $this->_namespaceResolver->determineOmittedNamespace(
                         preg_replace('/^(.+?)\/.+$/', '\\1', $this->getType()), true
                     ),
                 ));
@@ -528,7 +540,7 @@ class Instance extends \Magento\Core\Model\AbstractModel
             $template = ' template="' . $templatePath . '"';
         }
 
-        $hash = $this->_coreData->uniqHash();
+        $hash = $this->mathRandom->getUniqueHash();
         $xml .= '<block class="' . $this->getType() . '" name="' . $hash . '"' . $template . '>';
         foreach ($parameters as $name => $value) {
             if (is_array($value)) {
@@ -538,7 +550,7 @@ class Instance extends \Magento\Core\Model\AbstractModel
                 $xml .= '<action method="setData">'
                     . '<argument name="name" xsi:type="string">' . $name . '</argument>'
                     . '<argument name="value" xsi:type="string">'
-                    . $this->_widgetData->escapeHtml($value) . '</argument>'
+                    . $this->_escaper->escapeHtml($value) . '</argument>'
                     . '</action>';
             }
         }
diff --git a/app/code/Magento/Widget/etc/di.xml b/app/code/Magento/Widget/etc/di.xml
index 6dadc3fe368..ecb8a39183a 100644
--- a/app/code/Magento/Widget/etc/di.xml
+++ b/app/code/Magento/Widget/etc/di.xml
@@ -51,7 +51,7 @@
             <value>Magento\Widget\Model\Template\Filter</value>
         </param>
     </type>
-    <type name="Magento\App\Updater\SetupFactory">
+    <type name="Magento\Module\Updater\SetupFactory">
         <param name="resourceTypes">
             <value>
                 <widget_setup>Magento\Core\Model\Resource\Setup\Generic</widget_setup>
diff --git a/app/code/Magento/Widget/view/adminhtml/instance/edit/layout.phtml b/app/code/Magento/Widget/view/adminhtml/instance/edit/layout.phtml
index f61bb256f9d..9bdee8c5210 100644
--- a/app/code/Magento/Widget/view/adminhtml/instance/edit/layout.phtml
+++ b/app/code/Magento/Widget/view/adminhtml/instance/edit/layout.phtml
@@ -53,18 +53,18 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
             '<col width="200" />'+
             '<thead>'+
                 '<tr>'+
-                    '<th><label><?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('%1', $container['label'])) ?></label></th>'+
-                    '<th><label><?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Container')) ?> <span class="required">*</span></label></th>'+
-                    '<th><label><?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Template')) ?></label></th>'+
+                    '<th><label><?php echo $this->escapeJsQuote(__('%1', $container['label'])) ?></label></th>'+
+                    '<th><label><?php echo $this->escapeJsQuote(__('Container')) ?> <span class="required">*</span></label></th>'+
+                    '<th><label><?php echo $this->escapeJsQuote(__('Template')) ?></label></th>'+
                 '</tr>'+
             '</thead>'+
             '<tbody>'+
                 '<tr>'+
                     '<td>'+
                         '<input type="radio" class="radio for_all" id="all_<?php echo $container['name'] ?>_{{id}}" name="widget_instance[{{id}}][<?php echo $container['name'] ?>][for]" value="all" onclick="WidgetInstance.togglePageGroupChooser(this)" checked="checked" />&nbsp;'+
-                        '<label for="all_<?php echo $container['name'] ?>_{{id}}"><?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('All')) ?></label><br />'+
+                        '<label for="all_<?php echo $container['name'] ?>_{{id}}"><?php echo $this->escapeJsQuote(__('All')) ?></label><br />'+
                         '<input type="radio" class="radio for_specific" id="specific_<?php echo $container['name'] ?>_{{id}}" name="widget_instance[{{id}}][<?php echo $container['name'] ?>][for]" value="specific" onclick="WidgetInstance.togglePageGroupChooser(this)" />&nbsp;'+
-                        '<label for="specific_<?php echo $container['name'] ?>_{{id}}"><?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Specific %1', $container['label'])) ?></label>'+
+                        '<label for="specific_<?php echo $container['name'] ?>_{{id}}"><?php echo $this->escapeJsQuote(__('Specific %1', $container['label'])) ?></label>'+
                     '</td>'+
                     '<td>'+
                         '<div class="block_reference_container">'+
@@ -84,11 +84,11 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
             '<input type="hidden" class="product_type_id" name="widget_instance[{{id}}][<?php echo $container['name'] ?>][product_type_id]" value="<?php echo $container['product_type_id'] ?>" />'+
             '<p>' +
                 '<input type="text" class="input-text entities" name="widget_instance[{{id}}][<?php echo $container['name'] ?>][entities]" value="{{<?php echo $container['name'] ?>_entities}}" readonly="readonly" />&nbsp;' +
-                '<a class="widget-option-chooser" href="javascript:void(0)" onclick="WidgetInstance.displayEntityChooser(\'<?php echo $container['code'] ?>\', \'<?php echo $container['name'] ?>_ids_{{id}}\')"  title="<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Open Chooser')) ?>">' +
-                    '<img src="<?php echo $this->getViewFileUrl('images/rule_chooser_trigger.gif') ?>" alt="<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Open Chooser')); ?>" />' +
+                '<a class="widget-option-chooser" href="javascript:void(0)" onclick="WidgetInstance.displayEntityChooser(\'<?php echo $container['code'] ?>\', \'<?php echo $container['name'] ?>_ids_{{id}}\')"  title="<?php echo $this->escapeJsQuote(__('Open Chooser')) ?>">' +
+                    '<img src="<?php echo $this->getViewFileUrl('images/rule_chooser_trigger.gif') ?>" alt="<?php echo $this->escapeJsQuote(__('Open Chooser')); ?>" />' +
                 '</a>&nbsp;' +
-                '<a href="javascript:void(0)" onclick="WidgetInstance.hideEntityChooser(\'<?php echo $container['name'] ?>_ids_{{id}}\')" title="<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Apply')); ?>">' +
-                    '<img src="<?php echo $this->getViewFileUrl('images/rule_component_apply.gif') ?>" alt="<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Apply')); ?>" />' +
+                '<a href="javascript:void(0)" onclick="WidgetInstance.hideEntityChooser(\'<?php echo $container['name'] ?>_ids_{{id}}\')" title="<?php echo $this->escapeJsQuote(__('Apply')); ?>">' +
+                    '<img src="<?php echo $this->getViewFileUrl('images/rule_component_apply.gif') ?>" alt="<?php echo $this->escapeJsQuote(__('Apply')); ?>" />' +
                 '</a>' +
             '</p>'+
             '<div class="chooser"></div>'+
@@ -104,8 +104,8 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
         '<col width="200" />'+
         '<thead>'+
             '<tr>'+
-                '<th><label><?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Container')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Template')) ?></label></th>'+
+                '<th><label><?php echo $this->escapeJsQuote(__('Container')) ?> <span class="required">*</span></label></th>'+
+                '<th><label><?php echo $this->escapeJsQuote(__('Template')) ?></label></th>'+
                 '<th>&nbsp;</th>'+
             '</tr>'+
         '</thead>'+
@@ -134,9 +134,9 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
         '<col width="200" />'+
         '<thead>'+
             '<tr>'+
-                '<th><label><?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Page')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Container')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape(__('Template')) ?></label></th>'+
+                '<th><label><?php echo $this->escapeJsQuote(__('Page')) ?> <span class="required">*</span></label></th>'+
+                '<th><label><?php echo $this->escapeJsQuote(__('Container')) ?> <span class="required">*</span></label></th>'+
+                '<th><label><?php echo $this->escapeJsQuote(__('Template')) ?></label></th>'+
             '</tr>'+
         '</thead>'+
         '<tbody>'+
diff --git a/app/code/Magento/Wishlist/Controller/AbstractController.php b/app/code/Magento/Wishlist/Controller/AbstractController.php
index cfa5dca1feb..d1bcd71eea9 100644
--- a/app/code/Magento/Wishlist/Controller/AbstractController.php
+++ b/app/code/Magento/Wishlist/Controller/AbstractController.php
@@ -120,7 +120,7 @@ abstract class AbstractController extends \Magento\Core\Controller\Front\Action
                     $messages[] = __('%1 for "%2".', trim($e->getMessage(), '.'), $item->getProduct()->getName());
                 }
             } catch (\Exception $e) {
-                $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                $this->_objectManager->get('Magento\Logger')->logException($e);
                 $messages[] = __('We cannot add this item to your shopping cart.');
             }
         }
diff --git a/app/code/Magento/Wishlist/Controller/Index.php b/app/code/Magento/Wishlist/Controller/Index.php
index 39e7e305322..172143ebe20 100644
--- a/app/code/Magento/Wishlist/Controller/Index.php
+++ b/app/code/Magento/Wishlist/Controller/Index.php
@@ -254,7 +254,7 @@ class Index
 
             /** @var $helper \Magento\Wishlist\Helper\Data */
             $helper = $this->_objectManager->get('Magento\Wishlist\Helper\Data')->calculate();
-            $message = __('%1 has been added to your wishlist. Click <a href="%2">here</a> to continue shopping.', $helper->escapeHtml($product->getName()), $this->_objectManager->get('Magento\Core\Helper\Data')->escapeUrl($referer));
+            $message = __('%1 has been added to your wishlist. Click <a href="%2">here</a> to continue shopping.', $this->_objectManager->get('Magento\Escaper')->escapeHtml($product->getName()), $this->_objectManager->get('Magento\Escaper')->escapeUrl($referer));
             $session->addSuccess($message);
         }
         catch (\Magento\Core\Exception $e) {
@@ -262,7 +262,7 @@ class Index
         }
         catch (\Exception $e) {
             $session->addError(__('An error occurred while adding item to wish list.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
 
         $this->_redirect('*', array('wishlist_id' => $wishlist->getId()));
@@ -309,7 +309,7 @@ class Index
         } catch (\Exception $e) {
             $this->_objectManager->get('Magento\Customer\Model\Session')
                 ->addError(__('We can\'t configure the product.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->_redirect('*');
             return;
         }
@@ -363,7 +363,7 @@ class Index
             $session->addError($e->getMessage());
         } catch (\Exception $e) {
             $session->addError(__('An error occurred while updating wish list.'));
-            $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+            $this->_objectManager->get('Magento\Logger')->logException($e);
         }
         $this->_redirect('*/*', array('wishlist_id' => $wishlist->getId()));
     }
@@ -413,7 +413,7 @@ class Index
                     try {
                         $item->delete();
                     } catch (\Exception $e) {
-                        $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e);
+                        $this->_objectManager->get('Magento\Logger')->logException($e);
                         $this->_objectManager->get('Magento\Customer\Model\Session')->addError(
                             __('Can\'t delete item from wishlist')
                         );
@@ -431,7 +431,7 @@ class Index
                     $updatedItems++;
                 } catch (\Exception $e) {
                     $this->_objectManager->get('Magento\Customer\Model\Session')->addError(
-                        __('Can\'t save description %1', $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($description))
+                        __('Can\'t save description %1', $this->_objectManager->get('Magento\Escaper')->escapeHtml($description))
                     );
                 }
             }
@@ -601,8 +601,8 @@ class Index
             $cart->getQuote()->removeItem($itemId);
             $cart->save();
             $this->_objectManager->get('Magento\Wishlist\Helper\Data')->calculate();
-            $productName = $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($item->getProduct()->getName());
-            $wishlistName = $this->_objectManager->get('Magento\Core\Helper\Data')->escapeHtml($wishlist->getName());
+            $productName = $this->_objectManager->get('Magento\Escaper')->escapeHtml($item->getProduct()->getName());
+            $wishlistName = $this->_objectManager->get('Magento\Escaper')->escapeHtml($wishlist->getName());
             $session->addSuccess(
                 __("%1 has been moved to wish list %2", $productName, $wishlistName)
             );
diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php
index 622ca6aa595..50ab2fcfab7 100644
--- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php
+++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php
@@ -127,7 +127,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     protected $_productVisibility;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_coreResource;
 
@@ -155,14 +155,14 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData
      * @param \Magento\Sales\Helper\Admin $adminhtmlSales
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Date $date
      * @param \Magento\Wishlist\Model\Config $wishlistConfig
      * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollFactory
      * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory
      * @param \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory
@@ -173,14 +173,14 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
         \Magento\CatalogInventory\Helper\Data $catalogInventoryData,
         \Magento\Sales\Helper\Admin $adminhtmlSales,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Date $date,
         \Magento\Wishlist\Model\Config $wishlistConfig,
         \Magento\Catalog\Model\Product\Visibility $productVisibility,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollFactory,
         \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory,
         \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory,
@@ -471,14 +471,14 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
         $now = $this->_date->date();
         $gmtOffset = (int)$this->_date->getGmtOffset();
         if (isset($constraints['from'])) {
-            $lastDay = new \Zend_Date($now, \Magento\Date::DATETIME_INTERNAL_FORMAT);
+            $lastDay = new \Zend_Date($now, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
             $lastDay->subSecond($gmtOffset)
                 ->subDay(intval($constraints['from']));
             $filter['to'] = $lastDay;
         }
 
         if (isset($constraints['to'])) {
-            $firstDay = new \Zend_Date($now, \Magento\Date::DATETIME_INTERNAL_FORMAT);
+            $firstDay = new \Zend_Date($now, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT);
             $firstDay->subSecond($gmtOffset)
                 ->subDay(intval($constraints['to']) + 1);
             $filter['from'] = $firstDay;
diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php
index 3fedafad975..206653a3a35 100644
--- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php
+++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php
@@ -40,14 +40,14 @@ class Grid extends \Magento\Wishlist\Model\Resource\Item\Collection
      * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData
      * @param \Magento\Sales\Helper\Admin $adminhtmlSales
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Date $date
      * @param \Magento\Wishlist\Model\Config $wishlistConfig
      * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
-     * @param \Magento\Core\Model\Resource $coreResource
+     * @param \Magento\App\Resource $coreResource
      * @param \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollFactory
      * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory
      * @param \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory
@@ -59,14 +59,14 @@ class Grid extends \Magento\Wishlist\Model\Resource\Item\Collection
         \Magento\CatalogInventory\Helper\Data $catalogInventoryData,
         \Magento\Sales\Helper\Admin $adminhtmlSales,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Date $date,
         \Magento\Wishlist\Model\Config $wishlistConfig,
         \Magento\Catalog\Model\Product\Visibility $productVisibility,
-        \Magento\Core\Model\Resource $coreResource,
+        \Magento\App\Resource $coreResource,
         \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollFactory,
         \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory,
         \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory,
diff --git a/app/code/Magento/Wishlist/Model/Wishlist.php b/app/code/Magento/Wishlist/Model/Wishlist.php
index d038a145a20..a9d13a45cd1 100644
--- a/app/code/Magento/Wishlist/Model/Wishlist.php
+++ b/app/code/Magento/Wishlist/Model/Wishlist.php
@@ -24,6 +24,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Wishlist\Model;
 
 /**
  * Wishlist model
@@ -36,13 +37,7 @@
  * @method \Magento\Wishlist\Model\Wishlist setSharingCode(string $value)
  * @method string getUpdatedAt()
  * @method \Magento\Wishlist\Model\Wishlist setUpdatedAt(string $value)
- *
- * @category    Magento
- * @package     Magento_Wishlist
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Wishlist\Model;
-
 class Wishlist extends \Magento\Core\Model\AbstractModel
 {
     /**
@@ -79,13 +74,6 @@ class Wishlist extends \Magento\Core\Model\AbstractModel
      */
     protected $_wishlistData;
 
-    /**
-     * Core data
-     *
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_coreData;
-
     /**
      * Catalog product
      *
@@ -125,10 +113,19 @@ class Wishlist extends \Magento\Core\Model\AbstractModel
      */
     protected $_productFactory;
 
+    /**
+     * @var \Magento\Math\Random
+     */
+    protected $mathRandom;
+
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Catalog\Helper\Product $catalogProduct
-     * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Wishlist\Helper\Data $wishlistData
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
@@ -139,12 +136,13 @@ class Wishlist extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Wishlist\Model\ItemFactory $wishlistItemFactory
      * @param \Magento\Wishlist\Model\Resource\Item\CollectionFactory $wishlistCollFactory
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
+     * @param \Magento\Math\Random $mathRandom
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param array $data
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Catalog\Helper\Product $catalogProduct,
-        \Magento\Core\Helper\Data $coreData,
         \Magento\Wishlist\Helper\Data $wishlistData,
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
@@ -155,17 +153,20 @@ class Wishlist extends \Magento\Core\Model\AbstractModel
         \Magento\Wishlist\Model\ItemFactory $wishlistItemFactory,
         \Magento\Wishlist\Model\Resource\Item\CollectionFactory $wishlistCollFactory,
         \Magento\Catalog\Model\ProductFactory $productFactory,
+        \Magento\Math\Random $mathRandom,
+        \Magento\Stdlib\DateTime $dateTime,
         array $data = array()
     ) {
         $this->_eventManager = $eventManager;
         $this->_catalogProduct = $catalogProduct;
-        $this->_coreData = $coreData;
         $this->_wishlistData = $wishlistData;
         $this->_storeManager = $storeManager;
         $this->_date = $date;
         $this->_wishlistItemFactory = $wishlistItemFactory;
         $this->_wishlistCollFactory = $wishlistCollFactory;
         $this->_productFactory = $productFactory;
+        $this->mathRandom = $mathRandom;
+        $this->dateTime = $dateTime;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -242,7 +243,7 @@ class Wishlist extends \Magento\Core\Model\AbstractModel
      */
     protected function _getSharingRandomCode()
     {
-        return $this->_coreData->uniqHash();
+        return $this->mathRandom->getUniqueHash();
     }
 
     /**
@@ -296,7 +297,7 @@ class Wishlist extends \Magento\Core\Model\AbstractModel
             $item = $this->_wishlistItemFactory->create();
             $item->setProductId($product->getId())
                 ->setWishlistId($this->getId())
-                ->setAddedAt(now())
+                ->setAddedAt($this->dateTime->now())
                 ->setStoreId($storeId)
                 ->setOptions($product->getCustomOptions())
                 ->setProduct($product)
diff --git a/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml b/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml
index 1254160ead4..87837717410 100644
--- a/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml
+++ b/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml
@@ -72,8 +72,8 @@ wishlistControl = {
 productConfigure.addListType(
     'wishlist',
     {
-        urlFetch: '<?php echo $this->getUrl('*/customer_wishlist_product_composite_wishlist/configure') ?>',
-        urlConfirm: '<?php echo $this->getUrl('*/customer_wishlist_product_composite_wishlist/update') ?>'
+        urlFetch: '<?php echo $this->getUrl('customer/wishlist_product_composite_wishlist/configure') ?>',
+        urlConfirm: '<?php echo $this->getUrl('customer/wishlist_product_composite_wishlist/update') ?>'
     }
 );
 //-->
diff --git a/app/code/Magento/Wishlist/view/adminhtml/layout/adminhtml_customer_wishlist.xml b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
similarity index 96%
rename from app/code/Magento/Wishlist/view/adminhtml/layout/adminhtml_customer_wishlist.xml
rename to app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
index dfdfc1159df..6b0ad6db147 100644
--- a/app/code/Magento/Wishlist/view/adminhtml/layout/adminhtml_customer_wishlist.xml
+++ b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
@@ -40,7 +40,7 @@
         <block class="Magento\Backend\Block\Widget\Grid\ColumnSet" as="grid.columnSet" name="customer.wishlist.edit.tab.columnSet">
             <arguments>
                 <argument name="rowUrl" xsi:type="array">
-                    <item name="path" xsi:type="string">*/catalog_product/edit</item>
+                    <item name="path" xsi:type="string">catalog/product/edit</item>
                     <item name="extraParamsTemplate" xsi:type="array">
                         <item name="id" xsi:type="string">getProductId</item>
                     </item>
@@ -52,7 +52,7 @@
                     <argument name="header" xsi:type="string" translate="true">Product</argument>
                     <argument name="id" xsi:type="string">product_name</argument>
                     <argument name="index" xsi:type="string">product_name</argument>
-                    <argument name="renderer" xsi:type="string">Magento\Adminhtml\Block\Customer\Edit\Tab\View\Grid\Renderer\Item</argument>
+                    <argument name="renderer" xsi:type="string">Magento\Customer\Block\Adminhtml\Edit\Tab\View\Grid\Renderer\Item</argument>
                 </arguments>
             </block>
             <block class="Magento\Backend\Block\Widget\Grid\Column" as="description">
@@ -60,7 +60,7 @@
                     <argument name="header" xsi:type="string" translate="true">User description</argument>
                     <argument name="index" xsi:type="string">description</argument>
                     <argument name="id" xsi:type="string">description</argument>
-                    <argument name="renderer" xsi:type="string">Magento\Adminhtml\Block\Customer\Edit\Tab\Wishlist\Grid\Renderer\Description</argument>
+                    <argument name="renderer" xsi:type="string">Magento\Customer\Block\Adminhtml\Edit\Tab\Wishlist\Grid\Renderer\Description</argument>
                 </arguments>
             </block>
             <block class="Magento\Backend\Block\Widget\Grid\Column" as="qty">
@@ -101,7 +101,7 @@
                 <arguments>
                     <argument name="header" xsi:type="string" translate="true">Action</argument>
                     <argument name="index" xsi:type="string">wishlist_item_id</argument>
-                    <argument name="renderer" xsi:type="string">Magento\Adminhtml\Block\Customer\Grid\Renderer\Multiaction</argument>
+                    <argument name="renderer" xsi:type="string">Magento\Customer\Block\Adminhtml\Grid\Renderer\Multiaction</argument>
                     <argument name="sortable" xsi:type="string">0</argument>
                     <argument name="filter" xsi:type="string">0</argument>
                     <argument name="actions" xsi:type="array">
diff --git a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_simple.xml b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_simple.xml
index 650858247fc..5511ff2db5d 100644
--- a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_simple.xml
+++ b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_simple.xml
@@ -23,6 +23,6 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Configure Wishlist Item (Simple)" type="page" parent="wishlist_index_configure">
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Configure Wishlist Item (Simple)" type="page">
     <update handle="catalog_product_view_type_simple"/>
 </layout>
diff --git a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_share.xml b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_share.xml
index 5ddc35bf88a..ffda63b67f3 100644
--- a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_share.xml
+++ b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_share.xml
@@ -23,7 +23,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Customer My Account Wish List Sharing Form" type="page" parent="wishlist_index_index">
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Customer My Account Wish List Sharing Form" type="page">
     <update handle="customer_account"/>
     <referenceContainer name="my.account.wrapper">
         <block class="Magento\Wishlist\Block\Customer\Sharing" name="wishlist.sharing" template="sharing.phtml"/>
diff --git a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_shared_index.xml b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_shared_index.xml
index 39db3ab07c0..7ed767417f8 100644
--- a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_shared_index.xml
+++ b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_shared_index.xml
@@ -23,7 +23,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Customer Shared Wish List View" type="page" parent="wishlist_index_share">
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Customer Shared Wish List View" type="page">
     <referenceContainer name="content">
         <block class="Magento\Wishlist\Block\Share\Wishlist" name="customer.wishlist" template="shared.phtml"/>
     </referenceContainer>
diff --git a/app/code/Magento/Wishlist/view/frontend/render/item/price_msrp_item.phtml b/app/code/Magento/Wishlist/view/frontend/render/item/price_msrp_item.phtml
index b126f09a166..617a7193877 100644
--- a/app/code/Magento/Wishlist/view/frontend/render/item/price_msrp_item.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/render/item/price_msrp_item.phtml
@@ -52,14 +52,14 @@
         <?php if ($_catalogHelper->isShowPriceOnGesture($_product)): ?>
             <?php $priceElementId = 'product-price-' . $_id . $this->getIdSuffix(); ?>
             <span id="<?php echo $priceElementId ?>" style="display:none"></span>
-            <?php $popupId = 'msrp-popup-' . $_id . $_coreHelper->getRandomString(20); ?>
+            <?php $popupId = 'msrp-popup-' . $_id . $this->getRandomString(20); ?>
             <a href="#" id="<?php echo($popupId);?>"><?php echo __('Click for price'); ?></a>
         <?php else: ?>
             <span class="msrp-price-hide-message">
                 <?php echo $_catalogHelper->getMsrpPriceMessage($_product) ?>
             </span>
         <?php endif; ?>
-        <?php $helpLinkId = 'msrp-help-' . $_id . $_coreHelper->getRandomString(20); ?>
+        <?php $helpLinkId = 'msrp-help-' . $_id . $this->getRandomString(20); ?>
         <a href="#" id="<?php echo($helpLinkId);?>"><?php echo __("What's this?"); ?></a>
     </div>
     <script type="text/javascript">
diff --git a/app/design/adminhtml/magento_backend/css/debug.css b/app/design/adminhtml/magento_backend/css/debug.css
index 3dfb74027be..9879625b94e 100644
--- a/app/design/adminhtml/magento_backend/css/debug.css
+++ b/app/design/adminhtml/magento_backend/css/debug.css
@@ -694,7 +694,7 @@ th.required:after {
 .sales-recurring-profile-index .col-1-layout,
 .adminhtml-giftwrapping-index .col-1-layout,
 .sales-billing-agreement-index .col-1-layout,
-.adminhtml-checkout-agreement-index .col-1-layout,
+.checkout-agreement-index .col-1-layout,
 /* catalog */
 .catalog-product-index .col-1-layout,
 .adminhtml-catalog-event-index .col-1-layout,
@@ -712,19 +712,19 @@ th.required:after {
 .adminhtml-googleshopping-types-index .col-1-layout,
 .adminhtml-sitemap-index .col-1-layout,
 /* customers */
-.adminhtml-customer-online-index .col-1-layout,
-.adminhtml-customer-index .col-1-layout,
+.customer-online-index .col-1-layout,
+.customer-index-index .col-1-layout,
 .adminhtml-customer-attribute-index .col-1-layout,
 .adminhtml-customer-address-attribute-index .col-1-layout,
-.adminhtml-customer-group-index .col-1-layout,
+.customer-group-index .col-1-layout,
 .adminhtml-customersegment-index .col-1-layout,
 .adminhtml-reward-rate-index .col-1-layout,
 .adminhtml-giftcardaccount-index .col-1-layout,
 .adminhtml-giftregistry-index .col-1-layout,
 .adminhtml-invitation-index .col-1-layout,
 /* promotions */
-.adminhtml-promo-catalog-index .col-1-layout,
-.adminhtml-promo-quote-index .col-1-layout,
+.catalog-rule-promo-catalog-index .col-1-layout,
+.sales-rule-promo-quote-index .col-1-layout,
 .adminhtml-reminder-index .col-1-layout,
 /* newsletter */
 .adminhtml-newsletter-template-index .col-1-layout,
@@ -733,7 +733,8 @@ th.required:after {
 .adminhtml-newsletter-problem-index .col-1-layout,
 /* cms */
 .adminhtml-cms-page-index .col-1-layout,
-.adminhtml-cms-block-index .col-1-layout,
+.cms-page-index .col-1-layout,
+.cms-block-index .col-1-layout,
 .adminhtml-widget-instance-index .col-1-layout,
 .adminhtml-banner-index .col-1-layout,
 /* reports */
@@ -779,7 +780,8 @@ th.required:after {
 .tax-rate-index .col-1-layout,
 .adminhtml-system-currency-index .col-1-layout,
 .adminhtml-cache-index .col-1-layout,
-.sales-order-status-index .col-1-layout {
+.sales-order-status-index .col-1-layout,
+.adminhtml-integration-index .col-1-layout {
     padding: 0;
     background: transparent;
     border: 0;
@@ -795,7 +797,7 @@ th.required:after {
 .adminhtml-rma-index .page-actions,
 .adminhtml-giftwrapping-index .page-actions,
 .adminhtml-rma-item-attribute-index .page-actions,
-.adminhtml-checkout-agreement-index .page-actions,
+.checkout-agreement-index .page-actions,
 /* catalog */
 .catalog-product-index .page-actions,
 .adminhtml-catalog-event-index .page-actions,
@@ -810,24 +812,25 @@ th.required:after {
 .adminhtml-googleshopping-types-index .page-actions,
 .adminhtml-sitemap-index .page-actions,
 /* customers */
-.adminhtml-customer-index .page-actions,
+.customer-index-index .page-actions,
 .adminhtml-customer-attribute-index .page-actions,
 .adminhtml-customer-address-attribute-index .page-actions,
-.adminhtml-customer-group-index .page-actions,
+.customer-group-index .page-actions,
 .adminhtml-customersegment-index .page-actions,
 .adminhtml-reward-rate-index .page-actions,
 .adminhtml-giftcardaccount-index .page-actions,
 .adminhtml-giftregistry-index .page-actions,
 .adminhtml-invitation-index .page-actions,
 /* promotions */
-.adminhtml-promo-catalog-index .page-actions,
-.adminhtml-promo-quote-index .page-actions,
+.catalog-rule-promo-catalog-index .page-actions,
+.sales-rule-promo-quote-index .page-actions,
 .adminhtml-reminder-index .page-actions,
 /* newsletter */
 .adminhtml-newsletter-template-index .page-actions,
 /* cms */
 .adminhtml-cms-page-index .page-actions,
-.adminhtml-cms-block-index .page-actions,
+.cms-page-index .page-actions,
+.cms-block-index .page-actions,
 .adminhtml-widget-instance-index .page-actions,
 .adminhtml-banner-index .page-actions,
 /* reports */
@@ -841,7 +844,8 @@ th.required:after {
 .adminhtml-user-index .page-actions,
 .adminhtml-user-role-index .page-actions,
 .tax-rule-index .page-actions,
-.tax-rate-index .page-actions {
+.tax-rate-index .page-actions,
+.adminhtml-integration-index .page-actions {
     position: absolute;
     z-index: 2;
     margin-top: 8px;
@@ -853,7 +857,7 @@ th.required:after {
 .adminhtml-rma-index .page-actions.fixed,
 .adminhtml-giftwrapping-index .page-actions.fixed,
 .adminhtml-rma-item-attribute-index .page-actions.fixed,
-.adminhtml-checkout-agreement-index .page-actions.fixed,
+.checkout-agreement-index .page-actions.fixed,
 /* catalog */
 .catalog-product-index .page-actions.fixed,
 .adminhtml-catalog-event-index .page-actions.fixed,
@@ -868,24 +872,25 @@ th.required:after {
 .adminhtml-googleshopping-types-index .page-actions.fixed,
 .adminhtml-sitemap-index .page-actions.fixed,
 /* customers */
-.adminhtml-customer-index .page-actions.fixed,
+.customer-index-index .page-actions.fixed,
 .adminhtml-customer-attribute-index .page-actions.fixed,
 .adminhtml-customer-address-attribute-index .page-actions.fixed,
-.adminhtml-customer-group-index .page-actions.fixed,
+.customer-group-index .page-actions.fixed,
 .adminhtml-customersegment-index .page-actions.fixed,
 .adminhtml-reward-rate-index .page-actions.fixed,
 .adminhtml-giftcardaccount-index .page-actions.fixed,
 .adminhtml-giftregistry-index .page-actions.fixed,
 .adminhtml-invitation-index .page-actions.fixed,
 /* promotions */
-.adminhtml-promo-catalog-index .page-actions.fixed,
-.adminhtml-promo-quote-index .page-actions.fixed,
+.catalog-rule-promo-catalog-index .page-actions.fixed,
+.sales-rule-promo-quote-index .page-actions.fixed,
 .adminhtml-reminder-index .page-actions.fixed,
 /* newsletter */
 .adminhtml-newsletter-template-index .page-actions.fixed,
 /* cms */
 .adminhtml-cms-page-index .page-actions.fixed,
-.adminhtml-cms-block-index .page-actions.fixed,
+.cms-page-index .page-actions.fixed,
+.cms-block-index .page-actions.fixed,
 .adminhtml-widget-instance-index .page-actions.fixed,
 .adminhtml-banner-index .page-actions.fixed,
 /* reports */
@@ -899,7 +904,8 @@ th.required:after {
 .adminhtml-user-index .page-actions.fixed,
 .adminhtml-user-role-index .page-actions.fixed,
 .tax-rule-index .page-actions.fixed,
-.tax-rate-index .page-actions.fixed {
+.tax-rate-index .page-actions.fixed,
+.adminhtml-integration-index .page-actions.fixed {
     left: 0;
     margin: 0;
     padding: 0 21px;
@@ -910,7 +916,7 @@ th.required:after {
 .adminhtml-rma-index .page-actions .add,
 .adminhtml-giftwrapping-index .page-actions .add,
 .adminhtml-rma-item-attribute-index .page-actions .add,
-.adminhtml-checkout-agreement-index .page-actions .add,
+.checkout-agreement-index .page-actions .add,
 /* catalog */
 .catalog-product-index .page-actions .btn-round > .action-default,
 .adminhtml-catalog-event-index .page-actions .add,
@@ -925,24 +931,25 @@ th.required:after {
 .adminhtml-googleshopping-types-index .page-actions .add,
 .adminhtml-sitemap-index .page-actions .add,
 /* customers */
-.adminhtml-customer-index .page-actions .add,
+.customer-index-index .page-actions .add,
 .adminhtml-customer-attribute-index .page-actions .add,
 .adminhtml-customer-address-attribute-index .page-actions .add,
-.adminhtml-customer-group-index .page-actions .add,
+.customer-group-index .page-actions .add,
 .adminhtml-customersegment-index .page-actions .add,
 .adminhtml-reward-rate-index .page-actions .add,
 .adminhtml-giftcardaccount-index .page-actions .add,
 .adminhtml-giftregistry-index .page-actions .add,
 .adminhtml-invitation-index .page-actions .add,
 /* promotions */
-.adminhtml-promo-catalog-index .page-actions .add,
-.adminhtml-promo-quote-index .page-actions .add,
+.catalog-rule-promo-catalog-index .page-actions .add,
+.sales-rule-promo-quote-index .page-actions .add,
 .adminhtml-reminder-index .page-actions .add,
 /* newsletter */
 .adminhtml-newsletter-template-index .page-actions .add,
 /* cms */
 .adminhtml-cms-page-index .page-actions .add,
-.adminhtml-cms-block-index .page-actions .add,
+.cms-page-index .page-actions .add,
+.cms-block-index .page-actions .add,
 .adminhtml-widget-instance-index .page-actions .add,
 .adminhtml-banner-index .page-actions .add,
 /* reports */
@@ -956,7 +963,8 @@ th.required:after {
 .adminhtml-user-index .page-actions .add,
 .adminhtml-user-role-index .page-actions .add,
 .tax-rule-index .page-actions .add,
-.tax-rate-index .page-actions .add {
+.tax-rate-index .page-actions .add,
+.adminhtml-integration-index .page-actions .add {
     width: 32px;
     height: 32px;
     overflow: hidden;
@@ -980,7 +988,7 @@ th.required:after {
 .eq-ie8 .adminhtml-rma-index .page-actions .add,
 .eq-ie8 .adminhtml-giftwrapping-index .page-actions .add,
 .eq-ie8 .adminhtml-rma-item-attribute-index .page-actions .add,
-.eq-ie8 .adminhtml-checkout-agreement-index .page-actions .add,
+.eq-ie8 .checkout-agreement-index .page-actions .add,
 /* catalog */
 .eq-ie8 .catalog-product-index .page-actions .btn-round > .action-default,
 .eq-ie8 .adminhtml-catalog-event-index .page-actions .add,
@@ -995,24 +1003,25 @@ th.required:after {
 .eq-ie8 .adminhtml-googleshopping-types-index .page-actions .add,
 .eq-ie8 .adminhtml-sitemap-index .page-actions .add,
 /* customers */
-.eq-ie8 .adminhtml-customer-index .page-actions .add,
+.eq-ie8 .customer-index-index .page-actions .add,
 .eq-ie8 .adminhtml-customer-attribute-index .page-actions .add,
 .eq-ie8 .adminhtml-customer-address-attribute-index .page-actions .add,
-.eq-ie8 .adminhtml-customer-group-index .page-actions .add,
+.eq-ie8 .customer-group-index .page-actions .add,
 .eq-ie8 .adminhtml-customersegment-index .page-actions .add,
 .eq-ie8 .adminhtml-reward-rate-index .page-actions .add,
 .eq-ie8 .adminhtml-giftcardaccount-index .page-actions .add,
 .eq-ie8 .adminhtml-giftregistry-index .page-actions .add,
 .eq-ie8 .adminhtml-invitation-index .page-actions .add,
 /* promotions */
-.eq-ie8 .adminhtml-promo-catalog-index .page-actions .add,
-.eq-ie8 .adminhtml-promo-quote-index .page-actions .add,
+.eq-ie8 .catalog-rule-promo-catalog-index .page-actions .add,
+.eq-ie8 .sales-rule-promo-quote-index .page-actions .add,
 .eq-ie8 .adminhtml-reminder-index .page-actions .add,
 /* newsletter */
 .eq-ie8 .adminhtml-newsletter-template-index .page-actions .add,
 /* cms */
 .eq-ie8 .adminhtml-cms-page-index .page-actions .add,
-.eq-ie8 .adminhtml-cms-block-index .page-actions .add,
+.eq-ie8 .cms-page-index .page-actions .add,
+.eq-ie8 .cms-block-index .page-actions .add,
 .eq-ie8 .adminhtml-widget-instance-index .page-actions .add,
 .eq-ie8 .adminhtml-banner-index .page-actions .add,
 /* reports */
@@ -1026,7 +1035,8 @@ th.required:after {
 .eq-ie8 .adminhtml-user-index .page-actions .add,
 .eq-ie8 .adminhtml-user-role-index .page-actions .add,
 .eq-ie8 .tax-rule-index .page-actions .add,
-.eq-ie8 .tax-rate-index .page-actions .add {
+.eq-ie8 .tax-rate-index .page-actions .add,
+.eq-ie8 .adminhtml-integration-index .page-actions .add {
     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f58228', endColorstr='#f3731c',GradientType=0 );
 }
 
@@ -1034,7 +1044,7 @@ th.required:after {
 .adminhtml-rma-index .page-actions .add:hover,
 .adminhtml-giftwrapping-index .page-actions .add:hover,
 .adminhtml-rma-item-attribute-index .page-actions .add:hover,
-.adminhtml-checkout-agreement-index .page-actions .add:hover,
+.checkout-agreement-index .page-actions .add:hover,
 /* catalog */
 .catalog-product-index .page-actions .btn-round > .action-default:hover,
 .adminhtml-catalog-event-index .page-actions .add:hover,
@@ -1049,24 +1059,25 @@ th.required:after {
 .adminhtml-googleshopping-types-index .page-actions .add:hover,
 .adminhtml-sitemap-index .page-actions .add:hover,
 /* customers */
-.adminhtml-customer-index .page-actions .add:hover,
+.customer-index-index .page-actions .add:hover,
 .adminhtml-customer-attribute-index .page-actions .add:hover,
 .adminhtml-customer-address-attribute-index .page-actions .add:hover,
-.adminhtml-customer-group-index .page-actions .add:hover,
+.customer-group-index .page-actions .add:hover,
 .adminhtml-customersegment-index .page-actions .add:hover,
 .adminhtml-reward-rate-index .page-actions .add:hover,
 .adminhtml-giftcardaccount-index .page-actions .add:hover,
 .adminhtml-giftregistry-index .page-actions .add:hover,
 .adminhtml-invitation-index .page-actions .add:hover,
 /* promotions */
-.adminhtml-promo-catalog-index .page-actions .add:hover,
-.adminhtml-promo-quote-index .page-actions .add:hover,
+.catalog-rule-promo-catalog-index .page-actions .add:hover,
+.sales-rule-promo-quote-index .page-actions .add:hover,
 .adminhtml-reminder-index .page-actions .add:hover,
 /* newsletter */
 .adminhtml-newsletter-template-index .page-actions .add:hover,
 /* cms */
 .adminhtml-cms-page-index .page-actions .add:hover,
-.adminhtml-cms-block-index .page-actions .add:hover,
+.cms-page-index .page-actions .add:hover,
+.cms-block-index .page-actions .add:hover,
 .adminhtml-widget-instance-index .page-actions .add:hover,
 .adminhtml-banner-index .page-actions .add:hover,
 /* reports */
@@ -1080,7 +1091,8 @@ th.required:after {
 .adminhtml-user-index .page-actions .add:hover,
 .adminhtml-user-role-index .page-actions .add:hover,
 .tax-rule-index .page-actions .add:hover,
-.tax-rate-index .page-actions .add:hover {
+.tax-rate-index .page-actions .add:hover,
+.adminhtml-integration-index .page-actions .add:hover {
     border: 1px solid #e4731c;
     background: #e47821;
     background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U0NzgyMSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkZjY4MTciIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
@@ -1096,7 +1108,7 @@ th.required:after {
 .eq-ie8 .adminhtml-rma-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-giftwrapping-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-rma-item-attribute-index .page-actions .add:hover,
-.eq-ie8 .adminhtml-checkout-agreement-index .page-actions .add:hover,
+.eq-ie8 .checkout-agreement-index .page-actions .add:hover,
 /* catalog */
 .eq-ie8 .catalog-product-index .page-actions .btn-round > .action-default:hover,
 .eq-ie8 .adminhtml-catalog-event-index .page-actions .add:hover,
@@ -1111,24 +1123,24 @@ th.required:after {
 .eq-ie8 .adminhtml-googleshopping-types-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-sitemap-index .page-actions .add:hover,
 /* customers */
-.eq-ie8 .adminhtml-customer-index .page-actions .add:hover,
+.eq-ie8 .customer-index-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-customer-attribute-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-customer-address-attribute-index .page-actions .add:hover,
-.eq-ie8 .adminhtml-customer-group-index .page-actions .add:hover,
+.eq-ie8 .customer-group-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-customersegment-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-reward-rate-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-giftcardaccount-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-giftregistry-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-invitation-index .page-actions .add:hover,
 /* promotions */
-.eq-ie8 .adminhtml-promo-catalog-index .page-actions .add:hover,
-.eq-ie8 .adminhtml-promo-quote-index .page-actions .add:hover,
+.eq-ie8 .catalog-rule-promo-catalog-index .page-actions .add:hover,
+.eq-ie8 .sales-rule-promo-quote-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-reminder-index .page-actions .add:hover,
 /* newsletter */
 .eq-ie8 .adminhtml-newsletter-template-index .page-actions .add:hover,
 /* cms */
-.eq-ie8 .adminhtml-cms-page-index .page-actions .add:hover,
-.eq-ie8 .adminhtml-cms-block-index .page-actions .add:hover,
+.eq-ie8 .cms-page-index .page-actions .add:hover,
+.eq-ie8 .cms-block-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-widget-instance-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-banner-index .page-actions .add:hover,
 /* reports */
@@ -1142,7 +1154,8 @@ th.required:after {
 .eq-ie8 .adminhtml-user-index .page-actions .add:hover,
 .eq-ie8 .adminhtml-user-role-index .page-actions .add:hover,
 .eq-ie8 .tax-rule-index .page-actions .add:hover,
-.eq-ie8 .tax-rate-index .page-actions .add:hover {
+.eq-ie8 .tax-rate-index .page-actions .add:hover,
+.eq-ie8 .adminhtml-integration-index .page-actions .add:hover {
     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e47821', endColorstr='#df6817',GradientType=0 );
 }
 
@@ -1150,7 +1163,7 @@ th.required:after {
 .adminhtml-rma-index .page-actions .add:active,
 .adminhtml-giftwrapping-index .page-actions .add:active,
 .adminhtml-rma-item-attribute-index .page-actions .add:active,
-.adminhtml-checkout-agreement-index .page-actions .add:active,
+.checkout-agreement-index .page-actions .add:active,
 /* catalog */
 .catalog-product-index .page-actions .btn-round > .action-default:active,
 .adminhtml-catalog-event-index .page-actions .add:active,
@@ -1165,24 +1178,25 @@ th.required:after {
 .adminhtml-googleshopping-types-index .page-actions .add:active,
 .adminhtml-sitemap-index .page-actions .add:active,
 /* customers */
-.adminhtml-customer-index .page-actions .add:active,
+.customer-index-index .page-actions .add:active,
 .adminhtml-customer-attribute-index .page-actions .add:active,
 .adminhtml-customer-address-attribute-index .page-actions .add:active,
-.adminhtml-customer-group-index .page-actions .add:active,
+.customer-group-index .page-actions .add:active,
 .adminhtml-customersegment-index .page-actions .add:active,
 .adminhtml-reward-rate-index .page-actions .add:active,
 .adminhtml-giftcardaccount-index .page-actions .add:active,
 .adminhtml-giftregistry-index .page-actions .add:active,
 .adminhtml-invitation-index .page-actions .add:active,
 /* promotions */
-.adminhtml-promo-catalog-index .page-actions .add:active,
-.adminhtml-promo-quote-index .page-actions .add:active,
+.catalog-rule-promo-catalog-index .page-actions .add:active,
+.sales-rule-promo-quote-index .page-actions .add:active,
 .adminhtml-reminder-index .page-actions .add:active,
 /* newsletter */
 .adminhtml-newsletter-template-index .page-actions .add:active,
 /* cms */
 .adminhtml-cms-page-index .page-actions .add:active,
-.adminhtml-cms-block-index .page-actions .add:active,
+.cms-page-index .page-actions .add:active,
+.cms-block-index .page-actions .add:active,
 .adminhtml-widget-instance-index .page-actions .add:active,
 .adminhtml-banner-index .page-actions .add:active,
 /* reports */
@@ -1196,7 +1210,8 @@ th.required:after {
 .adminhtml-user-index .page-actions .add:active,
 .adminhtml-user-role-index .page-actions .add:active,
 .tax-rule-index .page-actions .add:active,
-.tax-rate-index .page-actions .add:active {
+.tax-rate-index .page-actions .add:active,
+.adminhtml-integration-index .page-actions .add:active  {
     background: #e2701av;
     -webkit-box-shadow: inset 0px 1px 1px 1px rgba(185, 90, 19, 1);
     box-shadow: inset 0px 1px 1px 1px rgba(185, 90, 19, 1);
@@ -1208,7 +1223,7 @@ th.required:after {
 .adminhtml-rma-index .page-actions .add > span,
 .adminhtml-rma-item-attribute-index .page-actions .add > span,
 .adminhtml-giftwrapping-index .page-actions .add > span,
-.adminhtml-checkout-agreement-index .page-actions .add > span,
+.checkout-agreement-index .page-actions .add > span,
 /* catalog */
 .catalog-product-index .page-actions .btn-round > .action-default > span,
 .adminhtml-catalog-event-index .page-actions .add > span,
@@ -1223,24 +1238,25 @@ th.required:after {
 .adminhtml-googleshopping-types-index .page-actions .add > span,
 .adminhtml-sitemap-index .page-actions .add > span,
 /* customers */
-.adminhtml-customer-index .page-actions .add > span,
+.customer-index-index .page-actions .add > span,
 .adminhtml-customer-attribute-index .page-actions .add > span,
 .adminhtml-customer-address-attribute-index .page-actions .add > span,
-.adminhtml-customer-group-index .page-actions .add > span,
+.customer-group-index .page-actions .add > span,
 .adminhtml-customersegment-index .page-actions .add > span,
 .adminhtml-reward-rate-index .page-actions .add > span,
 .adminhtml-giftcardaccount-index .page-actions .add > span,
 .adminhtml-giftregistry-index .page-actions .add > span,
 .adminhtml-invitation-index .page-actions .add > span,
 /* promotions */
-.adminhtml-promo-catalog-index .page-actions .add > span,
-.adminhtml-promo-quote-index .page-actions .add > span,
+.catalog-rule-promo-catalog-index .page-actions .add > span,
+.sales-rule-promo-quote-index .page-actions .add > span,
 .adminhtml-reminder-index .page-actions .add > span,
 /* newsletter */
 .adminhtml-newsletter-template-index .page-actions .add > span,
 /* cms */
 .adminhtml-cms-page-index .page-actions .add > span,
-.adminhtml-cms-block-index .page-actions .add > span,
+.cms-page-index .page-actions .add > span,
+.cms-block-index .page-actions .add > span,
 .adminhtml-widget-instance-index .page-actions .add > span,
 .adminhtml-banner-index .page-actions .add > span,
 /* reports */
@@ -1254,7 +1270,8 @@ th.required:after {
 .adminhtml-user-index .page-actions .add > span,
 .adminhtml-user-role-index .page-actions .add > span,
 .tax-rule-index .page-actions .add > span,
-.tax-rate-index .page-actions .add > span {
+.tax-rate-index .page-actions .add > span,
+.adminhtml-integration-index .page-actions .add > span {
     text-indent: -999em;
     display: block;
     width: 32px;
@@ -1265,7 +1282,7 @@ th.required:after {
 .adminhtml-rma-index .page-actions .add > span:before,
 .adminhtml-giftwrapping-index .page-actions .add > span:before,
 .adminhtml-rma-item-attribute-index .page-actions .add > span:before,
-.adminhtml-checkout-agreement-index .page-actions .add > span:before,
+.checkout-agreement-index .page-actions .add > span:before,
 /* catalog */
 .catalog-product-index .page-actions .btn-round > .action-default > span:before,
 .adminhtml-catalog-event-index .page-actions .add > span:before,
@@ -1280,24 +1297,25 @@ th.required:after {
 .adminhtml-googleshopping-types-index .page-actions .add > span:before,
 .adminhtml-sitemap-index .page-actions .add > span:before,
 /* customers */
-.adminhtml-customer-index .page-actions .add > span:before,
+.customer-index-index .page-actions .add > span:before,
 .adminhtml-customer-attribute-index .page-actions .add > span:before,
 .adminhtml-customer-address-attribute-index .page-actions .add > span:before,
-.adminhtml-customer-group-index .page-actions .add > span:before,
+.customer-group-index .page-actions .add > span:before,
 .adminhtml-customersegment-index .page-actions .add > span:before,
 .adminhtml-reward-rate-index .page-actions .add > span:before,
 .adminhtml-giftcardaccount-index .page-actions .add > span:before,
 .adminhtml-giftregistry-index .page-actions .add > span:before,
 .adminhtml-invitation-index .page-actions .add > span:before,
 /* promotions */
-.adminhtml-promo-catalog-index .page-actions .add > span:before,
-.adminhtml-promo-quote-index .page-actions .add > span:before,
+.catalog-rule-promo-catalog-index .page-actions .add > span:before,
+.sales-rule-promo-quote-index .page-actions .add > span:before,
 .adminhtml-reminder-index .page-actions .add > span:before,
 /* newsletter */
 .adminhtml-newsletter-template-index .page-actions .add > span:before,
 /* cms */
 .adminhtml-cms-page-index .page-actions .add > span:before,
-.adminhtml-cms-block-index .page-actions .add > span:before,
+.cms-page-index .page-actions .add > span:before,
+.cms-block-index .page-actions .add > span:before,
 .adminhtml-widget-instance-index .page-actions .add > span:before,
 .adminhtml-banner-index .page-actions .add > span:before,
 /* reports */
@@ -1311,7 +1329,8 @@ th.required:after {
 .adminhtml-user-index .page-actions .add > span:before,
 .adminhtml-user-role-index .page-actions .add > span:before,
 .tax-rule-index .page-actions .add > span:before,
-.tax-rate-index .page-actions .add > span:before {
+.tax-rate-index .page-actions .add > span:before,
+.adminhtml-integration-index .page-actions .add > span:before {
     text-indent: 0;
     font-family: 'MUI-Icons';
     font-weight: normal;
@@ -1431,7 +1450,7 @@ th.required:after {
 .adminhtml-rma-index .grid-actions,
 .adminhtml-giftwrapping-index .grid-actions,
 .adminhtml-rma-item-attribute-index .grid-actions,
-.adminhtml-checkout-agreement-index .grid-actions,
+.checkout-agreement-index .grid-actions,
 /* catalog */
 .catalog-product-index .grid-actions,
 .adminhtml-catalog-event-index .grid-actions,
@@ -1446,24 +1465,25 @@ th.required:after {
 .adminhtml-googleshopping-types-index .grid-actions,
 .adminhtml-sitemap-index .grid-actions,
 /* customers */
-.adminhtml-customer-index .grid-actions,
+.customer-index-index .grid-actions,
 .adminhtml-customer-attribute-index .grid-actions,
 .adminhtml-customer-address-attribute-index .grid-actions,
-.adminhtml-customer-group-index .grid-actions,
+.customer-group-index .grid-actions,
 .adminhtml-customersegment-index .grid-actions,
 .adminhtml-reward-rate-index .grid-actions,
 .adminhtml-giftcardaccount-index .grid-actions,
 .adminhtml-giftregistry-index .grid-actions,
 .adminhtml-invitation-index .grid-actions,
 /* promotions */
-.adminhtml-promo-catalog-index .grid-actions,
-.adminhtml-promo-quote-index .grid-actions,
+.catalog-rule-promo-catalog-index .grid-actions,
+.sales-rule-promo-quote-index .grid-actions,
 .adminhtml-reminder-index .grid-actions,
 /* newsletter */
 .adminhtml-newsletter-template-index .grid-actions,
 /* cms */
 .adminhtml-cms-page-index .grid-actions,
-.adminhtml-cms-block-index .grid-actions,
+.cms-page-index .grid-actions,
+.cms-block-index .grid-actions,
 .adminhtml-widget-instance-index .grid-actions,
 .adminhtml-banner-index .grid-actions,
 /* reports */
@@ -1477,7 +1497,8 @@ th.required:after {
 .adminhtml-user-index .grid-actions,
 .adminhtml-user-role-index .grid-actions,
 .tax-rule-index .grid-actions,
-.tax-rate-index .grid-actions {
+.tax-rate-index .grid-actions,
+.adminhtml-integration-index .grid-actions {
     border-radius: 5px 5px 0 0;
     margin-top: 20px;
     padding-left: 100px;
@@ -1537,11 +1558,11 @@ th.required:after {
     padding-left: 80px;
 }
 
-.adminhtml-promo-catalog-index .grid-actions {
+.catalog-rule-promo-catalog-index .grid-actions {
     padding-left: 210px;
 }
 
-.adminhtml-promo-catalog-index .page-actions .apply {
+.catalog-rule-promo-catalog-index .page-actions .apply {
     float: right;
     margin: 3px 0 0 10px;
 }
diff --git a/app/design/adminhtml/magento_backend/css/pages.css b/app/design/adminhtml/magento_backend/css/pages.css
index 9a7c6b0d09a..fd1fd798dd8 100644
--- a/app/design/adminhtml/magento_backend/css/pages.css
+++ b/app/design/adminhtml/magento_backend/css/pages.css
@@ -1854,7 +1854,7 @@
 }
 
 .adminhtml-giftwrapping-index .col-id,
-.adminhtml-checkout-agreement-index .col-id,
+.checkout-agreement-index .col-id,
 [class^=" sales-billing-"] .col-id,
 [class^=" sales-transactions-"] .col-id {
     width: 35px;
@@ -1879,7 +1879,7 @@
 [class^=" adminhtml-rma-"] .col-required,
 [class^=" adminhtml-rma-"] .col-system,
 [class^=" adminhtml-rma-"] .col-visible-on-front,
-.adminhtml-checkout-agreement-index .col-status,
+.checkout-agreement-index .col-status,
 .adminhtml-rma-item-attribute-edit .col-position {
     text-align: right;
     white-space: nowrap;
@@ -1984,7 +1984,7 @@
 }
 
 .adminhtml-giftwrapping-index .col-websites,
-.adminhtml-checkout-agreement-index .col-store-view {
+.checkout-agreement-index .col-store-view {
     white-space: nowrap;
     width: 200px;
 }
diff --git a/app/design/frontend/magento_backup/Magento_Paypal/express/shortcut.phtml b/app/design/frontend/magento_backup/Magento_Paypal/express/shortcut.phtml
index e79714b90dc..8db827ddaa7 100644
--- a/app/design/frontend/magento_backup/Magento_Paypal/express/shortcut.phtml
+++ b/app/design/frontend/magento_backup/Magento_Paypal/express/shortcut.phtml
@@ -56,7 +56,7 @@
                 "<?php echo $this->getViewFileUrl('Magento_Paypal::js/paypal-checkout.js') ?>",
                 function() {
                     $('.paypal-logo').paypalCheckout({
-                        confirmMessage: "<?php echo $this->helper('Magento\Core\Helper\Data')->jsQuoteEscape($this->getConfirmationMessage())?>",
+                        confirmMessage: "<?php echo $this->escapeJsQuote($this->getConfirmationMessage())?>",
                         confirmUrl: "<?php echo !empty($confirmationUrl) ? $confirmationUrl : false ?>",
                         isCatalogProduct: "<?php echo !empty($isInCatalogProduct) ? $isInCatalogProduct : false ?>",
                         paypalCheckoutSelector: '#pp-checkout-url',
diff --git a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_express_review_details.xml b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_express_review_details.xml
index 6de51a8c3a0..f340c628704 100644
--- a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_express_review_details.xml
+++ b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_express_review_details.xml
@@ -24,7 +24,7 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Paypal\Block\Express\Review\Details" output="1" name="paypal.express.review.details" template="express/review/details.phtml">
+    <block class="Magento\Paypal\Block\Express\Review\Details" output="1" name="root" template="express/review/details.phtml">
         <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="onepage/review/item.phtml"/>
         <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="onepage/review/item.phtml"/>
         <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="onepage/review/item.phtml"/>
diff --git a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_hostedpro_cancel.xml b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_hostedpro_cancel.xml
index bcdd5b3d58a..e40967effa8 100644
--- a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_hostedpro_cancel.xml
+++ b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_hostedpro_cancel.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Hosted Pro Frame" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Hosted\Pro\Iframe" name="hosted.pro.iframe" template="hss/redirect.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Hosted\Pro\Iframe" name="hosted.pro.iframe" output="1" template="hss/redirect.phtml"/>
 </layout>
diff --git a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_cancelpayment.xml b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_cancelpayment.xml
index 9b96ede33cb..2d6206809a4 100644
--- a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_cancelpayment.xml
+++ b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_cancelpayment.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Cancel Payment" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe" template="payflowlink/redirect.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe" output="1" template="payflowlink/redirect.phtml"/>
 </layout>
diff --git a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_form.xml b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_form.xml
index 47df5abbee0..c8a142b6b66 100644
--- a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_form.xml
+++ b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_form.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Form" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe" template="payflowlink/form.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe" output="1" template="payflowlink/form.phtml"/>
 </layout>
diff --git a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_returnurl.xml b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_returnurl.xml
index 817f34824aa..2dbd4cc55ec 100644
--- a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_returnurl.xml
+++ b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflow_returnurl.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Return URL" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe" template="payflowlink/redirect.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Link\Iframe" name="payflow.link.iframe" output="1" template="payflowlink/redirect.phtml"/>
 </layout>
diff --git a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_cancelpayment.xml b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_cancelpayment.xml
index ec688ce2f1c..b0bd45e7527 100644
--- a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_cancelpayment.xml
+++ b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_cancelpayment.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Advanced Cancel Payment" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe" template="payflowadvanced/redirect.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe" output="1" template="payflowadvanced/redirect.phtml"/>
 </layout>
diff --git a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_form.xml b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_form.xml
index 20dc05ce077..5f48316a8c4 100644
--- a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_form.xml
+++ b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_form.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Advanced Form" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe" template="payflowadvanced/form.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe" output="1" template="payflowadvanced/form.phtml"/>
 </layout>
diff --git a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_returnurl.xml b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_returnurl.xml
index fcf21c97f04..69c7a612956 100644
--- a/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_returnurl.xml
+++ b/app/design/frontend/magento_backup/Magento_Paypal/layout/override/paypal_payflowadvanced_returnurl.xml
@@ -24,7 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Paypal Payflow Advanced Return URL" type="page">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe" template="payflowadvanced/redirect.phtml"/>
-    </block>
+    <block class="Magento\Paypal\Block\Payflow\Advanced\Iframe" name="payflow.advanced.iframe" output="1" template="payflowadvanced/redirect.phtml"/>
 </layout>
diff --git a/app/design/frontend/magento_backup/Magento_PaypalUk/layput/override/paypal_express_review_details.xml b/app/design/frontend/magento_backup/Magento_PaypalUk/layput/override/paypal_express_review_details.xml
index e60382310ed..2ac04b323fb 100644
--- a/app/design/frontend/magento_backup/Magento_PaypalUk/layput/override/paypal_express_review_details.xml
+++ b/app/design/frontend/magento_backup/Magento_PaypalUk/layput/override/paypal_express_review_details.xml
@@ -24,12 +24,10 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml">
-        <block class="Magento\Paypal\Block\Express\Review\Details" name="paypal.express.review.details" template="express/review/details.phtml">
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="onepage/review/item.phtml"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="onepage/review/item.phtml"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="onepage/review/item.phtml"/>
-            <block class="Magento\Checkout\Block\Cart\Totals" name="paypal.express.review.details.totals" as="totals" template="onepage/review/totals.phtml"/>
-        </block>
+    <block class="Magento\Paypal\Block\Express\Review\Details" name="root" output="1" template="express/review/details.phtml">
+        <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="onepage/review/item.phtml"/>
+        <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="onepage/review/item.phtml"/>
+        <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="onepage/review/item.phtml"/>
+        <block class="Magento\Checkout\Block\Cart\Totals" name="paypal.express.review.details.totals" as="totals" template="onepage/review/totals.phtml"/>
     </block>
 </layout>
diff --git a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_billing_agreement_index.xml b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_billing_agreement_index.xml
index 70ae62068e2..0eb79578e40 100644
--- a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_billing_agreement_index.xml
+++ b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_billing_agreement_index.xml
@@ -23,7 +23,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Billing Agreement" type="page" parent="customer_account_index">
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Billing Agreement" type="page">
     <update handle="customer_account"/>
     <referenceBlock name="root">
         <action method="setTemplate">
diff --git a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_billing_agreement_view.xml b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_billing_agreement_view.xml
index 038fd3576a1..9093b370404 100644
--- a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_billing_agreement_view.xml
+++ b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_billing_agreement_view.xml
@@ -23,7 +23,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Billing Agreement View" type="page" parent="sales_billing_agreement_index">
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Billing Agreement View" type="page">
     <update handle="customer_account"/>
     <referenceBlock name="root">
         <action method="setTemplate">
diff --git a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_guest_printorder.xml b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_guest_printorder.xml
index 5a1ff2d5430..76c4e6475af 100644
--- a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_guest_printorder.xml
+++ b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_guest_printorder.xml
@@ -23,7 +23,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Sales Order Print View" type="page" parent="print">
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Sales Order Print View" type="page">
     <referenceContainer name="content">
         <block class="Magento\Sales\Block\Order\PrintShipment" name="sales.order.print" template="order/print.phtml">
             <block class="Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer" as="default" template="order/items/renderer/default.phtml"/>
diff --git a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_index.xml b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_index.xml
index 36d4758c9a0..57be56d1936 100644
--- a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_index.xml
+++ b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_index.xml
@@ -23,7 +23,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Recurring Profile" type="page" parent="customer_account_index">
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Recurring Profile" type="page">
     <update handle="customer_account"/>
     <referenceBlock name="root">
         <action method="setTemplate">
diff --git a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_orders.xml b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_orders.xml
index 7172f01d739..f4266eab8ed 100644
--- a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_orders.xml
+++ b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_orders.xml
@@ -23,7 +23,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Recurring Profile Orders List" type="page" parent="sales_recurring_profile_view__tabs">
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Recurring Profile Orders List" type="page">
     <update handle="customer_account"/>
     <update handle="sales_recurring_profile_view__tabs"/>
     <referenceBlock name="sales.recurring.profile.view.tab.orders">
diff --git a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view.xml b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view.xml
index ee5837b43e6..816ad80e9be 100644
--- a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view.xml
+++ b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view.xml
@@ -23,7 +23,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Recurring Profile View" type="page" parent="sales_recurring_profile_view__tabs">
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Recurring Profile View" type="page">
     <update handle="customer_account"/>
     <update handle="sales_recurring_profile_view__tabs"/>
     <referenceBlock name="sales.recurring.profile.view.tab.profile">
diff --git a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view__tabs.xml b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view__tabs.xml
index 4110ed7fbf7..6900e63f006 100644
--- a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view__tabs.xml
+++ b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view__tabs.xml
@@ -23,7 +23,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Recurring Profile View Tabs" type="page" parent="sales_recurring_profile_index">
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Recurring Profile View Tabs" type="page">
     <referenceBlock name="root">
         <action method="setTemplate">
             <argument name="template" xsi:type="string">2columns-left.phtml</argument>
diff --git a/app/design/frontend/magento_backup/Magento_Sales/order/creditmemo/items/renderer/default.phtml b/app/design/frontend/magento_backup/Magento_Sales/order/creditmemo/items/renderer/default.phtml
index 5f717e6a19a..d771a7efa8b 100644
--- a/app/design/frontend/magento_backup/Magento_Sales/order/creditmemo/items/renderer/default.phtml
+++ b/app/design/frontend/magento_backup/Magento_Sales/order/creditmemo/items/renderer/default.phtml
@@ -59,7 +59,7 @@
             <a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" aria-controls="order-item-gift-message-<?php echo $_item->getId()?>" data-item-id="<?php echo $_item->getId()?>"><?php echo __('Gift Message') ?></a>
         <?php endif; ?>
     </td>
-    <td><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="a-right">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
             <span class="price-excl-tax">
diff --git a/app/design/frontend/magento_backup/Magento_Sales/order/invoice/items/renderer/default.phtml b/app/design/frontend/magento_backup/Magento_Sales/order/invoice/items/renderer/default.phtml
index c07b48bc77c..45313d94633 100644
--- a/app/design/frontend/magento_backup/Magento_Sales/order/invoice/items/renderer/default.phtml
+++ b/app/design/frontend/magento_backup/Magento_Sales/order/invoice/items/renderer/default.phtml
@@ -60,7 +60,7 @@
             <a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" aria-controls="order-item-gift-message-<?php echo $_item->getId()?>" data-item-id="<?php echo $_item->getId()?>"><?php echo __('Gift Message') ?></a>
         <?php endif; ?>
     </td>
-    <td><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="a-right">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
             <span class="price-excl-tax">
@@ -87,7 +87,7 @@
 
                 </span>
 
-
+            
                 <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($this->getItem())): ?>
 
                     <span class="cart-tax-info" id="eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
diff --git a/app/design/frontend/magento_backup/Magento_Sales/order/items/renderer/default.phtml b/app/design/frontend/magento_backup/Magento_Sales/order/items/renderer/default.phtml
index f527029e49e..8b96cbcb9fe 100644
--- a/app/design/frontend/magento_backup/Magento_Sales/order/items/renderer/default.phtml
+++ b/app/design/frontend/magento_backup/Magento_Sales/order/items/renderer/default.phtml
@@ -61,7 +61,7 @@
             <a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" aria-controls="order-item-gift-message-<?php echo $_item->getId()?>" data-item-id="<?php echo $_item->getId()?>"><?php echo __('Gift Message') ?></a>
         <?php endif; ?>
     </td>
-    <td><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="a-right">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
             <span class="price-excl-tax">
diff --git a/app/design/frontend/magento_plushe/Magento_Bundle/sales/order/items/renderer.phtml b/app/design/frontend/magento_plushe/Magento_Bundle/sales/order/items/renderer.phtml
index 3692830fff3..45b77530802 100644
--- a/app/design/frontend/magento_plushe/Magento_Bundle/sales/order/items/renderer.phtml
+++ b/app/design/frontend/magento_plushe/Magento_Bundle/sales/order/items/renderer.phtml
@@ -23,6 +23,8 @@
  * @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)
  */
+
+/** @var $this \Magento\Bundle\Block\Sales\Order\Items\Renderer */
 ?>
 <?php $parentItem = $this->getItem() ?>
 <?php $items = array_merge(array($parentItem), $parentItem->getChildrenItems()); ?>
@@ -56,7 +58,7 @@
     <?php else: ?>
         <td class="col value"><div class="option value"><?php echo $this->getValueHtml($_item)?></div></td>
     <?php endif; ?>
-    <td class="col sku"><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($_item->getSku())) ?></td>
+    <td class="col sku"><?php echo $this->prepareSku($_item->getSku()) ?></td>
     <td class="col price">
         <?php if (!$_item->getParentItem()): ?>
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
diff --git a/app/design/frontend/magento_plushe/Magento_Catalog/product/view/base-image.phtml b/app/design/frontend/magento_plushe/Magento_Catalog/product/view/base-image.phtml
index a46a1b61be1..e8ab0f4616b 100644
--- a/app/design/frontend/magento_plushe/Magento_Catalog/product/view/base-image.phtml
+++ b/app/design/frontend/magento_plushe/Magento_Catalog/product/view/base-image.phtml
@@ -75,8 +75,8 @@
                     swapNotices: false,
                     isOldMode: <?php print $_isOldDisplayMode; ?>,
                     messages: {
-                        noticeDefault: '<?php echo $this->jsQuoteEscape(__("Click on image to zoom")) ?>',
-                        loadingMessage: '<?php echo $this->jsQuoteEscape(__("Loading...")) ?>'
+                        noticeDefault: '<?php echo $this->escapeJsQuote(__("Click on image to zoom")) ?>',
+                        loadingMessage: '<?php echo $this->escapeJsQuote(__("Loading...")) ?>'
                     }
                 });
             <?php else: ?>
@@ -91,8 +91,8 @@
                     swapNotices: true,
                     isOldMode: <?php print $_isOldDisplayMode; ?>,
                     messages: {
-                        noticeDefault: '<?php echo $this->jsQuoteEscape(__("Click on image to zoom")) ?>',
-                        noticeLightBox: '<?php echo $this->jsQuoteEscape(__("Click on image to view it full sized")) ?>', loadingMessage: '<?php echo $this->jsQuoteEscape(__("Loading...")) ?>'
+                        noticeDefault: '<?php echo $this->escapeJsQuote(__("Click on image to zoom")) ?>',
+                        noticeLightBox: '<?php echo $this->escapeJsQuote(__("Click on image to view it full sized")) ?>', loadingMessage: '<?php echo $this->escapeJsQuote(__("Loading...")) ?>'
                     }
                 });
             <?php endif; ?>
diff --git a/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml b/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml
index 65f32a6e195..6d2f675ae55 100644
--- a/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml
+++ b/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml
@@ -23,6 +23,8 @@
  * @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)
  */
+
+/** @var $this \Magento\Downloadable\Block\Sales\Order\Item\Renderer\Downloadable */
 ?>
 <?php $_item = $this->getItem() ?>
 <?php $_order = $this->getItem()->getOrderItem()->getOrder() ?>
@@ -72,7 +74,7 @@
             <a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" aria-controls="order-item-gift-message-<?php echo $_item->getId()?>" data-item-id="<?php echo $_item->getId()?>"><?php echo __('Gift Message') ?></a>
         <?php endif; ?>
     </td>
-    <td  class="col sku"><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td  class="col sku"><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="col price">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
             <span class="price-excl-tax">
diff --git a/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/invoice/items/renderer/downloadable.phtml b/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/invoice/items/renderer/downloadable.phtml
index cc6e3bad165..5df170eecb4 100644
--- a/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/invoice/items/renderer/downloadable.phtml
+++ b/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/invoice/items/renderer/downloadable.phtml
@@ -22,6 +22,8 @@
  * @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)
  */
+
+/** @var $this \Magento\Downloadable\Block\Sales\Order\Item\Renderer\Downloadable */
 ?>
 <?php $_item = $this->getItem() ?>
 <?php $_order = $this->getItem()->getOrderItem()->getOrder() ?>
@@ -70,7 +72,7 @@
             <a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" aria-controls="order-item-gift-message-<?php echo $_item->getId()?>" data-item-id="<?php echo $_item->getId()?>"><?php echo __('Gift Message') ?></a>
         <?php endif; ?>
     </td>
-    <td class="col sku"><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td class="col sku"><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="col price">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
             <span class="price-excl-tax">
diff --git a/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/items/renderer/downloadable.phtml b/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/items/renderer/downloadable.phtml
index 5b73ec009c1..8b0a06a9a83 100644
--- a/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/items/renderer/downloadable.phtml
+++ b/app/design/frontend/magento_plushe/Magento_Downloadable/sales/order/items/renderer/downloadable.phtml
@@ -22,6 +22,8 @@
  * @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)
  */
+
+/** @var $this \Magento\Downloadable\Block\Sales\Order\Item\Renderer\Downloadable */
 ?>
 <?php $_item = $this->getItem() ?>
 <tr id="order-item-row-<?php echo $_item->getId() ?>">
@@ -77,7 +79,7 @@
             </a>
         <?php endif; ?>
     </td>
-    <td class="col sku"><?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\String')->splitInjection($this->getSku())) ?></td>
+    <td class="col sku"><?php echo $this->prepareSku($this->getSku()) ?></td>
     <td class="col price">
         <?php if ($this->helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
             <span class="price-excl-tax">
diff --git a/app/design/frontend/magento_plushe/Magento_Sendfriend/send.phtml b/app/design/frontend/magento_plushe/Magento_Sendfriend/send.phtml
index 998017fe960..b4ee62ed58c 100644
--- a/app/design/frontend/magento_plushe/Magento_Sendfriend/send.phtml
+++ b/app/design/frontend/magento_plushe/Magento_Sendfriend/send.phtml
@@ -30,7 +30,7 @@
  */
 ?>
 <script id="add-recipient-tmpl" type="text/x-jQuery-tmpl">
-    <a href="delete_email"  id="btn-remove${_index_}" class="action delete" title="<?php echo $this->jsQuoteEscape(__('Remove Email')) ?>"><span><?php echo $this->jsQuoteEscape(__('Remove Email')) ?></span></a>
+    <a href="delete_email"  id="btn-remove${_index_}" class="action delete" title="<?php echo $this->escapeJsQuote(__('Remove Email')) ?>"><span><?php echo $this->escapeJsQuote(__('Remove Email')) ?></span></a>
 
     <div class="field name required">
         <label for="recipients-name${_index_}" class="label"><span><?php echo __('Name:')?></span></label>
diff --git a/app/design/frontend/magento_plushe/Magento_Wishlist/layout/override/base/wishlist_shared_index.xml b/app/design/frontend/magento_plushe/Magento_Wishlist/layout/override/base/wishlist_shared_index.xml
index 1e6bd663cc6..bfa717b7ee2 100644
--- a/app/design/frontend/magento_plushe/Magento_Wishlist/layout/override/base/wishlist_shared_index.xml
+++ b/app/design/frontend/magento_plushe/Magento_Wishlist/layout/override/base/wishlist_shared_index.xml
@@ -23,7 +23,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Customer Shared Wishlist View" type="page" parent="wishlist_index_share">
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Customer Shared Wishlist View" type="page">
     <referenceContainer name="content">
         <block class="Magento\Wishlist\Block\Share\Wishlist" name="customer.wishlist" template="shared.phtml"/>
     </referenceContainer>
diff --git a/app/design/frontend/magento_plushe/js/theme.js b/app/design/frontend/magento_plushe/js/theme.js
index d4a340719e9..81262c4b16f 100644
--- a/app/design/frontend/magento_plushe/js/theme.js
+++ b/app/design/frontend/magento_plushe/js/theme.js
@@ -29,9 +29,9 @@
         var list = $('[data-action="scroll"]').addClass('carousel');
         var listInner = $('> .minilist.items', list);
         var items = $('.item', list);
-        var itemWidth = $(items[0]).outerWidth();
-        var perpage = Math.floor(list.outerWidth()/itemWidth);
-        var pages = Math.floor(items.length/perpage);
+        var itemWidth = $(items).length ? $(items[0]).outerWidth() : null;
+        var perpage = (itemWidth !== null) ? Math.floor(list.outerWidth()/itemWidth) : null;
+        var pages = (perpage !== null) ? Math.floor(items.length/perpage) : null;
         var page=0;
         for (var i=0 ; i < perpage; i++) {
             $(items[i + page*perpage]).addClass('shown');
diff --git a/app/etc/config.xml b/app/etc/config.xml
deleted file mode 100644
index 4d18453dbad..00000000000
--- a/app/etc/config.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_Core
- * @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>
-    <default>
-        <system>
-            <filesystem>
-                <base>{{root_dir}}</base>
-                <app>{{root_dir}}/app</app>
-                <code>{{app_dir}}/code</code>
-                <design>{{app_dir}}/design</design>
-                <locale>{{app_dir}}/locale</locale>
-                <etc>{{app_dir}}/etc</etc>
-                <media>{{media_dir}}</media>
-                <upload>{{media_dir}}/upload</upload>
-                <var>{{var_dir}}</var>
-                <cache>{{var_dir}}/cache</cache>
-                <session>{{var_dir}}/session</session>
-                <tmp>{{var_dir}}/tmp</tmp>
-                <pear>{{var_dir}}/pear</pear>
-                <export>{{var_dir}}/export</export>
-            </filesystem>
-        </system>
-        <general>
-            <locale>
-                <code>en_US</code>
-                <timezone>America/Los_Angeles</timezone>
-            </locale>
-        </general>
-    </default>
-</config>
diff --git a/app/etc/di.xml b/app/etc/di.xml
index d4e183fa70c..82a9656a411 100644
--- a/app/etc/di.xml
+++ b/app/etc/di.xml
@@ -29,9 +29,9 @@
     <preference for="Magento\App\ResponseInterface" type="Magento\App\Response\Http" />
     <preference for="Magento\App\RouterListInterface" type="Magento\App\RouterList" />
     <preference for="Magento\App\FrontControllerInterface" type="Magento\App\FrontController" />
-    <preference for="Magento\App\UpdaterInterface" type="Magento\App\Updater" />
+    <preference for="Magento\Module\UpdaterInterface" type="Magento\Module\Updater" />
     <preference for="Magento\Core\Model\AppInterface" type="Magento\Core\Model\App\Proxy" />
-    <preference for="Magento\Core\Model\CacheInterface" type="Magento\Core\Model\Cache\Proxy" />
+    <preference for="Magento\App\CacheInterface" type="Magento\Core\Model\Cache\Proxy" />
     <preference for="Magento\Core\Model\Cache\StateInterface" type="Magento\Core\Model\Cache\State" />
     <preference for="Magento\Core\Model\Cache\TypeListInterface" type="Magento\Core\Model\Cache\TypeList" />
     <preference for="Magento\Core\Model\Store\ConfigInterface" type="Magento\Core\Model\Store\Config" />
@@ -45,48 +45,43 @@
     <preference for="Magento\Config\ScopeInterface" type="Magento\Config\Scope" />
     <preference for="Magento\Config\FileResolverInterface" type="Magento\Core\Model\Config\FileResolver" />
     <preference for="Magento\Config\CacheInterface" type="Magento\Core\Model\Cache\Type\Config" />
-    <preference for="Magento\Config\ValidationStateInterface" type="Magento\Core\Model\Config\ValidationState" />
-    <preference for="Magento\App\ModuleListInterface" type="Magento\App\ModuleList" />
+    <preference for="Magento\Config\ValidationStateInterface" type="Magento\App\Config\ValidationState" />
+    <preference for="Magento\Module\ModuleListInterface" type="Magento\Module\ModuleList" />
     <preference for="Magento\Event\ConfigInterface" type="Magento\Event\Config" />
     <preference for="Magento\Event\InvokerInterface" type="Magento\Event\Invoker\InvokerDefault" />
     <preference for="Magento\Interception\PluginList" type="Magento\Interception\PluginList\PluginList" />
     <preference for="Magento\Event\ManagerInterface" type="Magento\Event\Manager\Proxy" />
     <preference for="Magento\View\LayoutInterface" type="Magento\Core\Model\Layout" />
     <preference for="Magento\View\Layout\ProcessorInterface" type="Magento\Core\Model\Layout\Merge" />
+    <preference for="Magento\App\Route\ConfigInterface" type="Magento\App\Route\Config" />
+    <preference for="Magento\App\Resource\ConfigInterface" type="Magento\App\Resource\Config\Proxy" />
     <type name="Magento\View\Layout\Structure" shared="false" />
     <type name="Magento\View\BlockPool" shared="false" />
-    <type name="Magento\Data\Form\Factory">
-        <param name="session">
-            <instance type="Magento\Core\Model\Session" />
-        </param>
-    </type>
+    <preference for="Magento\Error\HandlerInterface" type="Magento\App\Error\Handler" />
     <type name="Magento\App\State">
         <param name="installDate">
             <value type="argument">Magento\App\State::PARAM_INSTALL_DATE</value>
         </param>
         <param name="mode">
-            <value type="argument">Magento\Core\Model\App::PARAM_MODE</value>
+            <value type="argument">Magento\App\State::PARAM_MODE</value>
         </param>
     </type>
-    <type name="Magento\Core\App\FrontController\Plugin\Install">
+    <type name="Magento\Module\FrontController\Plugin\Install">
         <param name="cache">
             <instance type="Magento\Core\Model\Cache\Type\Config" />
         </param>
     </type>
-    <type name="Magento\Core\Model\Config\ValidationState">
+    <type name="Magento\App\Config\ValidationState">
         <param name="appMode">
-            <value type="argument">Magento\Core\Model\App::PARAM_MODE</value>
+            <value type="argument">Magento\App\State::PARAM_MODE</value>
         </param>
     </type>
-    <type name="Magento\Core\Model\Config\Loader\Local">
+    <type name="Magento\App\Config\Loader">
         <param name="customFile">
-            <value type="argument">Magento\Core\Model\App::PARAM_CUSTOM_LOCAL_FILE</value>
-        </param>
-        <param name="customConfig">
-            <value type="argument">Magento\Core\Model\App::PARAM_CUSTOM_LOCAL_CONFIG</value>
+            <value type="argument">Magento\App\Config\Loader::PARAM_CUSTOM_FILE</value>
         </param>
     </type>
-    <type name="Magento\App\Module\Declaration\Reader\Filesystem">
+    <type name="Magento\Module\Declaration\Reader\Filesystem">
         <param name="allowedModules">
             <value type="argument">Magento\Core\Model\App::PARAM_ALLOWED_MODULES</value>
         </param>
@@ -95,6 +90,19 @@
         <param name="enforcedOptions">
             <value type="argument">Magento\Core\Model\App::PARAM_CACHE_OPTIONS</value>
         </param>
+        <param name="decorators">
+            <value>
+                <tag>
+                    <class>Magento\Cache\Frontend\Decorator\TagScope</class>
+                    <parameters>
+                        <tag>MAGE</tag>
+                    </parameters>
+                </tag>
+            </value>
+        </param>
+        <param name="resource">
+            <instance type="Magento\App\Resource\Proxy" />
+        </param>
     </type>
     <type name="Magento\Core\Model\Cache\State">
         <param name="banAll">
@@ -109,16 +117,6 @@
             <value type="argument">Magento\Core\Model\App::PARAM_RUN_TYPE</value>
         </param>
     </type>
-    <type name="Magento\Core\Model\Config">
-        <param name="storage">
-            <instance type="Magento\Core\Model\Config\Storage" />
-        </param>
-    </type>
-    <type name="Magento\Core\Model\Config\Storage">
-        <param name="loader">
-            <instance type="Magento\Core\Model\Config\Loader\Proxy" />
-        </param>
-    </type>
     <type name="Magento\Core\Model\Translate">
         <param name="cache">
             <instance type="Magento\Core\Model\Cache\Type\Translate" />
@@ -129,11 +127,6 @@
             <instance type="Magento\Core\Model\Config\Proxy" />
         </param>
     </type>
-    <type name="Magento\Core\Model\Store\StorageFactory">
-        <param name="config">
-            <instance type="Magento\Core\Model\Config\Proxy" />
-        </param>
-    </type>
     <type name="Magento\Filesystem" shared="false">
         <param name="adapter">
             <instance type="Magento\Filesystem\Adapter\Local" />
@@ -154,12 +147,12 @@
         </param>
     </type>
     <type name="Magento\Acl" shared="false" />
-    <type name="Magento\Core\Model\ObjectManager\ConfigLoader">
+    <type name="Magento\App\ObjectManager\ConfigLoader">
         <param name="cache">
             <instance type="Magento\Core\Model\Cache\Type\Config"/>
         </param>
     </type>
-    <type name="Magento\Core\Model\ObjectManager\ConfigCache">
+    <type name="Magento\App\ObjectManager\ConfigCache">
         <param name="cacheFrontend">
             <instance type="Magento\Core\Model\Cache\Type\Config"/>
         </param>
@@ -201,20 +194,30 @@
             </value>
         </param>
     </type>
-    <type name="Magento\Core\Model\Resource">
-        <param name="resourceConfig">
-            <instance type="Magento\Core\Model\Config\Resource\Primary" />
-        </param>
+    <type name="Magento\App\Resource">
         <param name="tablePrefix">
-            <value type="argument">Magento\Core\Model\Resource::PARAM_TABLE_PREFIX</value>
+            <value type="argument">Magento\App\Resource::PARAM_TABLE_PREFIX</value>
+        </param>
+    </type>
+    <type name="Magento\App\Resource\Config">
+        <param name="cache">
+            <instance type="Magento\Core\Model\Cache\Type\Config\Proxy" />
+        </param>
+        <param name="initialResources">
+            <value type="argument">Magento\App\Resource\Config::PARAM_INITIAL_RESOURCES</value>
+        </param>
+    </type>
+    <type name="Magento\App\Resource\Config\Reader">
+        <param name="fileResolver">
+            <instance type="Magento\Core\Model\Config\FileResolver\Proxy" />
         </param>
     </type>
     <type name="Magento\Config\Scope">
         <param name="defaultScope">
-            <value>global</value>
+            <value>primary</value>
         </param>
         <param name="areaList">
-            <instance type="Magento\App\AreaListProxy" />
+            <instance type="Magento\App\AreaList\Proxy" />
         </param>
     </type>
     <type name="Magento\Core\Model\Url">
@@ -222,4 +225,12 @@
             <instance type="Magento\Core\Model\Session\Proxy" />
         </param>
     </type>
+    <type name="Magento\HTTP\PhpEnvironment\RemoteAddress">
+        <param name="alternativeHeaders">
+            <value/>
+        </param>
+    </type>
+    <type name="Magento\App\FrontController">
+        <plugin name="install" type="Magento\Module\FrontController\Plugin\Install" sortOrder="40"/>
+    </type>
 </config>
diff --git a/app/functions.php b/app/functions.php
new file mode 100644
index 00000000000..65a6d4bbf14
--- /dev/null
+++ b/app/functions.php
@@ -0,0 +1,41 @@
+<?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)
+ */
+
+/**
+ * Create value-object \Magento\Phrase
+ *
+ * @return string
+ */
+function __()
+{
+    $argc = func_get_args();
+
+    /**
+     * Type casting to string is a workaround.
+     * Many places in client code at the moment are unable to handle the \Magento\Phrase object properly.
+     * The intended behavior is to use __toString(),
+     * so that rendering of the phrase happens only at the last moment when needed
+     */
+    return (string)new \Magento\Phrase(array_shift($argc), $argc);
+}
diff --git a/dev/shell/indexer.php b/dev/shell/indexer.php
index caeed2ca58e..6d44ec9c4ba 100644
--- a/dev/shell/indexer.php
+++ b/dev/shell/indexer.php
@@ -30,9 +30,7 @@ $params = array(
     \Magento\Core\Model\App::PARAM_RUN_TYPE => 'store',
 );
 
-$entryPoint = new \Magento\Index\Model\EntryPoint\Shell(
-    basename(__FILE__),
-    new \Magento\Index\Model\EntryPoint\Shell\ErrorHandler(),
-    new \Magento\Core\Model\Config\Primary(BP, $params)
-);
-$entryPoint->processRequest();
+$entryPoint = new \Magento\App\EntryPoint\EntryPoint(BP, $params);
+$entryPoint->run('Magento\Index\App\Shell', array(
+    'entryFileName' => basename(__FILE__),
+));
diff --git a/dev/shell/install.php b/dev/shell/install.php
index f5b9e477a42..51927377fc3 100644
--- a/dev/shell/install.php
+++ b/dev/shell/install.php
@@ -63,5 +63,5 @@ if (empty($args)) {
 define('BARE_BOOTSTRAP', 1);
 require_once __DIR__ . '/../../app/bootstrap.php';
 
-$entryPoint = new \Magento\Install\Model\EntryPoint\Console(BP, $args);
-$entryPoint->processRequest();
+$entryPoint = new \Magento\App\EntryPoint\EntryPoint(BP);
+$entryPoint->run('Magento\Install\App\Console', array('arguments' => $args));
\ No newline at end of file
diff --git a/dev/shell/log.php b/dev/shell/log.php
index dfc2472057a..598048971f9 100644
--- a/dev/shell/log.php
+++ b/dev/shell/log.php
@@ -29,8 +29,7 @@ $params = array(
     \Magento\Core\Model\App::PARAM_RUN_CODE => 'admin',
     \Magento\Core\Model\App::PARAM_RUN_TYPE => 'store',
 );
-$entryPoint = new \Magento\Log\Model\EntryPoint\Shell(
-    new \Magento\Core\Model\Config\Primary(BP, $params),
-    basename(__FILE__)
-);
-$entryPoint->processRequest();
+$entryPoint = new \Magento\App\EntryPoint\EntryPoint(BP, $params);
+$entryPoint->run('Magento\Log\App\Shell', array(
+    'entryFileName' => basename(__FILE__),
+));
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Annotation/AppArea.php b/dev/tests/integration/framework/Magento/TestFramework/Annotation/AppArea.php
index 3b988e23d57..3cbe13ca4c1 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Annotation/AppArea.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Annotation/AppArea.php
@@ -39,7 +39,7 @@ class AppArea
      */
     private $_allowedAreas = array(
         \Magento\Core\Model\App\Area::AREA_GLOBAL,
-        \Magento\Core\Model\App\Area::AREA_ADMINHTML,
+        \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE,
         \Magento\Core\Model\App\Area::AREA_FRONTEND,
         'install',
         'webapi_rest',
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php b/dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php
index aaa4d3f7bd0..18707d42440 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php
@@ -63,19 +63,12 @@ class ConfigFixture
     protected function _getConfigValue($configPath, $storeCode = false)
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-
-        if ($storeCode === false) {
-            /** @var \Magento\Core\Model\Config $configModel */
-            $configModel = $objectManager->get('Magento\Core\Model\Config');
-            $result = $configModel->getNode($configPath);
-        } else {
+        $result = null;
+        if ($storeCode !== false) {
             /** @var \Magento\Core\Model\Store\Config $storeConfig */
             $storeConfig = $objectManager->get('Magento\Core\Model\Store\Config');
             $result = $storeConfig->getConfig($configPath, $storeCode);
         }
-        if ($result instanceof \SimpleXMLElement) {
-            $result = (string)$result;
-        }
         return $result;
     }
 
@@ -90,17 +83,9 @@ class ConfigFixture
     {
         if ($storeCode === false) {
             $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-            /** @var $configModel \Magento\Core\Model\Config */
-            $configModel = $objectManager->get('Magento\Core\Model\Config');
-            // @todo refactor this method when all types of configuration are represented by array
             if (strpos($configPath, 'default/') === 0) {
                 $configPath = substr($configPath, 8);
-                $configModel->setValue($configPath, $value);
                 $objectManager->get('Magento\Core\Model\Config')->setValue($configPath, $value);
-            } else {
-                $configModel->setNode($configPath, $value);
-                $objectManager->get('Magento\Core\Model\Config')->setNode($configPath, $value);
-                $objectManager->get('Magento\Core\Model\Config\Primary')->setNode($configPath, $value);
             }
         } else {
             \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\StoreManagerInterface')
diff --git a/dev/tests/integration/framework/Magento/TestFramework/App.php b/dev/tests/integration/framework/Magento/TestFramework/App.php
new file mode 100644
index 00000000000..836507d441b
--- /dev/null
+++ b/dev/tests/integration/framework/Magento/TestFramework/App.php
@@ -0,0 +1,41 @@
+<?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
+ * @subpackage  integration_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\TestFramework;
+
+/**
+ * App class for integration test framework
+ */
+class App extends \Magento\Core\Model\App
+{
+    public function loadArea($code)
+    {
+        $area = $this->getArea($code);
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode($code);
+        $area->load();
+    }
+}
diff --git a/dev/tests/integration/framework/Magento/TestFramework/App/State.php b/dev/tests/integration/framework/Magento/TestFramework/App/State.php
new file mode 100644
index 00000000000..8f2fd38b318
--- /dev/null
+++ b/dev/tests/integration/framework/Magento/TestFramework/App/State.php
@@ -0,0 +1,51 @@
+<?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
+ * @subpackage  integration_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)
+ */
+
+/**
+ * App State class for integration tests framework
+ */
+namespace Magento\TestFramework\App;
+
+class State extends \Magento\App\State
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getAreaCode()
+    {
+        return $this->_areaCode;;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setAreaCode($code)
+    {
+        $this->_areaCode = $code;
+        $this->_configScope->setCurrentScope($code);
+    }
+}
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Application.php b/dev/tests/integration/framework/Magento/TestFramework/Application.php
index 2c0f8b6b9ea..fe17d2760ea 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Application.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Application.php
@@ -107,7 +107,12 @@ class Application
      *
      * @var array
      */
-    protected $_primaryConfig = array();
+    protected $_primaryConfigData = array();
+
+    /**
+     * @var \Magento\TestFramework\ObjectManagerFactory
+     */
+    protected $_factory;
 
     /**
      * Constructor
@@ -134,7 +139,7 @@ class Application
 
         $generationDir = "$installDir/generation";
         $this->_initParams = array(
-            \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+            \Magento\App\Dir::PARAM_APP_DIRS => array(
                 \Magento\App\Dir::CONFIG      => $this->_installEtcDir,
                 \Magento\App\Dir::VAR_DIR     => $installDir,
                 \Magento\App\Dir::MEDIA       => "$installDir/media",
@@ -142,8 +147,9 @@ class Application
                 \Magento\App\Dir::PUB_VIEW_CACHE => "$installDir/pub_cache",
                 \Magento\App\Dir::GENERATION => $generationDir,
             ),
-            \Magento\Core\Model\App::PARAM_MODE => $appMode
+            \Magento\App\State::PARAM_MODE => $appMode
         );
+        $this->_factory = new \Magento\TestFramework\ObjectManagerFactory();
     }
 
     /**
@@ -185,62 +191,32 @@ class Application
     }
 
     /**
-     * Initialize an already installed application
+     * Initialize application
      *
      * @param array $overriddenParams
      */
     public function initialize($overriddenParams = array())
     {
         $overriddenParams['base_dir'] = BP;
-        $overriddenParams[\Magento\Core\Model\App::PARAM_MODE] = $this->_appMode;
-        $config = new \Magento\Core\Model\Config\Primary(BP, $this->_customizeParams($overriddenParams));
-        if (!\Magento\TestFramework\Helper\Bootstrap::getObjectManager()) {
-            $objectManager = new \Magento\TestFramework\ObjectManager(
-                $config,
-                new \Magento\TestFramework\ObjectManager\Config()
-            );
-            $primaryLoader = new \Magento\Core\Model\ObjectManager\ConfigLoader\Primary($config->getDirectories());
-            $this->_primaryConfig = $primaryLoader->load();
+        $overriddenParams[\Magento\App\State::PARAM_MODE] = $this->_appMode;
+        $overriddenParams = $this->_customizeParams($overriddenParams);
+
+        /** @var \Magento\TestFramework\ObjectManager $objectManager */
+        $objectManager = Helper\Bootstrap::getObjectManager();
+        if (!$objectManager) {
+            $objectManager = $this->_factory->create(BP, $overriddenParams);
         } else {
-            $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-            \Magento\TestFramework\ObjectManager::setInstance($objectManager);
-            $config->configure($objectManager);
-
-            $objectManager->getFactory()->setArguments(array_replace(
-                $objectManager->get('Magento\Core\Model\Config\Local')->getParams(),
-                $config->getParams()
-            ));
-
-            $objectManager->addSharedInstance($config, 'Magento\Core\Model\Config\Primary');
-            $objectManager->addSharedInstance($config->getDirectories(), 'Magento\App\Dir');
-            $objectManager->configure(array(
-                'preferences' => array(
-                    'Magento\Core\Model\Cookie' => 'Magento\TestFramework\Cookie'
-                )
-            ));
-            $objectManager->loadPrimaryConfig($this->_primaryConfig);
-            $verification = $objectManager->get('Magento\App\Dir\Verification');
-            $verification->createAndVerifyDirectories();
-            $objectManager->configure(
-                $objectManager->get('Magento\Core\Model\ObjectManager\ConfigLoader')->load('global')
-            );
-            $objectManager->configure(array(
-                'Magento\View\Design\FileResolution\Strategy\Fallback\CachingProxy' => array(
-                    'parameters' => array('canSaveMap' => false)
-                ),
-                'default_setup' => array(
-                    'type' => 'Magento\TestFramework\Db\ConnectionAdapter'
-                ),
-                'preferences' => array(
-                    'Magento\Core\Model\Cookie' => 'Magento\TestFramework\Cookie',
-                    'Magento\App\RequestInterface' => 'Magento\TestFramework\Request',
-                    'Magento\App\ResponseInterface' => 'Magento\TestFramework\Response',
-                ),
-            ));
+            $objectManager = $this->_factory->restore($objectManager, BP, $overriddenParams);
         }
-        \Magento\TestFramework\Helper\Bootstrap::setObjectManager($objectManager);
-        $objectManager->get('Magento\Core\Model\Resource')
-            ->setCache($objectManager->get('Magento\Core\Model\CacheInterface'));
+
+        Helper\Bootstrap::setObjectManager($objectManager);
+
+        $objectManager->configure(array(
+            'preferences' => array(
+                'Magento\App\State' => 'Magento\TestFramework\App\State',
+                'Magento\Core\Model\App' => 'Magento\TestFramework\App',
+            ),
+        ));
 
         /** Register event observer of Integration Framework */
         /** @var \Magento\Event\Config\Data $eventConfigData */
@@ -256,12 +232,8 @@ class Application
                 )
             )
         );
-        /** @var \Magento\App\Dir\Verification $verification */
-        $verification = $objectManager->get('Magento\App\Dir\Verification');
-        $verification->createAndVerifyDirectories();
 
         $this->loadArea(\Magento\TestFramework\Application::DEFAULT_APP_AREA);
-
         \Magento\Phrase::setRenderer($objectManager->get('Magento\Phrase\Renderer\Placeholder'));
     }
 
@@ -282,9 +254,9 @@ class Application
     public function run()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $config = new \Magento\Core\Model\Config\Primary(BP, array());
-        $entryPoint = new \Magento\Core\Model\EntryPoint\Http($config, $objectManager);
-        $entryPoint->processRequest();
+        /** @var \Magento\App\Http $app */
+        $app = $objectManager->get('Magento\App\Http');
+        $app->execute();
     }
 
     /**
@@ -340,9 +312,12 @@ class Application
         /* Initialize an application in non-installed mode */
         $this->initialize();
 
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadAreaPart('install', \Magento\Core\Model\App\Area::PART_CONFIG);
+
         /* Run all install and data-install scripts */
-        /** @var $updater \Magento\App\Updater */
-        $updater = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Updater');
+        /** @var $updater \Magento\Module\Updater */
+        $updater = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Module\Updater');
         $updater->updateScheme();
         $updater->updateData();
 
@@ -395,18 +370,10 @@ class Application
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $objectManager->clearCache();
 
-        $resource = $objectManager->get('Magento\Core\Model\Registry')
-            ->registry('_singleton/Magento\Core\Model\Resource');
-
         \Magento\Data\Form::setElementRenderer(null);
         \Magento\Data\Form::setFieldsetRenderer(null);
         \Magento\Data\Form::setFieldsetElementRenderer(null);
         $this->_appArea = null;
-
-        if ($resource) {
-            $objectManager->get('Magento\Core\Model\Registry')
-                ->register('_singleton/Magento\Core\Model\Resource', $resource);
-        }
     }
 
     /**
@@ -484,16 +451,22 @@ class Application
     /**
      * Load application area
      *
-     * @param $area
+     * @param $areaCode
      */
-    public function loadArea($area)
+    public function loadArea($areaCode)
     {
-        $this->_appArea = $area;
-        if ($area == \Magento\TestFramework\Application::DEFAULT_APP_AREA) {
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-                ->loadAreaPart($area, \Magento\Core\Model\App\Area::PART_CONFIG);
+        $this->_appArea = $areaCode;
+        $scope = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\Scope');
+        $scope->setCurrentScope($areaCode);
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->configure(
+            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+                ->get('Magento\App\ObjectManager\ConfigLoader')->load($areaCode)
+        );
+        $app = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App');
+        if ($areaCode == \Magento\TestFramework\Application::DEFAULT_APP_AREA) {
+            $app->loadAreaPart($areaCode, \Magento\Core\Model\App\Area::PART_CONFIG);
         } else {
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')->loadArea($area);
+            $app->loadArea($areaCode);
         }
     }
 }
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php b/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php
index e3cdcbfabcf..baecf133212 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php
@@ -138,8 +138,8 @@ class Transaction
      */
     protected function _getAdapter($connectionName = 'core_write')
     {
-        /** @var $resource \Magento\Core\Model\Resource */
-        $resource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Resource');
+        /** @var $resource \Magento\App\Resource */
+        $resource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Resource');
         return $resource->getConnection($connectionName);
     }
 
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Helper/Config.php b/dev/tests/integration/framework/Magento/TestFramework/Helper/Config.php
index d52283543d9..d73a2c809ac 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Helper/Config.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Helper/Config.php
@@ -41,7 +41,7 @@ class Config
     {
         $result = array();
         $moduleList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\App\ModuleListInterface');
+            ->get('Magento\Module\ModuleListInterface');
         foreach ($moduleList->getModules() as $module) {
             $result[] = $module['name'];
         }
diff --git a/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php b/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php
index e2cea9ba5e8..36c179929c2 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php
@@ -25,7 +25,7 @@
  */
 namespace Magento\TestFramework;
 
-class ObjectManager extends \Magento\Core\Model\ObjectManager
+class ObjectManager extends \Magento\App\ObjectManager
 {
     /**
      * Classes with xml properties to explicitly call __destruct() due to https://bugs.php.net/bug.php?id=62468
@@ -51,9 +51,9 @@ class ObjectManager extends \Magento\Core\Model\ObjectManager
         }
 
         \Magento\Core\Model\Config\Base::destroy();
-        $sharedInstances = array('Magento\ObjectManager' => $this, 'Magento\Core\Model\ObjectManager' => $this);
-        if (isset($this->_sharedInstances['Magento\Core\Model\Resource'])) {
-            $sharedInstances['Magento\Core\Model\Resource'] = $this->_sharedInstances['Magento\Core\Model\Resource'];
+        $sharedInstances = array('Magento\ObjectManager' => $this, 'Magento\App\ObjectManager' => $this);
+        if (isset($this->_sharedInstances['Magento\App\Resource'])) {
+            $sharedInstances['Magento\App\Resource'] = $this->_sharedInstances['Magento\App\Resource'];
         }
         $this->_sharedInstances = $sharedInstances;
         $this->_config->clean();
@@ -82,18 +82,6 @@ class ObjectManager extends \Magento\Core\Model\ObjectManager
         unset($this->_sharedInstances[$className]);
     }
 
-    /**
-     * Load primary DI configuration
-     *
-     * @param array $configData
-     */
-    public function loadPrimaryConfig($configData)
-    {
-        if ($configData) {
-            $this->configure($configData);
-        }
-    }
-
     /**
      * Set objectManager
      *
diff --git a/dev/tests/integration/framework/Magento/TestFramework/ObjectManager/Configurator.php b/dev/tests/integration/framework/Magento/TestFramework/ObjectManager/Configurator.php
index 23312d17918..7109f806f72 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/ObjectManager/Configurator.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/ObjectManager/Configurator.php
@@ -25,7 +25,7 @@
 namespace Magento\TestFramework\ObjectManager;
 
 class Configurator
-    implements \Magento\Core\Model\ObjectManager\DynamicConfigInterface
+    implements \Magento\ObjectManager\DynamicConfigInterface
 {
     /**
      * Map application initialization params to Object Manager configuration format
diff --git a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
new file mode 100644
index 00000000000..d557af477e6
--- /dev/null
+++ b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
@@ -0,0 +1,116 @@
+<?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\TestFramework;
+
+use Magento\App\Dir;
+
+class ObjectManagerFactory extends \Magento\App\ObjectManagerFactory
+{
+    /**
+     * Locator class name
+     *
+     * @var string
+     */
+    protected $_locatorClassName = '\Magento\TestFramework\ObjectManager';
+
+    /**
+     * Config class name
+     *
+     * @var string
+     */
+    protected $_configClassName = '\Magento\TestFramework\ObjectManager\Config';
+
+    /**
+     * @var array
+     */
+    protected $_primaryConfigData = null;
+
+    /**
+     * Restore locator instance
+     *
+     * @param ObjectManager $objectManager
+     * @param string $rootDir
+     * @param array $arguments
+     * @return ObjectManager
+     */
+    public function restore(ObjectManager $objectManager, $rootDir, array $arguments)
+    {
+        $directories = new Dir(
+            $rootDir,
+            isset($arguments[Dir::PARAM_APP_URIS]) ? $arguments[Dir::PARAM_APP_URIS] : array(),
+            isset($arguments[Dir::PARAM_APP_DIRS]) ? $arguments[Dir::PARAM_APP_DIRS] : array()
+        );
+
+        \Magento\TestFramework\ObjectManager::setInstance($objectManager);
+
+        $objectManager->configure($this->_primaryConfigData);
+        $objectManager->addSharedInstance($directories, 'Magento\App\Dir');
+        $objectManager->configure(array(
+            'Magento\View\Design\FileResolution\Strategy\Fallback\CachingProxy' => array(
+                'parameters' => array('canSaveMap' => false)
+            ),
+            'default_setup' => array(
+                'type' => 'Magento\TestFramework\Db\ConnectionAdapter'
+            ),
+            'preferences' => array(
+                'Magento\Core\Model\Cookie' => 'Magento\TestFramework\Cookie',
+                'Magento\App\RequestInterface' => 'Magento\TestFramework\Request',
+                'Magento\App\ResponseInterface' => 'Magento\TestFramework\Response',
+            ),
+        ));
+
+        $options = new \Magento\App\Config(
+            $arguments,
+            new \Magento\App\Config\Loader($directories)
+        );
+        $objectManager->addSharedInstance($options, 'Magento\App\Config');
+        $objectManager->getFactory()->setArguments($options->get());
+        $objectManager->configure(
+            $objectManager->get('Magento\App\ObjectManager\ConfigLoader')->load('global')
+        );
+
+        /** @var \Magento\App\Dir\Verification $verification */
+        $verification = $objectManager->get('Magento\App\Dir\Verification');
+        $verification->createAndVerifyDirectories();
+
+        return $objectManager;
+    }
+
+    /**
+     * Load primary config data
+     *
+     * @param Dir $directories
+     * @param string $appMode
+     * @return array
+     * @throws \Magento\BootstrapException
+     */
+    protected function _loadPrimaryConfig(Dir $directories, $appMode)
+    {
+        if (null === $this->_primaryConfigData) {
+            $this->_primaryConfigData = parent::_loadPrimaryConfig($directories, $appMode);
+        }
+        return $this->_primaryConfigData;
+    }
+}
diff --git a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php
index d914765ffb2..16e6e246669 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php
@@ -54,7 +54,7 @@ abstract class AbstractConfigFiles extends \PHPUnit_Framework_TestCase
         $xmlFiles = $this->getXmlConfigFiles();
         if (!empty($xmlFiles)) {
 
-            $this->_fileResolverMock = $this->getMockBuilder('Magento\Core\Model\Config\FileResolver\Primary')
+            $this->_fileResolverMock = $this->getMockBuilder('Magento\App\Config\FileResolver\Primary')
                 ->disableOriginalConstructor()->getMock();
 
             /* Enable Validation regardles of MAGE_MODE */
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php
index 51d673a257f..f1da1c91579 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php
@@ -50,7 +50,7 @@ class StaticProperties
      */
     protected static $_classesToSkip = array(
         'Mage',
-        'Magento\Core\Model\ObjectManager',
+        'Magento\App\ObjectManager',
         'Magento\TestFramework\Helper\Bootstrap',
         'Magento\TestFramework\Event\Magento',
         'Magento\TestFramework\Event\PhpUnit',
diff --git a/dev/tests/integration/framework/bootstrap.php b/dev/tests/integration/framework/bootstrap.php
index b8c0026298a..ce013bfde74 100644
--- a/dev/tests/integration/framework/bootstrap.php
+++ b/dev/tests/integration/framework/bootstrap.php
@@ -38,6 +38,24 @@ $magentoBaseDir = realpath("$testsBaseDir/../../../");
     "$testsBaseDir/testsuite",
 ));
 
+function tool_autoloader($className)
+{
+    if (strpos($className, 'Magento\\Tools\\') === false) {
+        return false;
+    }
+
+    $filePath = str_replace('\\', DS, $className);
+    $filePath = BP . DS . 'dev' . DS . 'tools' . DS . $filePath . '.php';
+
+    if (file_exists($filePath)) {
+        include_once($filePath);
+    } else {
+        return false;
+    }
+}
+
+spl_autoload_register('tool_autoloader');
+
 /* Bootstrap the application */
 $invariantSettings = array(
     'TESTS_LOCAL_CONFIG_EXTRA_FILE' => 'etc/integration-tests-config.xml',
@@ -56,21 +74,5 @@ $bootstrap->runBootstrap();
 
 Magento\TestFramework\Utility\Files::init(new Magento\TestFramework\Utility\Files($magentoBaseDir));
 
-function tool_autoloader($className)
-{
-    if (strpos($className, 'Magento\\Tools\\') === false) {
-        return false;
-    }
-    $filePath = str_replace('\\', DS, $className);
-    $filePath = BP . DS . 'dev' . DS . 'tools' . DS . $filePath . '.php';
-
-    if (file_exists($filePath)) {
-        include_once($filePath);
-    } else {
-        return false;
-    }
-}
-spl_autoload_register('tool_autoloader');
-
 /* Unset declared global variables to release the PHPUnit from maintaining their values between tests */
 unset($bootstrap);
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Annotation/ConfigFixtureTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Annotation/ConfigFixtureTest.php
index ac92b4c3afc..2df10090b73 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Annotation/ConfigFixtureTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Annotation/ConfigFixtureTest.php
@@ -46,7 +46,7 @@ class ConfigFixtureTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @magentoConfigFixture web/unsecure/base_url http://example.com/
+     * @magentoConfigFixture current_store web/unsecure/base_url http://example.com/
      */
     public function testGlobalConfig()
     {
@@ -54,20 +54,17 @@ class ConfigFixtureTest extends \PHPUnit_Framework_TestCase
             ->expects($this->at(0))
             ->method('_getConfigValue')
             ->with('web/unsecure/base_url')
-            ->will($this->returnValue('http://localhost/'))
-        ;
+            ->will($this->returnValue('http://localhost/'));
         $this->_object
             ->expects($this->at(1))
             ->method('_setConfigValue')
-            ->with('web/unsecure/base_url', 'http://example.com/')
-        ;
+            ->with('web/unsecure/base_url', 'http://example.com/');
         $this->_object->startTest($this);
 
         $this->_object
             ->expects($this->once())
             ->method('_setConfigValue')
-            ->with('web/unsecure/base_url', 'http://localhost/')
-        ;
+            ->with('web/unsecure/base_url', 'http://localhost/');
         $this->_object->endTest($this);
     }
 
@@ -80,20 +77,17 @@ class ConfigFixtureTest extends \PHPUnit_Framework_TestCase
             ->expects($this->at(0))
             ->method('_getConfigValue')
             ->with('dev/restrict/allow_ips', '')
-            ->will($this->returnValue('127.0.0.1'))
-        ;
+            ->will($this->returnValue('127.0.0.1'));
         $this->_object
             ->expects($this->at(1))
             ->method('_setConfigValue')
-            ->with('dev/restrict/allow_ips', '192.168.0.1', '')
-        ;
+            ->with('dev/restrict/allow_ips', '192.168.0.1', '');
         $this->_object->startTest($this);
 
         $this->_object
             ->expects($this->once())
             ->method('_setConfigValue')
-            ->with('dev/restrict/allow_ips', '127.0.0.1', '')
-        ;
+            ->with('dev/restrict/allow_ips', '127.0.0.1', '');
         $this->_object->endTest($this);
     }
 
@@ -106,41 +100,33 @@ class ConfigFixtureTest extends \PHPUnit_Framework_TestCase
             ->expects($this->at(0))
             ->method('_getConfigValue')
             ->with('dev/restrict/allow_ips', 'admin')
-            ->will($this->returnValue('192.168.0.1'))
-        ;
+            ->will($this->returnValue('192.168.0.1'));
         $this->_object
             ->expects($this->at(1))
             ->method('_setConfigValue')
-            ->with('dev/restrict/allow_ips', '192.168.0.2', 'admin')
-        ;
+            ->with('dev/restrict/allow_ips', '192.168.0.2', 'admin');
         $this->_object->startTest($this);
 
         $this->_object
             ->expects($this->once())
             ->method('_setConfigValue')
-            ->with('dev/restrict/allow_ips', '192.168.0.1', 'admin')
-        ;
+            ->with('dev/restrict/allow_ips', '192.168.0.1', 'admin');
         $this->_object->endTest($this);
     }
 
-    /**
-     * @magentoConfigFixture some/config/path some_config_value
-     */
     public function testInitStoreAfterOfScope()
     {
         $this->_object
             ->expects($this->never())
-            ->method('_getConfigValue')
-        ;
+            ->method('_getConfigValue');
         $this->_object
             ->expects($this->never())
-            ->method('_setConfigValue')
-        ;
+            ->method('_setConfigValue');
         $this->_object->initStoreAfter();
     }
 
     /**
-     * @magentoConfigFixture web/unsecure/base_url http://example.com/
+     * @magentoConfigFixture current_store web/unsecure/base_url http://example.com/
      */
     public function testInitStoreAfter()
     {
@@ -149,13 +135,11 @@ class ConfigFixtureTest extends \PHPUnit_Framework_TestCase
             ->expects($this->at(0))
             ->method('_getConfigValue')
             ->with('web/unsecure/base_url')
-            ->will($this->returnValue('http://localhost/'))
-        ;
+            ->will($this->returnValue('http://localhost/'));
         $this->_object
             ->expects($this->at(1))
             ->method('_setConfigValue')
-            ->with('web/unsecure/base_url', 'http://example.com/')
-        ;
+            ->with('web/unsecure/base_url', 'http://example.com/');
         $this->_object->initStoreAfter();
     }
 }
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php
index 4aa324bc239..4d5e9e035cc 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php
@@ -27,6 +27,8 @@
 
 namespace Magento\Test;
 
+use Magento\App\State;
+
 class ApplicationTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -54,13 +56,13 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
 
         $initParams = $object->getInitParams();
         $this->assertInternalType('array', $initParams, 'Wrong initialization parameters type');
-        $this->assertArrayHasKey(\Magento\Core\Model\App::PARAM_APP_DIRS, $initParams,
+        $this->assertArrayHasKey(\Magento\App\Dir::PARAM_APP_DIRS, $initParams,
             'Directories are not configured');
-        $this->assertArrayHasKey(\Magento\Core\Model\App::PARAM_MODE, $initParams,
+        $this->assertArrayHasKey(State::PARAM_MODE, $initParams,
             'Application mode is not configured');
         $this->assertEquals(
             \Magento\App\State::MODE_DEVELOPER,
-            $initParams[\Magento\Core\Model\App::PARAM_MODE],
+            $initParams[State::PARAM_MODE],
             'Wrong application mode configured'
         );
     }
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/CookieTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/CookieTest.php
index f8308c9e807..ad10cd15d2f 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/CookieTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/CookieTest.php
@@ -48,7 +48,7 @@ class CookieTest extends \PHPUnit_Framework_TestCase
             $coreStoreConfig,
             $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false),
             new \Magento\TestFramework\Request(
-                $this->getMock('Magento\App\RouterListInterface'),
+                $this->getMock('\Magento\App\Route\ConfigInterface'),
                 'http://example.com',
                 $this->getMock('Magento\App\Request\PathInfoProcessorInterface')
             ),
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php
index 8ea05427755..ed9e29c8dea 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php
@@ -53,7 +53,7 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase
      * @var array
      */
     protected $_fixtureInitParams = array(
-        \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+        \Magento\App\Dir::PARAM_APP_DIRS => array(
             \Magento\App\Dir::CONFIG     => __DIR__,
             \Magento\App\Dir::VAR_DIR    => __DIR__,
         ),
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php
index 788dc275056..d26ba641daa 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php
@@ -46,47 +46,42 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
     {
         $resource = new \stdClass;
         $instanceConfig = new \Magento\TestFramework\ObjectManager\Config();
-        $primaryConfig = $this->getMock('Magento\Core\Model\Config\Primary', array(), array(), '', false);
-        $primaryConfig->expects($this->any())->method('getParams')->will($this->returnValue(array()));
-        $dirs = $this->getMock('Magento\App\Dir', array(), array(), '', false);
         $verification = $this->getMock('Magento\App\Dir\Verification', array(), array(), '', false);
-        $cache = $this->getMock('Magento\Core\Model\CacheInterface');
-        $configLoader = $this->getMock('Magento\Core\Model\ObjectManager\ConfigLoader', array(), array(), '', false);
-        $configLoader->expects($this->once())->method('load')->will($this->returnValue(array()));
-        $configCache = $this->getMock('Magento\Core\Model\ObjectManager\ConfigCache', array(), array(), '', false);
-        $primaryConfig->expects($this->any())->method('getDirectories')->will($this->returnValue($dirs));
+        $cache = $this->getMock('Magento\App\CacheInterface');
+        $configLoader = $this->getMock('Magento\App\ObjectManager\ConfigLoader', array(), array(), '', false);
+        $configCache = $this->getMock('Magento\App\ObjectManager\ConfigCache', array(), array(), '', false);
         $primaryLoaderMock = $this->getMock(
-            'Magento\Core\Model\ObjectManager\ConfigLoader\Primary', array(), array(), '', false
+            'Magento\App\ObjectManager\ConfigLoader\Primary', array(), array(), '', false
         );
 
         $model = new \Magento\TestFramework\ObjectManager(
-            $primaryConfig, $instanceConfig,
+            null, $instanceConfig,
             array(
                 'Magento\App\Dir\Verification' => $verification,
                 'Magento\Core\Model\Cache\Type\Config' => $cache,
-                'Magento\Core\Model\ObjectManager\ConfigLoader' => $configLoader,
-                'Magento\Core\Model\ObjectManager\ConfigCache' => $configCache,
+                'Magento\App\ObjectManager\ConfigLoader' => $configLoader,
+                'Magento\App\ObjectManager\ConfigCache' => $configCache,
                 'Magento\Config\ReaderInterface' => $this->getMock('Magento\Config\ReaderInterface'),
                 'Magento\Config\ScopeInterface' => $this->getMock('Magento\Config\ScopeInterface'),
                 'Magento\Config\CacheInterface' => $this->getMock('Magento\Config\CacheInterface'),
                 'Magento\Cache\FrontendInterface' => $this->getMock('Magento\Cache\FrontendInterface'),
-                'Magento\Core\Model\Resource' => $this->getMock(
-                    'Magento\Core\Model\Resource', array(), array(), '', false
+                'Magento\App\Resource' => $this->getMock(
+                    'Magento\App\Resource', array(), array(), '', false
                 ),
-                'Magento\Core\Model\Config\Resource' => $this->getMock(
-                    'Magento\Core\Model\Config\Resource', array(), array(), '', false
+                'Magento\App\Resource\Config' => $this->getMock(
+                    'Magento\App\Resource\Config', array(), array(), '', false
                 ),
             ),
             $primaryLoaderMock
         );
 
-        $model->addSharedInstance($resource, 'Magento\Core\Model\Resource');
+        $model->addSharedInstance($resource, 'Magento\App\Resource');
         $instance1 = $model->get('Magento\Object');
 
         $this->assertSame($instance1, $model->get('Magento\Object'));
         $this->assertSame($model, $model->clearCache());
         $this->assertSame($model, $model->get('Magento\ObjectManager'));
-        $this->assertSame($resource, $model->get('Magento\Core\Model\Resource'));
+        $this->assertSame($resource, $model->get('Magento\App\Resource'));
         $this->assertNotSame($instance1, $model->get('Magento\Object'));
     }
 }
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php
index 6a81be56265..a6d9fa065cc 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php
@@ -37,7 +37,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_model = new \Magento\TestFramework\Request(
-            $this->getMock('Magento\App\RouterListInterface', array(), array(), '', false)
+            $this->getMock('Magento\App\Route\ConfigInterface', array(), array(), '', false)
         );
     }
 
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php
index 0ac47a15e2e..b726dbefec9 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php
@@ -46,7 +46,7 @@ class ControllerAbstractTest extends \Magento\TestFramework\TestCase\AbstractCon
         ;
         $session = new \Magento\Object(array('messages' => $messagesCollection));
         $request = new \Magento\TestFramework\Request(
-            $this->getMock('Magento\App\RouterListInterface', array(), array(), '', false)
+            $this->getMock('\Magento\App\Route\ConfigInterface', array(), array(), '', false)
         );
         $response = new \Magento\TestFramework\Response();
 
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Newsletter/Queue/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Newsletter/Queue/Edit/FormTest.php
index 73936e9674d..4bb4a1e8eab 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Newsletter/Queue/Edit/FormTest.php
+++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Newsletter/Queue/Edit/FormTest.php
@@ -39,11 +39,11 @@ class FormTest extends \PHPUnit_Framework_TestCase
     public function testPrepareForm()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            ->setArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
             ->setDefaultDesignTheme();
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Adminhtml\Block\Newsletter\Queue\Edit\Form');
         $prepareFormMethod = new \ReflectionMethod(
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Report/Filter/FormTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Report/Filter/FormTest.php
index 6315c59eb76..09b6fb1b156 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Report/Filter/FormTest.php
+++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Report/Filter/FormTest.php
@@ -39,7 +39,7 @@ class FormTest extends \PHPUnit_Framework_TestCase
     public function testPrepareForm()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            ->setArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
             ->setDefaultDesignTheme();
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Core\Model\Layout');
         $block = $layout->addBlock('Magento\Adminhtml\Block\Report\Filter\Form');
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/EditTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/EditTest.php
index 37d1681c4d1..26b386e828e 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/EditTest.php
@@ -46,7 +46,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
         /** @var $layout \Magento\View\LayoutInterface */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
         );
 
         /** @var $block \Magento\Adminhtml\Block\Urlrewrite\Catalog\Category\Edit */
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/EditTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/EditTest.php
index eee7225b498..ffc55ce4164 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/EditTest.php
@@ -46,7 +46,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
         /** @var $layout \Magento\View\LayoutInterface */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
         );
 
         /** @var $block \Magento\Adminhtml\Block\Urlrewrite\Catalog\Product\Edit */
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/EditTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/EditTest.php
index d6f30792cee..e94788bda49 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/EditTest.php
@@ -46,7 +46,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
         /** @var $layout \Magento\View\LayoutInterface */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
         );
 
         /** @var $block \Magento\Adminhtml\Block\Urlrewrite\Cms\Page\Edit */
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/EditTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/EditTest.php
index d0a33097768..824174ab13c 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Urlrewrite/EditTest.php
@@ -47,7 +47,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
         /** @var $layout \Magento\View\LayoutInterface */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
         );
 
         /** @var $block \Magento\Adminhtml\Block\Urlrewrite\Edit */
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/ContainerTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/ContainerTest.php
index bba5ceb5c6c..954f1167a26 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/ContainerTest.php
+++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/ContainerTest.php
@@ -76,7 +76,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
         /** @var $layout \Magento\View\LayoutInterface */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
         );
         /** @var $block \Magento\Adminhtml\Block\Widget\Container */
         $block = $layout->createBlock('Magento\Adminhtml\Block\Widget\Container', 'block');
diff --git a/dev/tests/integration/testsuite/Magento/App/FrontControllerTest.php b/dev/tests/integration/testsuite/Magento/App/FrontControllerTest.php
index b707dcb2213..ae6a6e862ac 100644
--- a/dev/tests/integration/testsuite/Magento/App/FrontControllerTest.php
+++ b/dev/tests/integration/testsuite/Magento/App/FrontControllerTest.php
@@ -28,6 +28,7 @@ namespace Magento\App;
 
 /**
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ * @magentoAppArea frontend
  */
 class FrontControllerTest extends \PHPUnit_Framework_TestCase
 {
@@ -47,16 +48,6 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase
         $this->_model = $this->_objectManager->create('Magento\App\FrontController');
     }
 
-    public function testSetGetDefault()
-    {
-        $this->_model->setDefault('test', 'value');
-        $this->assertEquals('value', $this->_model->getDefault('test'));
-
-        $default = array('some_key' => 'some_value');
-        $this->_model->setDefault($default);
-        $this->assertEquals($default, $this->_model->getDefault());
-    }
-
     public function testGetRequest()
     {
         $this->assertNull($this->_model->getRequest());
@@ -80,7 +71,7 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase
             $this->markTestSkipped('Cant\'t test dispatch process without sending headers');
         }
         $_SERVER['HTTP_HOST'] = 'localhost';
-        $this->_objectManager->get('Magento\Config\Scope')->setCurrentScope('frontend');
+        $this->_objectManager->get('Magento\App\State')->setAreaCode('frontend');
         $request = $this->_objectManager->create('Magento\App\Request\Http');
         /* empty action */
         $request->setRequestUri('core/index/index');
diff --git a/dev/tests/integration/testsuite/Magento/Authorizenet/Block/Directpost/IframeTest.php b/dev/tests/integration/testsuite/Magento/Authorizenet/Block/Directpost/IframeTest.php
index aaea940c9ba..bf6181af2ff 100644
--- a/dev/tests/integration/testsuite/Magento/Authorizenet/Block/Directpost/IframeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Authorizenet/Block/Directpost/IframeTest.php
@@ -34,6 +34,7 @@ class IframeTest extends \PHPUnit_Framework_TestCase
      */
     public function testToHtml()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         $xssString = '</script><script>alert("XSS")</script>';
         /** @var $block \Magento\Authorizenet\Block\Directpost\Iframe */
         $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface')
diff --git a/dev/tests/integration/testsuite/Magento/Backend/App/Router/DefaultRouterTest.php b/dev/tests/integration/testsuite/Magento/Backend/App/Router/DefaultRouterTest.php
new file mode 100644
index 00000000000..4834b92d962
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Backend/App/Router/DefaultRouterTest.php
@@ -0,0 +1,76 @@
+<?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_Backend
+ * @subpackage  integration_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\Backend\App\Router;
+
+/**
+ * @magentoAppArea adminhtml
+ */
+class DefaultRouterTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Backend\App\Router\DefaultRouter
+     */
+    protected $_model;
+
+    protected function setUp()
+    {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->_model = $objectManager->create('Magento\Backend\App\Router\DefaultRouter');
+    }
+
+    public function testRouterCanProcessRequestsWithProperPathInfo()
+    {
+        $request = $this->getMock('Magento\App\Request\Http', array(), array(), '', false);
+        $request->expects($this->once())
+            ->method('getPathInfo')
+            ->will($this->returnValue('backend/admin/dashboard'));
+
+        $this->assertInstanceOf('Magento\Backend\Controller\Adminhtml\Dashboard', $this->_model->match($request));
+    }
+
+    /**
+     * @param string $module
+     * @param string $controller
+     * @param string $className
+     *
+     * @dataProvider getControllerClassNameDataProvider
+     */
+    public function testGetControllerClassName($module, $controller, $className)
+    {
+        $this->assertEquals($className, $this->_model->getControllerClassName($module, $controller));
+    }
+
+    public function getControllerClassNameDataProvider()
+    {
+        return array(
+            array('Magento_Adminhtml', 'index', 'Magento\Adminhtml\Controller\Index'),
+            array('Magento_Index', 'process', 'Magento\Index\Controller\Adminhtml\Process'),
+            array('Magento_Index_Adminhtml', 'process', 'Magento\Index\Controller\Adminhtml\Process'),
+        );
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Account/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Account/Edit/FormTest.php
similarity index 95%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Account/Edit/FormTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Block/System/Account/Edit/FormTest.php
index c1f0d7263fd..ad973a34da6 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Account/Edit/FormTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Account/Edit/FormTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\System\Account\Edit;
+namespace Magento\Backend\Block\System\Account\Edit;
 
 /**
  * @magentoAppArea adminhtml
@@ -45,8 +45,8 @@ class FormTest extends \PHPUnit_Framework_TestCase
         /** @var $layout \Magento\Core\Model\Layout */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface');
 
-        /** @var \Magento\Adminhtml\Block\System\Account\Edit\Form */
-        $block = $layout->createBlock('Magento\Adminhtml\Block\System\Account\Edit\Form');
+        /** @var \Magento\Backend\Block\System\Account\Edit\Form */
+        $block = $layout->createBlock('Magento\Backend\Block\System\Account\Edit\Form');
         $block->toHtml();
 
         $form = $block->getForm();
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php
index 7988f069caf..a6edb1c751e 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php
@@ -38,14 +38,14 @@ class FormTest extends \PHPUnit_Framework_TestCase
     protected $_objectManager;
 
     /**
-     * @var \Magento\Data\Form\Factory
+     * @var \Magento\Data\FormFactory
      */
     protected $_formFactory;
 
     protected function setUp()
     {
         $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $this->_formFactory = $this->_objectManager->create('Magento\Data\Form\Factory');
+        $this->_formFactory = $this->_objectManager->create('Magento\Data\FormFactory');
     }
 
     public function testDependenceHtml()
@@ -54,7 +54,7 @@ class FormTest extends \PHPUnit_Framework_TestCase
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Core\Model\Layout', array('area' => 'adminhtml'));
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         /** @var $block \Magento\Backend\Block\System\Config\Form */
         $block = $layout->createBlock('Magento\Backend\Block\System\Config\Form', 'block');
 
@@ -81,7 +81,7 @@ class FormTest extends \PHPUnit_Framework_TestCase
     {
         $this->markTestIncomplete('MAGETWO-9058');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $form = $this->_formFactory->create();
         $fieldset = $form->addFieldset($section->getId() . '_' . $group->getId(), array());
 
@@ -135,7 +135,7 @@ class FormTest extends \PHPUnit_Framework_TestCase
     {
         $this->markTestIncomplete('MAGETWO-9058');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $form = $this->_formFactory->create();
         $fieldset = $form->addFieldset($section->getId() . '_' . $group->getId(), array());
 
@@ -166,11 +166,14 @@ class FormTest extends \PHPUnit_Framework_TestCase
         ));
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->loadAreaPart(\Magento\Core\Model\App\Area::AREA_ADMINHTML, \Magento\Core\Model\App\Area::PART_CONFIG);
+            ->loadAreaPart(
+                \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE,
+                \Magento\Core\Model\App\Area::PART_CONFIG
+            );
 
-        $configMock = $this->getMock('Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false, false);
+        $configMock = $this->getMock('Magento\Module\Dir\Reader', array(), array(), '', false, false);
         $configMock->expects($this->any())->method('getConfigurationFiles')
             ->will($this->returnValue(array(__DIR__ . '/_files/test_section_config.xml')));
         $configMock->expects($this->any())->method('getModuleDir')
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Design/Edit/Tab/GeneralTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Design/Edit/Tab/GeneralTest.php
similarity index 84%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Design/Edit/Tab/GeneralTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Block/System/Design/Edit/Tab/GeneralTest.php
index be96f0e31b8..99d28e355ba 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Design/Edit/Tab/GeneralTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Design/Edit/Tab/GeneralTest.php
@@ -25,10 +25,10 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\System\Design\Edit\Tab;
+namespace Magento\Backend\Block\System\Design\Edit\Tab;
 
 /**
- * Test class for \Magento\Adminhtml\Block\System\Design\Edit\Tab\General
+ * Test class for \Magento\Backend\Block\System\Design\Edit\Tab\General
  * @magentoAppArea adminhtml
  */
 class GeneralTest extends \PHPUnit_Framework_TestCase
@@ -40,14 +40,14 @@ class GeneralTest extends \PHPUnit_Framework_TestCase
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $objectManager->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            ->setArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
             ->setDefaultDesignTheme();
         $objectManager->get('Magento\Core\Model\Registry')
             ->register('design', $objectManager ->create('Magento\Core\Model\Design'));
         $layout = $objectManager ->create('Magento\Core\Model\Layout');
-        $block = $layout->addBlock('Magento\Adminhtml\Block\System\Design\Edit\Tab\General');
+        $block = $layout->addBlock('Magento\Backend\Block\System\Design\Edit\Tab\General');
         $prepareFormMethod = new \ReflectionMethod(
-            'Magento\Adminhtml\Block\System\Design\Edit\Tab\General', '_prepareForm'
+            'Magento\Backend\Block\System\Design\Edit\Tab\General', '_prepareForm'
         );
         $prepareFormMethod->setAccessible(true);
         $prepareFormMethod->invoke($block);
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/DeleteTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/DeleteTest.php
similarity index 88%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/DeleteTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/DeleteTest.php
index 0fe5ae4b226..c0e087dfbd5 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/DeleteTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/DeleteTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\System\Store;
+namespace Magento\Backend\Block\System\Store;
 
 /**
  * @magentoAppArea adminhtml
@@ -36,8 +36,8 @@ class DeleteTest extends \PHPUnit_Framework_TestCase
     {
         /** @var $layout \Magento\Core\Model\Layout */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface');
-        /** @var $block \Magento\Adminhtml\Block\System\Store\Delete */
-        $block = $layout->createBlock('Magento\Adminhtml\Block\System\Store\Delete', 'block');
+        /** @var $block \Magento\Backend\Block\System\Store\Delete */
+        $block = $layout->createBlock('Magento\Backend\Block\System\Store\Delete', 'block');
 
         $dataObject = new \Magento\Object;
         $form = $block->getChildBlock('form');
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/Edit/Form/GroupTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/GroupTest.php
similarity index 92%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/Edit/Form/GroupTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/GroupTest.php
index 341cfae72b6..42f0abcfc61 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/Edit/Form/GroupTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/GroupTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\System\Store\Edit\Form;
+namespace Magento\Backend\Block\System\Store\Edit\Form;
 
 /**
  * @magentoAppIsolation enabled
@@ -34,7 +34,7 @@ namespace Magento\Adminhtml\Block\System\Store\Edit\Form;
 class GroupTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Adminhtml\Block\System\Store\Edit\Form\Group
+     * @var \Magento\Backend\Block\System\Store\Edit\Form\Group
      */
     protected $_block;
 
@@ -57,7 +57,7 @@ class GroupTest extends \PHPUnit_Framework_TestCase
         /** @var $layout \Magento\Core\Model\Layout */
         $layout = $objectManager->get('Magento\View\LayoutInterface');
 
-        $this->_block = $layout->createBlock('Magento\Adminhtml\Block\System\Store\Edit\Form\Group');
+        $this->_block = $layout->createBlock('Magento\Backend\Block\System\Store\Edit\Form\Group');
 
         $this->_block->toHtml();
     }
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/Edit/Form/StoreTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/StoreTest.php
similarity index 92%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/Edit/Form/StoreTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/StoreTest.php
index 017c46e267e..8b7bbfefce8 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/Edit/Form/StoreTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/StoreTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\System\Store\Edit\Form;
+namespace Magento\Backend\Block\System\Store\Edit\Form;
 
 /**
  * @magentoAppIsolation enabled
@@ -34,7 +34,7 @@ namespace Magento\Adminhtml\Block\System\Store\Edit\Form;
 class StoreTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Adminhtml\Block\System\Store\Edit\Form\Store
+     * @var \Magento\Backend\Block\System\Store\Edit\Form\Store
      */
     protected $_block;
 
@@ -57,7 +57,7 @@ class StoreTest extends \PHPUnit_Framework_TestCase
         /** @var $layout \Magento\Core\Model\Layout */
         $layout = $objectManager->get('Magento\View\LayoutInterface');
 
-        $this->_block = $layout->createBlock('Magento\Adminhtml\Block\System\Store\Edit\Form\Store');
+        $this->_block = $layout->createBlock('Magento\Backend\Block\System\Store\Edit\Form\Store');
 
         $this->_block->toHtml();
     }
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/Edit/Form/WebsiteTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/WebsiteTest.php
similarity index 92%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/Edit/Form/WebsiteTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/WebsiteTest.php
index 3a61acaa263..ed8d5098c72 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/Edit/Form/WebsiteTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/WebsiteTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\System\Store\Edit\Form;
+namespace Magento\Backend\Block\System\Store\Edit\Form;
 
 /**
  * @magentoAppIsolation enabled
@@ -34,7 +34,7 @@ namespace Magento\Adminhtml\Block\System\Store\Edit\Form;
 class WebsiteTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Adminhtml\Block\System\Store\Edit\Form\Website
+     * @var \Magento\Backend\Block\System\Store\Edit\Form\Website
      */
     protected $_block;
 
@@ -56,7 +56,7 @@ class WebsiteTest extends \PHPUnit_Framework_TestCase
         /** @var $layout \Magento\Core\Model\Layout */
         $layout = $objectManager->get('Magento\View\LayoutInterface');
 
-        $this->_block = $layout->createBlock('Magento\Adminhtml\Block\System\Store\Edit\Form\Website');
+        $this->_block = $layout->createBlock('Magento\Backend\Block\System\Store\Edit\Form\Website');
 
         $this->_block->toHtml();
     }
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/EditTest.php
similarity index 81%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/EditTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/EditTest.php
index 7a6422efe79..323b4fcbe6b 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Store/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/EditTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\System\Store;
+namespace Magento\Backend\Block\System\Store;
 
 /**
  * @magentoAppArea adminhtml
@@ -65,9 +65,9 @@ class EditTest extends \PHPUnit_Framework_TestCase
 
         /** @var $layout \Magento\Core\Model\Layout */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface');
-        /** @var $block \Magento\Adminhtml\Block\System\Store\Edit */
-        $block = $layout->createBlock('Magento\Adminhtml\Block\System\Store\Edit', 'block');
-        $block->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+        /** @var $block \Magento\Backend\Block\System\Store\Edit */
+        $block = $layout->createBlock('Magento\Backend\Block\System\Store\Edit', 'block');
+        $block->setArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
 
         $this->assertInstanceOf($expected, $block->getChildBlock('form'));
     }
@@ -82,25 +82,25 @@ class EditTest extends \PHPUnit_Framework_TestCase
                 array(
                     'store_type' => 'website',
                     'store_data' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                        ->create('Magento\Core\Model\Website')
+                            ->create('Magento\Core\Model\Website')
                 ),
-                'Magento\Adminhtml\Block\System\Store\Edit\Form\Website'
+                'Magento\Backend\Block\System\Store\Edit\Form\Website'
             ),
             array(
                 array(
                     'store_type' => 'group',
                     'store_data' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                        ->create('Magento\Core\Model\Store\Group')
+                            ->create('Magento\Core\Model\Store\Group')
                 ),
-                'Magento\Adminhtml\Block\System\Store\Edit\Form\Group'
+                'Magento\Backend\Block\System\Store\Edit\Form\Group'
             ),
             array(
                 array(
                     'store_type' => 'store',
                     'store_data' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                        ->create('Magento\Core\Model\Store')
+                            ->create('Magento\Core\Model\Store')
                 ),
-                'Magento\Adminhtml\Block\System\Store\Edit\Form\Store'
+                'Magento\Backend\Block\System\Store\Edit\Form\Store'
             )
         );
     }
@@ -116,9 +116,9 @@ class EditTest extends \PHPUnit_Framework_TestCase
 
         /** @var $layout \Magento\Core\Model\Layout */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface');
-        /** @var $block \Magento\Adminhtml\Block\System\Store\Edit */
-        $block = $layout->createBlock('Magento\Adminhtml\Block\System\Store\Edit', 'block');
-        $block->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+        /** @var $block \Magento\Backend\Block\System\Store\Edit */
+        $block = $layout->createBlock('Magento\Backend\Block\System\Store\Edit', 'block');
+        $block->setArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
 
         $this->assertEquals($expected, $block->getHeaderText());
     }
@@ -133,7 +133,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
                 array(
                     'store_type' => 'website',
                     'store_data' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                        ->create('Magento\Core\Model\Website'),
+                            ->create('Magento\Core\Model\Website'),
                     'store_action' => 'add'
                 ),
                 'New Web Site'
@@ -142,7 +142,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
                 array(
                     'store_type' => 'website',
                     'store_data' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                        ->create('Magento\Core\Model\Website'),
+                            ->create('Magento\Core\Model\Website'),
                     'store_action' => 'edit'
                 ),
                 'Edit Web Site'
@@ -151,7 +151,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
                 array(
                     'store_type' => 'group',
                     'store_data' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                        ->create('Magento\Core\Model\Store\Group'),
+                            ->create('Magento\Core\Model\Store\Group'),
                     'store_action' => 'add'
                 ),
                 'New Store'
@@ -160,7 +160,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
                 array(
                     'store_type' => 'group',
                     'store_data' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                        ->create('Magento\Core\Model\Store\Group'),
+                            ->create('Magento\Core\Model\Store\Group'),
                     'store_action' => 'edit'
                 ),
                 'Edit Store'
@@ -169,7 +169,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
                 array(
                     'store_type' => 'store',
                     'store_data' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                        ->create('Magento\Core\Model\Store'),
+                            ->create('Magento\Core\Model\Store'),
                     'store_action' => 'add'
                 ),
                 'New Store View'
@@ -178,7 +178,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
                 array(
                     'store_type' => 'store',
                     'store_data' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                        ->create('Magento\Core\Model\Store'),
+                            ->create('Magento\Core\Model\Store'),
                     'store_action' => 'edit'
                 ),
                 'Edit Store View'
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Variable/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Variable/EditTest.php
similarity index 93%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Variable/EditTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Block/System/Variable/EditTest.php
index 08e8402de4e..b90c83a5b95 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/System/Variable/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Variable/EditTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\System\Variable;
+namespace Magento\Backend\Block\System\Variable;
 
 /**
  * @magentoAppArea adminhtml
@@ -54,7 +54,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
         $objectManager->get('Magento\App\RequestInterface')
             ->setParam('variable_id', $variable->getId());
         $block = $objectManager->get('Magento\View\LayoutInterface')
-            ->createBlock('Magento\Adminhtml\Block\System\Variable\Edit', 'variable');
+            ->createBlock('Magento\Backend\Block\System\Variable\Edit', 'variable');
         $this->assertArrayHasKey('variable-delete_button', $block->getLayout()->getAllBlocks());
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/FormTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/FormTest.php
index 29982f371d0..2d9b82a3e38 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/FormTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/FormTest.php
@@ -41,7 +41,7 @@ class FormTest extends \PHPUnit_Framework_TestCase
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $objectManager->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            ->setArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
             ->setDefaultDesignTheme();
         $layout = $objectManager->create('Magento\Core\Model\Layout');
         $formBlock = $layout->addBlock('Magento\Backend\Block\Widget\Form');
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php
index f014623bc3d..0d2c1e42f84 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php
@@ -69,7 +69,7 @@ class MassactionTest extends \PHPUnit_Framework_TestCase
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
             \Magento\Core\Model\App::PARAM_RUN_CODE => 'admin',
             \Magento\Core\Model\App::PARAM_RUN_TYPE => 'store',
-            \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+            \Magento\App\Dir::PARAM_APP_DIRS => array(
                 \Magento\App\Dir::THEMES => __DIR__ . '/../../_files/design'
             ),
         ));
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php
index ce0b8056b56..d13f1e91042 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php
@@ -41,7 +41,7 @@ class WidgetTest extends \PHPUnit_Framework_TestCase
     {
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
         );
         $layout->getUpdate()->load();
         $layout->generateXml()->generateElements();
@@ -63,7 +63,7 @@ class WidgetTest extends \PHPUnit_Framework_TestCase
     {
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
         );
         $layout->getUpdate()->load();
         $layout->generateXml()->generateElements();
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php
index 2a2ea266014..0094d6f7cac 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php
@@ -23,7 +23,7 @@
  */
 /** @var $registration \Magento\Core\Model\Theme\Registration */
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-    ->loadAreaPart(\Magento\Core\Model\App\Area::AREA_ADMINHTML, \Magento\Core\Model\App\Area::PART_CONFIG);
+    ->loadAreaPart(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, \Magento\Core\Model\App\Area::PART_CONFIG);
 $registration = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
     ->create('Magento\Core\Model\Theme\Registration');
 $registration->register(
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/AbstractActionTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/AbstractActionTest.php
index 3e4f5236571..144358a0e02 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Controller/AbstractActionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/AbstractActionTest.php
@@ -18,9 +18,6 @@
  * 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_Backend
- * @subpackage  integration_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)
  */
@@ -35,13 +32,12 @@ class AbstractActionTest extends \Magento\Backend\Utility\Controller
 {
     /**
      * Check redirection to startup page for logged user
-     * @magentoConfigFixture global/areas/adminhtml/frontName backend
      * @magentoConfigFixture current_store admin/security/use_form_key 1
      */
     public function testPreDispatchWithEmptyUrlRedirectsToStartupPage()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $this->dispatch('backend');
         /** @var $backendUrlModel \Magento\Backend\Model\Url */
         $backendUrlModel =
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php
new file mode 100644
index 00000000000..3e1004c73a4
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php
@@ -0,0 +1,43 @@
+<?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_Adminhtml
+ * @subpackage  integration_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\Backend\Controller\Adminhtml;
+
+/**
+ * @magentoAppArea adminhtml
+ */
+class DashboardTest extends \Magento\Backend\Utility\Controller
+{
+    public function testAjaxBlockAction()
+    {
+        $this->getRequest()->setParam('block', 'tab_orders');
+        $this->dispatch('backend/admin/dashboard/ajaxBlock');
+
+        $actual = $this->getResponse()->getBody();
+        $this->assertContains('dashboard-diagram', $actual);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/System/AccountTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php
similarity index 89%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/System/AccountTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php
index 5bb128b7be3..1e739f420a9 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/System/AccountTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php
@@ -22,7 +22,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\System;
+namespace Magento\Backend\Controller\Adminhtml\System;
 
 /**
  * @magentoAppArea adminhtml
@@ -51,9 +51,11 @@ class AccountTest extends \Magento\Backend\Utility\Controller
         $user = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\User\Model\User')->load($userId);
         $this->assertNotEquals($oldPassword, $user->getPassword());
+
+
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $this->assertTrue(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Helper\Data')
-                ->validateHash($password, $user->getPassword())
+            $objectManager->get('Magento\Encryption\EncryptorInterface')->validateHash($password, $user->getPassword())
         );
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/System/DesignTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/DesignTest.php
similarity index 96%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Controller/System/DesignTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/DesignTest.php
index f3a6d012a54..ccd6839cefc 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/System/DesignTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/DesignTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Controller\System;
+namespace Magento\Backend\Controller\Adminhtml\System;
 
 /**
  * @magentoAppArea adminhtml
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/System/StoreTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/StoreTest.php
similarity index 96%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Controller/System/StoreTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/StoreTest.php
index 05fabc071be..cad3f014200 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/System/StoreTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/StoreTest.php
@@ -22,7 +22,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Controller\System;
+namespace Magento\Backend\Controller\Adminhtml\System;
 
 /**
  * @magentoAppArea adminhtml
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/System/VariableTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/VariableTest.php
similarity index 96%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Controller/System/VariableTest.php
rename to dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/VariableTest.php
index 77e5301153a..6bbb5070461 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/System/VariableTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/VariableTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Controller\System;
+namespace Magento\Backend\Controller\Adminhtml\System;
 
 /**
  * @magentoAppArea adminhtml
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Router/DefaultRouterTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Router/DefaultRouterTest.php
deleted file mode 100644
index 0913771b6b1..00000000000
--- a/dev/tests/integration/testsuite/Magento/Backend/Controller/Router/DefaultRouterTest.php
+++ /dev/null
@@ -1,153 +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_Backend
- * @subpackage  integration_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\Backend\Controller\Router;
-
-/**
- * @magentoAppArea adminhtml
- */
-class DefaultRouterTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Backend\Controller\Router\DefaultRouter
-     */
-    protected $_model;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_frontMock;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_routeConfigMock;
-
-    protected function setUp()
-    {
-        parent::setUp();
-
-        $this->_routeConfigMock = $this->getMock('Magento\Core\Model\Route\Config', array(), array(), '', false);
-        $options = array(
-            'areaCode'        => \Magento\Core\Model\App\Area::AREA_ADMINHTML,
-            'baseController'  => 'Magento\Backend\Controller\AbstractAction',
-            'routeConfig' => $this->_routeConfigMock
-        );
-        $this->_frontMock = $this->getMock('Magento\App\FrontController', array(), array(), '', false);
-        $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Backend\Controller\Router\DefaultRouter', $options);
-        $this->_model->setFront($this->_frontMock);
-    }
-
-    public function testRouterCannotProcessRequestsWithWrongFrontName()
-    {
-        $request = $this->getMock('Magento\App\Request\Http', array(), array(), '', false);
-        $request->expects($this->once())
-            ->method('getPathInfo')
-            ->will($this->returnValue('frontend/admin/dashboard'));
-        $this->_frontMock->expects($this->never())
-            ->method('setDefault');
-        $this->_model->match($request);
-    }
-
-    public function testRouterCanProcessRequestsWithProperFrontName()
-    {
-        $request = $this->getMock('Magento\App\Request\Http', array(), array(), '', false);
-        $request->expects($this->once())
-            ->method('getPathInfo')
-            ->will($this->returnValue('backend/admin/dashboard'));
-        $this->_frontMock->expects($this->once())
-            ->method('setDefault');
-
-        $adminRoute = array(
-            'adminhtml' => array(
-                'id'        => 'adminhtml',
-                'frontName' => 'admin',
-                'modules'   => array(
-                    'Magento_Adminhtml'
-                )
-            )
-        );
-
-        $this->_routeConfigMock->expects($this->once())
-            ->method('getRoutes')
-            ->will($this->returnValue($adminRoute));
-        $this->_model->match($request);
-    }
-
-
-    /**
-     * @covers \Magento\Backend\Controller\Router\DefaultRouter::fetchDefault
-     */
-    public function testFetchDefault()
-    {
-        $default = array(
-            'area' => '',
-            'module' => 'admin',
-            'controller' => 'index',
-            'action' => 'index'
-        );
-        $routes = array(
-            'adminhtml' => array(
-                'id' => 'adminhtml',
-                'frontName' => 'admin',
-                'modules' => array()
-            ),
-            'key1' => array('frontName' => 'something'),
-        );
-
-        $this->_routeConfigMock->expects($this->once())->method('getRoutes')
-            ->will($this->returnValue($routes));
-
-        $this->_frontMock->expects($this->once())
-            ->method('setDefault')
-            ->with($this->equalTo($default));
-        $this->_model->fetchDefault();
-    }
-
-    /**
-     * @param string $module
-     * @param string $controller
-     * @param string $className
-     *
-     * @covers \Magento\Backend\Controller\Router\DefaultRouter::getControllerClassName
-     * @dataProvider getControllerClassNameDataProvider
-     */
-    public function testGetControllerClassName($module, $controller, $className)
-    {
-        $this->assertEquals($className, $this->_model->getControllerClassName($module, $controller));
-    }
-
-    public function getControllerClassNameDataProvider()
-    {
-        return array(
-            array('Magento_Adminhtml', 'index', 'Magento\Adminhtml\Controller\Index'),
-            array('Magento_Index', 'process', 'Magento\Index\Controller\Adminhtml\Process'),
-            array('Magento_Index_Adminhtml', 'process', 'Magento\Index\Controller\Adminhtml\Process'),
-        );
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Helper/DataTest.php b/dev/tests/integration/testsuite/Magento/Backend/Helper/DataTest.php
index 2e3ec9dc9a7..b2c7dbd3fb5 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Helper/DataTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Helper/DataTest.php
@@ -45,7 +45,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $this->_helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\Backend\Helper\Data');
     }
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Auth/SessionTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Auth/SessionTest.php
index 8faa5176f4e..416d41d1830 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Model/Auth/SessionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Auth/SessionTest.php
@@ -46,7 +46,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase
     {
         parent::setUp();
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $this->_auth  = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Backend\Model\Auth');
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/AuthTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/AuthTest.php
index 956faa5e912..61dc2c70390 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Model/AuthTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Model/AuthTest.php
@@ -44,7 +44,7 @@ class AuthTest extends \PHPUnit_Framework_TestCase
         parent::setUp();
 
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->loadArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Backend\Model\Auth');
     }
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/ConfigTest.php
index 858d7cc4f60..98eb62221c7 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Model/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Model/ConfigTest.php
@@ -42,7 +42,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     public function testSaveWithSingleStoreModeEnabled($groups)
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         /** @var $_configDataObject \Magento\Backend\Model\Config */
         $_configDataObject = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Backend\Model\Config');
@@ -90,22 +90,22 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
      */
     public function testSave($section, $groups, $expected)
     {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
         /** @var $_configDataObject \Magento\Backend\Model\Config */
-        $_configDataObject = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Backend\Model\Config');
+        $_configDataObject = $objectManager->create('Magento\Backend\Model\Config');
         $_configDataObject->setSection($section)
             ->setWebsite('base')
             ->setGroups($groups)
             ->save();
 
         foreach ($expected as $group => $expectedData) {
-            $_configDataObject = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                ->create('Magento\Backend\Model\Config');
+            $_configDataObject = $objectManager->create('Magento\Backend\Model\Config');
             $_configData = $_configDataObject->setSection($group)->setWebsite('base')
                 ->load();
             if (array_key_exists('payment/payflow_link/pwd', $_configData)) {
                 $_configData['payment/payflow_link/pwd'] =
-                    \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Helper\Data')
+                    $objectManager->get('Magento\Encryption\EncryptorInterface')
                         ->decrypt($_configData['payment/payflow_link/pwd']);
             }
             $this->assertEquals($expectedData, $_configData);
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/MenuTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/MenuTest.php
index 23a16e9b6af..b1a7e61453b 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Model/MenuTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Model/MenuTest.php
@@ -43,11 +43,11 @@ class MenuTest extends \PHPUnit_Framework_TestCase
     {
         parent::setUp();
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->loadArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Backend\Model\Auth');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
     }
 
     public function testMenuItemManipulation()
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/SessionTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/SessionTest.php
index a9422343c71..a29709441b8 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Model/SessionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Model/SessionTest.php
@@ -39,7 +39,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase
         if (array_key_exists('adminhtml', $_SESSION)) {
             unset($_SESSION['adminhtml']);
         }
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Backend\Model\Session', array($logger));
         $this->assertArrayHasKey('adminhtml', $_SESSION);
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/UrlTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/UrlTest.php
index 43bd2212de6..fb19483a94a 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Model/UrlTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Model/UrlTest.php
@@ -118,25 +118,28 @@ class UrlTest extends \PHPUnit_Framework_TestCase
      */
     public function getSecretKeyDataProvider()
     {
-        /** @var $helper \Magento\Core\Helper\Data */
-        $helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Helper\Data');
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+        /** @var $encryptor \Magento\Encryption\EncryptorInterface */
+        $encryptor = $objectManager->get('Magento\Encryption\EncryptorInterface');
+
         return array(
             array('', '', '',
-                $helper->getHash('default_router' . 'default_controller' . 'default_action' . 'salt')),
+                $encryptor->getHash('default_router' . 'default_controller' . 'default_action' . 'salt')),
             array('', '', 'action',
-                $helper->getHash('default_router' . 'default_controller' . 'action' . 'salt')),
+                $encryptor->getHash('default_router' . 'default_controller' . 'action' . 'salt')),
             array('', 'controller', '',
-                $helper->getHash('default_router' . 'controller' . 'default_action' . 'salt')),
+                $encryptor->getHash('default_router' . 'controller' . 'default_action' . 'salt')),
             array('', 'controller', 'action',
-                $helper->getHash('default_router' . 'controller' . 'action' . 'salt')),
+                $encryptor->getHash('default_router' . 'controller' . 'action' . 'salt')),
             array('adminhtml', '', '',
-                $helper->getHash('adminhtml' . 'default_controller' . 'default_action' . 'salt')),
+                $encryptor->getHash('adminhtml' . 'default_controller' . 'default_action' . 'salt')),
             array('adminhtml', '', 'action',
-                $helper->getHash('adminhtml' . 'default_controller' . 'action' . 'salt')),
+                $encryptor->getHash('adminhtml' . 'default_controller' . 'action' . 'salt')),
             array('adminhtml', 'controller', '',
-                $helper->getHash('adminhtml' . 'controller' . 'default_action' . 'salt')),
+                $encryptor->getHash('adminhtml' . 'controller' . 'default_action' . 'salt')),
             array('adminhtml', 'controller', 'action',
-                $helper->getHash('adminhtml' . 'controller' . 'action' . 'salt')),
+                $encryptor->getHash('adminhtml' . 'controller' . 'action' . 'salt')),
         );
     }
 
@@ -145,9 +148,12 @@ class UrlTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetSecretKeyForwarded()
     {
-        /** @var $helper \Magento\Core\Helper\Data */
-        $helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Helper\Data');
-        /** @var $request \Magento\App\RequestInterface */
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+        /** @var $encryptor \Magento\Encryption\EncryptorInterface */
+        $encryptor = $objectManager->get('Magento\Encryption\EncryptorInterface');
+
+        /** @var $request \Magento\App\Request\Http */
         $request = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\App\RequestInterface');
         $request->setControllerName('controller')->setActionName('action');
@@ -156,7 +162,7 @@ class UrlTest extends \PHPUnit_Framework_TestCase
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Session')
             ->setData('_form_key', 'salt');
         $this->assertEquals(
-            $helper->getHash('controller' . 'action' . 'salt'),
+            $encryptor->getHash('controller' . 'action' . 'salt'),
             $this->_model->getSecretKey()
         );
     }
diff --git a/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php b/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php
index f8404edc8cc..752df3e8119 100644
--- a/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php
+++ b/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php
@@ -35,12 +35,12 @@ class GridTest
      */
     public function testToHtmlHasOnClick()
     {
-        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         /** @var $layout \Magento\View\LayoutInterface */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
         );
         $block = $layout->createBlock(
             'Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Search\Grid',
diff --git a/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/SearchTest.php b/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/SearchTest.php
index 62d35083fc1..569b42a7003 100644
--- a/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/SearchTest.php
+++ b/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/SearchTest.php
@@ -32,20 +32,16 @@ class SearchTest
 {
     /**
      * @magentoAppIsolation enabled
+     * @magentoAppArea adminhtml
      */
     public function testToHtmlHasIndex()
     {
-        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
-
         /** @var $layout \Magento\View\LayoutInterface */
-        $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
-        );
+        $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Core\Model\Layout');
         $block = $layout->createBlock(
             'Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Search',
-            'block2');
+            'block2'
+        );
 
         $indexValue = 'magento_index_set_to_test';
         $block->setIndex($indexValue);
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php
index 0e2d6557814..1e52d510c42 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php
@@ -39,20 +39,18 @@ class TabsTest extends \PHPUnit_Framework_TestCase
     public function testPrepareLayout()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $objectManager->get('Magento\App\State')->setAreaCode(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $objectManager->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML)
             ->setDefaultDesignTheme();
-        $objectManager->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
         /** @var $product \Magento\Catalog\Model\Product */
         $product = $objectManager->create('Magento\Catalog\Model\Product');
         $product->load(1); // fixture
         $objectManager->get('Magento\Core\Model\Registry')->register('product', $product);
 
+        $objectManager->get('Magento\App\State')->setAreaCode('nonexisting');
         /** @var $layout \Magento\Core\Model\Layout */
         $layout = $objectManager->get('Magento\View\LayoutInterface');
         $layout->addBlock('Magento\Core\Block\Text', 'head');
-        $layout->setArea('nonexisting'); // prevent block templates rendering
         /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs */
         $block = $layout->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs');
         $this->assertArrayHasKey(0, $block->getTabsIds());
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/CategoryTest.php
index 5c77706f60c..5f2b882c628 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/CategoryTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/CategoryTest.php
@@ -33,14 +33,14 @@ class CategoryTest extends \PHPUnit_Framework_TestCase
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
         );
 
         $block = $objectManager->create('Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Category',
             array('layout' => $layout));
 
-        /** @var $formFactory \Magento\Data\Form\Factory */
-        $formFactory = $objectManager->get('Magento\Data\Form\Factory');
+        /** @var $formFactory \Magento\Data\FormFactory */
+        $formFactory = $objectManager->get('Magento\Data\FormFactory');
         $form = $formFactory->create();
         $block->setForm($form);
 
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php
index e7c81f2ed0a..fbd7d3c2fc4 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php
@@ -35,14 +35,14 @@ class WeightTest extends \PHPUnit_Framework_TestCase
     protected $_objectManager;
 
     /**
-     * @var \Magento\Data\Form\Factory
+     * @var \Magento\Data\FormFactory
      */
     protected $_formFactory;
 
     protected function setUp()
     {
         $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $this->_formFactory = $this->_objectManager->create('Magento\Data\Form\Factory');
+        $this->_formFactory = $this->_objectManager->create('Magento\Data\FormFactory');
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php
index a516c1ad474..18b340085b1 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php
@@ -65,6 +65,8 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
             self::$_isStubClass = true;
         }
 
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode('frontend');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
             ->setDefaultDesignTheme();
         $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface')
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php
index 31f73cb1a5d..2d907c48d0b 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php
@@ -41,6 +41,8 @@ class ListTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode('frontend');
         $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface')
             ->createBlock('Magento\Catalog\Block\Product\ListProduct');
     }
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/NewTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/NewTest.php
index cdf29e5a04e..18eb7e0b6a4 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/NewTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/NewTest.php
@@ -41,10 +41,10 @@ class NewTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface')
             ->createBlock('Magento\Catalog\Block\Product\NewProduct');
-        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
     }
 
     public function testGetCacheKeyInfo()
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php
index 5e867a346db..1b40e69e5ea 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php
@@ -37,7 +37,7 @@ class CrosssellTest extends \PHPUnit_Framework_TestCase
     public function testAll()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Catalog\Model\Product');
         $product->load(2);
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php
index 58fe415949b..2bc79c50f9c 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php
@@ -37,7 +37,7 @@ class RelatedTest extends \PHPUnit_Framework_TestCase
     public function testAll()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Catalog\Model\Product');
         $product->load(2);
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php
index 11bf6b89e18..81d34678ca8 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php
@@ -40,21 +40,30 @@ class AttributeTest extends \Magento\Backend\Utility\Controller
      */
     public function testSaveActionRedirectsSuccessfully()
     {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
         /** @var $session \Magento\Adminhtml\Model\Session */
-        $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Adminhtml\Model\Session');
+        $session = $objectManager->get('Magento\Adminhtml\Model\Session');
         $session->setProductIds(array(1));
 
         $this->dispatch('backend/catalog/product_action_attribute/save/store/0');
 
         $this->assertEquals(302, $this->getResponse()->getHttpResponseCode());
-        $expectedUrl = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Url')->
-            getUrl('backend/catalog/product/index');
+        /** @var \Magento\Backend\Model\Url $urlBuilder */
+        $urlBuilder = $objectManager->get('Magento\UrlInterface');
+
+        /** @var \Magento\Catalog\Helper\Product\Edit\Action\Attribute $attributeHelper */
+        $attributeHelper = $objectManager->get('Magento\Catalog\Helper\Product\Edit\Action\Attribute');
+        $expectedUrl = $urlBuilder->getUrl(
+            'catalog/product/index', array('store' => $attributeHelper->getSelectedStoreId()))
+        ;
         $isRedirectPresent = false;
         foreach ($this->getResponse()->getHeaders() as $header) {
             if ($header['name'] === 'Location' && strpos($header['value'], $expectedUrl) === 0) {
                 $isRedirectPresent = true;
             }
         }
+
         $this->assertTrue($isRedirectPresent);
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/AttributeTest.php
index d5f3db00921..125977e64fa 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/AttributeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/AttributeTest.php
@@ -118,7 +118,7 @@ class AttributeTest extends \Magento\Backend\Utility\Controller
         /** @var \Magento\Core\Model\Translate $translate */
         $translate = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Core\Model\Translate');
-        $translate->init(\Magento\Backend\Helper\Data::BACKEND_AREA_CODE, null);
+        $translate->init(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, null);
         return $translate->translate(array($string));
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php
index e20e58ab553..811f23658c1 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php
@@ -139,8 +139,10 @@ class CompareTest extends \Magento\TestFramework\TestCase\AbstractController
         /** @var $visitor \Magento\Log\Model\Visitor */
         $visitor = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Log\Model\Visitor');
+        /** @var \Magento\Stdlib\DateTime $dateTime */
+        $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('\Magento\Stdlib\DateTime');
         $visitor->setSessionId(md5(time()) . md5(microtime()))
-            ->setLastVisitAt(now())
+            ->setLastVisitAt($dateTime->now())
             ->save();
         /** @var $item \Magento\Catalog\Model\Product\Compare\Item */
         $item = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
@@ -157,8 +159,12 @@ class CompareTest extends \Magento\TestFramework\TestCase\AbstractController
         /** @var $visitor \Magento\Log\Model\Visitor */
         $visitor = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Log\Model\Visitor');
+
+        /** @var \Magento\Stdlib\DateTime $dateTime */
+        $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('\Magento\Stdlib\DateTime');
+
         $visitor->setSessionId(md5(time()) . md5(microtime()))
-            ->setLastVisitAt(now())
+            ->setLastVisitAt($dateTime->now())
             ->save();
 
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Log\Model\Visitor')
@@ -172,8 +178,10 @@ class CompareTest extends \Magento\TestFramework\TestCase\AbstractController
         /** @var $visitor \Magento\Log\Model\Visitor */
         $visitor = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Log\Model\Visitor');
+        /** @var \Magento\Stdlib\DateTime $dateTime */
+        $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('\Magento\Stdlib\DateTime');
         $visitor->setSessionId(md5(time()) . md5(microtime()))
-            ->setLastVisitAt(now())
+            ->setLastVisitAt($dateTime->now())
             ->save();
 
         /** @var $item \Magento\Catalog\Model\Product\Compare\Item */
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php
index fe57266a56d..7cd53a74488 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php
@@ -29,6 +29,9 @@ namespace Magento\Catalog\Helper\Product;
 require \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Dir')->getDir()
     . '/app/code/Magento/Catalog/Controller/Product.php';
 
+/**
+ * @magentoAppArea frontend
+ */
 class ViewTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -44,6 +47,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $objectManager->get('Magento\App\State')->setAreaCode('frontend');
         $objectManager->get('Magento\View\DesignInterface')
             ->setDefaultDesignTheme();
         $this->_helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
@@ -80,6 +84,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase
 
     /**
      * @magentoAppIsolation enabled
+     * @magentoAppArea frontend
      */
     public function testInitProductLayout()
     {
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/ProductTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/ProductTest.php
index f9eb4bdb757..b43c9dc8988 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/ProductTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/ProductTest.php
@@ -36,6 +36,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode('frontend');
         $this->_helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\Catalog\Helper\Product');
     }
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest.php
index 2c9284efa47..a679348afae 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest.php
@@ -48,12 +48,10 @@ class CategoryImageTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         /** @var $configModel \Magento\Core\Model\Config */
-        $configModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Config');
         $this->_oldLogActive = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\Core\Model\StoreManagerInterface')->getStore()->getConfig('dev/log/active');
         $this->_oldExceptionFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\Core\Model\StoreManagerInterface')->getStore()->getConfig('dev/log/exception_file');
-        $this->_oldWriterModel = (string)$configModel->getNode('global/log/core/writer_model');
     }
 
     protected function tearDown()
@@ -66,9 +64,6 @@ class CategoryImageTest extends \PHPUnit_Framework_TestCase
             ->getStore()->setConfig('dev/log/exception_file', $this->_oldExceptionFile);
         $this->_oldExceptionFile = null;
 
-        /** @var $configModel \Magento\Core\Model\Config */
-        $configModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Config');
-        $configModel->setNode('global/log/core/writer_model', $this->_oldWriterModel);
         $this->_oldWriterModel = null;
 
         /**
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest/StubZendLogWriterStreamTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest/StubZendLogWriterStreamTest.php
index 7557a2b487e..a0803b2b9ff 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest/StubZendLogWriterStreamTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest/StubZendLogWriterStreamTest.php
@@ -31,12 +31,6 @@ namespace Magento\Catalog\Model\Category\CategoryImageTest;
     ->setConfig('dev/log/active', 1);
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\StoreManagerInterface')->getStore()
     ->setConfig('dev/log/exception_file', 'save_category_without_image.log');
-\Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-    ->get('Magento\Core\Model\Config')
-    ->setNode(
-        'global/log/core/writer_model',
-        'Magento\Catalog\Model\Category\CategoryImageTest\StubZendLogWriterStreamTest'
-);
 
 class StubZendLogWriterStreamTest extends \Zend_Log_Writer_Stream
 {
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php
index 95e7c7668f5..18bf376162d 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php
@@ -67,6 +67,9 @@ class ItemTest extends \PHPUnit_Framework_TestCase
         $model->getFilter();
     }
 
+    /**
+     * @magentoAppArea frontend
+     */
     public function testGetUrl()
     {
         /** @var $objectManager \Magento\TestFramework\ObjectManager */
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php
index 6a41d51983d..0c60a6add66 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php
@@ -46,7 +46,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $fileStorageDb = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
         $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
         $registry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $this->_model = $this->getMockForAbstractClass('Magento\Catalog\Model\Product\Type\AbstractType',
             array($productFactory, $catalogProductOption, $eavConfig, $catalogProductType, $eventManager, $coreData,
                 $fileStorageDb, $filesystem, $registry, $logger)
@@ -267,6 +267,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
      */
     public function testBeforeSave()
     {
+        $this->markTestIncomplete('MAGETWO-9199');
         /** @var $product \Magento\Catalog\Model\Product */
         $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Catalog\Model\Product');
@@ -274,7 +275,6 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $product->setData('links_purchased_separately', 'value'); // this attribute is applicable only for downloadable
         $this->_model->beforeSave($product);
         $this->assertTrue($product->canAffectOptions());
-        $this->markTestIncomplete('MAGETWO-9199');
         $this->assertFalse($product->hasData('links_purchased_separately'));
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/MainTest.php b/dev/tests/integration/testsuite/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/MainTest.php
similarity index 83%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/MainTest.php
rename to dev/tests/integration/testsuite/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/MainTest.php
index 68eead7ccb7..754a5d63275 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Promo/Catalog/Edit/Tab/MainTest.php
+++ b/dev/tests/integration/testsuite/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/MainTest.php
@@ -25,10 +25,10 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\Promo\Catalog\Edit\Tab;
+namespace Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab;
 
 /**
- * Test class for \Magento\Adminhtml\Block\Promo\Catalog\Edit\Tab\Main
+ * Test class for \Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Main
  *
  * @magentoAppArea adminhtml
  */
@@ -42,15 +42,15 @@ class MainTest extends \PHPUnit_Framework_TestCase
         /** @var $objectManager \Magento\TestFramework\ObjectManager */
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $objectManager->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            ->setArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
             ->setDefaultDesignTheme();
         $rule = $objectManager->create('Magento\CatalogRule\Model\Rule');
         $objectManager->get('Magento\Core\Model\Registry')->register('current_promo_catalog_rule', $rule);
 
-        $block = $objectManager->create('Magento\Adminhtml\Block\Promo\Catalog\Edit\Tab\Main');
+        $block = $objectManager->create('Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Main');
         $block->setLayout($objectManager->create('Magento\Core\Model\Layout'));
         $prepareFormMethod = new \ReflectionMethod(
-            'Magento\Adminhtml\Block\Promo\Catalog\Edit\Tab\Main', '_prepareForm'
+            'Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Main', '_prepareForm'
         );
         $prepareFormMethod->setAccessible(true);
         $prepareFormMethod->invoke($block);
diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php
index e4b02bc65d4..f82c7743863 100644
--- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php
+++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php
@@ -66,23 +66,23 @@ class DataTest extends \PHPUnit_Framework_TestCase
     {
         /** @var \Magento\TestFramework\ObjectManager  $objectManager */
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $mock \Magento\CatalogSearch\Helper\Data */
-        $mock = $this->getMock(
-            'Magento\CatalogSearch\Helper\Data',
-            array('getQueryText'),
-            array(
-                $objectManager->get('Magento\Core\Helper\Context'),
-                $objectManager->get('Magento\Core\Helper\String'),
-                $objectManager->get('Magento\Core\Model\Store\ConfigInterface'),
-                $objectManager->get('Magento\CatalogSearch\Model\QueryFactory'),
+
+        /** @var \Magento\CatalogSearch\Helper\Data $catalogSearchHelper */
+        $catalogSearchHelper = $this->getMock('Magento\CatalogSearch\Helper\Data', array('getQueryText'), array(
+            $objectManager->get('Magento\Core\Helper\Context'),
+            $objectManager->get('Magento\Stdlib\String'),
+            $objectManager->get('Magento\Core\Model\Store\ConfigInterface'),
+            $objectManager->get('Magento\CatalogSearch\Model\QueryFactory'),
+            $objectManager->get('Magento\Escaper'),
+            $objectManager->get('Magento\Filter\FilterManager'),
         ));
-        $mock->expects($this->any())
+        $catalogSearchHelper->expects($this->any())
             ->method('getQueryText')
             ->will($this->returnValue('five <words> here <being> tested'));
 
-        $mock->checkNotes();
+        $catalogSearchHelper->checkNotes();
 
-        $notes = implode($mock->getNoteMessages());
+        $notes = implode($catalogSearchHelper->getNoteMessages());
         $this->assertContains('&lt;being&gt;', $notes);
         $this->assertNotContains('<being>', $notes);
     }
diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php
index 051a4310261..9d1e611900d 100644
--- a/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php
+++ b/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php
@@ -40,7 +40,7 @@ class RendererTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface')
             ->createBlock('Magento\Checkout\Block\Cart\Item\Renderer');
         /** @var $item \Magento\Sales\Model\Quote\Item */
diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php
index 83c2fc2d0f5..408dbe22a08 100644
--- a/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php
+++ b/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php
@@ -32,6 +32,8 @@ class SidebarTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode('frontend');
         $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface')
             ->createBlock('Magento\Checkout\Block\Cart\Sidebar');
     }
diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Block/Multishipping/OverviewTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Block/Multishipping/OverviewTest.php
index 2c4e961180f..fd467f89a5b 100644
--- a/dev/tests/integration/testsuite/Magento/Checkout/Block/Multishipping/OverviewTest.php
+++ b/dev/tests/integration/testsuite/Magento/Checkout/Block/Multishipping/OverviewTest.php
@@ -34,29 +34,32 @@ class OverviewTest extends \PHPUnit_Framework_TestCase
      */
     protected $_block;
 
+    /**
+     * @var \Magento\ObjectManager
+     */
+    protected $_objectManager;
+
     protected function setUp()
     {
-        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
-        $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface')
+        $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->_objectManager->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
+        $this->_block = $this->_objectManager->get('Magento\View\LayoutInterface')
             ->createBlock('Magento\Checkout\Block\Multishipping\Overview');
     }
 
     public function testGetRowItemHtml()
     {
         /** @var $item \Magento\Sales\Model\Quote\Item */
-        $item = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Sales\Model\Quote\Item');
+        $item = $this->_objectManager->create('Magento\Sales\Model\Quote\Item');
         /** @var $product \Magento\Catalog\Model\Product */
-        $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Catalog\Model\Product');
+        $product = $this->_objectManager->create('Magento\Catalog\Model\Product');
         $product->load(1);
         $item->setProduct($product);
         /** @var $quote \Magento\Sales\Model\Quote */
-        $quote = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Sales\Model\Quote');
+        $quote = $this->_objectManager->create('Magento\Sales\Model\Quote');
         $item->setQuote($quote);
         // assure that default renderer was obtained
-        $this->assertSelectCount('strong.product.name a', 1, $this->_block->getRowItemHtml($item));
+        $this->assertSelectCount('.product.name a', 1, $this->_block->getRowItemHtml($item));
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Controller/MultishippingTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Controller/MultishippingTest.php
index 9c3f98e3f5d..ba37eafd22a 100644
--- a/dev/tests/integration/testsuite/Magento/Checkout/Controller/MultishippingTest.php
+++ b/dev/tests/integration/testsuite/Magento/Checkout/Controller/MultishippingTest.php
@@ -50,7 +50,7 @@ class MultishippingTest extends \Magento\TestFramework\TestCase\AbstractControll
         $quote->load('test01', 'reserved_order_id');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Checkout\Model\Session')
             ->setQuoteId($quote->getId());
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         /** @var $session \Magento\Customer\Model\Session */
         $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Customer\Model\Session', array($logger));
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/DesignTest.php b/dev/tests/integration/testsuite/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/DesignTest.php
similarity index 81%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/DesignTest.php
rename to dev/tests/integration/testsuite/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/DesignTest.php
index f065f2a10bc..f201241fd9a 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/DesignTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/DesignTest.php
@@ -19,16 +19,16 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Cms
  * @subpackage  integration_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\Adminhtml\Block\Cms\Page\Edit\Tab;
+namespace Magento\Cms\Block\Adminhtml\Page\Edit\Tab;
 
 /**
- * Test class for \Magento\Adminhtml\Block\Cms\Page\Edit\Tab\Design
+ * Test class for \Magento\Cms\Block\Adminhtml\Page\Edit\Tab\Design
  * @magentoAppArea adminhtml
  */
 class DesignTest extends \PHPUnit_Framework_TestCase
@@ -41,16 +41,16 @@ class DesignTest extends \PHPUnit_Framework_TestCase
         /** @var $objectManager \Magento\TestFramework\ObjectManager */
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $objectManager->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            ->setArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
             ->setDefaultDesignTheme();
         $objectManager->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $objectManager->get('Magento\Core\Model\Registry')
             ->register('cms_page', $objectManager->create('Magento\Cms\Model\Page'));
 
-        $block = $objectManager->create('Magento\Adminhtml\Block\Cms\Page\Edit\Tab\Design');
+        $block = $objectManager->create('Magento\Cms\Block\Adminhtml\Page\Edit\Tab\Design');
         $prepareFormMethod = new \ReflectionMethod(
-            'Magento\Adminhtml\Block\Cms\Page\Edit\Tab\Design', '_prepareForm');
+            'Magento\Cms\Block\Adminhtml\Page\Edit\Tab\Design', '_prepareForm');
         $prepareFormMethod->setAccessible(true);
         $prepareFormMethod->invoke($block);
 
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php
index b756d44aefc..7452d870143 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php
@@ -49,7 +49,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase
             \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
                 ->get('Magento\UrlInterface'),
             \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                ->get('Magento\Core\Model\Config\Primary'),
+                ->get('Magento\App\StateInterface'),
             \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
                 ->get('Magento\Cms\Model\PageFactory'),
             \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php b/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php
index f22ea853453..493db4c80bf 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php
@@ -27,6 +27,9 @@
 
 namespace Magento\Cms\Helper;
 
+/**
+ * @magentoAppArea frontend
+ */
 class PageTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -37,6 +40,7 @@ class PageTest extends \PHPUnit_Framework_TestCase
     {
         /** @var $objectManager \Magento\TestFramework\ObjectManager */
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $objectManager->get('Magento\App\State')->setAreaCode('frontend');
         $arguments = array(
             'request' => $objectManager->get('Magento\TestFramework\Request'),
             'response' => $objectManager->get('Magento\TestFramework\Response')
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php
index 5a630002ccc..398f3aa6e80 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php
@@ -40,7 +40,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\ScopeInterface')
-            ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Cms\Model\Wysiwyg\Config');
     }
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php
index 2f4ed6d7b13..7e6c86b00e2 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php
@@ -54,8 +54,10 @@ class StorageTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetFilesCollection()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setDesignTheme('magento_basic', 'adminhtml');
+            ->setDesignTheme('magento_basic');
         /** @var $model \Magento\Cms\Model\Wysiwyg\Images\Storage */
         $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Cms\Model\Wysiwyg\Images\Storage');
diff --git a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithNamespaceInterceptor.php b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithNamespaceInterceptor.php
index d79650b8d74..44ad5f06da5 100644
--- a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithNamespaceInterceptor.php
+++ b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithNamespaceInterceptor.php
@@ -159,7 +159,7 @@ class SourceClassWithNamespaceInterceptor extends \Magento\Code\GeneratorTest\So
      */
     public function __wakeup()
     {
-        $this->_objectManager = \Magento\Core\Model\ObjectManager::getInstance();
+        $this->_objectManager = \Magento\App\ObjectManager::getInstance();
         $this->_pluginList = $this->_objectManager->get('Magento\Interception\PluginList');
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithNamespaceProxy.php b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithNamespaceProxy.php
index 8565650f9a7..71a8dc91c00 100644
--- a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithNamespaceProxy.php
+++ b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithNamespaceProxy.php
@@ -85,7 +85,7 @@ class SourceClassWithNamespaceProxy extends \Magento\Code\GeneratorTest\SourceCl
      */
     public function __wakeup()
     {
-        $this->_objectManager = \Magento\Core\Model\ObjectManager::getInstance();
+        $this->_objectManager = \Magento\App\ObjectManager::getInstance();
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithoutNamespaceInterceptor.php b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithoutNamespaceInterceptor.php
index 6c1ff0fee43..50b5e903829 100644
--- a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithoutNamespaceInterceptor.php
+++ b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithoutNamespaceInterceptor.php
@@ -160,7 +160,7 @@ class SourceClassWithoutNamespaceInterceptor
      */
     public function __wakeup()
     {
-        $this->_objectManager = \Magento\Core\Model\ObjectManager::getInstance();
+        $this->_objectManager = \Magento\App\ObjectManager::getInstance();
         $this->_pluginList = $this->_objectManager->get('Magento\Interception\PluginList');
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithoutNamespaceProxy.php b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithoutNamespaceProxy.php
index deffee0fc68..c0c12bd4480 100644
--- a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithoutNamespaceProxy.php
+++ b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithoutNamespaceProxy.php
@@ -86,7 +86,7 @@ class SourceClassWithoutNamespaceProxy
      */
     public function __wakeup()
     {
-        $this->_objectManager = \Magento\Core\Model\ObjectManager::getInstance();
+        $this->_objectManager = \Magento\App\ObjectManager::getInstance();
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceInterfaceWithoutNamespaceInterceptor.php b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceInterfaceWithoutNamespaceInterceptor.php
index f70798964b9..d6afae74241 100644
--- a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceInterfaceWithoutNamespaceInterceptor.php
+++ b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceInterfaceWithoutNamespaceInterceptor.php
@@ -160,7 +160,7 @@ class SourceInterfaceWithoutNamespaceInterceptor
      */
     public function __wakeup()
     {
-        $this->_objectManager = \Magento\Core\Model\ObjectManager::getInstance();
+        $this->_objectManager = \Magento\App\ObjectManager::getInstance();
         $this->_pluginList = $this->_objectManager->get('Magento\Interception\PluginList');
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Core/Controller/Varien/Router/BaseTest.php b/dev/tests/integration/testsuite/Magento/Core/App/Router/BaseTest.php
similarity index 63%
rename from dev/tests/integration/testsuite/Magento/Core/Controller/Varien/Router/BaseTest.php
rename to dev/tests/integration/testsuite/Magento/Core/App/Router/BaseTest.php
index 88abd658234..bd09b17b7d9 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Controller/Varien/Router/BaseTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/App/Router/BaseTest.php
@@ -25,40 +25,25 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Core\Controller\Varien\Router;
+namespace Magento\Core\App\Router;
 
 class BaseTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Controller\Varien\Router\Base
+     * @var \Magento\Core\App\Router\Base
      */
     protected $_model;
 
     protected function setUp()
     {
-        $options = array(
-            'areaCode' => 'frontend',
-            'baseController' => 'Magento\Core\Controller\Front\Action',
-            'routerId' => 'standard'
-        );
+        $options = array('routerId' => 'standard');
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Core\Controller\Varien\Router\Base', $options);
-        $this->_model->setFront(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\App\FrontController'));
-    }
-
-    public function testFetchDefault()
-    {
-        $default = array(
-            'module' => 'core',
-            'controller' => 'index',
-            'action' => 'index'
-        );
-        $this->assertEmpty($this->_model->getFront()->getDefault());
-        $this->_model->fetchDefault();
-        $this->assertEquals($default, $this->_model->getFront()->getDefault());
+            ->create('Magento\Core\App\Router\Base', $options);
     }
 
+    /**
+     * @magentoAppArea frontend
+     */
     public function testMatch()
     {
         if (!\Magento\TestFramework\Helper\Bootstrap::canTestHeaders()) {
@@ -81,18 +66,6 @@ class BaseTest extends \PHPUnit_Framework_TestCase
         $this->assertNull($this->_model->match($request));
     }
 
-    /**
-     * @covers \Magento\Core\Controller\Varien\Router\Base::getModulesByFrontName
-     * @covers \Magento\Core\Controller\Varien\Router\Base::getRouteByFrontName
-     * @covers \Magento\Core\Controller\Varien\Router\Base::getFrontNameByRoute
-     */
-    public function testGetters()
-    {
-        $this->assertEquals(array('Magento_Catalog'), $this->_model->getModulesByFrontName('catalog'));
-        $this->assertEquals('cms', $this->_model->getRouteByFrontName('cms'));
-        $this->assertEquals('cms', $this->_model->getFrontNameByRoute('cms'));
-    }
-
     public function testGetControllerClassName()
     {
         $this->assertEquals(
diff --git a/dev/tests/integration/testsuite/Magento/Core/Block/AbstractBlockTest.php b/dev/tests/integration/testsuite/Magento/Core/Block/AbstractBlockTest.php
index 24802c11f91..a1d815996c4 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Block/AbstractBlockTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Block/AbstractBlockTest.php
@@ -46,6 +46,7 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
             ->setDefaultDesignTheme();
         $this->_block = $this->getMockForAbstractClass('Magento\Core\Block\AbstractBlock', array(
@@ -628,10 +629,10 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals($url, $this->_block->escapeUrl($url));
     }
 
-    public function testJsQuoteEscape()
+    public function testEscapeJsQuote()
     {
         $script = "var s = 'text';";
-        $this->assertEquals('var s = \\\'text\\\';', $this->_block->jsQuoteEscape($script));
+        $this->assertEquals('var s = \\\'text\\\';', $this->_block->escapeJsQuote($script));
     }
 
     public function testGetCacheKeyInfo()
diff --git a/dev/tests/integration/testsuite/Magento/Core/Block/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Core/Block/TemplateTest.php
index 22246796fc2..4681b04644e 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Block/TemplateTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Block/TemplateTest.php
@@ -59,11 +59,12 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
 
     public function testGetArea()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         $this->assertEquals('frontend', $this->_block->getArea());
-        $this->_block->setLayout(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Core\Model\Layout', array('area' => 'some_area')));
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('some_area');
         $this->assertEquals('some_area', $this->_block->getArea());
-        $this->_block->setArea('another_area');
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode('another_area');
         $this->assertEquals('another_area', $this->_block->getArea());
     }
 
@@ -74,6 +75,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
      */
     public function testToHtml()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('any area');
         $this->assertEmpty($this->_block->toHtml());
         $this->_block->setTemplate(uniqid('invalid_filename.phtml'));
         $this->assertEmpty($this->_block->toHtml());
diff --git a/dev/tests/integration/testsuite/Magento/Core/Controller/Varien/ActionTest.php b/dev/tests/integration/testsuite/Magento/Core/Controller/Varien/ActionTest.php
index bb082db8b1b..88a17f1d8b0 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Controller/Varien/ActionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Controller/Varien/ActionTest.php
@@ -27,6 +27,9 @@
 
 namespace Magento\Core\Controller\Varien;
 
+/**
+ * @magentoAppArea frontend
+ */
 class ActionTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -42,8 +45,9 @@ class ActionTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+        $this->_objectManager->get('Magento\App\State')->setAreaCode(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $this->_objectManager->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)
             ->setDefaultDesignTheme();
         /** @var $objectManager \Magento\TestFramework\ObjectManager */
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
@@ -54,7 +58,6 @@ class ActionTest extends \PHPUnit_Framework_TestCase
             'response' => $this->_objectManager->get('Magento\TestFramework\Response'),
         );
         $this->_objectManager->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)
             ->setDefaultDesignTheme();
         $context = $this->_objectManager->create('Magento\Core\Controller\Varien\Action\Context', $arguments);
         $this->_object = $this->getMockForAbstractClass(
@@ -297,10 +300,12 @@ class ActionTest extends \PHPUnit_Framework_TestCase
     {
         $themes = array('frontend' => 'magento_blank', 'adminhtml' => 'magento_backend', 'install' => 'magento_basic');
         $design = $this->_objectManager->create('Magento\Core\Model\View\Design', array('themes' => $themes));
+        $app = $this->_objectManager->create('Magento\Core\Model\App');
         $this->_objectManager->addSharedInstance($design, 'Magento\Core\Model\View\Design');
+        $this->_objectManager->addSharedInstance($app, 'Magento\Core\Model\App');
+        $this->_objectManager->addSharedInstance($app, 'Magento\TestFramework\App');
+        $app->loadArea($expectedArea);
 
-        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->loadArea($expectedArea);
         /** @var $controller \Magento\Core\Controller\Varien\Action */
         $context = $this->_objectManager->create($context, array(
             'response' => $this->_objectManager->get('Magento\TestFramework\Response')
diff --git a/dev/tests/integration/testsuite/Magento/Core/Helper/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Core/Helper/AbstractTest.php
index 81e9d473281..8b054883ef3 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Helper/AbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Helper/AbstractTest.php
@@ -55,73 +55,6 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $this->assertTrue($this->_helper->isModuleOutputEnabled());
     }
 
-    /**
-     * @dataProvider escapeHtmlDataProvider
-     */
-    public function testEscapeHtml($data, $expected)
-    {
-        $actual = $this->_helper->escapeHtml($data);
-        $this->assertEquals($expected, $actual);
-    }
-
-    /**
-     * @return array
-     */
-    public function escapeHtmlDataProvider()
-    {
-        return array(
-            'array data' => array(
-                'data' => array('one', '<two>three</two>'),
-                'expected' => array('one', '&lt;two&gt;three&lt;/two&gt;')
-            ),
-            'string data conversion' => array(
-                'data' => '<two>three</two>',
-                'expected' => '&lt;two&gt;three&lt;/two&gt;'
-            ),
-            'string data no conversion' => array(
-                'data' => 'one',
-                'expected' => 'one'
-            )
-        );
-    }
-
-    public function testStripTags()
-    {
-        $this->assertEquals('three', $this->_helper->stripTags('<two>three</two>'));
-    }
-
-    /**
-     * @covers \Magento\Core\Helper\AbstractHelper::escapeUrl
-     */
-    public function testEscapeUrl()
-    {
-        $data = '<two>"three</two>';
-        $expected = '&lt;two&gt;&quot;three&lt;/two&gt;';
-        $this->assertEquals($expected, $this->_helper->escapeUrl($data));
-    }
-
-    public function testJsQuoteEscape()
-    {
-        $data = array("Don't do that.", 'lost_key' => "Can't do that.");
-        $expected = array("Don\\'t do that.", "Can\\'t do that.");
-        $this->assertEquals($expected, $this->_helper->jsQuoteEscape($data));
-        $this->assertEquals($expected[0], $this->_helper->jsQuoteEscape($data[0]));
-    }
-
-    /**
-     * @covers \Magento\Core\Helper\AbstractHelper::quoteEscape
-     */
-    public function testQuoteEscape()
-    {
-        $data = "Text with 'single' and \"double\" quotes";
-        $expected = array(
-            "Text with &#039;single&#039; and &quot;double&quot; quotes",
-            "Text with \\&#039;single\\&#039; and \\&quot;double\\&quot; quotes",
-        );
-        $this->assertEquals($expected[0], $this->_helper->quoteEscape($data));
-        $this->assertEquals($expected[1], $this->_helper->quoteEscape($data, true));
-    }
-
     public function testUrlEncodeDecode()
     {
         $data = uniqid();
diff --git a/dev/tests/integration/testsuite/Magento/Core/Helper/DataTest.php b/dev/tests/integration/testsuite/Magento/Core/Helper/DataTest.php
index 2cb5a59f704..229ac663ec3 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Helper/DataTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Helper/DataTest.php
@@ -57,11 +57,6 @@ class DataTest extends \PHPUnit_Framework_TestCase
         $this->_dateTime->setTimezone(new \DateTimeZone(self::DATE_TIMEZONE));
     }
 
-    public function testGetEncryptor()
-    {
-        $this->assertInstanceOf('Magento\Core\Model\Encryption', $this->_helper->getEncryptor());
-    }
-
     public function testCurrency()
     {
         $price = 10.00;
@@ -107,40 +102,6 @@ class DataTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    public function testEncryptDecrypt()
-    {
-        $initial = md5(uniqid());
-        $encrypted = $this->_helper->encrypt($initial);
-        $this->assertNotEquals($initial, $encrypted);
-        $this->assertEquals($initial, $this->_helper->decrypt($encrypted));
-    }
-
-    public function testValidateKey()
-    {
-        $validKey = md5(uniqid());
-        $this->assertInstanceOf('Magento\Crypt', $this->_helper->validateKey($validKey));
-    }
-
-    public function testGetRandomString()
-    {
-        $string = $this->_helper->getRandomString(10);
-        $this->assertEquals(10, strlen($string));
-    }
-
-    public function testGetValidateHash()
-    {
-        $password = uniqid();
-        $hash = $this->_helper->getHash($password);
-
-        $this->assertTrue(is_string($hash));
-        $this->assertTrue($this->_helper->validateHash($password, $hash));
-    }
-
-    public function testGetStoreId()
-    {
-        $this->assertTrue(is_numeric($this->_helper->getStoreId()));
-    }
-
     /**
      * @magentoAppIsolation enabled
      */
@@ -155,7 +116,12 @@ class DataTest extends \PHPUnit_Framework_TestCase
      */
     public function testIsDevAllowedTrue()
     {
-        $_SERVER['REMOTE_ADDR'] = '192.168.0.1';
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+        /** @var \Magento\TestFramework\Request $request */
+        $request = $objectManager->get('Magento\TestFramework\Request');
+        $request->setServer(array('REMOTE_ADDR' => '192.168.0.1'));
+
         $this->assertTrue($this->_helper->isDevAllowed());
     }
 
@@ -165,7 +131,12 @@ class DataTest extends \PHPUnit_Framework_TestCase
      */
     public function testIsDevAllowedFalse()
     {
-        $_SERVER['REMOTE_ADDR'] = '192.168.0.3';
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+        /** @var \Magento\TestFramework\Request $request */
+        $request = $objectManager->get('Magento\TestFramework\Request');
+        $request->setServer(array('REMOTE_ADDR' => '192.168.0.3'));
+
         $this->assertFalse($this->_helper->isDevAllowed());
     }
 
@@ -246,56 +217,6 @@ class DataTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals($decoratedVo, $this->_helper->decorateArray($sample, ''));
     }
 
-    public function testAssocToXml()
-    {
-        $data = array(
-            'one' => 1,
-            'two' => array(
-                'three' => 3,
-                'four' => '4',
-            ),
-        );
-        $result = $this->_helper->assocToXml($data);
-        $expectedResult = <<<XML
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<_><one>1</one><two><three>3</three><four>4</four></two></_>
-
-XML;
-        $this->assertInstanceOf('SimpleXMLElement', $result);
-        $this->assertEquals($expectedResult, $result->asXML());
-    }
-
-    /**
-     * @param array $array
-     * @param string $rootName
-     * @expectedException \Magento\Exception
-     * @dataProvider assocToXmlExceptionDataProvider
-     */
-    public function testAssocToXmlException($array, $rootName = '_')
-    {
-        $this->_helper->assocToXml($array, $rootName);
-    }
-
-    public function assocToXmlExceptionDataProvider()
-    {
-        return array(
-            array(array(), ''),
-            array(array(), 0),
-            array(array(1, 2, 3)),
-            array(array('root' => 1), 'root'),
-        );
-    }
-
-    public function testXmlToAssoc()
-    {
-        $xmlstr = <<<XML
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<_><one>1</one><two><three>3</three><four>4</four></two></_>
-XML;
-        $result = $this->_helper->xmlToAssoc(new \SimpleXMLElement($xmlstr));
-        $this->assertEquals(array('one' => '1', 'two' => array('three' => '3', 'four'  => '4')), $result);
-    }
-
     public function testJsonEncodeDecode()
     {
         $data = array('one' => 1, 'two' => 'two');
@@ -304,15 +225,6 @@ XML;
         $this->assertEquals($data, $this->_helper->jsonDecode($jsonData));
     }
 
-    public function testUniqHash()
-    {
-        $hashOne = $this->_helper->uniqHash();
-        $hashTwo = $this->_helper->uniqHash();
-        $this->assertTrue(is_string($hashOne));
-        $this->assertTrue(is_string($hashTwo));
-        $this->assertNotEquals($hashOne, $hashTwo);
-    }
-
     public function testGetDefaultCountry()
     {
         $this->assertEquals('US', $this->_helper->getDefaultCountry());
diff --git a/dev/tests/integration/testsuite/Magento/Core/Helper/HttpTest.php b/dev/tests/integration/testsuite/Magento/Core/Helper/HttpTest.php
deleted file mode 100644
index 312bbd928e5..00000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Helper/HttpTest.php
+++ /dev/null
@@ -1,77 +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_Core
- * @subpackage  integration_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\Core\Helper;
-
-class HttpTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Core\Helper\Http
-     */
-    protected $_helper = null;
-
-    protected function setUp()
-    {
-        $this->_helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Helper\Http');
-    }
-
-    public function testGetRemoteAddrHeaders()
-    {
-        $this->assertEquals(array(), $this->_helper->getRemoteAddrHeaders());
-    }
-
-    public function testGetRemoteAddr()
-    {
-        $this->assertEquals(false, $this->_helper->getRemoteAddr());
-    }
-
-    public function testGetServerAddr()
-    {
-        $this->assertEquals(false, $this->_helper->getServerAddr());
-    }
-
-    public function testGetHttpMethods()
-    {
-        $host = 'localhost';
-        $this->assertEquals(false, $this->_helper->getHttpAcceptCharset());
-        $this->assertEquals($host, $this->_helper->getHttpHost());
-        $this->assertEquals(false, $this->_helper->getHttpReferer());
-        $this->assertEquals(false, $this->_helper->getHttpAcceptLanguage());
-        $this->assertEquals(false, $this->_helper->getHttpUserAgent());
-    }
-
-    public function testGetRequestUri()
-    {
-        $this->assertNull($this->_helper->getRequestUri());
-    }
-
-    public function testValidateIpAddr()
-    {
-        $this->assertTrue((bool)$this->_helper->validateIpAddr('127.0.0.1'));
-        $this->assertFalse((bool)$this->_helper->validateIpAddr('invalid'));
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Core/Helper/StringTest.php b/dev/tests/integration/testsuite/Magento/Core/Helper/StringTest.php
deleted file mode 100644
index ef6f94f46c8..00000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Helper/StringTest.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_Core
- * @subpackage  integration_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\Core\Helper;
-
-class StringTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Core\Helper\String
-     */
-    protected $_helper;
-
-    protected function setUp()
-    {
-        $this->_helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Helper\String');
-    }
-
-    /**
-     * @covers \Magento\Core\Helper\String::truncate
-     * @covers \Magento\Core\Helper\String::strlen
-     * @covers \Magento\Core\Helper\String::substr
-     */
-    public function testTruncate()
-    {
-        $string = '1234567890';
-        $this->assertEquals('12...', $this->_helper->truncate($string, 5));
-
-        $words = '123 456 789';
-        $remainder = '';
-        $this->assertEquals('123...', $this->_helper->truncate($words, 8, '...', $remainder, false));
-    }
-
-    /**
-     * @covers \Magento\Core\Helper\String::splitInjection
-     * @covers \Magento\Core\Helper\String::strrev
-     */
-    public function testSplitInjection()
-    {
-        $string = '1234567890';
-        $this->assertEquals('1234 5678 90', $this->_helper->splitInjection($string, 4));
-    }
-
-    public function testStrSplit()
-    {
-        $this->assertEquals(array(), $this->_helper->strSplit(''));
-        $this->assertEquals(array('1', '2', '3', '4'), $this->_helper->strSplit('1234', 1));
-        $this->assertEquals(array('1', '2', ' ', '3', '4'), $this->_helper->strSplit('12 34', 1, false, true));
-        $this->assertEquals(array(
-            '12345', '123', '12345', '6789'
-        ), $this->_helper->strSplit('12345  123    123456789', 5, true, true));
-    }
-
-    /**
-     * Bug: $maxWordLength parameter has a misleading name. It limits qty of words in the result.
-     */
-    public function testSplitWords()
-    {
-        $words = '123  123  45 789';
-        $this->assertEquals(array('123', '123', '45'), $this->_helper->splitWords($words, false, 3));
-        $this->assertEquals(array('123', '45'), $this->_helper->splitWords($words, true, 2));
-    }
-
-    public function testCleanString()
-    {
-        $string = '12345';
-        $this->assertEquals($string, $this->_helper->cleanString($string));
-    }
-
-    public function testStrpos()
-    {
-        $this->assertEquals(1, $this->_helper->strpos('123', 2));
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/App/AreaTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/App/AreaTest.php
index 83b11e71432..41ad8075dae 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/App/AreaTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/App/AreaTest.php
@@ -42,6 +42,7 @@ class AreaTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         /** @var $_model \Magento\Core\Model\App\Area */
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Core\Model\App\Area', array('areaCode' => 'frontend'));
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php
index b2058b098ce..0b01389c52e 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php
@@ -42,16 +42,17 @@ class EmulationTest extends \PHPUnit_Framework_TestCase
     {
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Core\Model\App\Emulation');
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+            ->get('Magento\View\DesignInterface');
 
         $initialEnvInfo = $this->_model->startEnvironmentEmulation(1);
         $initialDesign = $initialEnvInfo->getInitialDesign();
-        $this->assertEquals(\Magento\Core\Model\App\Area::AREA_ADMINHTML, $initialDesign['area']);
-        $this->assertEquals(\Magento\Core\Model\App\Area::AREA_FRONTEND, $design->getArea());
+        $this->assertEquals(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, $initialDesign['area']);
+        $this->assertEquals(\Magento\Core\Model\App\Area::AREA_FRONTEND, $design->getDesignTheme()->getData('area'));
 
         $this->_model->stopEnvironmentEmulation($initialEnvInfo);
-        $this->assertEquals(\Magento\Core\Model\App\Area::AREA_ADMINHTML, $design->getArea());
+        $this->assertEquals(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, $design->getArea());
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/AppTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/AppTest.php
index 79a25264228..5990ba818aa 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/AppTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/AppTest.php
@@ -202,7 +202,7 @@ class AppTest extends \PHPUnit_Framework_TestCase
     public function testGetCacheInstance()
     {
         $cache = $this->_mageModel->getCacheInstance();
-        $this->assertInstanceOf('Magento\Core\Model\CacheInterface', $cache);
+        $this->assertInstanceOf('Magento\App\CacheInterface', $cache);
         $this->assertSame($cache, $this->_mageModel->getCacheInstance());
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/ConfigTest.php
deleted file mode 100644
index 9ebd892ee59..00000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Model/ConfigTest.php
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-/**
- * Integration test for \Magento\Core\Model\Config
- *
- * 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;
-
-/**
- * First part of \Magento\Core\Model\Config testing:
- * - general behaviour is tested
- *
- * @see \Magento\Core\Model\ConfigFactoryTest
- *
- * @SuppressWarnings(PHPMD.ExcessivePublicCount)
- */
-class ConfigTest extends \PHPUnit_Framework_TestCase
-{
-    protected function setUp()
-    {
-        /** @var \Magento\Core\Model\Cache\StateInterface $cacheState */
-        $cacheState = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Core\Model\Cache\StateInterface');
-        $cacheState->setEnabled('config', false);
-    }
-
-    public function testSetNode()
-    {
-        $model = $this->_createModel();
-        /* some existing node should be used */
-        $model->setNode('default/node/with/value', 'test');
-        $this->assertEquals('test', (string) $model->getNode('default/node/with/value'));
-    }
-
-    public function testDetermineOmittedNamespace()
-    {
-        $model = $this->_createModel();
-        $this->assertEquals('cms', $model->determineOmittedNamespace('cms'));
-        $this->assertEquals('Magento_Cms', $model->determineOmittedNamespace('cms', true));
-        $this->assertEquals('', $model->determineOmittedNamespace('nonexistent'));
-        $this->assertEquals('', $model->determineOmittedNamespace('nonexistent', true));
-    }
-
-    public function testGetModuleDir()
-    {
-        $model = $this->_createModel();
-        foreach (array('etc', 'sql', 'data', 'i18n') as $type) {
-            $dir = $model->getModuleDir($type, 'Magento_Core');
-            $this->assertStringEndsWith($type, $dir);
-            $this->assertContains('Magento' . DIRECTORY_SEPARATOR . 'Core', $dir);
-        }
-        $this->assertTrue(is_dir($this->_createModel()->getModuleDir('etc', 'Magento_Core')));
-    }
-
-    public function testGetStoresConfigByPath()
-    {
-        $model = $this->_createModel();
-
-        // default
-        $baseUrl = $model->getStoresConfigByPath('web/unsecure/base_url');
-        $this->assertArrayHasKey(0, $baseUrl);
-        $this->assertArrayHasKey(1, $baseUrl);
-
-        // $allowValues
-        $baseUrl = $model->getStoresConfigByPath('web/unsecure/base_url', array(uniqid()));
-        $this->assertEquals(array(), $baseUrl);
-
-        // store code
-        $baseUrl = $model->getStoresConfigByPath('web/unsecure/base_url', array(), 'code');
-        $this->assertArrayHasKey('default', $baseUrl);
-        $this->assertArrayHasKey('admin', $baseUrl);
-
-        // store name
-        $baseUrl = $model->getStoresConfigByPath('web/unsecure/base_url', array(), 'name');
-        $this->assertArrayHasKey('Default Store View', $baseUrl);
-        $this->assertArrayHasKey('Admin', $baseUrl);
-    }
-
-    /**
-     * Instantiate \Magento\Core\Model\Config and initialize (load configuration) if needed
-     *
-     * @param array $arguments
-     * @return \Magento\Core\Model\Config
-     */
-    protected function _createModel(array $arguments = array())
-    {
-        /** @var $model \Magento\Core\Model\Config */
-        $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Core\Model\Config', $arguments);
-        return $model;
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/ConfigTest.php
index b263985bdf9..cd31dbc6ee6 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/ConfigTest.php
@@ -48,13 +48,13 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         );
 
         $moduleList = $objectManager->create(
-            'Magento\App\ModuleList',
+            'Magento\Module\ModuleList',
             array(
                 'reader' => $objectManager->create(
-                    'Magento\App\Module\Declaration\Reader\Filesystem',
+                    'Magento\Module\Declaration\Reader\Filesystem',
                     array(
                         'fileResolver' => $objectManager->create(
-                            'Magento\App\Module\Declaration\FileResolver',
+                            'Magento\Module\Declaration\FileResolver',
                             array(
                                 'applicationDirs' => $dirs
                             )
@@ -65,9 +65,9 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             )
         );
 
-        /** @var \Magento\Core\Model\Config\Modules\Reader $moduleReader */
+        /** @var \Magento\Module\Dir\Reader $moduleReader */
         $moduleReader = $objectManager->create(
-            'Magento\Core\Model\Config\Modules\Reader',
+            'Magento\Module\Dir\Reader',
             array(
                 'moduleList' => $moduleList
             )
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest.php
index 046516e0864..698235d7d0a 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest.php
@@ -53,8 +53,8 @@ class LayoutTest extends \Magento\TestFramework\TestCase\AbstractController
     protected function _loadServiceCallsConfig()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Core\Model\Config\Modules\Reader $moduleReader */
-        $moduleReader = $objectManager->create('Magento\Core\Model\Config\Modules\Reader');
+        /** @var \Magento\Module\Dir\Reader $moduleReader */
+        $moduleReader = $objectManager->create('Magento\Module\Dir\Reader');
         $moduleReader->setModuleDir('Magento_Catalog', 'etc', __DIR__ . '/LayoutTest/Magento/Catalog/etc');
 
         /** @var \Magento\Core\Model\DataService\Config\Reader\Factory $dsCfgReaderFactory */
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DesignTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/DesignTest.php
index 36ca0d661f2..30ca12b56b1 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DesignTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/DesignTest.php
@@ -51,6 +51,7 @@ class DesignTest extends \PHPUnit_Framework_TestCase
      */
     public function testChangeDesign()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\View\DesignInterface');
         $storeId = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
@@ -119,7 +120,9 @@ class DesignTest extends \PHPUnit_Framework_TestCase
      */
     public function testLoadChangeCache()
     {
-        $date = \Magento\Date::now(true);
+        /** @var \Magento\Stdlib\DateTime $dateTime */
+        $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('\Magento\Stdlib\DateTime');
+        $date = $dateTime->now(true);
         $storeId = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\Core\Model\StoreManagerInterface')->getAnyStoreView()->getId(); // fixture design_change
 
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/Template/FilterTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Email/Template/FilterTest.php
index e57a2e380f9..cbd600c1de5 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Email/Template/FilterTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Email/Template/FilterTest.php
@@ -42,6 +42,8 @@ class FilterTest extends \PHPUnit_Framework_TestCase
 
     /**
      * Isolation level has been raised in order to flush themes configuration in-memory cache
+     *
+     * @magentoAppArea frontend
      */
     public function testViewDirective()
     {
@@ -109,10 +111,14 @@ class FilterTest extends \PHPUnit_Framework_TestCase
     public function testLayoutDirective($area, $directiveParams, $expectedOutput)
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+            \Magento\App\Dir::PARAM_APP_DIRS => array(
                 \Magento\App\Dir::THEMES => dirname(__DIR__) . '/_files/design'
             )
         ));
+        $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->create('Magento\Core\Model\Email\Template\Filter');
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea($area);
 
         $collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Core\Model\Resource\Theme\Collection');
@@ -127,7 +133,7 @@ class FilterTest extends \PHPUnit_Framework_TestCase
         $objectManager->addSharedInstance($design, 'Magento\Core\Model\View\Design');
 
         /** @var $layout \Magento\View\LayoutInterface */
-        $layout = $objectManager->create('Magento\Core\Model\Layout', array('area' => $area));
+        $layout = $objectManager->create('Magento\Core\Model\Layout');
         $objectManager->addSharedInstance($layout, 'Magento\Core\Model\Layout');
         $this->assertEquals($area, $layout->getArea());
         $this->assertEquals(
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Email/TemplateTest.php
index 2acf244ac57..d395696d08d 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Email/TemplateTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Email/TemplateTest.php
@@ -63,6 +63,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
                 $objectManager->get('Magento\Core\Model\Email\Template\Config'),
             ))
             ->getMock();
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         $this->_model->expects($this->any())->method('_getMail')->will($this->returnCallback(array($this, 'getMail')));
         $this->_model->setSenderName('sender')->setSenderEmail('sender@example.com')->setTemplateSubject('Subject');
     }
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/themes.php b/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/themes.php
index d251e714e90..2d64c840203 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/themes.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/themes.php
@@ -22,7 +22,15 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-    ->loadAreaPart(\Magento\Core\Model\App\Area::AREA_ADMINHTML, \Magento\Core\Model\App\Area::PART_CONFIG);
+    ->loadAreaPart(
+        \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE,
+        \Magento\Core\Model\App\Area::PART_CONFIG
+    );
+\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->configure(array(
+    'preferences' => array(
+        'Magento\Core\Model\Theme' => 'Magento\Core\Model\Theme\Data'
+    )
+));
 /** @var $registration \Magento\Core\Model\Theme\Registration */
 $registration = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
     ->create('Magento\Core\Model\Theme\Registration');
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/EntryPoint/HttpTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/EntryPoint/HttpTest.php
deleted file mode 100644
index 6e379234c03..00000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Model/EntryPoint/HttpTest.php
+++ /dev/null
@@ -1,57 +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.
- *
- *
- * @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\EntryPoint;
-
-class HttpTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @magentoAppIsolation enabled
-     */
-    public function testProcessRequestBootstrapException()
-    {
-        if (!\Magento\TestFramework\Helper\Bootstrap::canTestHeaders()) {
-            $this->markTestSkipped('Can\'t test entry point response without sending headers');
-        }
-
-        $config = $this->getMock('Magento\Core\Model\Config\Primary', array(), array(), '', false);
-        $objectManager = $this->getMock('Magento\ObjectManager');
-        $objectManager->expects($this->any())
-            ->method('get')
-            ->will($this->throwException(new \Magento\BootstrapException('exception_message')));
-
-        $config = $this->getMock('Magento\Core\Model\Config\Primary', array(), array(), '', false);
-
-
-        /** @var \Magento\Core\Model\EntryPoint\Http $model */
-        $model = new \Magento\Core\Model\EntryPoint\Http($config, $objectManager);
-        ob_start();
-        $model->processRequest();
-        $content = ob_get_clean();
-
-        $headers = xdebug_get_headers();
-        $this->assertContains('Content-Type: text/plain', $headers);
-        $this->assertEquals('exception_message', $content, 'The response must contain exception message, and only it');
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Fieldset/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Fieldset/Config/ReaderTest.php
index d5fb8fa0347..4aa04730111 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Fieldset/Config/ReaderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Fieldset/Config/ReaderTest.php
@@ -49,31 +49,31 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
             )
         );
 
-        /** @var \Magento\App\Module\Declaration\FileResolver $modulesDeclarations */
+        /** @var \Magento\Module\Declaration\FileResolver $modulesDeclarations */
         $modulesDeclarations = $objectManager->create(
-            'Magento\App\Module\Declaration\FileResolver', array(
+            'Magento\Module\Declaration\FileResolver', array(
                 'applicationDirs' => $dirs,
             )
         );
 
 
-        /** @var \Magento\App\Module\Declaration\Reader\Filesystem $filesystemReader */
+        /** @var \Magento\Module\Declaration\Reader\Filesystem $filesystemReader */
         $filesystemReader = $objectManager->create(
-            'Magento\App\Module\Declaration\Reader\Filesystem', array(
+            'Magento\Module\Declaration\Reader\Filesystem', array(
                 'fileResolver' => $modulesDeclarations,
             )
         );
 
-        /** @var \Magento\App\ModuleList $modulesList */
+        /** @var \Magento\Module\ModuleList $modulesList */
         $modulesList = $objectManager->create(
-            'Magento\App\ModuleList', array(
+            'Magento\Module\ModuleList', array(
                 'reader' => $filesystemReader,
             )
         );
 
-        /** @var \Magento\Core\Model\Config\Modules\Reader $moduleReader */
+        /** @var \Magento\Module\Dir\Reader $moduleReader */
         $moduleReader = $objectManager->create(
-            'Magento\Core\Model\Config\Modules\Reader', array(
+            'Magento\Module\Dir\Reader', array(
                 'moduleList' => $modulesList
             )
         );
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php
index 6e518d9a788..35bd88830c1 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php
@@ -53,15 +53,19 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
      */
     public function testConstructor(array $inputArguments, $expectedArea)
     {
+        if (isset($inputArguments['area'])) {
+            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+                ->setAreaCode($inputArguments['area']);
+        }
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Core\Model\Layout', $inputArguments);
+            ->create('Magento\Core\Model\Layout');
         $this->assertEquals($expectedArea, $layout->getArea());
     }
 
     public function constructorDataProvider()
     {
         return array(
-            'default area'  => array(array(), \Magento\View\DesignInterface::DEFAULT_AREA),
+            'default area'  => array(array(), null),
             'frontend area' => array(array('area' => 'frontend'), 'frontend'),
             'backend area'  => array(array('area' => 'adminhtml'), 'adminhtml'),
         );
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/LocaleTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/LocaleTest.php
index 4b4471778a9..889573dd771 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/LocaleTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/LocaleTest.php
@@ -31,7 +31,7 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
 {
     public function testGetLocale()
     {
-        $objectManager = \Magento\Core\Model\ObjectManager::getInstance();
+        $objectManager = \Magento\App\ObjectManager::getInstance();
         \Zend_Locale_Data::removeCache();
         $this->assertNull(\Zend_Locale_Data::getCache());
         $model = $objectManager->create('Magento\Core\Model\Locale', array('locale' => 'some_locale'));
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Page/Asset/MergedTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Page/Asset/MergedTest.php
index ac5cb3c1944..823044611bf 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Page/Asset/MergedTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Page/Asset/MergedTest.php
@@ -59,10 +59,11 @@ class MergedTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+            \Magento\App\Dir::PARAM_APP_DIRS => array(
                 \Magento\App\Dir::THEMES => realpath(__DIR__ . '/../../_files/design')
             )
         ));
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
             ->setDesignTheme('vendor_default');
     }
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/CacheTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/CacheTest.php
index 8facb40218f..32fc044111f 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/CacheTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/CacheTest.php
@@ -49,7 +49,7 @@ class CacheTest extends \PHPUnit_Framework_TestCase
     public function testGetTable()
     {
         $this->_resourceMock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Resource', array('tablePrefix' => 'prefix_')
+            'Magento\App\Resource', array('tablePrefix' => 'prefix_')
         );
 
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php
index df0c27ffa93..50efae98107 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php
@@ -36,7 +36,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $resource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Resource');
+        $resource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Resource');
         $this->_model = $this->getMockForAbstractClass('Magento\Core\Model\Resource\Db\AbstractDb',
             array('resource' => $resource)
         );
@@ -47,7 +47,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
     {
         $resourceProperty = new \ReflectionProperty(get_class($this->_model), '_resources');
         $resourceProperty->setAccessible(true);
-        $this->assertInstanceOf('Magento\Core\Model\Resource', $resourceProperty->getValue($this->_model));
+        $this->assertInstanceOf('Magento\App\Resource', $resourceProperty->getValue($this->_model));
     }
 
     public function testSetMainTable()
@@ -72,7 +72,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $tableNameOrig = 'core_website';
         $tableSuffix = 'suffix';
         $resource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Resource', array('tablePrefix' => 'prefix_')
+            'Magento\App\Resource', array('tablePrefix' => 'prefix_')
         );
 
         $model = $this->getMockForAbstractClass('Magento\Core\Model\Resource\Db\AbstractDb',
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/Collection/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/Collection/AbstractTest.php
index 45bf587ab51..413d20ff1a1 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/Collection/AbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/Collection/AbstractTest.php
@@ -34,7 +34,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $resourceModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Core\Model\Resource');
+            ->get('Magento\App\Resource');
         $resource = $this->getMockForAbstractClass('Magento\Core\Model\Resource\Db\AbstractDb',
             array($resourceModel), '', true, true, true, array('getMainTable', 'getIdFieldName')
         );
@@ -54,7 +54,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $entityFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\Core\Model\EntityFactory');
         $logger = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Core\Model\Logger');
+            ->get('Magento\Logger');
 
         $this->_model = $this->getMockForAbstractClass(
             'Magento\Core\Model\Resource\Db\Collection\AbstractCollection',
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/ProfilerTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/ProfilerTest.php
index 4f298b603cf..0839db2fc68 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/ProfilerTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Db/ProfilerTest.php
@@ -28,7 +28,7 @@ namespace Magento\Core\Model\Resource\Db;
 class ProfilerTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_model;
 
@@ -52,7 +52,7 @@ class ProfilerTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Core\Model\Resource');
+            ->create('Magento\App\Resource');
     }
 
     /**
@@ -61,7 +61,7 @@ class ProfilerTest extends \PHPUnit_Framework_TestCase
     protected function _getConnectionRead()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $localConfig = $objectManager->get('Magento\Core\Model\Config\Local');
+        $localConfig = $objectManager->get('Magento\App\Config');
         $connectionConfig = $localConfig->getConnection('default');
         $connectionConfig['profiler'] = array(
             'class' => 'Magento\Core\Model\Resource\Db\Profiler',
@@ -85,8 +85,8 @@ class ProfilerTest extends \PHPUnit_Framework_TestCase
     {
         $connection = $this->_getConnectionRead();
 
-        /** @var \Magento\Core\Model\Resource $resource */
-        $resource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Resource');
+        /** @var \Magento\App\Resource $resource */
+        $resource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Resource');
         $testTableName = $resource->getTableName('core_resource');
         $selectQuery = sprintf($selectQuery, $testTableName);
 
@@ -142,8 +142,8 @@ class ProfilerTest extends \PHPUnit_Framework_TestCase
             $this->fail("Expected exception didn't thrown!");
         }
 
-        /** @var \Magento\Core\Model\Resource $resource */
-        $resource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Resource');
+        /** @var \Magento\App\Resource $resource */
+        $resource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Resource');
         $testTableName = $resource->getTableName('core_resource');
         $connection->query('SELECT * FROM ' . $testTableName);
 
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/SessionTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/SessionTest.php
index 196e8f66153..0f7e4c17b41 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/SessionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/SessionTest.php
@@ -97,8 +97,8 @@ class SessionTest extends \PHPUnit_Framework_TestCase
         $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $this->_model         = $this->_objectManager->get('Magento\Core\Model\Resource\Session');
 
-        /** @var $resource \Magento\Core\Model\Resource */
-        $resource            = $this->_objectManager->get('Magento\Core\Model\Resource');
+        /** @var $resource \Magento\App\Resource */
+        $resource            = $this->_objectManager->get('Magento\App\Resource');
         $this->_connection   = $resource->getConnection('core_write');
         $this->_sessionTable = $resource->getTableName('core_session');
 
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/SetupTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/SetupTest.php
index 212d4cfcba0..0a6e7b683d0 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/SetupTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/SetupTest.php
@@ -58,8 +58,8 @@ class SetupTest extends \PHPUnit_Framework_TestCase
         $this->_model->deleteTableRow('core_resource', 'code', 'adminnotification_setup');
         $this->_model->getConnection()->dropTable($this->_model->getTable('adminnotification_inbox'));
         $this->_model->getConnection()->dropTable($this->_model->getTable('admin_system_messages'));
-        /** @var $updater \Magento\App\Updater */
-        $updater = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Updater');
+        /** @var $updater \Magento\Module\Updater */
+        $updater = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Module\Updater');
         try {
             $updater->updateScheme();
             $updater->updateData();
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Theme/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Theme/CollectionTest.php
index b97204f9297..5b739d3f283 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Theme/CollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Theme/CollectionTest.php
@@ -29,6 +29,15 @@ namespace Magento\Core\Model\Resource\Theme;
 
 class CollectionTest extends \PHPUnit_Framework_TestCase
 {
+    public static function setUpBeforeClass()
+    {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->configure(array(
+            'preferences' => array(
+                'Magento\Core\Model\Theme' => 'Magento\Core\Model\Theme\Data'
+            )
+        ));
+    }
+
     /**
      * @return \Magento\Core\Model\Resource\Theme\Collection
      */
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/ResourceTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/ResourceTest.php
index 44cd3684f9e..73f2644877e 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/ResourceTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/ResourceTest.php
@@ -28,14 +28,14 @@ namespace Magento\Core\Model;
 class ResourceTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_model;
 
     protected function setUp()
     {
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Core\Model\Resource');
+            ->create('Magento\App\Resource');
     }
 
     public function testGetTableName()
@@ -45,7 +45,7 @@ class ResourceTest extends \PHPUnit_Framework_TestCase
         $tableNameOrig = 'core_website';
 
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Core\Model\Resource', array('tablePrefix' => 'prefix_'));
+            ->create('Magento\App\Resource', array('tablePrefix' => 'prefix_'));
 
         $tableName = $this->_model->getTableName(array($tableNameOrig, $tableSuffix));
         $this->assertContains($tablePrefix, $tableName);
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/RouterListTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/RouterListTest.php
deleted file mode 100644
index 9ec1794ff60..00000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Model/RouterListTest.php
+++ /dev/null
@@ -1,76 +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.
- *
- * @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;
-
-class RouterListTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\ObjectManager
-     */
-    protected $_objectManager;
-
-    /**
-     * @var \Magento\App\RouterList
-     */
-    protected $_model;
-
-    protected function setUp()
-    {
-        $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $this->_model = $this->_objectManager->create('Magento\App\RouterList');
-    }
-
-    public function testGetRouterByRoute()
-    {
-        $this->assertInstanceOf(
-            'Magento\Core\Controller\Varien\Router\Base',
-            $this->_model->getRouterByRoute('')
-        );
-        $this->assertInstanceOf(
-            'Magento\Core\Controller\Varien\Router\Base',
-            $this->_model->getRouterByRoute('checkout')
-        );
-        $this->assertInstanceOf(
-            'Magento\App\Router\DefaultRouter',
-            $this->_model->getRouterByRoute('test')
-        );
-    }
-
-    public function testGetRouterByFrontName()
-    {
-        $this->assertInstanceOf(
-            'Magento\Core\Controller\Varien\Router\Base',
-            $this->_model->getRouterByFrontName('')
-        );
-        $this->assertInstanceOf(
-            'Magento\Core\Controller\Varien\Router\Base',
-            $this->_model->getRouterByFrontName('checkout')
-        );
-        $this->assertInstanceOf(
-            'Magento\App\Router\DefaultRouter',
-            $this->_model->getRouterByFrontName('test')
-        );
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Session/AbstractSession/VarienTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Session/AbstractSession/VarienTest.php
index 59d6bd77c83..5171812e565 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Session/AbstractSession/VarienTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Session/AbstractSession/VarienTest.php
@@ -24,13 +24,11 @@
  * @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\Session\AbstractSession;
 
 /**
- * Test class for \Magento\Core\Model\Session\AbstractSession\Varien
- *
+ * Test class for \Magento\Core\Model\Session\AbstractSession
  */
-namespace Magento\Core\Model\Session\AbstractSession;
-
 class VarienTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -41,25 +39,21 @@ class VarienTest extends \PHPUnit_Framework_TestCase
     public function testSessionSaveMethod($saveMethod, $iniValue)
     {
         $this->markTestIncomplete('Bug MAGE-5487');
-
         // depending on configuration some values cannot be set as default save session handlers.
         // in such cases warnings will be generated by php and test will fail
         $origErrorRep = error_reporting(E_ALL ^ E_WARNING);
         $origSessionHandler = ini_set('session.save_handler', $iniValue);
-
         if ($iniValue && (ini_get('session.save_handler') != $iniValue)) {
             ini_set('session.save_handler', $origSessionHandler);
             error_reporting($origErrorRep);
             $this->markTestSkipped("Can't  set '$iniValue' as session save handler");
         }
-
         ini_set('session.save_handler', $origSessionHandler);
-
         /** @var $configModel \Magento\Core\Model\Config */
         $configModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Config');
-        $configModel->setNode(\Magento\Core\Model\Session\AbstractSession::XML_NODE_SESSION_SAVE, $saveMethod);
+        $configModel->setNode(\Magento\Core\Model\Session\AbstractSession::PARAM_SESSION_SAVE_METHOD, $saveMethod);
         /**
-         * @var \Magento\Core\Model\Session\AbstractSession\Varien
+         * @var \Magento\Core\Model\Session\AbstractSession $model
          */
         $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Core\Model\Session\AbstractSession');
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Store/GroupTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Store/GroupTest.php
index c6e3dae9e0b..15ac7ee69ac 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Store/GroupTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Store/GroupTest.php
@@ -24,9 +24,10 @@
  * @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\Store;
 
+use Magento\TestFramework\Helper\Bootstrap;
+
 class GroupTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -36,17 +37,34 @@ class GroupTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+        $this->_model = Bootstrap::getObjectManager()
             ->create('Magento\Core\Model\Store\Group');
     }
 
     public function testSetGetWebsite()
     {
         $this->assertFalse($this->_model->getWebsite());
-        $website = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+        $website = Bootstrap::getObjectManager()
             ->get('Magento\Core\Model\StoreManagerInterface')->getWebsite();
         $this->_model->setWebsite($website);
         $actualResult = $this->_model->getWebsite();
         $this->assertSame($website, $actualResult);
     }
+
+    /**
+     * Tests that getWebsite returns the default site when defaults are passed in for id
+     */
+    public function testGetWebsiteDefault()
+    {
+        $this->assertFalse($this->_model->getWebsite());
+        $website = Bootstrap::getObjectManager()
+            ->get('Magento\Core\Model\StoreManagerInterface')->getWebsite();
+        $this->_model->setWebsite($website);
+        // Empty string should get treated like no parameter
+        $actualResult = $this->_model->getWebsite('');
+        $this->assertSame($website, $actualResult);
+        // Null string should get treated like no parameter
+        $actualResult = $this->_model->getWebsite(null);
+        $this->assertSame($website, $actualResult);
+    }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php
index 67a77b2f975..455237b2ef0 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php
@@ -198,7 +198,7 @@ class StoreTest extends \PHPUnit_Framework_TestCase
     public function testGetBaseUrlInPub()
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Core\Model\App::PARAM_APP_URIS => array(\Magento\App\Dir::PUB => '')
+            \Magento\App\Dir::PARAM_APP_URIS => array(\Magento\App\Dir::PUB => '')
         ));
         $this->_model = $this->_getStoreModel();
         $this->_model->load('default');
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php
index 1ce3c36f9d4..a200c71c846 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php
@@ -97,6 +97,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
      *
      * @magentoAppIsolation enabled
      * @covers \Magento\Core\Model\Theme\Collection::hasTheme
+     * @magentoAppArea install
      */
     public function testHasThemeInCollection()
     {
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Translate/InlineParserTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Translate/InlineParserTest.php
index 6b08c71c251..69e10432dba 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Translate/InlineParserTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Translate/InlineParserTest.php
@@ -76,7 +76,7 @@ class InlineParserTest extends \PHPUnit_Framework_TestCase
             $model->delete();
         } catch (\Exception $e) {
             $model->delete();
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Logger')
+            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Logger')
                 ->logException($e);
         }
     }
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Translate/InlineTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Translate/InlineTest.php
index b75084f8017..bcbe27e1c9e 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Translate/InlineTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Translate/InlineTest.php
@@ -41,6 +41,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase
 
     public static function setUpBeforeClass()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
             ->setDesignTheme('magento_demo');
     }
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/TranslateTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/TranslateTest.php
index ef3713a3ed3..7ce39fe88c1 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/TranslateTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/TranslateTest.php
@@ -79,8 +79,8 @@ class TranslateTest extends \PHPUnit_Framework_TestCase
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $objectManager->addSharedInstance($this->_viewFileSystem, 'Magento\Core\Model\View\FileSystem');
 
-        /** @var $moduleReader \Magento\Core\Model\Config\Modules\Reader */
-        $moduleReader = $objectManager->get('Magento\Core\Model\Config\Modules\Reader');
+        /** @var $moduleReader \Magento\Module\Dir\Reader */
+        $moduleReader = $objectManager->get('Magento\Module\Dir\Reader');
         $moduleReader->setModuleDir('Magento_Core', 'i18n', __DIR__ . '/_files/Magento/Core/i18n');
         $moduleReader->setModuleDir('Magento_Catalog', 'i18n',
             __DIR__ . '/_files/Magento/Catalog/i18n');
@@ -95,6 +95,7 @@ class TranslateTest extends \PHPUnit_Framework_TestCase
                 $objectManager->get('Magento\Core\Model\Store\Config'),
                 $objectManager->get('Magento\Core\Model\ThemeFactory'),
                 $objectManager->get('Magento\Core\Model\App'),
+                $objectManager->get('Magento\App\State'),
                 array('frontend' => 'test_default')
             )
         );
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/UrlTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/UrlTest.php
index 800f96742a4..a6cc866d724 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/UrlTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/UrlTest.php
@@ -255,10 +255,6 @@ class UrlTest extends \PHPUnit_Framework_TestCase
         $this->_model->setRoutePath('catalog/product/view');
         $this->_model->setRouteParams(array('id' => 50));
         $this->assertEquals('catalog/product/view/id/50/', $this->_model->getRoutePath());
-
-        $this->_model->setRoutePath('adminhtml/system_config/edit');
-        $this->_model->setRouteParams(array('section' => 'design', 'key' => '123'));
-        $this->assertEquals('admin/system_config/edit/section/design/key/123/', $this->_model->getRoutePath());
     }
 
     public function testSetGetRouteName()
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php
index 0c5c7bd0608..884060e9ffb 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php
@@ -88,6 +88,7 @@ class DesignTest extends \PHPUnit_Framework_TestCase
             ->create('Magento\View\ConfigInterface');
         $this->_viewUrl = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Core\Model\View\Url');
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
     }
 
     /**
@@ -98,10 +99,12 @@ class DesignTest extends \PHPUnit_Framework_TestCase
     protected function _emulateFixtureTheme($themePath = 'test_default')
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+            \Magento\App\Dir::PARAM_APP_DIRS => array(
                 \Magento\App\Dir::THEMES => realpath(__DIR__ . '/../_files/design'),
             ),
         ));
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea('frontend');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\View\DesignInterface')
             ->setDesignTheme($themePath);
@@ -117,13 +120,14 @@ class DesignTest extends \PHPUnit_Framework_TestCase
     public function testSetGetArea()
     {
         $this->assertEquals(\Magento\View\DesignInterface::DEFAULT_AREA, $this->_model->getArea());
-        $this->_model->setArea('test');
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('test');
         $this->assertEquals('test', $this->_model->getArea());
     }
 
     public function testSetDesignTheme()
     {
-        $this->_model->setDesignTheme('test_test', 'test');
+        $this->_model->setDesignTheme('test_test');
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('test');
         $this->assertEquals('test', $this->_model->getArea());
         $this->assertEquals(null, $this->_model->getDesignTheme()->getThemePath());
     }
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/View/FileSystemTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/View/FileSystemTest.php
index 4c13b98f80d..0603d9f4bf0 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/View/FileSystemTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/View/FileSystemTest.php
@@ -41,10 +41,11 @@ class FileSystemTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+            \Magento\App\Dir::PARAM_APP_DIRS => array(
                 \Magento\App\Dir::THEMES => dirname(__DIR__) . '/_files/design'
             )
         ));
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Core\Model\View\FileSystem');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/View/PublicationTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/View/PublicationTest.php
index bc58ac9245e..d2931f4e29b 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/View/PublicationTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/View/PublicationTest.php
@@ -51,6 +51,7 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         $this->_viewService = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Core\Model\View\Service');
         $this->_fileSystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
@@ -332,7 +333,7 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
         $cssViewFile, $designParams, $expectedCssFile, $expectedCssContent, $expectedRelatedFiles
     ) {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $this->_viewUrl->getViewFileUrl($cssViewFile, $designParams);
 
         $expectedCssFile = $this->_viewService->getPublicDir() . '/' . $expectedCssFile;
@@ -439,10 +440,11 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
     {
         $appInstallDir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir();
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+            \Magento\App\Dir::PARAM_APP_DIRS => array(
                 \Magento\App\Dir::THEMES => "$appInstallDir/media_for_change",
             )
         ));
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
 
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\View\DesignInterface');
@@ -529,10 +531,11 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
     {
         $appInstallDir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir();
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+            \Magento\App\Dir::PARAM_APP_DIRS => array(
                 \Magento\App\Dir::THEMES => "$appInstallDir/media_for_change",
             )
         ));
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
 
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\View\DesignInterface');
@@ -576,10 +579,11 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
     protected function _initTestTheme($allowDuplication = null)
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+            \Magento\App\Dir::PARAM_APP_DIRS => array(
                 \Magento\App\Dir::THEMES => dirname(__DIR__) . '/_files/design/'
             )
         ));
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
 
         if ($allowDuplication !== null) {
             $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
@@ -612,12 +616,12 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
     public function testCssWithBase64Data()
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+            \Magento\App\Dir::PARAM_APP_DIRS => array(
                 \Magento\App\Dir::THEMES => dirname(__DIR__) . '/_files/design/'
             )
         ));
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')->loadAreaPart(
-            \Magento\Core\Model\App\Area::AREA_ADMINHTML,
+            \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE,
             \Magento\Core\Model\App\Area::PART_CONFIG
         );
 
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php
index 1387852abec..513f228949e 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php
@@ -25,7 +25,15 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-    ->loadAreaPart(\Magento\Core\Model\App\Area::AREA_ADMINHTML, \Magento\Core\Model\App\Area::PART_CONFIG);
+    ->loadAreaPart(
+        \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE,
+        \Magento\Core\Model\App\Area::PART_CONFIG
+    );
+\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->configure(array(
+    'preferences' => array(
+        'Magento\Core\Model\Theme' => 'Magento\Core\Model\Theme\Data'
+    )
+));
 /** @var $registration \Magento\Core\Model\Theme\Registration */
 $registration = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
     ->create('Magento\Core\Model\Theme\Registration');
diff --git a/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php b/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php
index 519a410cce0..e69deca32d5 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php
@@ -96,7 +96,7 @@ class Layout
         return array(
             'processorFactory'       => $objectManager->get('Magento\View\Layout\ProcessorFactory'),
             'themeFactory'       => $objectManager->get('Magento\Core\Model\Resource\Theme\CollectionFactory'),
-            'logger'             => $objectManager->get('Magento\Core\Model\Logger'),
+            'logger'             => $objectManager->get('Magento\Logger'),
             'eventManager'       => $objectManager->get('Magento\Event\ManagerInterface'),
             'factoryHelper'      => $objectManager->get('Magento\Core\Model\Factory\Helper'),
             'coreData'           => $objectManager->get('Magento\Core\Helper\Data'),
@@ -107,6 +107,7 @@ class Layout
             'scheduledStructure' => $objectManager->create('Magento\Core\Model\Layout\ScheduledStructure', array()),
             'dataServiceGraph'   => $objectManager->create('Magento\Core\Model\DataService\Graph', array()),
             'coreStoreConfig'    => $objectManager->create('Magento\Core\Model\Store\Config'),
+            'appState'           => $objectManager->get('Magento\App\State'),
         );
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/layout_update.php b/dev/tests/integration/testsuite/Magento/Core/_files/layout_update.php
index 51391e9e347..f5f5f650c2d 100644
--- a/dev/tests/integration/testsuite/Magento/Core/_files/layout_update.php
+++ b/dev/tests/integration/testsuite/Magento/Core/_files/layout_update.php
@@ -28,7 +28,7 @@
 /** @var $objectManager \Magento\ObjectManager */
 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 $objectManager->get('Magento\Core\Model\App')
-    ->loadAreaPart(\Magento\Core\Model\App\Area::AREA_ADMINHTML, \Magento\Core\Model\App\Area::PART_CONFIG);
+    ->loadAreaPart(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, \Magento\Core\Model\App\Area::PART_CONFIG);
 /** @var $theme \Magento\View\Design\ThemeInterface */
 $theme = $objectManager->create('Magento\View\Design\ThemeInterface');
 $theme->setThemePath('test/test')
diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change.php b/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change.php
index 852c6714743..b405537b41f 100644
--- a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change.php
+++ b/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change.php
@@ -25,7 +25,10 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-    ->loadAreaPart(\Magento\Core\Model\App\Area::AREA_ADMINHTML, \Magento\Core\Model\App\Area::PART_CONFIG);
+    ->loadAreaPart(
+        \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE,
+        \Magento\Core\Model\App\Area::PART_CONFIG
+    );
 $designDir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir() . '/media_for_change';
 $themeDir = $designDir . DIRECTORY_SEPARATOR . 'frontend/test_default';
 $sourcePath = dirname(__DIR__) . '/Model/_files/design/frontend/test_publication/';
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Customer/Edit/Tab/View/AccordionTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/AccordionTest.php
similarity index 86%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/Customer/Edit/Tab/View/AccordionTest.php
rename to dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/AccordionTest.php
index dbc7d19495c..3f2dc373a91 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Customer/Edit/Tab/View/AccordionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/AccordionTest.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\Customer\Edit\Tab\View;
+namespace Magento\Customer\Block\Adminhtml\Edit\Tab\View;
 
 /**
  * @magentoAppArea adminhtml
@@ -33,7 +33,7 @@ namespace Magento\Adminhtml\Block\Customer\Edit\Tab\View;
 class AccordionTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Adminhtml\Block\Customer\Edit\Tab\View\Accordion
+     * @var \Magento\Customer\Block\Adminhtml\Edit\Tab\View\Accordion
      */
     protected $_block;
 
@@ -50,9 +50,9 @@ class AccordionTest extends \PHPUnit_Framework_TestCase
         /** @var $layout \Magento\View\LayoutInterface */
         $layout = $objectManager->create(
             'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
         );
-        $this->_block = $layout->createBlock('Magento\Adminhtml\Block\Customer\Edit\Tab\View\Accordion');
+        $this->_block = $layout->createBlock('Magento\Customer\Block\Adminhtml\Edit\Tab\View\Accordion');
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Customer/OnlineTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/OnlineTest.php
similarity index 83%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/Customer/OnlineTest.php
rename to dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/OnlineTest.php
index 7073646abc1..71814e2f660 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Customer/OnlineTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/OnlineTest.php
@@ -26,7 +26,7 @@
  */
 
 
-namespace Magento\Adminhtml\Block\Customer;
+namespace Magento\Customer\Block\Adminhtml;
 
 /**
  * @magentoAppArea adminhtml
@@ -41,10 +41,10 @@ class OnlineTest extends \PHPUnit_Framework_TestCase
         /** @var $layout \Magento\View\LayoutInterface */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Core\Model\Layout',
-            array('area' => \Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
         );
-        /** @var $block \Magento\Adminhtml\Block\Customer\Online */
-        $block = $layout->createBlock('Magento\Adminhtml\Block\Customer\Online', 'block');
+        /** @var $block \Magento\Customer\Block\Adminhtml\Online */
+        $block = $layout->createBlock('Magento\Customer\Block\Adminhtml\Online', 'block');
         $this->assertNotEmpty($block->getFilterFormHtml());
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php
index 5023add4a8a..402423f5434 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php
@@ -34,7 +34,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testIndexAction()
     {
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Customer\Model\Session', array($logger));
         $session->login('customer@example.com', 'password');
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/Customer/GroupTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php
similarity index 90%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Controller/Customer/GroupTest.php
rename to dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php
index 141ca388ae8..a5c92a8a4c2 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/Customer/GroupTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php
@@ -19,14 +19,14 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Customer
  * @subpackage  integration_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\Adminhtml\Controller\Customer;
+namespace Magento\Customer\Controller\Adminhtml;
 
 /**
  * @magentoAppArea adminhtml
@@ -53,7 +53,7 @@ class GroupTest extends \Magento\Backend\Utility\Controller
 
     public function testNewAction()
     {
-        $this->dispatch('backend/admin/customer_group/new');
+        $this->dispatch('backend/customer/group/new');
         $responseBody = $this->getResponse()->getBody();
         $this->assertRegExp('/<h1 class\="title">\s*New Customer Group\s*<\/h1>/', $responseBody);
     }
@@ -61,7 +61,7 @@ class GroupTest extends \Magento\Backend\Utility\Controller
     public function testDeleteActionExistingGroup()
     {
         $this->getRequest()->setParam('id', self::$_customerGroupId);
-        $this->dispatch('backend/admin/customer_group/delete');
+        $this->dispatch('backend/customer/group/delete');
 
         /**
          * Check that success message is set
@@ -74,7 +74,7 @@ class GroupTest extends \Magento\Backend\Utility\Controller
     public function testDeleteActionNonExistingGroupId()
     {
         $this->getRequest()->setParam('id', 10000);
-        $this->dispatch('backend/admin/customer_group/delete');
+        $this->dispatch('backend/customer/group/delete');
 
         /**
          * Check that error message is set
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/CustomerTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
similarity index 91%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Controller/CustomerTest.php
rename to dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
index 7e5c7b4d15a..f4854cbfc59 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/CustomerTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
@@ -19,18 +19,18 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Adminhtml
+ * @package     Magento_Customer
  * @subpackage  integration_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\Adminhtml\Controller;
+namespace Magento\Customer\Controller\Adminhtml;
 
 /**
  * @magentoAppArea adminhtml
  */
-class CustomerTest extends \Magento\Backend\Utility\Controller
+class IndexTest extends \Magento\Backend\Utility\Controller
 {
     /**
      * Base controller URL
@@ -42,7 +42,7 @@ class CustomerTest extends \Magento\Backend\Utility\Controller
     protected function setUp()
     {
         parent::setUp();
-        $this->_baseControllerUrl = 'http://localhost/index.php/backend/admin/customer/';
+        $this->_baseControllerUrl = 'http://localhost/index.php/backend/customer/index/';
     }
 
     protected function tearDown()
@@ -64,7 +64,7 @@ class CustomerTest extends \Magento\Backend\Utility\Controller
     public function testSaveActionWithEmptyPostData()
     {
         $this->getRequest()->setPost(array());
-        $this->dispatch('backend/admin/customer/save');
+        $this->dispatch('backend/customer/index/save');
         $this->assertRedirect($this->stringStartsWith($this->_baseControllerUrl));
     }
 
@@ -77,7 +77,7 @@ class CustomerTest extends \Magento\Backend\Utility\Controller
             )
         );
         $this->getRequest()->setPost($post);
-        $this->dispatch('backend/admin/customer/save');
+        $this->dispatch('backend/customer/index/save');
         /**
          * Check that errors was generated and set to session
          */
@@ -107,7 +107,7 @@ class CustomerTest extends \Magento\Backend\Utility\Controller
             'address' => array('_item1' => array()),
         );
         $this->getRequest()->setPost($post);
-        $this->dispatch('backend/admin/customer/save');
+        $this->dispatch('backend/customer/index/save');
         /**
          * Check that errors was generated and set to session
          */
@@ -125,6 +125,9 @@ class CustomerTest extends \Magento\Backend\Utility\Controller
      */
     public function testSaveActionWithValidCustomerDataAndValidAddressData()
     {
+        /** @var $objectManager \Magento\TestFramework\ObjectManager */
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
         $post = array(
             'account' => array(
                 'middlename' => 'test middlename',
@@ -150,7 +153,7 @@ class CustomerTest extends \Magento\Backend\Utility\Controller
         );
         $this->getRequest()->setPost($post);
         $this->getRequest()->setParam('back', '1');
-        $this->dispatch('backend/admin/customer/save');
+        $this->dispatch('backend/customer/index/save');
         /**
          * Check that errors was generated and set to session
          */
@@ -158,21 +161,18 @@ class CustomerTest extends \Magento\Backend\Utility\Controller
         /**
          * Check that customer data were set to session
          */
-        $this->assertEmpty(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Backend\Model\Session')->getCustomerData());
+        $this->assertEmpty($objectManager->get('Magento\Backend\Model\Session')->getCustomerData());
 
         /**
          * Check that success message is set
          */
         $this->assertSessionMessages($this->logicalNot($this->isEmpty()), \Magento\Core\Model\Message::SUCCESS);
 
-        /** @var $objectManager \Magento\TestFramework\ObjectManager */
-        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-
         /**
          * Check that customer id set and addresses saved
          */
-        $customer = $objectManager->get('Magento\Core\Model\Registry')->registry('current_customer');
+        $registry = $objectManager->get('Magento\Core\Model\Registry');
+        $customer = $registry->registry('current_customer');
         $this->assertInstanceOf('Magento\Customer\Model\Customer', $customer);
         $this->assertCount(1, $customer->getAddressesCollection());
 
@@ -182,7 +182,7 @@ class CustomerTest extends \Magento\Backend\Utility\Controller
     }
 
     /**
-     * @magentoDataFixture Magento/Adminhtml/controllers/_files/customer_sample.php
+     * @magentoDataFixture Magento/Customer/_files/customer_sample.php
      */
     public function testSaveActionExistingCustomerAndExistingAddressData()
     {
@@ -233,7 +233,7 @@ class CustomerTest extends \Magento\Backend\Utility\Controller
         );
         $this->getRequest()->setPost($post);
         $this->getRequest()->setParam('customer_id', 1);
-        $this->dispatch('backend/admin/customer/save');
+        $this->dispatch('backend/customer/index/save');
         /**
          * Check that success message is set
          */
@@ -273,7 +273,7 @@ class CustomerTest extends \Magento\Backend\Utility\Controller
     }
 
     /**
-     * @magentoDataFixture Magento/Adminhtml/controllers/_files/customer_sample.php
+     * @magentoDataFixture Magento/Customer/_files/customer_sample.php
      */
     public function testSaveActionCoreException()
     {
@@ -289,7 +289,7 @@ class CustomerTest extends \Magento\Backend\Utility\Controller
             ),
         );
         $this->getRequest()->setPost($post);
-        $this->dispatch('backend/admin/customer/save');
+        $this->dispatch('backend/customer/index/save');
         /*
         * Check that error message is set
         */
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/CustomerTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/CustomerTest.php
index 34ad993945c..45d52fdca37 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Service/CustomerTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Service/CustomerTest.php
@@ -52,6 +52,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
         $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $this->_customerFactory = $this->_objectManager->get('Magento\Customer\Model\CustomerFactory');
         $this->_model = $this->_objectManager->create('Magento\Customer\Service\Customer');
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
     }
 
     protected function tearDown()
@@ -77,6 +78,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
     /**
      * @param array $customerData
      * @dataProvider createDataProvider
+     * @magentoAppArea adminhtml
      */
     public function testCreate($customerData)
     {
@@ -316,6 +318,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
      * @param array $customerData
      * @magentoDataFixture Magento/Customer/_files/customer.php
      * @dataProvider updateDataProvider
+     * @magentoAppArea frontend
      */
     public function testUpdate($customerData)
     {
@@ -410,6 +413,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
 
     /**
      * @magentoDataFixture Magento/Customer/_files/customer.php
+     * @appAreaCode adminhtml
      */
     public function testAutoGeneratePassword()
     {
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/controllers/_files/customer_sample.php b/dev/tests/integration/testsuite/Magento/Customer/_files/customer_sample.php
similarity index 100%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/controllers/_files/customer_sample.php
rename to dev/tests/integration/testsuite/Magento/Customer/_files/customer_sample.php
diff --git a/dev/tests/integration/testsuite/Magento/DB/Adapter/Pdo/MysqlTest.php b/dev/tests/integration/testsuite/Magento/DB/Adapter/Pdo/MysqlTest.php
index f87ca58475a..ae950660caa 100644
--- a/dev/tests/integration/testsuite/Magento/DB/Adapter/Pdo/MysqlTest.php
+++ b/dev/tests/integration/testsuite/Magento/DB/Adapter/Pdo/MysqlTest.php
@@ -128,9 +128,9 @@ class MysqlTest extends \PHPUnit_Framework_TestCase
     protected function _getDbAdapter()
     {
         if (is_null($this->_dbAdapter)) {
-            /** @var $coreResource \Magento\Core\Model\Resource */
+            /** @var $coreResource \Magento\App\Resource */
             $coreResource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                ->get('Magento\Core\Model\Resource');
+                ->get('Magento\App\Resource');
             $this->_dbAdapter = $coreResource->getConnection('default_setup');
         }
         return $this->_dbAdapter;
diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php
index 1bf4d156f9b..1652de54494 100644
--- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php
+++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php
@@ -51,7 +51,8 @@ class QuickStylesTest extends \PHPUnit_Framework_TestCase
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $this->_design = $objectManager->get('Magento\View\DesignInterface');
-        $this->_design->setDesignTheme('vendor_test', \Magento\View\DesignInterface::DEFAULT_AREA);
+        $objectManager->get('Magento\App\State')->setAreaCode(\Magento\View\DesignInterface::DEFAULT_AREA);
+        $this->_design->setDesignTheme('vendor_test');
         $this->_viewFileSystem = $objectManager->get('Magento\Core\Model\View\FileSystem');
         $quickStylesPath = $this->_viewFileSystem->getFilename('Magento_DesignEditor::controls/quick_styles.xml');
         $this->assertFileExists($quickStylesPath);
diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php
index 2a4ed51970f..33addaaf0b0 100644
--- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php
+++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php
@@ -44,10 +44,12 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode(\Magento\View\DesignInterface::DEFAULT_AREA);
         $this->_design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
             'Magento\View\DesignInterface'
         );
-        $this->_design->setDesignTheme('vendor_test_child', \Magento\View\DesignInterface::DEFAULT_AREA);
+        $this->_design->setDesignTheme('vendor_test_child');
         $this->_configFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\DesignEditor\Model\Editor\Tools\Controls\Factory'
         );
diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Translate/InlineVdeTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Translate/InlineVdeTest.php
index 87132cac920..3328b98984b 100644
--- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Translate/InlineVdeTest.php
+++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Translate/InlineVdeTest.php
@@ -46,6 +46,7 @@ class InlineVdeTest extends \PHPUnit_Framework_TestCase
 
     public static function setUpBeforeClass()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
             ->setDesignTheme('magento_demo');
     }
diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php
index 0a068650796..5f3bdbf315d 100644
--- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php
+++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php
@@ -26,13 +26,13 @@
  */
 
 \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-    \Magento\Core\Model\App::PARAM_APP_DIRS => array(
+    \Magento\App\Dir::PARAM_APP_DIRS => array(
         \Magento\App\Dir::THEMES => dirname(__DIR__) . '/design'
     )
 ));
 
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-    ->loadAreaPart(\Magento\Core\Model\App\Area::AREA_ADMINHTML, \Magento\Core\Model\App\Area::PART_CONFIG);
+    ->loadAreaPart(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, \Magento\Core\Model\App\Area::PART_CONFIG);
 
 /** @var $registration \Magento\Core\Model\Theme\Registration */
 $registration = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/_files/design_editor_active.php b/dev/tests/integration/testsuite/Magento/DesignEditor/_files/design_editor_active.php
index 714aa8d020a..e70674f16bd 100644
--- a/dev/tests/integration/testsuite/Magento/DesignEditor/_files/design_editor_active.php
+++ b/dev/tests/integration/testsuite/Magento/DesignEditor/_files/design_editor_active.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\ScopeInterface')
-    ->setCurrentScope(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+    ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
 $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
     ->create('Magento\DesignEditor\Model\Session');
 /** @var $auth \Magento\Backend\Model\Auth */
diff --git a/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php
index f119bfe1110..78ad066cc7a 100644
--- a/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php
@@ -41,8 +41,9 @@ class AbstractTest
         /** @var $objectManager \Magento\TestFramework\ObjectManager */
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 
+        $objectManager->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $objectManager->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML)
             ->setDefaultDesignTheme();
         $entityType = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Eav\Model\Config')
             ->getEntityType('customer');
@@ -54,7 +55,7 @@ class AbstractTest
             'Magento\Eav\Block\Adminhtml\Attribute\Edit\Main\AbstractMain',
             array(
                 $objectManager->get('Magento\Core\Model\Registry'),
-                $objectManager->get('Magento\Data\Form\Factory'),
+                $objectManager->get('Magento\Data\FormFactory'),
                 $objectManager->get('Magento\Core\Helper\Data'),
                 $objectManager->get('Magento\Backend\Block\Template\Context'),
                 $objectManager->get('Magento\Eav\Helper\Data'),
diff --git a/dev/tests/integration/testsuite/Magento/Encryption/ModelTest.php b/dev/tests/integration/testsuite/Magento/Encryption/ModelTest.php
new file mode 100644
index 00000000000..6788e342616
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Encryption/ModelTest.php
@@ -0,0 +1,74 @@
+<?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_Core
+ * @subpackage  integration_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\Encryption;
+
+class ModelTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Encryption\Encryptor
+     */
+    protected $_model;
+
+    protected function setUp()
+    {
+        $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->create('Magento\Encryption\Encryptor');
+    }
+
+    public function testEncryptDecrypt()
+    {
+        $encryptor = $this->_model;
+
+        $this->assertEquals('', $encryptor->decrypt($encryptor->encrypt('')));
+        $this->assertEquals('test', $encryptor->decrypt($encryptor->encrypt('test')));
+    }
+
+    public function testEncryptDecrypt2()
+    {
+        $encryptor = $this->_model;
+
+        $initial = md5(uniqid());
+        $encrypted = $encryptor->encrypt($initial);
+        $this->assertNotEquals($initial, $encrypted);
+        $this->assertEquals($initial, $encryptor->decrypt($encrypted));
+    }
+
+    public function testValidateKey()
+    {
+        $validKey = md5(uniqid());
+        $this->assertInstanceOf('Magento\Encryption\Crypt', $this->_model->validateKey($validKey));
+    }
+
+    public function testGetValidateHash()
+    {
+        $password = uniqid();
+        $hash = $this->_model->getHash($password);
+
+        $this->assertTrue(is_string($hash));
+        $this->assertTrue($this->_model->validateHash($password, $hash));
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/Adapter/LocalTest.php b/dev/tests/integration/testsuite/Magento/Filesystem/Adapter/LocalTest.php
index 3b164197e42..a7324cddcdb 100644
--- a/dev/tests/integration/testsuite/Magento/Filesystem/Adapter/LocalTest.php
+++ b/dev/tests/integration/testsuite/Magento/Filesystem/Adapter/LocalTest.php
@@ -37,7 +37,7 @@ class LocalTest extends \PHPUnit_Framework_TestCase
         $this->_adapter = new \Magento\Filesystem\Adapter\Local();
 
         \Magento\Io\File::rmdirRecursive(self::_getTmpDir());
-        mkdir(self::_getTmpDir());
+        mkdir(self::_getTmpDir(), 0777, true);
     }
 
     protected function tearDown()
diff --git a/dev/tests/integration/testsuite/Magento/GiftMessage/Block/Message/InlineTest.php b/dev/tests/integration/testsuite/Magento/GiftMessage/Block/Message/InlineTest.php
index 1d6530c3fc8..05c8916b228 100644
--- a/dev/tests/integration/testsuite/Magento/GiftMessage/Block/Message/InlineTest.php
+++ b/dev/tests/integration/testsuite/Magento/GiftMessage/Block/Message/InlineTest.php
@@ -46,7 +46,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase
     public function testThumbnail()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Catalog\Model\Product');
         $product->load(1);
diff --git a/dev/tests/integration/testsuite/Magento/GoogleAdwords/Model/Validator/FactoryTest.php b/dev/tests/integration/testsuite/Magento/GoogleAdwords/Model/Validator/FactoryTest.php
new file mode 100644
index 00000000000..6e7c2720136
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/GoogleAdwords/Model/Validator/FactoryTest.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Integration test for \Magento\GoogleAdwords\Model\Validator\Factory
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\GoogleAdwords\Model\Validator;
+
+use Magento\TestFramework\Helper\Bootstrap;
+
+class FactoryTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Test creation of conversion id validator
+     *
+     * @magentoAppIsolation enabled
+     */
+    public function testGetConversionIdValidator()
+    {
+        $conversionId = '123';
+
+        $objectManager = Bootstrap::getObjectManager();
+        $factory = $objectManager->get('Magento\GoogleAdwords\Model\Validator\Factory');
+
+        $validator = $factory->createConversionIdValidator($conversionId);
+        $this->assertNotNull($validator, "Conversion ID Validator");
+    }
+
+    /**
+     * Test creation of conversion color validator
+     *
+     * @magentoAppIsolation enabled
+     */
+    public function testGetConversionColorValidator()
+    {
+        $conversionColor = "FFFFFF";
+
+        $objectManager = Bootstrap::getObjectManager();
+        $factory = $objectManager->get('Magento\GoogleAdwords\Model\Validator\Factory');
+
+        $validator = $factory->createColorValidator($conversionColor);
+        $this->assertNotNull($validator);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/HTTP/HeaderTest.php b/dev/tests/integration/testsuite/Magento/HTTP/HeaderTest.php
new file mode 100644
index 00000000000..98ddeb8436a
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/HTTP/HeaderTest.php
@@ -0,0 +1,61 @@
+<?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_Core
+ * @subpackage  integration_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\HTTP;
+
+class HeaderTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\HTTP\Header
+     */
+    protected $_header;
+
+    protected function setUp()
+    {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->_header = $objectManager->get('Magento\HTTP\Header');
+
+        /** @var \Magento\TestFramework\Request $request */
+        $request = $objectManager->get('Magento\TestFramework\Request');
+        $request->setServer(array('HTTP_HOST' => 'localhost'));
+    }
+
+    public function testGetHttpHeaderMethods()
+    {
+        $host = 'localhost';
+        $this->assertEquals($host, $this->_header->getHttpHost());
+        $this->assertEquals(false, $this->_header->getHttpUserAgent());
+        $this->assertEquals(false, $this->_header->getHttpAcceptLanguage());
+        $this->assertEquals(false, $this->_header->getHttpAcceptCharset());
+        $this->assertEquals(false, $this->_header->getHttpReferer());
+    }
+
+    public function testGetRequestUri()
+    {
+        $this->assertNull($this->_header->getRequestUri());
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/EncryptionTest.php b/dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/RemoteAddressTest.php
similarity index 67%
rename from dev/tests/integration/testsuite/Magento/Core/Model/EncryptionTest.php
rename to dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/RemoteAddressTest.php
index 5304d09b776..20afee09a4c 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/EncryptionTest.php
+++ b/dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/RemoteAddressTest.php
@@ -25,24 +25,23 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Core\Model;
+namespace Magento\HTTP\PhpEnvironment;
 
-class EncryptionTest extends \PHPUnit_Framework_TestCase
+class RemoteAddressTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Encryption
+     * @var \Magento\HTTP\PhpEnvironment\RemoteAddress
      */
-    protected $_model;
+    protected $_helper;
 
     protected function setUp()
     {
-        $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Core\Model\Encryption');
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->_helper = $objectManager->get('Magento\HTTP\PhpEnvironment\RemoteAddress');
     }
 
-    public function testEncryptDecrypt()
+    public function testGetRemoteAddress()
     {
-        $this->assertEquals('', $this->_model->decrypt($this->_model->encrypt('')));
-        $this->assertEquals('test', $this->_model->decrypt($this->_model->encrypt('test')));
+        $this->assertEquals(false, $this->_helper->getRemoteAddress());
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/ServerAddressTest.php b/dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/ServerAddressTest.php
new file mode 100644
index 00000000000..4e1abce7a3d
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/ServerAddressTest.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Magento
+ * @package     Magento_Core
+ * @subpackage  integration_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\HTTP\PhpEnvironment;
+
+class ServerAddressTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\HTTP\PhpEnvironment\ServerAddress
+     */
+    protected $_helper;
+
+    protected function setUp()
+    {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->_helper = $objectManager->get('Magento\HTTP\PhpEnvironment\ServerAddress');
+    }
+
+    public function testGetServerAddress()
+    {
+        $this->assertEquals(false, $this->_helper->getServerAddress());
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/FilterTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/FilterTest.php
index 7cfd5bf603a..cedf81aed0b 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/FilterTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/FilterTest.php
@@ -38,8 +38,9 @@ class FilterTest
      */
     public function testGetDateFromToHtmlWithValue()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML)
             ->setDefaultDesignTheme();
         $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\ImportExport\Block\Adminhtml\Export\Filter');
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php
index eaaba9f299d..988ad6aaf14 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php
@@ -160,7 +160,7 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
     public function testImportData($behavior, $sourceFile, array $dataBefore, array $dataAfter, array $errors = array())
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         // set entity adapter parameters
         $this->_entityAdapter->setParameters(array('behavior' => $behavior));
 
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php
index b7283a4a833..d1bd0eba036 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php
@@ -234,12 +234,15 @@ class AddressTest extends \PHPUnit_Framework_TestCase
         $addressId = $objectManager->get('Magento\Core\Model\Resource\HelperPool')->get('Magento_ImportExport')
             ->getNextAutoincrement($tableName);
 
+        /** @var \Magento\Stdlib\DateTime $dateTime */
+        $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('\Magento\Stdlib\DateTime');
+
         $entityData = array(
             'entity_id'      => $addressId,
             'entity_type_id' => $addressModel->getEntityTypeId(),
             'parent_id'      => $customerId,
-            'created_at'     => now(),
-            'updated_at'     => now()
+            'created_at'     => $dateTime->now(),
+            'updated_at'     => $dateTime->now()
         );
 
         // invoke _saveAddressEntities
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php
index 76e5f8eec88..3ca0617ace8 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php
@@ -125,7 +125,7 @@ class CustomerImportTest extends \PHPUnit_Framework_TestCase
     public function testDeleteData()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $source = new \Magento\ImportExport\Model\Import\Source\Csv(__DIR__ . '/_files/customers_to_import.csv');
 
         /** @var $customerCollection \Magento\Customer\Model\Resource\Customer\Collection */
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php
index 1d929147ada..80813fd9ea2 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php
@@ -47,11 +47,11 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase
         /** @var $model \Magento\ImportExport\Model\Import\AbstractEntity|\PHPUnit_Framework_MockObject_MockObject */
         $model = $this->getMockForAbstractClass('Magento\ImportExport\Model\Import\AbstractEntity', array(
             $objectManager->get('Magento\Core\Helper\Data'),
-            $objectManager->get('Magento\Core\Helper\String'),
+            $objectManager->get('Magento\Stdlib\String'),
             $objectManager->get('Magento\Core\Model\Store\Config'),
             $objectManager->get('Magento\ImportExport\Model\ImportFactory'),
             $objectManager->get('Magento\ImportExport\Model\Resource\Helper'),
-            $objectManager->get('Magento\Core\Model\Resource'),
+            $objectManager->get('Magento\App\Resource'),
         ));
         $model->expects($this->any())
             ->method('validateRow')
diff --git a/dev/tests/integration/testsuite/Magento/Install/Block/AdminTest.php b/dev/tests/integration/testsuite/Magento/Install/Block/AdminTest.php
index dac49101f15..e5bf3d49d56 100644
--- a/dev/tests/integration/testsuite/Magento/Install/Block/AdminTest.php
+++ b/dev/tests/integration/testsuite/Magento/Install/Block/AdminTest.php
@@ -42,9 +42,11 @@ class AdminTest extends \PHPUnit_Framework_TestCase
         $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Install\Model\Session');
         $session->setAdminData(array_merge($preserve, $omit));
 
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('install');
+
         /** @var $layout \Magento\View\LayoutInterface */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Core\Model\Layout', array('area' => 'install'));
+            ->create('Magento\Core\Model\Layout');
         /** @var $block \Magento\Install\Block\Admin */
         $block = $layout->createBlock('Magento\Install\Block\Admin');
         $output = $block->toHtml();
diff --git a/dev/tests/integration/testsuite/Magento/Install/Controller/WizardTest.php b/dev/tests/integration/testsuite/Magento/Install/Controller/WizardTest.php
index b700881041b..6a1db025300 100644
--- a/dev/tests/integration/testsuite/Magento/Install/Controller/WizardTest.php
+++ b/dev/tests/integration/testsuite/Magento/Install/Controller/WizardTest.php
@@ -66,7 +66,7 @@ class WizardTest extends \Magento\TestFramework\TestCase\AbstractController
         $appState = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State');
         $appState->setInstallDate(false);
         $this->dispatch('install/wizard');
-        $this->assertEquals(200, $this->getResponse()->getHttpResponseCode());
+        $this->assertEquals(302, $this->getResponse()->getHttpResponseCode());
         $appState->setInstallDate(date('r', strtotime('now')));
     }
 
@@ -78,7 +78,7 @@ class WizardTest extends \Magento\TestFramework\TestCase\AbstractController
     public function testPreDispatchImpossibleToRenderPage($action)
     {
         $params = self::$_params;
-        $params[\Magento\Core\Model\App::PARAM_APP_DIRS][\Magento\App\Dir::STATIC_VIEW] = self::$_tmpDir;
+        $params[\Magento\App\Dir::PARAM_APP_DIRS][\Magento\App\Dir::STATIC_VIEW] = self::$_tmpDir;
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize($params);
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->configure(array(
             'preferences' => array(
diff --git a/dev/tests/integration/testsuite/Magento/Install/IndexTest.php b/dev/tests/integration/testsuite/Magento/Install/IndexTest.php
deleted file mode 100644
index f5f3eb492c7..00000000000
--- a/dev/tests/integration/testsuite/Magento/Install/IndexTest.php
+++ /dev/null
@@ -1,44 +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.
- *
- * @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\Install;
-
-class IndexTest extends \Magento\TestFramework\TestCase\AbstractController
-{
-    public function testIndexAction()
-    {
-        $this->dispatch('install/index/index');
-        $request = $this->getRequest();
-        $this->assertEquals('begin', $request->getActionName());
-        $this->assertEquals('wizard', $request->getControllerName());
-        $this->assertEquals('install', $request->getModuleName());
-        /**
-         * Make sure that preDispatch() didn't cleanup var directory (by asserting presence of anything there),
-         * because in integration testing environment the application is considered "installed"
-         */
-        $this->assertFileExists(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Dir')
-                ->getDir(\Magento\App\Dir::TMP)
-        );
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php
index c39ea4fc6e4..5b7b4792205 100644
--- a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php
@@ -64,31 +64,31 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             )
         );
 
-        /** @var \Magento\App\Module\Declaration\FileResolver $modulesDeclarations */
+        /** @var \Magento\Module\Declaration\FileResolver $modulesDeclarations */
         $modulesDeclarations = $this->_objectManager->create(
-            'Magento\App\Module\Declaration\FileResolver', array(
+            'Magento\Module\Declaration\FileResolver', array(
                 'applicationDirs' => $dirs,
             )
         );
 
 
-        /** @var \Magento\App\Module\Declaration\Reader\Filesystem $filesystemReader */
+        /** @var \Magento\Module\Declaration\Reader\Filesystem $filesystemReader */
         $filesystemReader = $this->_objectManager->create(
-            'Magento\App\Module\Declaration\Reader\Filesystem', array(
+            'Magento\Module\Declaration\Reader\Filesystem', array(
                 'fileResolver' => $modulesDeclarations,
             )
         );
 
-        /** @var \Magento\App\ModuleList $modulesList */
+        /** @var \Magento\Module\ModuleList $modulesList */
         $modulesList = $this->_objectManager->create(
-            'Magento\App\ModuleList', array(
+            'Magento\Module\ModuleList', array(
                 'reader' => $filesystemReader,
             )
         );
 
-        /** @var \Magento\Core\Model\Config\Modules\Reader $moduleReader */
+        /** @var \Magento\Module\Dir\Reader $moduleReader */
         $moduleReader = $this->_objectManager->create(
-            'Magento\Core\Model\Config\Modules\Reader', array(
+            'Magento\Module\Dir\Reader', array(
                 'moduleList' => $modulesList
             )
         );
diff --git a/dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php b/dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php
new file mode 100644
index 00000000000..b5d777e7660
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php
@@ -0,0 +1,130 @@
+<?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\Integration\Controller\Adminhtml;
+
+/**
+ * \Magento\Integration\Controller\Adminhtml\Integration
+ *
+ * @magentoAppArea adminhtml
+ * @magentoDbIsolation enabled
+ */
+class IntegrationTest extends \Magento\Backend\Utility\Controller
+{
+    /** @var \Magento\Integration\Model\Integration  */
+    private $_integration;
+
+    protected function setUp()
+    {
+        parent::setUp();
+        $this->_createDummyIntegration();
+    }
+
+    public function testIndexAction()
+    {
+        $this->dispatch('backend/admin/integration/index');
+        $response = $this->getResponse()->getBody();
+
+        $this->assertContains('Integrations', $response);
+        $this->assertSelectCount('#integrationGrid', 1, $response);
+    }
+
+    public function testNewAction()
+    {
+        $this->dispatch('backend/admin/integration/new');
+        $response = $this->getResponse()->getBody();
+
+        $this->assertEquals('new', $this->getRequest()->getActionName());
+        $this->assertContains('entry-edit form-inline', $response);
+        $this->assertContains('New Integration', $response);
+        $this->assertSelectCount('#integration_properties_base_fieldset', 1, $response);
+    }
+
+    public function testEditAction()
+    {
+        $integrationId = $this->_integration->getId();
+        $this->getRequest()->setParam('id', $integrationId);
+        $this->dispatch('backend/admin/integration/edit');
+        $response = $this->getResponse()->getBody();
+        $saveLink = 'integration/save/';
+            
+        $this->assertContains('entry-edit form-inline', $response);
+        $this->assertContains('Edit &quot;'. $this->_integration->getName() .'&quot; Integration', $response);
+        $this->assertContains($saveLink, $response);
+        $this->assertSelectCount('#integration_properties_base_fieldset', 1, $response);
+        $this->assertSelectCount('#integration_edit_tabs_info_section_content', 1, $response);
+    }
+
+    public function testSaveActionUpdateIntegration()
+    {
+        $integrationId = $this->_integration->getId();
+        $integrationName = $this->_integration->getName();
+        $this->getRequest()->setParam('id', $integrationId);
+        $url = 'http://magento.ll/endpoint_url';
+        $this->getRequest()->setPost(array(
+                'name' => $integrationName,
+                'email' => 'test@magento.com',
+                'authentication' => '1',
+                'endpoint' => $url
+        ));
+        $this->dispatch('backend/admin/integration/save');
+        $this->assertSessionMessages(
+            $this->equalTo(array("The integration '$integrationName' has been saved.")),
+            \Magento\Core\Model\Message::SUCCESS
+        );
+        $this->assertRedirect($this->stringContains('backend/admin/integration/index/'));
+    }
+
+    public function testSaveActionNewIntegration()
+    {
+        $url = 'http://magento.ll/endpoint_url';
+        $integrationName = md5(rand());
+        $this->getRequest()->setPost(array(
+            'name' => $integrationName,
+            'email' => 'test@magento.com',
+            'authentication' => '1',
+            'endpoint' => $url
+        ));
+        $this->dispatch('backend/admin/integration/save');
+
+        $this->assertSessionMessages(
+            $this->equalTo(array("The integration '$integrationName' has been saved.")),
+            \Magento\Core\Model\Message::SUCCESS
+        );
+        $this->assertRedirect($this->stringContains('backend/admin/integration/index/'));
+    }
+
+    /**
+     * Creates a dummy integration for use in dispatched methods under testing
+     */
+    private function _createDummyIntegration()
+    {
+        /** @var $factory \Magento\Integration\Model\Integration\Factory */
+        $factory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->create('Magento\Integration\Model\Integration\Factory');
+        $this->_integration = $factory->create()
+            ->setName(md5(rand()))
+            ->save();
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php
index 6ad448fdd32..60c4b332401 100644
--- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php
@@ -46,9 +46,9 @@ class QueueTest extends \PHPUnit_Framework_TestCase
         /** @var $appEmulation \Magento\Core\Model\App\Emulation */
         $appEmulation = $objectManager->create('Magento\Core\Model\App\Emulation', array('viewDesign' => $design));
         $objectManager->addSharedInstance($appEmulation, 'Magento\Core\Model\App\Emulation');
-        /** @var $app \Magento\Core\Model\App */
+        /** @var $app \Magento\TestFramework\App */
         $app = $objectManager->get('Magento\Core\Model\App');
-        $app->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+        $app->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
 
         /** @var $collection \Magento\Core\Model\Resource\Theme\Collection */
         $collection = $objectManager->create('Magento\Core\Model\Resource\Theme\Collection');
@@ -110,7 +110,7 @@ class QueueTest extends \PHPUnit_Framework_TestCase
     public function testSendPerSubscriberProblem()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $mail = $this->getMock('Zend_Mail', array('send'), array('utf-8'));
         $brokenMail = $this->getMock('Zend_Mail', array('send'), array('utf-8'));
         $errorMsg = md5(microtime());
diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/Config/Reader/DomTest.php b/dev/tests/integration/testsuite/Magento/ObjectManager/Config/Reader/DomTest.php
index ee3ff8a2bee..e8ca88b8a83 100644
--- a/dev/tests/integration/testsuite/Magento/ObjectManager/Config/Reader/DomTest.php
+++ b/dev/tests/integration/testsuite/Magento/ObjectManager/Config/Reader/DomTest.php
@@ -36,7 +36,7 @@ class DomTest extends \PHPUnit_Framework_TestCase
     protected $_fileList;
 
     /**
-     * @var \Magento\Core\Model\Config\FileResolver\Primary
+     * @var \Magento\App\Config\FileResolver\Primary
      */
     protected $_fileResolverMock;
 
@@ -46,7 +46,7 @@ class DomTest extends \PHPUnit_Framework_TestCase
     protected $_mergedConfig;
 
     /**
-     * @var \Magento\Core\Model\Config\ValidationState
+     * @var \Magento\App\Config\ValidationState
      */
     protected $_validationState;
 
@@ -69,12 +69,12 @@ class DomTest extends \PHPUnit_Framework_TestCase
         );
 
         $this->_fileResolverMock = $this->getMock(
-            'Magento\Core\Model\Config\FileResolver\Primary', array(), array(), '', false
+            'Magento\App\Config\FileResolver\Primary', array(), array(), '', false
         );
         $this->_fileResolverMock->expects($this->once())->method('get')->will($this->returnValue($this->_fileList));
         $this->_mapper = new \Magento\ObjectManager\Config\Mapper\Dom();
         $this->_validationState =
-            new \Magento\Core\Model\Config\ValidationState(\Magento\App\State::MODE_DEFAULT);
+            new \Magento\App\Config\ValidationState(\Magento\App\State::MODE_DEFAULT);
         $this->_schemaLocator = new \Magento\ObjectManager\Config\SchemaLocator();
 
         $this->_mergedConfig = new \DOMDocument();
diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_merged.xml b/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_merged.xml
index 0377b424481..e681e4c652e 100644
--- a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_merged.xml
+++ b/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_merged.xml
@@ -24,11 +24,11 @@
  */
 -->
 <config>
-    <preference for="Magento\App\UpdaterInterface" type="Magento\App\UpdaterOne" />
-    <preference for="Magento\App\UpdaterInterfaceTwo" type="Magento\App\UpdaterTwo"/>
-    <type name="Magento\Core\Model\Config\Loader\Local" shared="false">
+    <preference for="Magento\Module\UpdaterInterface" type="Magento\Module\UpdaterOne" />
+    <preference for="Magento\Module\UpdaterInterfaceTwo" type="Magento\Module\UpdaterTwo"/>
+    <type name="Magento\App\Config\Loader" shared="false">
         <param name="customFile">
-            <value type="argument">Magento\Core\Model\App::PARAM_CUSTOM_LOCAL_CONFIG</value>
+            <value type="argument">Magento\App\Config\Loader::PARAM_CUSTOM_FILE</value>
         </param>
         <param name="customConfig">
             <instance shared="false" type="Magento\Core\Model\Config\Storage_Modules" />
@@ -50,9 +50,9 @@
         </param>
         <plugin name="three" type="somePluginThree"/>
     </type>
-    <virtualType name="Magento\Core\Model\Config\Loader\LocalVirtual" type="Magento\Core\Model\Config\Loader\Local" shared="true">
+    <virtualType name="Magento\App\Config\LoaderVirtual" type="Magento\App\Config\Loader\Local" shared="true">
         <param name="customFile">
-            <value type="argument">Magento\Core\Model\App::PARAM_CUSTOM_LOCAL_FILE</value>
+            <value type="argument">Magento\App\Config\Loader::PARAM_CUSTOM_FILE</value>
         </param>
         <param name="customConfig">
             <instance type="Magento\Core\Model\Config\Storage_Modules" />
diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_one.xml b/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_one.xml
index 708a9c97c82..c3e77c2b6b2 100644
--- a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_one.xml
+++ b/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_one.xml
@@ -24,10 +24,10 @@
  */
 -->
 <config>
-    <preference for="Magento\App\UpdaterInterface" type="Magento\App\Updater" />
-    <type name="Magento\Core\Model\Config\Loader\Local">
+    <preference for="Magento\Module\UpdaterInterface" type="Magento\Module\Updater" />
+    <type name="Magento\App\Config\Loader">
         <param name="customFile">
-            <value type="argument">Magento\Core\Model\App::PARAM_CUSTOM_LOCAL_FILE</value>
+            <value type="argument">Magento\App\Config\Loader::PARAM_CUSTOM_FILE</value>
         </param>
         <param name="customConfig">
             <instance shared="true" type="Magento\Core\Model\Config\Storage_Modules" />
@@ -44,9 +44,9 @@
         <plugin name="one" type="somePluginOne"/>
         <plugin name="two" type="somePluginTwo" sortOrder="15"/>
     </type>
-    <virtualType name="Magento\Core\Model\Config\Loader\LocalVirtual" type="Magento\Core\Model\Config\Loader\Local" shared="false">
+    <virtualType name="Magento\App\Config\LoaderVirtual" type="Magento\App\Config\Loader\Local" shared="false">
         <param name="customFile">
-            <value type="argument">Magento\Core\Model\App::PARAM_CUSTOM_LOCAL_FILE</value>
+            <value type="argument">Magento\App\Config\Loader::PARAM_CUSTOM_FILE</value>
         </param>
         <param name="customConfig">
             <instance type="Magento\Core\Model\Config\Storage_Modules" />
diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_two.xml b/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_two.xml
index 8e794956d1c..66d7c5a84c9 100644
--- a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_two.xml
+++ b/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_two.xml
@@ -24,11 +24,11 @@
  */
 -->
 <config>
-    <preference for="Magento\App\UpdaterInterfaceTwo" type="Magento\App\UpdaterTwo" />
-    <preference for="Magento\App\UpdaterInterface" type="Magento\App\UpdaterOne" />
-    <type name="Magento\Core\Model\Config\Loader\Local" shared="false">
+    <preference for="Magento\Module\UpdaterInterfaceTwo" type="Magento\Module\UpdaterTwo" />
+    <preference for="Magento\Module\UpdaterInterface" type="Magento\Module\UpdaterOne" />
+    <type name="Magento\App\Config\Loader" shared="false">
         <param name="customFile">
-            <value type="argument">Magento\Core\Model\App::PARAM_CUSTOM_LOCAL_CONFIG</value>
+            <value type="argument">Magento\App\Config\Loader::PARAM_CUSTOM_FILE</value>
         </param>
         <param name="newParam">
             <value>paramValue</value>
@@ -48,7 +48,7 @@
         <plugin name="two" type="somePluginTwo" sortOrder="20" disabled="true"/>
         <plugin name="one" sortOrder="800"/>
     </type>
-    <virtualType name="Magento\Core\Model\Config\Loader\LocalVirtual" shared="true">
+    <virtualType name="Magento\App\Config\LoaderVirtual" shared="true">
         <plugin name="three" type="somePluginThree"/>
         <plugin name="two" type="somePluginTwo" sortOrder="20" disabled="true"/>
         <plugin name="one" sortOrder="800"/>
diff --git a/dev/tests/integration/testsuite/Magento/Page/Block/Html/BreadcrumbsTest.php b/dev/tests/integration/testsuite/Magento/Page/Block/Html/BreadcrumbsTest.php
index d23b1135797..b3dfb0adca0 100644
--- a/dev/tests/integration/testsuite/Magento/Page/Block/Html/BreadcrumbsTest.php
+++ b/dev/tests/integration/testsuite/Magento/Page/Block/Html/BreadcrumbsTest.php
@@ -36,6 +36,7 @@ class BreadcrumbsTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface')
             ->createBlock('Magento\Page\Block\Html\Breadcrumbs');
     }
diff --git a/dev/tests/integration/testsuite/Magento/Page/Block/Html/FooterTest.php b/dev/tests/integration/testsuite/Magento/Page/Block/Html/FooterTest.php
index d382f849c85..9ddbce10975 100644
--- a/dev/tests/integration/testsuite/Magento/Page/Block/Html/FooterTest.php
+++ b/dev/tests/integration/testsuite/Magento/Page/Block/Html/FooterTest.php
@@ -36,6 +36,7 @@ class FooterTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
         $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\View\DesignInterface');
         $this->_theme = $design->setDefaultDesignTheme()->getDesignTheme();
diff --git a/dev/tests/integration/testsuite/Magento/Page/Block/Html/HeadTest.php b/dev/tests/integration/testsuite/Magento/Page/Block/Html/HeadTest.php
index 18f69ad3c0b..073c9867e53 100644
--- a/dev/tests/integration/testsuite/Magento/Page/Block/Html/HeadTest.php
+++ b/dev/tests/integration/testsuite/Magento/Page/Block/Html/HeadTest.php
@@ -36,8 +36,10 @@ class HeadTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode('frontend');
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setDesignTheme('magento_demo', 'frontend');
+            ->setDesignTheme('magento_demo');
         $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface')
             ->createBlock('Magento\Page\Block\Html\Head');
     }
diff --git a/dev/tests/integration/testsuite/Magento/Page/Block/HtmlTest.php b/dev/tests/integration/testsuite/Magento/Page/Block/HtmlTest.php
index 34e9c70d4c7..a881908c4d9 100644
--- a/dev/tests/integration/testsuite/Magento/Page/Block/HtmlTest.php
+++ b/dev/tests/integration/testsuite/Magento/Page/Block/HtmlTest.php
@@ -30,8 +30,8 @@ namespace Magento\Page\Block;
 class HtmlTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     *
      * @dataProvider getConfigValuesDataProvider
+     * @magentoAppArea frontend
      */
     public function testGetPrintLogoUrl($configData, $returnValue)
     {
@@ -43,17 +43,19 @@ class HtmlTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValueMap($configData));
 
         $securityInfoMock = $this->getMock('Magento\Core\Model\Url\SecurityInfoInterface');
-        $urlHelperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
+        $codeData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
         $urlBuilder = $this->getMock(
             'Magento\Core\Model\Url',
             array('getBaseUrl'),
             array(
+                $this->getMock('Magento\App\Route\ConfigInterface'),
+                $this->getMock('Magento\App\Request\Http', array(), array(), '', false),
                 $securityInfoMock,
                 $storeConfig,
-                $urlHelperMock,
                 $this->getMock('Magento\Core\Model\App', array(), array(), '', false),
                 $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false),
                 $this->getMock('Magento\Core\Model\Session', array(), array(), '', false),
+                null,
                 array()
             )
         );
@@ -73,7 +75,7 @@ class HtmlTest extends \PHPUnit_Framework_TestCase
             ->create('Magento\Page\Block\Html', array(
                 'storeManager'  => $storeManager,
                 'locale'        => $locale,
-                'urlHelperMock' => $urlHelperMock,
+                'urlHelperMock' => $codeData,
                 'context'       => $context
             ));
 
diff --git a/dev/tests/integration/testsuite/Magento/Payment/Block/Catalog/Product/View/ProfileTest.php b/dev/tests/integration/testsuite/Magento/Payment/Block/Catalog/Product/View/ProfileTest.php
index a694aee270b..bc952023248 100644
--- a/dev/tests/integration/testsuite/Magento/Payment/Block/Catalog/Product/View/ProfileTest.php
+++ b/dev/tests/integration/testsuite/Magento/Payment/Block/Catalog/Product/View/ProfileTest.php
@@ -39,6 +39,7 @@ class ProfileTest extends \PHPUnit_Framework_TestCase
     {
         /** @var $objectManager \Magento\TestFramework\ObjectManager */
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $objectManager->get('Magento\App\State')->setAreaCode('frontend');
         
         $product = $objectManager->create('Magento\Catalog\Model\Product');
         $product->setIsRecurring('1');
diff --git a/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php b/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php
index 8a12488037b..5047bf920a9 100644
--- a/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php
+++ b/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php
@@ -35,6 +35,8 @@ class InfoTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetChildPdfAsArray()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         /** @var $layout \Magento\Core\Model\Layout */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface');
         $block = $layout->createBlock('Magento\Payment\Block\Info', 'block');
@@ -46,8 +48,7 @@ class InfoTest extends \PHPUnit_Framework_TestCase
             ->create('Magento\Payment\Model\Method\Banktransfer'));
         /** @var $childBank \Magento\Payment\Block\Info\Instructions */
         $childBank = $layout->addBlock('Magento\Payment\Block\Info\Instructions', 'child.one', 'block');
-        $childBank->setInfo($paymentInfoBank)
-            ->setArea('adminhtml');
+        $childBank->setInfo($paymentInfoBank);
 
         $nonExpectedHtml = 'non-expected html';
         $childHtml = $layout->addBlock('Magento\Core\Block\Text', 'child.html', 'block');
@@ -60,8 +61,7 @@ class InfoTest extends \PHPUnit_Framework_TestCase
             ->create('Magento\Payment\Model\Method\Checkmo'));
         /** @var $childCheckmo \Magento\Payment\Block\Info\Checkmo */
         $childCheckmo = $layout->addBlock('Magento\Payment\Block\Info\Checkmo', 'child.just.another', 'block');
-        $childCheckmo->setInfo($paymentInfoCheckmo)
-            ->setArea('adminhtml');
+        $childCheckmo->setInfo($paymentInfoCheckmo);
 
         $pdfArray = $block->getChildPdfAsArray();
 
diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Model/VoidTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Model/VoidTest.php
index bea4f722f16..ba1df91a176 100644
--- a/dev/tests/integration/testsuite/Magento/Paypal/Model/VoidTest.php
+++ b/dev/tests/integration/testsuite/Magento/Paypal/Model/VoidTest.php
@@ -37,16 +37,16 @@ class VoidTest extends \PHPUnit_Framework_TestCase
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $eventManager = $objectManager->get('Magento\Event\ManagerInterface');
-        $moduleList = $objectManager->get('Magento\App\ModuleListInterface');
+        $moduleList = $objectManager->get('Magento\Module\ModuleListInterface');
         $paymentData = $objectManager->get('Magento\Payment\Helper\Data');
         $coreStoreConfig = $objectManager->get('Magento\Core\Model\Store\Config');
-        $logger = $objectManager->get('Magento\Core\Model\Logger');
+        $logger = $objectManager->get('Magento\Logger');
         $logAdapterFactory = $objectManager->get('Magento\Core\Model\Log\AdapterFactory');
         $locale = $objectManager->get('Magento\Core\Model\LocaleInterface');
         $centinelService = $objectManager->get('Magento\Centinel\Model\Service');
         $storeManager = $objectManager->get('Magento\Core\Model\StoreManagerInterface');
         $configFactory = $objectManager->get('Magento\Paypal\Model\ConfigFactory');
-        $coreData = $objectManager->get('Magento\Core\Helper\Data');
+        $mathRandom = $objectManager->get('Magento\Math\Random');
 
         /** @var $order \Magento\Sales\Model\Order */
         $order = $objectManager->create('Magento\Sales\Model\Order');
@@ -63,9 +63,9 @@ class VoidTest extends \PHPUnit_Framework_TestCase
             $logAdapterFactory,
             $locale,
             $centinelService,
-            $coreData,
             $storeManager,
-            $configFactory
+            $configFactory,
+            $mathRandom
         ));
 
         $response = new \Magento\Object(array(
diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Block/Email/StockTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Block/Email/StockTest.php
index c437f98bb76..c33f89fe325 100644
--- a/dev/tests/integration/testsuite/Magento/ProductAlert/Block/Email/StockTest.php
+++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Block/Email/StockTest.php
@@ -46,7 +46,7 @@ class StockTest extends \PHPUnit_Framework_TestCase
     public function testThumbnail()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Catalog\Model\Product');
         $product->load(1);
diff --git a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php b/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php
index e010066c978..4c42595ec4b 100644
--- a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php
+++ b/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php
@@ -50,7 +50,7 @@ class FirebugTest extends \PHPUnit_Framework_TestCase
             ->method('canSendHeaders')
             ->will($this->returnValue(true));
 
-        $this->_request = $this->getMock('\Magento\App\Request\Http', array('getHeader'));
+        $this->_request = $this->getMock('\Magento\App\Request\Http', array('getHeader'), array(), '', false);
         $this->_request
             ->expects($this->any())
             ->method('getHeader')
diff --git a/dev/tests/integration/testsuite/Magento/PubSub/Event/QueueHandlerTest.php b/dev/tests/integration/testsuite/Magento/PubSub/Event/QueueHandlerTest.php
index 4b66fbd3995..f21961ace82 100644
--- a/dev/tests/integration/testsuite/Magento/PubSub/Event/QueueHandlerTest.php
+++ b/dev/tests/integration/testsuite/Magento/PubSub/Event/QueueHandlerTest.php
@@ -75,14 +75,14 @@ class QueueHandlerTest extends \PHPUnit_Framework_TestCase
             ->save();
 
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->configure(array(
-            'Magento\Core\Model\Config\Base' => array(
+            'Magento\Webhook\Model\Config' => array(
                 'parameters' => array(
                     'sourceData' => __DIR__ . '/../_files/config.xml',
                 ),
             ),
             'Magento\Webhook\Model\Resource\Subscription' => array(
                 'parameters' => array(
-                    'config' => array('instance' => 'Magento\Core\Model\Config\Base'),
+                    'config' => array('instance' => 'Magento\Webhook\Model\Config'),
                 ),
             )
         ));
diff --git a/dev/tests/integration/testsuite/Magento/Rss/Controller/CatalogTest.php b/dev/tests/integration/testsuite/Magento/Rss/Controller/CatalogTest.php
index 4440c58d107..1c65ad9656b 100644
--- a/dev/tests/integration/testsuite/Magento/Rss/Controller/CatalogTest.php
+++ b/dev/tests/integration/testsuite/Magento/Rss/Controller/CatalogTest.php
@@ -88,7 +88,9 @@ class CatalogTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testAuthorizationFailed($action)
     {
-        $this->dispatch("rss/catalog/{$action}");
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Backend\Model\Url')
+            ->turnOffSecretKey();
+        $this->dispatch("backend/rss/catalog/{$action}");
         $this->assertHeaderPcre('Http/1.1', '/^401 Unauthorized$/');
     }
 
@@ -105,6 +107,7 @@ class CatalogTest extends \Magento\TestFramework\TestCase\AbstractController
 
     /**
      * @magentoDataFixture Magento/Catalog/_files/multiple_products.php
+     * @magentoConfigFixture admin_store cataloginventory/item_options/notify_stock_qty 75
      * @magentoConfigFixture current_store cataloginventory/item_options/notify_stock_qty 75
      */
     public function testNotifyStockAction()
@@ -114,7 +117,7 @@ class CatalogTest extends \Magento\TestFramework\TestCase\AbstractController
             ->get('Magento\CatalogInventory\Model\Resource\Stock')
             ->updateLowStockDate();
         $this->_loginAdmin();
-        $this->dispatch('rss/catalog/notifystock');
+        $this->dispatch('backend/rss/catalog/notifystock');
 
         $this->assertHeaderPcre('Content-Type', '/text\/xml/');
 
@@ -131,7 +134,7 @@ class CatalogTest extends \Magento\TestFramework\TestCase\AbstractController
     public function testReviewAction()
     {
         $this->_loginAdmin();
-        $this->dispatch('rss/catalog/review');
+        $this->dispatch('backend/rss/catalog/review');
         $this->assertHeaderPcre('Content-Type', '/text\/xml/');
         $body = $this->getResponse()->getBody();
         $this->assertContains('"Simple Product 3"', $body);
@@ -160,12 +163,15 @@ class CatalogTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     protected function _loginAdmin()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setArea('adminhtml')
             ->setDefaultDesignTheme();
         $this->getRequest()->setServer(array(
             'PHP_AUTH_USER' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
             'PHP_AUTH_PW' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD
         ));
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Backend\Model\Url')
+            ->turnOffSecretKey();
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Rss/Controller/OrderTest.php b/dev/tests/integration/testsuite/Magento/Rss/Controller/OrderTest.php
index 9a8222c1bfe..9b8d5897578 100644
--- a/dev/tests/integration/testsuite/Magento/Rss/Controller/OrderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Rss/Controller/OrderTest.php
@@ -35,7 +35,7 @@ class OrderTest extends \Magento\TestFramework\TestCase\AbstractController
     /**
      * Reuse URI for "new" action
      */
-    const NEW_ORDER_URI = 'rss/order/new';
+    const NEW_ORDER_URI = 'backend/rss/order/new';
 
     public function testNewActionAuthorizationFailed()
     {
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php
index 064a3c9053a..71a29157c86 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php
@@ -39,11 +39,13 @@ class AbstractTest
     public function testAddAttributesToForm()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
+
         $objectManager->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML)
             ->setDefaultDesignTheme();
         $arguments = array(
-            $objectManager->get('Magento\Data\Form\Factory'),
+            $objectManager->get('Magento\Data\FormFactory'),
             $objectManager->get('Magento\Adminhtml\Model\Session\Quote'),
             $objectManager->get('Magento\Sales\Model\AdminOrder\Create'),
             $objectManager->get('Magento\Core\Helper\Data'),
@@ -58,8 +60,8 @@ class AbstractTest
             'Magento\Sales\Block\Adminhtml\Order\Create\Form\AbstractForm', '_addAttributesToForm');
         $method->setAccessible(true);
 
-        /** @var $formFactory \Magento\Data\Form\Factory */
-        $formFactory = $objectManager->get('Magento\Data\Form\Factory');
+        /** @var $formFactory \Magento\Data\FormFactory */
+        $formFactory = $objectManager->get('Magento\Data\FormFactory');
         $form = $formFactory->create();
         $fieldset = $form->addFieldset('test_fieldset', array());
         $arguments = array(
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php
index ccce946491a..39ffb55e269 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php
@@ -31,6 +31,9 @@ class TotalsTest extends \PHPUnit_Framework_TestCase
 {
     public function testToHtmlChildrenInitialized()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode('frontend');
+
         /** @var $layout \Magento\Core\Model\Layout */
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface');
         $block = $layout->createBlock('Magento\Sales\Block\Order\Totals', 'block');
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Recurring/Profile/ViewTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Recurring/Profile/ViewTest.php
index 332b7a3f68b..25235c897c7 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Block/Recurring/Profile/ViewTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Recurring/Profile/ViewTest.php
@@ -69,6 +69,8 @@ class ViewTest extends \PHPUnit_Framework_TestCase
 
     public function testToHtmlPropagatesUrl()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode('frontend');
         $this->_block->setShouldPrepareInfoTabs(true);
         $childOne = $this->_layout->addBlock('Magento\Core\Block\Text', 'child1', 'block');
         $this->_layout->addToParentGroup('child1', 'info_tabs');
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/AbstractTest.php
index 38130aba78d..7a2565937e3 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Model/AbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/AbstractTest.php
@@ -44,7 +44,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
 
     public function testAfterCommitCallbackOrderGridNotInvoked()
     {
-        $adapter = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Resource')
+        $adapter = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Resource')
             ->getConnection('core_write');
         $this->assertEquals(0, $adapter->getTransactionLevel(), 'This test must be outside a transaction.');
 
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php
index 37ae440eb8d..42d599bd803 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php
@@ -35,7 +35,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase
     public function testSendEmail()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Sales\Model\Order');
         $order->loadByIncrementId('100000001');
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/InvoiceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/InvoiceTest.php
index 6d22d5be716..95c27cb4c24 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/InvoiceTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/InvoiceTest.php
@@ -35,7 +35,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
     public function testSendEmail()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Sales\Model\Order');
         $order->loadByIncrementId('100000001');
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/OrderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/OrderTest.php
index 95c63b8b1ac..bab0e2df477 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/OrderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/OrderTest.php
@@ -35,7 +35,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase
     public function testSendNewOrderEmail()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Sales\Model\Order');
         $order->loadByIncrementId('100000001');
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/ShipmentTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/ShipmentTest.php
index de8f40cf9c2..8c97f8305e5 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/ShipmentTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/ShipmentTest.php
@@ -34,6 +34,8 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase
      */
     public function testSendEmail()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode('frontend');
         $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Sales\Model\Order');
         $order->loadByIncrementId('100000001');
@@ -47,7 +49,6 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase
         $paymentInfoBlock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\Payment\Helper\Data')
             ->getInfoBlock($payment);
-        $paymentInfoBlock->setArea('invalid-area');
         $payment->setBlockMock($paymentInfoBlock);
 
         $this->assertEmpty($shipment->getEmailSent());
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_info.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_info.php
index b9c645176fa..dd08c848d79 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/_files/order_info.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_info.php
@@ -26,7 +26,7 @@
  */
 
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-    ->loadArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+    ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
 
 /** @var $product \Magento\Catalog\Model\Product */
 $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Catalog\Model\Product');
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_paid_with_saved_cc.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_paid_with_saved_cc.php
index 1178165b559..d37c7ca2370 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/_files/order_paid_with_saved_cc.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_paid_with_saved_cc.php
@@ -27,7 +27,7 @@
 
 /** @var \Magento\Core\Model\App $app */
 $app = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App');
-$app->loadArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML);
+$app->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
 
 $addressData = include(__DIR__ . '/address_data.php');
 
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/LabelsTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/LabelsTest.php
similarity index 83%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/LabelsTest.php
rename to dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/LabelsTest.php
index 5486fb59eed..753de15b742 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/LabelsTest.php
+++ b/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/LabelsTest.php
@@ -22,7 +22,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit\Tab;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab;
 
 /**
  * @magentoAppArea adminhtml
@@ -32,9 +32,9 @@ class LabelsTest extends \PHPUnit_Framework_TestCase
     public function testConstruct()
     {
         $this->assertInstanceOf(
-            'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Labels',
+            'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Labels',
             \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface')
-                ->createBlock('Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Labels')
+                ->createBlock('Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Labels')
         );
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/MainTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/MainTest.php
similarity index 83%
rename from dev/tests/integration/testsuite/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/MainTest.php
rename to dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/MainTest.php
index c68ca6b29a4..b6244cc3f44 100644
--- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Promo/Quote/Edit/Tab/MainTest.php
+++ b/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/MainTest.php
@@ -25,10 +25,10 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\Promo\Quote\Edit\Tab;
+namespace Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab;
 
 /**
- * Test class for \Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Main
+ * Test class for \Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Main
  *
  * @magentoAppArea adminhtml
  */
@@ -41,15 +41,15 @@ class MainTest extends \PHPUnit_Framework_TestCase
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $objectManager->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_ADMINHTML)
+            ->setArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
             ->setDefaultDesignTheme();
         $objectManager->get('Magento\Core\Model\Registry')
             ->register('current_promo_quote_rule', $objectManager->create('Magento\SalesRule\Model\Rule'));
 
         $layout = $objectManager->create('Magento\Core\Model\Layout');
-        $block = $layout->addBlock('Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Main');
+        $block = $layout->addBlock('Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Main');
         $prepareFormMethod = new \ReflectionMethod(
-            'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Main', '_prepareForm'
+            'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Main', '_prepareForm'
         );
         $prepareFormMethod->setAccessible(true);
         $prepareFormMethod->invoke($block);
diff --git a/dev/tests/integration/testsuite/Magento/Tax/Block/Adminhtml/Rate/ImportExportTest.php b/dev/tests/integration/testsuite/Magento/Tax/Block/Adminhtml/Rate/ImportExportTest.php
index 0b4b9ec283a..0dce8062b2c 100644
--- a/dev/tests/integration/testsuite/Magento/Tax/Block/Adminhtml/Rate/ImportExportTest.php
+++ b/dev/tests/integration/testsuite/Magento/Tax/Block/Adminhtml/Rate/ImportExportTest.php
@@ -35,9 +35,10 @@ class ImportExportTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface')
-            ->createBlock('Magento\Tax\Block\Adminhtml\Rate\ImportExport')
-            ->setArea('adminhtml');
+            ->createBlock('Magento\Tax\Block\Adminhtml\Rate\ImportExport');
     }
 
     protected function tearDown()
diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RuleTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RuleTest.php
index a5c302711d9..7ecc37a2117 100644
--- a/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RuleTest.php
+++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RuleTest.php
@@ -182,7 +182,7 @@ class RuleTest extends \PHPUnit_Framework_TestCase
             array(
                 $this->_objectManager->create('Magento\Core\Model\Context'),
                 $this->_objectManager->get('Magento\Core\Model\Registry'),
-                $this->_objectManager->create('Magento\Tax\Model\ClassModel\Factory'),
+                $this->_objectManager->get('Magento\Tax\Model\TaxClass\Factory'),                
             ),
             '',
             true
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php
index 3f6658e2e72..31b429c6748 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php
@@ -38,6 +38,15 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
      */
     protected static $_cachedFiles = array();
 
+    public static function setUpBeforeClass()
+    {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->configure(array(
+            'preferences' => array(
+                'Magento\Core\Model\Theme' => 'Magento\Core\Model\Theme\Data'
+            )
+        ));
+    }
+
     public static function tearDownAfterClass()
     {
         self::$_cachedFiles = array(); // Free memory
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php
index 15919e048c9..15611f079d8 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php
@@ -29,6 +29,11 @@ namespace Magento\Test\Integrity\Magento\Widget;
 
 class TemplateFilesTest extends \PHPUnit_Framework_TestCase
 {
+    public static function setUpBeforeClass()
+    {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
+    }
+
     /**
      * Check if all the declared widget templates actually exist
      *
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php
index 47542270411..cd24b6615e8 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php
@@ -129,7 +129,7 @@ class BlockInstantiationTest extends \Magento\TestFramework\TestCase\AbstractInt
             $area = 'adminhtml';
         }
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')->loadAreaPart(
-            \Magento\Core\Model\App\Area::AREA_ADMINHTML,
+            \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE,
             \Magento\Core\Model\App\Area::PART_CONFIG
         );
         $templateBlocks[$module . ', ' . $blockClass . ', ' . $area]
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CacheFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CacheFilesTest.php
index 340efd95786..23f6c9bf67e 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CacheFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CacheFilesTest.php
@@ -34,9 +34,9 @@ class CacheFilesTest extends \PHPUnit_Framework_TestCase
         $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface');
         $validationStateMock->expects($this->any())->method('isValidated')->will($this->returnValue(true));
 
-        /** @var \Magento\Core\Model\Config\Modules\Reader $moduleReader */
+        /** @var \Magento\Module\Dir\Reader $moduleReader */
         $moduleReader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Core\Model\Config\Modules\Reader');
+            ->get('Magento\Module\Dir\Reader');
         $schema = $moduleReader->getModuleDir('etc', 'Magento_Core') . DIRECTORY_SEPARATOR . 'cache.xsd';
 
         /** @var \Magento\Core\Model\Cache\Config\Reader $reader */
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CrontabConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CrontabConfigFilesTest.php
index c03cc4ac8a9..4ffbf63c5ba 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CrontabConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CrontabConfigFilesTest.php
@@ -27,7 +27,7 @@ class CrontabConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * attributes represent merging rules
-     * copied from original class \Magento\Core\Model\Route\Config\Reader
+     * copied from original class \Magento\App\Route\Config\Reader
      *
      * @var array
      */
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php
index 93120b72be9..809f544adc7 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php
@@ -54,9 +54,9 @@ class DiConfigFilesTest extends \PHPUnit_Framework_TestCase
         array_unshift(self::$_primaryFiles, $dir->getDir(\Magento\App\Dir::APP) . DS . 'etc' . DS . 'di.xml');
 
         //init module global configs
-        /** @var $modulesReader \Magento\Core\Model\Config\Modules\Reader */
+        /** @var $modulesReader \Magento\Module\Dir\Reader */
         $modulesReader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Core\Model\Config\Modules\Reader');
+            ->get('Magento\Module\Dir\Reader');
         self::$_moduleGlobalFiles = $modulesReader->getConfigurationFiles('di.xml');
 
         //init module area configs
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MenuConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MenuConfigFilesTest.php
index a7fd29fc210..8a520c5966d 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MenuConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MenuConfigFilesTest.php
@@ -37,7 +37,7 @@ class MenuConfigFilesTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $moduleReader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Core\Model\Config\Modules\Reader');
+            ->create('Magento\Module\Dir\Reader');
         $schemaFile = $moduleReader->getModuleDir('etc', 'Magento_Backend') . DIRECTORY_SEPARATOR . 'menu.xsd';
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Backend\Model\Menu\Config\Reader',
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php
index d366ddbc64f..cdf8e7082b7 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php
@@ -26,7 +26,7 @@ namespace Magento\Test\Integrity\Modular;
 class ResourcesConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Resource\Config\Reader
+     * @var \Magento\App\Resource\Config\Reader
      */
     protected $_model;
 
@@ -44,10 +44,10 @@ class ResourcesConfigFilesTest extends \PHPUnit_Framework_TestCase
         $validationStateMock->expects($this->any())
             ->method('isValidated')
             ->will($this->returnValue(true));
-        $localConfigMock = $this->getMock('Magento\Core\Model\Config\Local', array(), array(), '', false);
+        $localConfigMock = $this->getMock('Magento\App\Config', array(), array(), '', false);
         $localConfigMock->expects($this->any())->method('getConfiguration')->will($this->returnValue(array()));
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $this->_model = $objectManager->create('Magento\Core\Model\Resource\Config\Reader', array(
+        $this->_model = $objectManager->create('Magento\App\Resource\Config\Reader', array(
             'fileResolver' => $fileResolverMock,
             'validationState' => $validationStateMock,
             'localConfig' => $localConfigMock,
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php
index a5fb045958b..8e2f746f8ab 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php
@@ -28,7 +28,7 @@ class RouteConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * attributes represent merging rules
-     * copied from original class \Magento\Core\Model\Route\Config\Reader
+     * copied from original class \Magento\App\Route\Config\Reader
      * @var array
      */
     protected $_idAttributes = array(
@@ -55,8 +55,8 @@ class RouteConfigFilesTest extends \PHPUnit_Framework_TestCase
     {
         global $magentoBaseDir;
 
-        $this->_schemaFile = $magentoBaseDir . '/app/code/Magento/Core/etc/routes.xsd';
-        $this->_mergedSchemaFile = $magentoBaseDir . '/app/code/Magento/Core/etc/routes_merged.xsd';
+        $this->_schemaFile = $magentoBaseDir . '/lib/Magento/App/etc/routes.xsd';
+        $this->_mergedSchemaFile = $magentoBaseDir . '/lib/Magento/App/etc/routes_merged.xsd';
     }
 
     public function testRouteConfigsValidation()
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SalesConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SalesConfigFilesTest.php
index 01cb37e91f6..2e1deb45038 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SalesConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SalesConfigFilesTest.php
@@ -27,7 +27,7 @@ class SalesConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * attributes represent merging rules
-     * copied from original namespace Magento\Core\Model\Route\Config;
+     * copied from original namespace Magento\App\Route\Config;
      *
      * class Reader
      *
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php
index 9b357baf9cc..38f274ad2a5 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php
@@ -45,7 +45,7 @@ class SystemConfigFilesTest extends \PHPUnit_Framework_TestCase
         $fileList = glob($modulesDir . '/*/*/etc/adminhtml/system.xml');
 
         $configMock = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array('getConfigurationFiles', 'getModuleDir'),
+            'Magento\Module\Dir\Reader', array('getConfigurationFiles', 'getModuleDir'),
             array(), '', false
         );
         $configMock->expects($this->any())
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php
index dbdd2f44aa5..d66217d7278 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php
@@ -94,12 +94,14 @@ class TemplateFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrit
                 }
 
                 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')->loadAreaPart(
-                    \Magento\Core\Model\App\Area::AREA_ADMINHTML,
+                    \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE,
                     \Magento\Core\Model\App\Area::PART_CONFIG
                 );
                 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
                     ->get('Magento\Config\ScopeInterface')
                     ->setCurrentScope($area);
+                \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+                    ->setAreaCode($area);
 
                 $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($blockClass);
                 $template = $block->getTemplate();
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/UsaConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/UsaConfigFilesTest.php
index 6a40895fee7..0424806a0a5 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/UsaConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/UsaConfigFilesTest.php
@@ -35,7 +35,7 @@ class UsaConfigFilesTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $moduleReader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Core\Model\Config\Modules\Reader');
+            ->create('Magento\Module\Dir\Reader');
         $schemaFile = $moduleReader->getModuleDir('etc', 'Magento_Backend') . '/system.xsd';
         $this->_reader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create(
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php
index 845e1bc274c..ced8f3c0bf0 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php
@@ -55,7 +55,7 @@ class ViewConfigFilesTest extends \PHPUnit_Framework_TestCase
     {
         $result = array();
         $files = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Core\Model\Config\Modules\Reader')
+            ->get('Magento\Module\Dir\Reader')
             ->getConfigurationFiles('view.xml');
         foreach ($files as $file) {
             $result[] = array($file);
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewFilesTest.php
index fed053e38e4..b12cc636431 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewFilesTest.php
@@ -38,9 +38,10 @@ class ViewFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrity
              * @param string $file
              */
             function ($application, $file) {
+                \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+                    ->loadArea($application);
                 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
                     ->get('Magento\View\DesignInterface')
-                    ->setArea($application)
                     ->setDefaultDesignTheme();
                 $result = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
                     ->get('Magento\Core\Model\View\FileSystem')
@@ -59,10 +60,11 @@ class ViewFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrity
     public function viewFilesFromModulesViewDataProvider()
     {
         $files = array();
-        /** @var $configModel \Magento\Core\Model\Config */
-        $configModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Config');
+        /** @var $configModelReader \Magento\Module\Dir\Reader */
+        $configModelReader =
+            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Module\Dir\Reader');
         foreach ($this->_getEnabledModules() as $moduleName) {
-            $moduleViewDir = $configModel->getModuleDir('view', $moduleName);
+            $moduleViewDir = $configModelReader->getModuleDir('view', $moduleName);
             if (!is_dir($moduleViewDir)) {
                 continue;
             }
@@ -141,9 +143,10 @@ class ViewFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrity
              * @param string $file
              */
             function ($application, $file) {
+                \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+                    ->setAreaCode($application);
                 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
                     ->get('Magento\View\DesignInterface')
-                    ->setArea($application)
                     ->setDefaultDesignTheme();
                 $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
                     ->get('Magento\Core\Model\View\FileSystem');
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php
index 5c04054be34..81587abdd3b 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php
@@ -27,15 +27,15 @@
  */
 return array(
     // Blocks with abstract constructor arguments
-    'Magento\Adminhtml\Block\System\Email\Template',
-    'Magento\Adminhtml\Block\System\Email\Template\Edit',
+    'Magento\Backend\Block\System\Email\Template',
+    'Magento\Backend\Block\System\Email\Template\Edit',
     'Magento\Backend\Block\System\Config\Edit',
     'Magento\Backend\Block\System\Config\Form',
     'Magento\Backend\Block\System\Config\Tabs',
     'Magento\Review\Block\Form',
     // Fails because of bug in \Magento\Webapi\Model\Acl\Loader\Resource\ConfigReader constructor
-    'Magento\Adminhtml\Block\Cms\Page',
-    'Magento\Adminhtml\Block\Cms\Page\Edit',
+    'Magento\Cms\Block\Adminhtml\Page',
+    'Magento\Cms\Block\Adminhtml\Page\Edit',
     'Magento\Sales\Block\Adminhtml\Order',
     'Magento\Oauth\Block\Adminhtml\Oauth\Consumer',
     'Magento\Oauth\Block\Adminhtml\Oauth\Consumer\Grid',
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php
index c5557a9e859..eac70152e22 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php
@@ -31,6 +31,11 @@ class ViewFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrity
 {
     public function testViewFilesFromThemes()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectmanager()->configure(array(
+            'preferences' => array(
+                'Magento\Core\Model\Theme' => 'Magento\Core\Model\Theme\Data'
+            )
+        ));
         $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this);
         $invoker(
             /**
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php
index 0e9a42648db..f55e8fe1dd1 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php
@@ -63,6 +63,11 @@ class ViewFileReferenceTest extends \PHPUnit_Framework_TestCase
     public static function setUpBeforeClass()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $objectManager->configure(array(
+            'preferences' => array(
+                'Magento\Core\Model\Theme' => 'Magento\Core\Model\Theme\Data'
+            )
+        ));
 
         /** @var $fallbackFactory \Magento\View\Design\Fallback\Factory */
         $fallbackFactory = $objectManager->get('Magento\View\Design\Fallback\Factory');
diff --git a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php
index 7da025aab51..1a2ee090279 100644
--- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php
+++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php
@@ -112,13 +112,17 @@ class AuthTest extends \Magento\Backend\Utility\Controller
      */
     public function testResetPasswordPostAction()
     {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
         /** @var $user \Magento\User\Model\User */
-        $user = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\User\Model\User')->loadByUsername('dummy_username');
+        $user = $objectManager->create('Magento\User\Model\User');
+        $user->loadByUsername('dummy_username');
         $this->assertNotEmpty($user->getId(), 'Broken fixture');
-        $resetPasswordToken = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\User\Helper\Data')
-            ->generateResetPasswordLinkToken();
+
+        /** @var \Magento\User\Helper\Data $helper */
+        $helper = $objectManager->get('Magento\User\Helper\Data');
+
+        $resetPasswordToken = $helper->generateResetPasswordLinkToken();
         $user->changeResetPasswordLinkToken($resetPasswordToken);
         $user->save();
 
@@ -132,18 +136,17 @@ class AuthTest extends \Magento\Backend\Utility\Controller
 
         $this->dispatch('backend/admin/auth/resetpasswordpost');
 
-        $this->assertRedirect($this->equalTo(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Backend\Helper\Data')
-                ->getHomePageUrl()
-        ));
+        /** @var \Magento\Backend\Helper\Data $backendHelper */
+        $backendHelper = $objectManager->get('Magento\Backend\Helper\Data');
+        $this->assertRedirect($this->equalTo($backendHelper->getHomePageUrl()));
 
         /** @var $user \Magento\User\Model\User */
-        $user = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\User\Model\User')->loadByUsername('dummy_username');
-        $this->assertTrue(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Helper\Data')
-                ->validateHash($newDummyPassword, $user->getPassword())
-        );
+        $user = $objectManager->create('Magento\User\Model\User');
+        $user->loadByUsername('dummy_username');
+
+        /** @var \Magento\Encryption\EncryptorInterface $encryptor */
+        $encryptor = $objectManager->get('Magento\Encryption\EncryptorInterface');
+        $this->assertTrue($encryptor->validateHash($newDummyPassword, $user->getPassword()));
     }
 
     /**
@@ -158,10 +161,13 @@ class AuthTest extends \Magento\Backend\Utility\Controller
         $this->assertSessionMessages(
             $this->equalTo(array('Your password reset link has expired.')), \Magento\Core\Model\Message::ERROR
         );
-        $this->assertRedirect($this->equalTo(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Backend\Helper\Data')
-                ->getHomePageUrl()
-        ));
+
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+        /** @var \Magento\Backend\Helper\Data $backendHelper */
+        $backendHelper = $objectManager->get('Magento\Backend\Helper\Data');
+
+        $this->assertRedirect($this->equalTo($backendHelper->getHomePageUrl()));
     }
 
     /**
@@ -171,13 +177,16 @@ class AuthTest extends \Magento\Backend\Utility\Controller
      */
     public function testResetPasswordPostActionWithInvalidPassword()
     {
-        $user = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\User\Model\User')->loadByUsername('dummy_username');
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+        $user = $objectManager->create('Magento\User\Model\User');
+        $user->loadByUsername('dummy_username');
         $resetPasswordToken = null;
         if ($user->getId()) {
-            $resetPasswordToken = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                ->get('Magento\User\Helper\Data')
-                ->generateResetPasswordLinkToken();
+            /** @var \Magento\User\Helper\Data $userHelper */
+            $userHelper = $objectManager->get('Magento\User\Helper\Data');
+
+            $resetPasswordToken = $userHelper->generateResetPasswordLinkToken();
             $user->changeResetPasswordLinkToken($resetPasswordToken);
             $user->save();
         }
diff --git a/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php b/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php
index 9d5094a3796..dd5778a2705 100644
--- a/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php
+++ b/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php
@@ -37,6 +37,11 @@ class UserTest extends \PHPUnit_Framework_TestCase
      */
     protected $_model;
 
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
     /**
      * @var \Magento\User\Model\Role
      */
@@ -46,6 +51,8 @@ class UserTest extends \PHPUnit_Framework_TestCase
     {
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\User\Model\User');
+        $this->_dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->create('Magento\Stdlib\DateTime');
     }
 
     /**
@@ -408,10 +415,10 @@ class UserTest extends \PHPUnit_Framework_TestCase
         $this->_model->save();
         $this->_model->loadByUsername(\Magento\TestFramework\Bootstrap::ADMIN_NAME);
         $this->assertFalse($this->_model->isResetPasswordLinkTokenExpired());
-        $this->_model->setRpTokenCreatedAt(\Magento\Date::formatDate(time() - 60 * 60 * 24 * 10 + 10));
+        $this->_model->setRpTokenCreatedAt($this->_dateTime->formatDate(time() - 60 * 60 * 24 * 10 + 10));
         $this->assertFalse($this->_model->isResetPasswordLinkTokenExpired());
 
-        $this->_model->setRpTokenCreatedAt(\Magento\Date::formatDate(time() - 60 * 60 * 24 * 10 - 10));
+        $this->_model->setRpTokenCreatedAt($this->_dateTime->formatDate(time() - 60 * 60 * 24 * 10 - 10));
         $this->assertTrue($this->_model->isResetPasswordLinkTokenExpired());
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php b/dev/tests/integration/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php
index fff9ea875e7..66720967479 100644
--- a/dev/tests/integration/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php
+++ b/dev/tests/integration/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php
@@ -104,6 +104,7 @@ class FallbackTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetFile($file, $area, $themePath, $module, $expectedFilename)
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode($area);
         $model = $this->_buildModel($area, $themePath, null);
         $themeModel = $this->_getThemeModel($area, $themePath);
 
@@ -161,6 +162,7 @@ class FallbackTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetI18nCsvFile($area, $themePath, $locale, $expectedFilename)
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode($area);
         $model = $this->_buildModel($area, $themePath, $locale);
         $themeModel = $this->_getThemeModel($area, $themePath);
 
@@ -207,7 +209,8 @@ class FallbackTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetViewFile($file, $area, $themePath, $locale, $module, $expectedFilename)
     {
-        $model = $this->_buildModel($area, $themePath, $locale);
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode($area);
+        $model = $this->_buildModel();
         $themeModel = $this->_getThemeModel($area, $themePath);
 
         $expectedFilename = str_replace('/', DIRECTORY_SEPARATOR, $expectedFilename);
diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Block/Adminhtml/AbstractFormTest.php b/dev/tests/integration/testsuite/Magento/Webapi/Block/Adminhtml/AbstractFormTest.php
index 9cc4f1a13e5..59c2f2a6cee 100644
--- a/dev/tests/integration/testsuite/Magento/Webapi/Block/Adminhtml/AbstractFormTest.php
+++ b/dev/tests/integration/testsuite/Magento/Webapi/Block/Adminhtml/AbstractFormTest.php
@@ -93,6 +93,8 @@ abstract class AbstractFormTest extends \PHPUnit_Framework_TestCase
     public function testPrepareForm()
     {
         // TODO: Move to unit tests after MAGETWO-4015 complete.
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $this->assertEmpty($this->_block->getForm());
 
         $this->_urlBuilder->expects($this->once())
diff --git a/dev/tests/integration/testsuite/Magento/Webapi/ServiceNameCollisionTest.php b/dev/tests/integration/testsuite/Magento/Webapi/ServiceNameCollisionTest.php
new file mode 100644
index 00000000000..ad41c7f9eeb
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Webapi/ServiceNameCollisionTest.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Test services for name collisions.
+ *
+ * Let we have two service interfaces called Foo\Bar\Service\SomeBazV1Interface and Foo\Bar\Service\Some\BazV1Interface.
+ * Given current name generation logic both are going to be translated to BarSomeBazV1. This test checks such things
+ * are not going to happen.
+ *
+ * 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\Webapi;
+
+class ServiceNameCollisionTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Test there are no collisions between service names.
+     *
+     * @see \Magento\Webapi\Model\Soap\Config::getServiceName()
+     * @SuppressWarnings(PHPMD.UnusedLocalVariable)
+     */
+    public function testServiceNameCollisions()
+    {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        /** @var \Magento\Webapi\Model\Soap\Config $soapConfig */
+        $soapConfig = $objectManager->get('Magento\Webapi\Model\Soap\Config');
+        /** @var \Magento\Webapi\Model\Config $webapiConfig */
+        $webapiConfig = $objectManager->get('Magento\Webapi\Model\Config');
+        $serviceNames = array();
+
+        foreach ($webapiConfig->getServices() as $serviceClassName => $serviceData) {
+            $newServiceName = $soapConfig->getServiceName($serviceClassName);
+            $this->assertFalse(in_array($newServiceName, $serviceNames));
+            $serviceNames[] = $newServiceName;
+        }
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Model/ObserverTest.php
index 2c04c28a52a..81a74d6d19e 100644
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/ObserverTest.php
+++ b/dev/tests/integration/testsuite/Magento/Webhook/Model/ObserverTest.php
@@ -101,9 +101,6 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
             $this->_subscriptionFactory->create()->load($this->_subscription->getId())->getStatus());
     }
 
-    /**
-     * @magentoConfigFixture global/webhook/webhooks/test/hook/label 'Test Hook'
-     */
     public function testAfterWebapiUserChange()
     {
         //setup
@@ -121,9 +118,6 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
             $this->_subscriptionFactory->create()->load($this->_subscription->getId())->getStatus());
     }
 
-    /**
-     * @magentoConfigFixture global/webhook/webhooks/test/hook/label 'Test Hook'
-     */
     public function testAfterWebapiRoleChange()
     {
         //setup
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Event/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Event/CollectionTest.php
index bc59a86a86f..a6c7f94727a 100644
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Event/CollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Event/CollectionTest.php
@@ -145,8 +145,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
         $data = $collection->getData();
         $this->assertEquals(2, count($data));
 
-        /** @var \Magento\Core\Model\Resource $resource */
-        $resource = $this->_objectManager->create('Magento\Core\Model\Resource');
+        /** @var \Magento\App\Resource $resource */
+        $resource = $this->_objectManager->create('Magento\App\Resource');
         $connection = $resource->getConnection('core_write');
 
         /** @var \Magento\Webhook\Model\Resource\Event\Collection $collection2 */
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/EventTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/EventTest.php
index 66c7cdb0aa8..f8e36902b16 100644
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/EventTest.php
+++ b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/EventTest.php
@@ -38,7 +38,7 @@ class EventTest extends \PHPUnit_Framework_TestCase
     public function testInit()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $resource = $objectManager->create('Magento\Core\Model\Resource', array('tablePrefix' => 'prefix_'));
+        $resource = $objectManager->create('Magento\App\Resource', array('tablePrefix' => 'prefix_'));
 
         /** @var \Magento\Webhook\Model\Resource\Event $eventResource */
         $eventResource = $objectManager->create('Magento\Webhook\Model\Resource\Event', array('resource' => $resource));
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Job/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Job/CollectionTest.php
index 1f57c66ad4c..92a13800d44 100644
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Job/CollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Job/CollectionTest.php
@@ -144,8 +144,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
         $data = $collection->getData();
         $this->assertEquals(2, count($data));
 
-        /** @var \Magento\Core\Model\Resource $resource */
-        $resource = $this->_objectManager->create('Magento\Core\Model\Resource');
+        /** @var \Magento\App\Resource $resource */
+        $resource = $this->_objectManager->create('Magento\App\Resource');
         $connection = $resource->getConnection('core_write');
 
         /** @var \Magento\Webhook\Model\Resource\Job\Collection $collection2 */
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/JobTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/JobTest.php
index 2cba6e970fe..a62e45d7654 100644
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/JobTest.php
+++ b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/JobTest.php
@@ -35,7 +35,7 @@ class JobTest extends \PHPUnit_Framework_TestCase
     public function testInit()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $resource = $objectManager->create('Magento\Core\Model\Resource', array('tablePrefix' => 'prefix_'));
+        $resource = $objectManager->create('Magento\App\Resource', array('tablePrefix' => 'prefix_'));
 
         /** @var \Magento\Webhook\Model\Resource\Job $jobResource */
         $jobResource = $objectManager->create('Magento\Webhook\Model\Resource\Job', array('resource' => $resource));
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/CollectionTest.php
index b80ecc6a601..53d56afb032 100644
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/CollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/CollectionTest.php
@@ -76,11 +76,19 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $this->_subscriptions = array();
-        $configModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Config');
-        $configModel->setNode('global/webhook/webhooks/listeners/one/label', 'One Listener');
-        $configModel->setNode('global/webhook/webhooks/listeners/two/label', 'Two Listeners');
-        $configModel->setNode('global/webhook/webhooks/listeners/three/label', 'Three Listeners');
+
+        $configMock = $this->getMock('Magento\Webhook\Model\Config', array(), array(), '', false, false);
+        $webHooks = array(
+            'listeners' => array(
+                'one' => array('label' => 'One Listener'),
+                'two' => array('label' => 'Two Listeners'),
+                'three' => array('label' => 'Three Listeners'),
+            )
+        );
+        $configMock->expects($this->any())->method('getWebhooks')->will($this->returnValue($webHooks));
+        $objectManager->addSharedInstance($configMock, 'Magento\Webhook\Model\Config');
 
         /** @var \Magento\Webhook\Model\Subscription $subscription */
         $subscription = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/CollectionTest.php
index 6fc8337ff13..2f0fdf78674 100644
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/CollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/CollectionTest.php
@@ -108,78 +108,28 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     protected function _createSubscriptionConfig()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $dirs = $objectManager->create(
-            'Magento\App\Dir',
-            array(
-                'baseDir' => BP,
-                'dirs' => array(
-                    \Magento\App\Dir::MODULES => __DIR__ . '/_files',
-                    \Magento\App\Dir::CONFIG => __DIR__ . '/_files',
-                ),
-            )
-        );
 
-        $moduleList = $objectManager->create('Magento\App\ModuleList', array(
-            'reader' => $objectManager->create('Magento\App\Module\Declaration\Reader\Filesystem',
-                array(
-                    'fileResolver' => $objectManager->create(
-                        'Magento\App\Module\Declaration\FileResolver',
-                        array(
-                            'applicationDirs' => $dirs
-                        )
-                    )
-                )
+        $configMock = $this->getMock('Magento\Webhook\Model\Config', array(), array(), '', false, false);
+        $subscriptions = array(
+            'subscription_alias' => array(
+                'name' => 'Test subscriber',
+                'endpoint_url' => 'http://mage.loc/mage-twitter-integration/web/index.php/endpoint',
+                'topics' => array(
+                    'customer' => array(
+                        'created' => '',
+                        'updated' => '',
+                        'deleted' => '',
+                    ),
+                    'order' => array(
+                        'created'
+                    ),
+                ),
             ),
-            'cache' => $this->getMock('Magento\Config\CacheInterface')
-        ));
-
-        /** @var \Magento\Core\Model\Config\Modules\Reader $moduleReader */
-        $moduleReader = $objectManager->create('Magento\Core\Model\Config\Modules\Reader', array(
-            'moduleList' => $moduleList
-        ));
-        $moduleReader->setModuleDir('Acme_Subscriber', 'etc', __DIR__ . '/_files/Acme/Subscriber/etc');
-
-        /** @var \Magento\Core\Model\Config\Loader $modulesLoader */
-        $modulesLoader = $objectManager->create(
-            'Magento\Core\Model\Config\Loader', array(
-                'fileReader' => $moduleReader
-        ));
-
-        $config = new \Magento\Core\Model\Config\Base('<config />');
-        $modulesLoader->load($config);
-
-        /**
-         * Mock is used to disable caching, as far as Integration Tests Framework loads main
-         * modules configuration first and it gets cached
-         *
-         * @var \PHPUnit_Framework_MockObject_MockObject $cache
-         */
-        $cache = $this->getMock('Magento\Core\Model\Config\Cache',
-            array('load', 'save', 'clean', 'getSection'),
-            array(), '', false);
-
-        $cache->expects($this->any())
-            ->method('load')
-            ->will($this->returnValue(false));
-
-        /** @var \Magento\Core\Model\Config\Storage $storage */
-        $storage = $objectManager->create(
-            'Magento\Core\Model\Config\Storage', array(
-                'loader' => $modulesLoader,
-                'cache' => $cache
-            )
         );
+        $configMock->expects($this->any())->method('getSubscriptions')->will($this->returnValue($subscriptions));
 
-        /** @var \Magento\Core\Model\Config $mageConfig */
-        $mageConfig = $objectManager->create('Magento\Core\Model\Config', array(
-            'storage' => $storage,
-            'moduleReader' => $moduleReader,
-            'moduleList' => $moduleList
-        ));
-
-        /** @var \Magento\Webhook\Model\Subscription\Config $config */
         return $objectManager->create('Magento\Webhook\Model\Subscription\Config', array(
-            'mageConfig' => $mageConfig
+            'config' => $configMock
         ));
     }
 
@@ -188,11 +138,16 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $this->_subscriptions = array();
 
-        /** @var $configModel \Magento\Core\Model\Config */
-        $configModel = $objectManager->get('Magento\Core\Model\Config');
-        $configModel->setNode('global/webhook/webhooks/listeners/one/label', 'One Listener');
-        $configModel->setNode('global/webhook/webhooks/listeners/two/label', 'Two Listeners');
-        $configModel->setNode('global/webhook/webhooks/listeners/three/label', 'Three Listeners');
+        $configMock = $this->getMock('Magento\Webhook\Model\Config', array(), array(), '', false, false);
+        $webHooks = array(
+            'listeners' => array(
+                'one' => array('label' => 'One Listener'),
+                'two' => array('label' => 'Two Listeners'),
+                'three' => array('label' => 'Three Listeners'),
+            )
+        );
+        $configMock->expects($this->any())->method('getWebhooks')->will($this->returnValue($webHooks));
+        $objectManager->addSharedInstance($configMock, 'Magento\Webhook\Model\Config');
 
         /** @var \Magento\Webhook\Model\Subscription $subscription */
         $subscription = $objectManager->create('Magento\Webhook\Model\Subscription');
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/_files/Acme/Subscriber/etc/config.xml b/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/_files/Acme/Subscriber/etc/config.xml
deleted file mode 100644
index a6f62841d7e..00000000000
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/_files/Acme/Subscriber/etc/config.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_Webhook
- * @subpackage  integration_tests
- * @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>
-    <global>
-        <webhook>
-            <subscriptions>
-                <subscription_alias>
-                    <name>Test subscriber</name>
-                    <endpoint_url>http://mage.loc/mage-twitter-integration/web/index.php/endpoint</endpoint_url>
-                    <topics>
-                        <customer>
-                            <created/>
-                            <updated/>
-                            <deleted/>
-                        </customer>
-                        <order>
-                            <created/>
-                        </order>
-                    </topics>
-                </subscription_alias>
-            </subscriptions>
-        </webhook>
-    </global>
-</config>
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/Subscription/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Model/Subscription/ConfigTest.php
index efc370ce964..cf221137e83 100644
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/Subscription/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Webhook/Model/Subscription/ConfigTest.php
@@ -56,70 +56,30 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $dirs = $this->_objectManager->create(
-            'Magento\App\Dir',
-            array(
-                'baseDir' => BP,
-                'dirs'    => array(
-                    \Magento\App\Dir::MODULES => __DIR__ . '/_files',
-                    \Magento\App\Dir::CONFIG => __DIR__ . '/_files'
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+        $configMock = $this->getMock('Magento\Webhook\Model\Config', array(), array(), '', false, false);
+        $subscriptions = array(
+            'subscription_alias' => array(
+                'name' => 'Test subscriber',
+                'endpoint_url' => 'http://mage.loc/mage-twitter-integration/web/index.php/endpoint',
+                'topics' => array(
+                    'customer' => array(
+                        'created' => '',
+                        'updated' => '',
+                        'deleted' => '',
+                    ),
+                    'order' => array(
+                        'created'
+                    ),
                 ),
-            )
+            ),
         );
+        $configMock->expects($this->any())->method('getSubscriptions')->will($this->returnValue($subscriptions));
 
-        $fileResolver = $this->_objectManager->create(
-            'Magento\App\Module\Declaration\FileResolver', array('applicationDirs' => $dirs)
-        );
-        $filesystemReader = $this->_objectManager->create('Magento\App\Module\Declaration\Reader\Filesystem',
-            array('fileResolver' => $fileResolver)
-        );
-        $moduleList = $this->_objectManager->create(
-            'Magento\App\ModuleList',
-            array('reader' => $filesystemReader, 'cache' => $this->getMock('Magento\Config\CacheInterface'))
-        );
-
-        /**
-         * Mock is used to disable caching, as far as Integration Tests Framework loads main
-         * modules configuration first and it gets cached
-         *
-         * @var \PHPUnit_Framework_MockObject_MockObject $cache
-         */
-        $cache = $this->getMock('Magento\Core\Model\Config\Cache', array('load', 'save', 'clean', 'getSection'),
-            array(), '', false);
-
-        $cache->expects($this->any())
-            ->method('load')
-            ->will($this->returnValue(false));
-
-        /** @var \Magento\Core\Model\Config\Modules\Reader $moduleReader */
-        $moduleReader = $this->_objectManager->create(
-            'Magento\Core\Model\Config\Modules\Reader', array(
-                'moduleList' => $moduleList
-            )
-        );
-        $moduleReader->setModuleDir('Acme_Subscriber', 'etc', __DIR__ . '/_files/Acme/Subscriber/etc');
-
-        $loader = $this->_objectManager->create(
-            'Magento\Core\Model\Config\Loader',
-            array('fileReader' => $moduleReader)
-        );
-        /** @var \Magento\Core\Model\Config\Storage $storage */
-        $storage = $this->_objectManager->create(
-            'Magento\Core\Model\Config\Storage', array(
-                'loader' => $loader,
-                'cache' => $cache
-            )
-        );
-
-        $mageConfig = $this->_objectManager->create(
-            'Magento\Core\Model\Config',
-            array('storage' => $storage, 'moduleReader' => $moduleReader)
-        );
-
-        /** @var \Magento\Webhook\Model\Subscription\Config $config */
-        $this->_config = $this->_objectManager->create('Magento\Webhook\Model\Subscription\Config',
-            array('mageConfig' => $mageConfig)
-        );
+        $this->_config = $objectManager->create('Magento\Webhook\Model\Subscription\Config', array(
+            'config' => $configMock
+        ));
     }
 
     public function testReadingConfig()
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/Subscription/_files/Acme/Subscriber/etc/config.xml b/dev/tests/integration/testsuite/Magento/Webhook/Model/Subscription/_files/Acme/Subscriber/etc/config.xml
deleted file mode 100644
index a6f62841d7e..00000000000
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/Subscription/_files/Acme/Subscriber/etc/config.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_Webhook
- * @subpackage  integration_tests
- * @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>
-    <global>
-        <webhook>
-            <subscriptions>
-                <subscription_alias>
-                    <name>Test subscriber</name>
-                    <endpoint_url>http://mage.loc/mage-twitter-integration/web/index.php/endpoint</endpoint_url>
-                    <topics>
-                        <customer>
-                            <created/>
-                            <updated/>
-                            <deleted/>
-                        </customer>
-                        <order>
-                            <created/>
-                        </order>
-                    </topics>
-                </subscription_alias>
-            </subscriptions>
-        </webhook>
-    </global>
-</config>
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/SubscriptionTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Model/SubscriptionTest.php
index 8969db676ef..152321cca9b 100644
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/SubscriptionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Webhook/Model/SubscriptionTest.php
@@ -79,10 +79,16 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
         $aclCache->clean();
         // add new hooks for the tests
 
-        /** @var $configModel \Magento\Core\Model\Config */
-        $configModel = $this->_objectManager->get('Magento\Core\Model\Config');
-        $configModel->setNode('global/webhook/webhooks/test/hook/label', 'Test Hook');
-        $configModel->setNode('global/webhook/webhooks/test/two/label', 'Test Hook Two');
+
+        $configMock = $this->getMock('Magento\Webhook\Model\Config', array(), array(), '', false, false);
+        $webHooks = array(
+            'test' => array(
+                'hook' => array('label' => 'Test Hook'),
+                'two' => array('label' => 'Test Hook Two'),
+            )
+        );
+        $configMock->expects($this->any())->method('getWebhooks')->will($this->returnValue($webHooks));
+        $this->_objectManager->addSharedInstance($configMock, 'Magento\Webhook\Model\Config');
     }
 
     protected function tearDown()
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php
index c697145cb2e..31f0b44c5d7 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php
@@ -44,11 +44,14 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
 
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $layoutUtility = new \Magento\Core\Utility\Layout($this);
+        $appState = $objectManager->get('Magento\App\State');
+        $appState->setAreaCode(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $args = array(
             'context' => $objectManager->get('Magento\Core\Block\Template\Context'),
             'layoutProcessorFactory' => $this->getMock('Magento\View\Layout\ProcessorFactory',
                 array(), array(), '', false),
             'themesFactory' => $objectManager->get('Magento\Core\Model\Resource\Theme\CollectionFactory'),
+            'appState' => $appState,
             'data' => array(
                 'name'  => 'page_type',
                 'id'    => 'page_types_select',
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/LayoutTest.php
index 44f9d4479f5..e527e8dbed5 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/LayoutTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/LayoutTest.php
@@ -61,8 +61,9 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetLayoutsChooser()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)
             ->setDefaultDesignTheme();
 
         $actualHtml = $this->_block->getLayoutsChooser();
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php b/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php
index b0d76255a95..a7f7ad1e36e 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php
@@ -52,7 +52,8 @@ class InstanceTest extends \Magento\Backend\Utility\Controller
     public function testEditAction()
     {
         $this->dispatch('backend/admin/widget_instance/edit');
-        $this->assertContains('<option value="cms_page_link" selected="selected">',
+        $this->assertContains(
+            '<option value="cms_page_link" selected="selected">',
             $this->getResponse()->getBody()
         );
     }
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php
index 6fbf0933475..e91dfb2f41b 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php
@@ -52,31 +52,31 @@ class DataTest extends \PHPUnit_Framework_TestCase
             )
         );
 
-        /** @var \Magento\App\Module\Declaration\FileResolver $modulesDeclarations */
+        /** @var \Magento\Module\Declaration\FileResolver $modulesDeclarations */
         $modulesDeclarations = $objectManager->create(
-            'Magento\App\Module\Declaration\FileResolver', array(
+            'Magento\Module\Declaration\FileResolver', array(
                 'applicationDirs' => $dirs,
             )
         );
 
 
-        /** @var \Magento\App\Module\Declaration\Reader\Filesystem $filesystemReader */
+        /** @var \Magento\Module\Declaration\Reader\Filesystem $filesystemReader */
         $filesystemReader = $objectManager->create(
-            'Magento\App\Module\Declaration\Reader\Filesystem', array(
+            'Magento\Module\Declaration\Reader\Filesystem', array(
                 'fileResolver' => $modulesDeclarations,
             )
         );
 
-        /** @var \Magento\App\ModuleList $modulesList */
+        /** @var \Magento\Module\ModuleList $modulesList */
         $modulesList = $objectManager->create(
-            'Magento\App\ModuleList', array(
+            'Magento\Module\ModuleList', array(
                 'reader' => $filesystemReader,
             )
         );
 
-        /** @var \Magento\Core\Model\Config\Modules\Reader $moduleReader */
+        /** @var \Magento\Module\Dir\Reader $moduleReader */
         $moduleReader = $objectManager->create(
-            'Magento\Core\Model\Config\Modules\Reader', array(
+            'Magento\Module\Dir\Reader', array(
                 'moduleList' => $modulesList
             )
         );
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php
index b98cc6e8589..9cc1bdb8002 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php
@@ -41,7 +41,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $moduleListMock = $this->getMockBuilder('Magento\App\ModuleListInterface')
+        $moduleListMock = $this->getMockBuilder('Magento\Module\ModuleListInterface')
             ->disableOriginalConstructor()
             ->getMock();
         $moduleListMock->expects($this->any())
@@ -53,7 +53,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
             ))));
 
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $moduleReader = $objectManager->create('Magento\Core\Model\Config\Modules\Reader', array(
+        $moduleReader = $objectManager->create('Magento\Module\Dir\Reader', array(
             'moduleList' => $moduleListMock
         ));
         $moduleReader->setModuleDir('Magento_Test', 'etc', __DIR__ . '/_files/code/Magento/Test/etc');
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php
index 9300eaacf6c..688480e6f4e 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php
@@ -46,31 +46,31 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
             )
         );
 
-        /** @var \Magento\App\Module\Declaration\FileResolver $modulesDeclarations */
+        /** @var \Magento\Module\Declaration\FileResolver $modulesDeclarations */
         $modulesDeclarations = $objectManager->create(
-            'Magento\App\Module\Declaration\FileResolver', array(
+            'Magento\Module\Declaration\FileResolver', array(
                 'applicationDirs' => $dirs,
             )
         );
 
 
-        /** @var \Magento\App\Module\Declaration\Reader\Filesystem $filesystemReader */
+        /** @var \Magento\Module\Declaration\Reader\Filesystem $filesystemReader */
         $filesystemReader = $objectManager->create(
-            'Magento\App\Module\Declaration\Reader\Filesystem', array(
+            'Magento\Module\Declaration\Reader\Filesystem', array(
                 'fileResolver' => $modulesDeclarations,
             )
         );
 
-        /** @var \Magento\App\ModuleList $modulesList */
+        /** @var \Magento\Module\ModuleList $modulesList */
         $modulesList = $objectManager->create(
-            'Magento\App\ModuleList', array(
+            'Magento\Module\ModuleList', array(
                 'reader' => $filesystemReader,
             )
         );
 
-        /** @var \Magento\Core\Model\Config\Modules\Reader $moduleReader */
+        /** @var \Magento\Module\Dir\Reader $moduleReader */
         $moduleReader = $objectManager->create(
-            'Magento\Core\Model\Config\Modules\Reader', array(
+            'Magento\Module\Dir\Reader', array(
                 'moduleList' => $modulesList
             )
         );
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php
index 340aa83fa6e..6ab959f223f 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php
@@ -46,8 +46,10 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetPluginSettings()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setDesignTheme('magento_basic', 'adminhtml');
+            ->setDesignTheme('magento_basic');
 
         $config = new \Magento\Object();
         $settings = $this->_model->getPluginSettings($config);
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/InstanceTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/InstanceTest.php
index 722a91f5ce1..a506788d31b 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/InstanceTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/InstanceTest.php
@@ -48,6 +48,8 @@ class InstanceTest extends \PHPUnit_Framework_TestCase
 
     public function testSetThemeId()
     {
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')
+            ->setAreaCode('frontend');
         $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\View\DesignInterface')
             ->setDefaultDesignTheme()
@@ -62,6 +64,9 @@ class InstanceTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetWidgetConfigAsArray()
     {
+        $this->markTestIncomplete('Functionality is failed because widget'
+            . ' "app/design/frontend/magento_iphone_html5/etc/widget.xml" replaces'
+            . ' "new_products" widget in Catalog module');
         $config = $this->_model->setType('Magento\Catalog\Block\Product\Widget\NewWidget')->getWidgetConfigAsArray();
         $this->assertTrue(is_array($config));
         $element = null;
@@ -86,6 +91,9 @@ class InstanceTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetWidgetSupportedContainers()
     {
+        $this->markTestIncomplete('Functionality is failed because widget'
+            . ' "app/design/frontend/magento_iphone_html5/etc/widget.xml" replaces'
+            . ' "new_products" widget in Catalog module');
         $this->_model->setType('Magento\Catalog\Block\Product\Widget\NewWidget');
         $containers = $this->_model->getWidgetSupportedContainers();
         $this->assertInternalType('array', $containers);
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php
index 27a0209bf70..c2e4f87bb72 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php
@@ -62,8 +62,13 @@ class WidgetTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetPlaceholderImageUrl($type, $expectedFile)
     {
+        $this->markTestIncomplete('Functionality is failed because widget'
+            . ' "app/design/frontend/magento_iphone_html5/etc/widget.xml" replaces'
+            . ' "new_products" widget in Catalog module');
+        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
+            ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setDesignTheme('magento_basic', 'adminhtml');
+            ->setDesignTheme('magento_basic');
         $expectedPubFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Dir')
                 ->getDir(\Magento\App\Dir::STATIC_VIEW) . "/adminhtml/magento_basic/en_US/{$expectedFile}";
         if (file_exists($expectedPubFile)) {
diff --git a/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php b/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php
index 1c39d4cb758..fdbf1d76264 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php
@@ -25,7 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-    ->loadAreaPart(\Magento\Core\Model\App\Area::AREA_ADMINHTML, \Magento\Core\Model\App\Area::PART_CONFIG);
+    ->loadAreaPart(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, \Magento\Core\Model\App\Area::PART_CONFIG);
 /** @var $registration \Magento\Core\Model\Theme\Registration */
 $registration = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
     ->create('Magento\Core\Model\Theme\Registration');
diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php
index 478e5d85288..26a9b1a7a6d 100644
--- a/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php
@@ -58,9 +58,8 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
     public function testImage()
     {
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')
-            ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->load();
+            ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface')
-            ->setArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)
             ->setDefaultDesignTheme();
         $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Catalog\Model\Product');
diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php
index 9199b90cd5e..cf5211844e2 100644
--- a/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php
+++ b/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php
@@ -37,7 +37,7 @@ class IndexTest extends \Magento\TestFramework\TestCase\AbstractController
     protected function setUp()
     {
         parent::setUp();
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $this->_customerSession = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Customer\Model\Session', array($logger));
         $this->_customerSession->login('customer@example.com', 'password');
diff --git a/dev/tests/performance/framework/Magento/TestFramework/Application.php b/dev/tests/performance/framework/Magento/TestFramework/Application.php
index 4a4cfdbfb37..ff1421c248c 100644
--- a/dev/tests/performance/framework/Magento/TestFramework/Application.php
+++ b/dev/tests/performance/framework/Magento/TestFramework/Application.php
@@ -191,9 +191,7 @@ class Application
     protected function _bootstrap()
     {
         if (!$this->_objectManager) {
-            $this->_objectManager = new \Magento\Core\Model\ObjectManager(
-                new \Magento\Core\Model\Config\Primary(BP, $_SERVER)
-            );
+            $this->_objectManager = new \Magento\App\ObjectManager(BP, $_SERVER);
         }
         /** @var $app \Magento\Core\Model\App */
         $this->_objectManager->get('Magento\Core\Model\App');
diff --git a/dev/tests/performance/testsuite/fixtures/shipping_flatrate_enabled.php b/dev/tests/performance/testsuite/fixtures/shipping_flatrate_enabled.php
index d3d448ee95d..f73c7df3172 100644
--- a/dev/tests/performance/testsuite/fixtures/shipping_flatrate_enabled.php
+++ b/dev/tests/performance/testsuite/fixtures/shipping_flatrate_enabled.php
@@ -34,5 +34,5 @@ $configData->setPath('carriers/flatrate/active')
     ->setValue(1)
     ->save();
 
-$this->getObjectManager()->get('Magento\Core\Model\CacheInterface')
+$this->getObjectManager()->get('Magento\App\CacheInterface')
     ->clean(array(\Magento\Core\Model\Config::CACHE_TAG));
diff --git a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php
index 9bc46795755..a248feff7bb 100644
--- a/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php
+++ b/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/CodeMessDetector.php
@@ -92,7 +92,7 @@ class CodeMessDetector
 
         $command = new \PHP_PMD_TextUI_Command();
 
-        return $command->run($options);
+        return $command->run($options, new \PHP_PMD_RuleSetFactory());
     }
 
 }
diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
index 3158e3c69d3..17ab0a22cf7 100644
--- a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
+++ b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
@@ -536,11 +536,20 @@ class Files
      * Look for DI config through the system
      * @return array
      */
-    public function getDiConfigs()
+    public function getDiConfigs($asDataSet = false)
     {
         $primaryConfigs = glob($this->_path . '/app/etc/{di.xml,*/di.xml}', GLOB_BRACE);
         $moduleConfigs = glob($this->_path . '/app/code/*/*/etc/{di,*/di}.xml', GLOB_BRACE);
         $configs = array_merge($primaryConfigs, $moduleConfigs);
+
+        if ($asDataSet) {
+            $output = array();
+            foreach ($configs as $file) {
+                $output[$file] = array($file);
+            }
+
+            return $output;
+        }
         return $configs;
     }
 
@@ -565,7 +574,7 @@ class Files
             '/dev/tests/api-functional/framework/', '/dev/tests/integration/framework/',
             '/dev/tests/integration/framework/tests/unit/testsuite/', '/dev/tests/integration/testsuite/',
             '/dev/tests/integration/testsuite/Magento/Test/Integrity/', '/dev/tests/performance/framework/',
-            '/dev/tests/static/framework/', '/dev/tests/static/testsuite/',
+            '/dev/tests/static/framework/', '/dev/tests/static/testsuite/', '/dev/tests/functional/tests/app/',
             '/dev/tests/unit/framework/', '/dev/tests/unit/testsuite/',
         );
 
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Compiler/CompilerTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Compiler/CompilerTest.php
deleted file mode 100644
index 7aa4a3d3e9c..00000000000
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Compiler/CompilerTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-/**
- * Compiler test. Check compilation of DI definitions and code generation
- *
- * 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\Test\Integrity\Compiler;
-
-class CompilerTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var string
-     */
-    protected $_command;
-
-    /**
-     * @var \Magento\Shell
-     */
-    protected $_shell;
-
-    /**
-     * @var string
-     */
-    protected $_generationDir;
-
-    /**
-     * @var string
-     */
-    protected $_compilationDir;
-
-    /**
-     * @var string
-     */
-    protected $_tmpDir;
-
-    protected function setUp()
-    {
-        $this->_shell = new \Magento\Shell();
-        $basePath = \Magento\TestFramework\Utility\Files::init()->getPathToSource();
-        $basePath = str_replace(DIRECTORY_SEPARATOR, '/', $basePath);
-        $this->_tmpDir = realpath(__DIR__) . '/tmp';
-        $this->_generationDir =  $this->_tmpDir . '/generation';
-        $this->_compilationDir = $this->_tmpDir . '/di';
-        $this->_command = 'php ' . $basePath
-            . '/dev/tools/Magento/Tools/Di/compiler.php --l=%s --generation=%s --di=%s --v';
-    }
-
-    protected function tearDown()
-    {
-        $filesystem = new \Magento\Filesystem\Adapter\Local();
-        $filesystem->delete($this->_tmpDir);
-    }
-
-    public function testCompiler()
-    {
-        try {
-            $output = $this->_shell->execute(
-                $this->_command,
-                array('error', $this->_generationDir, $this->_compilationDir)
-            );
-            $this->assertEmpty($output, $output);
-        } catch (\Magento\Exception $exception) {
-            $this->fail($exception->getPrevious()->getMessage());
-        }
-    }
-}
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php
new file mode 100644
index 00000000000..4adc0eca352
--- /dev/null
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php
@@ -0,0 +1,239 @@
+<?php
+/**
+ * Compiler test. Check compilation of DI definitions and code generation
+ *
+ * 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\Test\Integrity\Di;
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class CompilerTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var string
+     */
+    protected $_command;
+
+    /**
+     * @var \Magento\Shell
+     */
+    protected $_shell;
+
+    /**
+     * @var string
+     */
+    protected $_generationDir;
+
+    /**
+     * @var string
+     */
+    protected $_compilationDir;
+
+    /**
+     * @var string
+     */
+    protected $_tmpDir;
+
+    /**
+     * @var \Magento\ObjectManager\Config\Mapper\Dom()
+     */
+    protected $_mapper;
+
+    /**
+     * @var \Magento\Code\Validator\ConstructorIntegrity
+     */
+    protected $_validator;
+
+    protected function setUp()
+    {
+        $this->_shell = new \Magento\Shell();
+        $basePath = \Magento\TestFramework\Utility\Files::init()->getPathToSource();
+        $basePath = str_replace(DIRECTORY_SEPARATOR, '/', $basePath);
+
+        $this->_tmpDir = realpath(__DIR__) . '/tmp';
+        $this->_generationDir =  $this->_tmpDir . '/generation';
+        $this->_compilationDir = $this->_tmpDir . '/di';
+
+        \Magento\Autoload\IncludePath::addIncludePath(array(
+            $basePath . '/app/code',
+            $basePath . '/lib',
+            $this->_generationDir,
+        ));
+
+        $this->_command = 'php ' . $basePath
+            . '/dev/tools/Magento/Tools/Di/compiler.php --generation=%s --di=%s';
+        $this->_mapper = new \Magento\ObjectManager\Config\Mapper\Dom();
+        $this->_validator = new \Magento\Code\Validator\ConstructorIntegrity();
+    }
+
+    protected function tearDown()
+    {
+        $filesystem = new \Magento\Filesystem\Adapter\Local();
+        $filesystem->delete($this->_tmpDir);
+    }
+
+    /**
+     * Validate DI config file
+     *
+     * @param string $file
+     */
+    protected function _validateFile($file)
+    {
+        $dom = new \DOMDocument();
+        $dom->load($file);
+        $data = $this->_mapper->convert($dom);
+
+        foreach ($data as $instanceName => $parameters) {
+            if (!isset($parameters['parameters']) || empty($parameters['parameters'])) {
+                continue;
+            }
+            if (\Magento\TestFramework\Utility\Classes::isVirtual($instanceName)) {
+                $instanceName = \Magento\TestFramework\Utility\Classes::resolveVirtualType($instanceName);
+            }
+            $parameters = $parameters['parameters'];
+            if (!class_exists($instanceName)) {
+                $this->fail('Detected configuration of non existed class: ' . $instanceName);
+            }
+
+            $reflectionClass = new \ReflectionClass($instanceName);
+
+            $constructor = $reflectionClass->getConstructor();
+            if (!$constructor) {
+                $this->fail('Class ' . $instanceName . ' does not have __constructor');
+            }
+
+            $classParameters = $constructor->getParameters();
+            foreach ($classParameters as $classParameter) {
+                $parameterName = $classParameter->getName();
+                if (array_key_exists($parameterName, $parameters)) {
+                    unset($parameters[$parameterName]);
+                }
+            }
+            $message = 'Configuration of ' . $instanceName
+                . ' contains data for non-existed parameters: ' . implode(', ', array_keys($parameters));
+            $this->assertEmpty($parameters, $message);
+        }
+    }
+
+    /**
+     * Get php classes list
+     *
+     * @return array
+     */
+    protected function _phpClassesDataProvider()
+    {
+        $basePath = \Magento\TestFramework\Utility\Files::init()->getPathToSource();
+
+        $basePath = str_replace('/', '\\', $basePath);
+        $libPath = $basePath . '\\lib';
+        $appPath = $basePath . '\\app\\code';
+        $generationPathPath = str_replace('/', '\\', $this->_generationDir);
+
+        $files = \Magento\TestFramework\Utility\Files::init()->getClassFiles(
+            true, false, false, false, false, true, false
+        );
+
+        $patterns  = array(
+            '/' . preg_quote($libPath) . '/',
+            '/' . preg_quote($appPath) . '/',
+            '/' . preg_quote($generationPathPath) . '/'
+        );
+        $replacements  = array('', '', '');
+
+        $classes = array();
+        foreach ($files as $file) {
+            $file = str_replace('/', '\\', $file);
+            $filePath = preg_replace($patterns, $replacements, $file);
+            $className = substr($filePath, 0, -4);
+            if (class_exists($className)) {
+                $classes[$file] = array($className);
+            }
+        }
+        return $classes;
+    }
+
+    /**
+     * Validate class
+     *
+     * @param string $className
+     */
+    protected function _validateClass($className)
+    {
+        try {
+            $this->_validator->validate($className);
+        } catch (\Magento\Code\ValidationException $exceptions) {
+            $this->fail($exceptions->getMessage());
+        } catch (\ReflectionException $exceptions) {
+            $this->fail($exceptions->getMessage());
+        }
+    }
+
+    public function testConfigurationOfInstanceParameters()
+    {
+        $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this);
+        $invoker(
+            /**
+             * @param string $file
+             */
+            function ($file) {
+                $this->_validateFile($file);
+            },
+            \Magento\TestFramework\Utility\Files::init()->getDiConfigs(true)
+        );
+    }
+
+    public function testConstructorIntegrity()
+    {
+        $autoloader = new \Magento\Autoload\IncludePath();
+        $generatorIo = new \Magento\Code\Generator\Io(new \Magento\Io\File(), $autoloader, $this->_generationDir);
+        $generator = new \Magento\Code\Generator(null, $autoloader, $generatorIo);
+        $autoloader = new \Magento\Code\Generator\Autoloader($generator);
+        spl_autoload_register(array($autoloader, 'load'));
+
+        $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this);
+        $invoker(
+            function ($className) {
+                $this->_validateClass($className);
+            },
+            $this->_phpClassesDataProvider()
+        );
+        spl_autoload_unregister(array($autoloader, 'load'));
+    }
+
+    /**
+     * @depends testConfigurationOfInstanceParameters
+     * @depends testConstructorIntegrity
+     */
+    public function testCompiler()
+    {
+        try {
+            $this->_shell->execute(
+                $this->_command,
+                array($this->_generationDir, $this->_compilationDir)
+            );
+        } catch (\Magento\Exception $exception) {
+            $this->fail($exception->getPrevious()->getMessage());
+        }
+    }
+}
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/ConfigurationTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/ConfigurationTest.php
deleted file mode 100644
index 9be734c294c..00000000000
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/ConfigurationTest.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-/**
- * DI configuration test. Checks configuration of types and virtual types parameters
- *
- * 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\Test\Integrity\Di;
-
-class ConfigurationTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\ObjectManager\Config\Mapper\Dom()
-     */
-    protected $_mapper;
-
-    protected function setUp()
-    {
-        $basePath = \Magento\TestFramework\Utility\Files::init()->getPathToSource();
-        \Magento\Autoload\IncludePath::addIncludePath(array(
-            $basePath . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'code',
-            $basePath . DIRECTORY_SEPARATOR . 'lib',
-        ));
-        $this->_mapper = new \Magento\ObjectManager\Config\Mapper\Dom();
-
-    }
-
-    /**
-     * @dataProvider configFilesDataProvider
-     */
-    public function testConfigurationOfInstanceParameters($file)
-    {
-        $dom = new \DOMDocument();
-        $dom->load($file);
-        $data = $this->_mapper->convert($dom);
-
-        foreach ($data as $instanceName => $parameters) {
-            if (!isset($parameters['parameters']) || empty($parameters['parameters'])) {
-                continue;
-            }
-
-            if (\Magento\TestFramework\Utility\Classes::isVirtual($instanceName)) {
-                $instanceName = \Magento\TestFramework\Utility\Classes::resolveVirtualType($instanceName);
-            }
-            $parameters = $parameters['parameters'];
-
-            if (!class_exists($instanceName)) {
-                $this->fail('Non existed class: ' . $instanceName);
-            }
-
-            $reflectionClass = new \ReflectionClass($instanceName);
-
-            $constructor = $reflectionClass->getConstructor();
-            if (!$constructor) {
-                $this->fail('Class ' . $instanceName . ' does not have __constructor');
-            }
-
-            $classParameters = $constructor->getParameters();
-            foreach ($classParameters as $classParameter) {
-                $parameterName = $classParameter->getName();
-                if (array_key_exists($parameterName, $parameters)) {
-                    unset($parameters[$parameterName]);
-                }
-            }
-            $this->assertEmpty($parameters,
-                'Configuration of ' . $instanceName
-                . ' contains data for non-existed parameters: ' . implode(', ', array_keys($parameters))
-                . ' in file: ' . $file
-            );
-        }
-    }
-
-    /**
-     * @return array
-     */
-    public function configFilesDataProvider()
-    {
-        $output = array();
-        $files = \Magento\TestFramework\Utility\Files::init()->getDiConfigs();
-        foreach ($files as $file) {
-            $output[$file] = array($file);
-        }
-        return $output;
-    }
-}
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Page/ConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Page/ConfigTest.php
index edf503af4fc..48295e9ff32 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Page/ConfigTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Page/ConfigTest.php
@@ -30,13 +30,13 @@ namespace Magento\Test\Integrity\Magento\Page;
 
 class ConfigTest extends \Magento\TestFramework\Integrity\AbstractConfig
 {
-    public function testFileSchemaUsingInvalidXml()
+    public function testFileSchemaUsingInvalidXml($expectedErrors = null)
     {
         $expectedErrors = array("Element 'layout': The attribute 'id' is required but missing.");
         parent::testFileSchemaUsingInvalidXml($expectedErrors);
     }
 
-    public function testSchemaUsingInvalidXml()
+    public function testSchemaUsingInvalidXml($expectedErrors = null)
     {
         $expectedErrors = array(
             "Element 'layouts': No match found for key-sequence ['bad_ref'] of keyref 'layout-ref'.",
@@ -45,7 +45,7 @@ class ConfigTest extends \Magento\TestFramework\Integrity\AbstractConfig
         parent::testSchemaUsingInvalidXml($expectedErrors);
     }
 
-    public function testSchemaUsingPartialXml()
+    public function testSchemaUsingPartialXml($expectedErrors = null)
     {
         $expectedErrors = array(
             "Element 'layout': Missing child element(s). Expected is ( label ).",
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Payment/Model/ConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Payment/Model/ConfigTest.php
index 50c27218ec0..25cc5d5e829 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Payment/Model/ConfigTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Payment/Model/ConfigTest.php
@@ -28,7 +28,7 @@ namespace Magento\Test\Integrity\Magento\Payment\Model;
 class ConfigTest extends \Magento\TestFramework\Integrity\AbstractConfig
 {
 
-    public function testSchemaUsingInvalidXml()
+    public function testSchemaUsingInvalidXml($expectedErrors = null)
     {
         $expectedErrors = array(
             "Element 'type': The attribute 'id' is required but missing.",
@@ -39,7 +39,7 @@ class ConfigTest extends \Magento\TestFramework\Integrity\AbstractConfig
         parent::testSchemaUsingInvalidXml($expectedErrors);
     }
 
-    public function testFileSchemaUsingInvalidXml()
+    public function testFileSchemaUsingInvalidXml($expectedErrors = null)
     {
         $expectedErrors = array(
             "Element 'type': The attribute 'id' is required but missing.",
@@ -49,7 +49,7 @@ class ConfigTest extends \Magento\TestFramework\Integrity\AbstractConfig
         parent::testFileSchemaUsingInvalidXml($expectedErrors);
     }
 
-    public function testSchemaUsingPartialXml()
+    public function testSchemaUsingPartialXml($expectedErrors = null)
     {
         $expectedErrors = array(
             "Element 'type': The attribute 'order' is required but missing.",
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Persistent/ConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Persistent/ConfigTest.php
index b3aa707eedb..507c365709b 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Persistent/ConfigTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Persistent/ConfigTest.php
@@ -101,12 +101,12 @@ class ConfigTest extends \Magento\TestFramework\Integrity\AbstractConfig
         return 'persistent.xml';
     }
 
-    public function testFileSchemaUsingInvalidXml()
+    public function testFileSchemaUsingInvalidXml($expectedErrors = null)
     {
         $this->markTestSkipped('persistent.xml does not have a partial schema');
     }
 
-    public function testSchemaUsingPartialXml()
+    public function testSchemaUsingPartialXml($expectedErrors = null)
     {
         $this->markTestSkipped('persistent.xml does not have a partial schema');
     }
@@ -116,7 +116,7 @@ class ConfigTest extends \Magento\TestFramework\Integrity\AbstractConfig
         $this->markTestSkipped('persistent.xml does not have a partial schema');
     }
 
-    public function testSchemaUsingInvalidXml()
+    public function testSchemaUsingInvalidXml($expectedErrors = null)
     {
         $expectedErrors = array(
             "Element 'welcome': This element is not expected.",
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/JsTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/JsTest.php
index a5bc126d36e..50bccdf3dd8 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/JsTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/JsTest.php
@@ -60,7 +60,7 @@ class JsTest extends \Magento\Test\Integrity\Phrase\AbstractTestCase
 
         $registeredPhrases = $this->_getRegisteredPhrases();
 
-        foreach ($this->_getJavascriptPhrases('adminhtml') as $phrase) {
+        foreach ($this->_getJavascriptPhrases(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) as $phrase) {
             if (!in_array($phrase['phrase'], $registeredPhrases)) {
                 $unregisteredMessages[]
                     = sprintf("'%s' \n in file %s, line# %s", $phrase['phrase'], $phrase['file'], $phrase['line']);
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/adminhtml_decoupling.php b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/adminhtml_decoupling.php
index 472e37de550..26896dc7bc2 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/adminhtml_decoupling.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/adminhtml_decoupling.php
@@ -30,37 +30,23 @@ return array(
     'Block/Admin',
     'Block/Backup',
     'Block/Cache',
-    'Block/Checkout',
-    'Block/Cms',
-    'Block/Customer',
-    'Block/Dashboard',
     'Block/Denied',
     'Block/Html',
     'Block/Media',
     'Block/Messages',
     'Block/Newsletter',
     'Block/Page',
-    'Block/Promo',
-    'Block/Rating',
     'Block/Report',
     'Block/Review',
     'Block/Shipping',
     'Block/Sitemap',
-    'Block/System',
     'Block/Template',
     'Block/Text',
     'Block/Urlrewrite',
     'Block/Widget',
 
     // Controllers
-    'Controller/Checkout',
-    'Controller/Cms',
-    'Controller/Customer',
     'Controller/Newsletter',
-    'Controller/Promo',
-    'Controller/Report',
-    'Controller/System',
-    'Controller/Promo',
     'Controller/Report',
     'Controller/Urlrewrite',
 
@@ -71,7 +57,6 @@ return array(
     'Helper/Js',
 
     // Models
-    'Model/Customer',
     'Model/Email',
     'Model/Giftmessage',
     'Model/LayoutUpdate',
@@ -84,33 +69,23 @@ return array(
     // Views
     'view/adminhtml/admin',
     'view/adminhtml/backup',
-    'view/adminhtml/cms',
-    'view/adminhtml/customer',
     'view/adminhtml/email',
     'view/adminhtml/images',
     'view/adminhtml/media',
     'view/adminhtml/newsletter',
     'view/adminhtml/page',
-    'view/adminhtml/promo',
     'view/adminhtml/report',
     'view/adminhtml/review',
     'view/adminhtml/store',
-    'view/adminhtml/system',
     'view/adminhtml/urlrewrite',
     'view/adminhtml/widget',
-    'view/adminhtml/validation-rules.js',
-    'view/adminhtml/variables.js',
 
     // Layouts
     'layout/adminhtml_cache',
-    'layout/adminhtml_cms',
-    'layout/adminhtml_customer',
     'layout/adminhtml_denied',
     'layout/adminhtml_newsletter',
     'layout/adminhtml_noroute',
-    'layout/adminhtml_promo',
     'layout/adminhtml_report',
-    'layout/adminhtml_system',
     'layout/adminhtml_urlrewrite',
     'layout/default',
     'layout/editor',
@@ -121,5 +96,4 @@ return array(
     'layout/popup',
     'layout/preview',
     'layout/report_sales',
-    'layout/systemPreview',
-);
\ No newline at end of file
+);
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt
index 8991e35d1b3..37dfcfb1851 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt
@@ -1,5 +1,15 @@
 dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Model/Test.php
 dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Helper/Test.php
+dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Element.php
+dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/ElementFactory.php
+dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php
+dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php
+dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php
+dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php
+dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php
+dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php
+dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php
+dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php
 dev/tools/Magento/Tools/I18n/Zend/Exception.php
 dev/tools/Magento/Tools/I18n/Zend/Console/Getopt/Exception.php
 dev/tools/Magento/Tools/I18n/Zend/Console/Getopt.php
diff --git a/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt b/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt
index cfcaf9992ef..b6d8747db51 100644
--- a/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt
@@ -12,7 +12,7 @@ app/code/Magento/Captcha/view/frontend/onepage.js
 app/code/Magento/Catalog/view/adminhtml/catalog/category/edit.js
 app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/configure.js
 app/code/Magento/Catalog/view/adminhtml/catalog/product.js
-app/code/Magento/Adminhtml/view/adminhtml/promo/rules.js
+app/code/Magento/Adminhtml/view/adminhtml/rules.js
 app/code/Magento/Sales/view/adminhtml/order/create/giftmessage.js
 app/code/Magento/Sales/view/adminhtml/order/create/scripts.js
 app/code/Magento/Sales/view/adminhtml/order/giftoptions_tooltip.js
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php
index 52dd0f986c9..96e1fba1d74 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php
@@ -108,6 +108,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
                 $layoutXml = simplexml_load_file($layoutFile);
 
                 $this->_testObsoleteReferences($layoutXml);
+                $this->_testObsoleteAttributes($layoutXml);
 
                 $selectorHeadBlock = '(name()="block" or name()="referenceBlock") and '
                     . '(@name="head" or @name="convert_root_head" or @name="vde_head")';
@@ -170,6 +171,34 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
         }
     }
 
+    /**
+     * Tests the attributes of the top-level Layout Node.
+     * Verifies there are no longer attributes of "parent" or "owner"
+     *
+     * @param SimpleXMLElement $layoutXml
+     */
+    protected function _testObsoleteAttributes($layoutXml)
+    {
+        $issues = array();
+        $type = $layoutXml['type'];
+        $parent = $layoutXml['parent'];
+        $owner = $layoutXml['owner'];
+
+        if ((string)$type === 'page') {
+            if ($parent) {
+                $issues[] = 'Attribute "parent" is not valid';
+            }
+        }
+        if ((string)$type === 'fragment') {
+            if ($owner) {
+                $issues[] = 'Attribute "owner" is not valid';
+            }
+        }
+        if ($issues) {
+            $this->fail("Issues found in handle declaration:\n" . implode("\n", $issues) . "\n");
+        }
+    }
+
     public function testActionNodeMethods()
     {
         $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this);
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
index c7f028459d5..ed833af0a5d 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
@@ -258,8 +258,16 @@ class ObsoleteCodeTest extends \PHPUnit_Framework_TestCase
                     "Function or method '{$method}()' is obsolete in file '{$file}'.",
                     $replacement
                 );
-                $this->_assertNotRegExp('/function\s*' . $quotedMethod . '\s*\(/iS', $content, $message);
-                $this->_assertNotRegExp('/[^a-z\d_]' . $quotedMethod . '\s*\(/iS', $content, $message);
+                $this->_assertNotRegExp(
+                    '/(?<!public|protected|private|static)\s+function\s*' . $quotedMethod . '\s*\(/iS',
+                    $content,
+                    $message
+                );
+                $this->_assertNotRegExp(
+                    '/(?<![a-z\d_:]|->|function\s)' . $quotedMethod . '\s*\(/iS',
+                    $content,
+                    $message
+                );
             }
         }
     }
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 e3dbeedaaa5..6ef10a4a619 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
@@ -585,7 +585,7 @@ return array(
     array('Mage_Core_Block_Template_Facade'),
     array('Mage_Core_Block_Template_Smarty'),
     array('Mage_Core_Block_Template_Zend'),
-    array('Mage_Core_Controller_Magento_Router_Admin', 'Magento\Backend\Controller\Router\DefaultRouter'),
+    array('Mage_Core_Controller_Magento_Router_Admin', 'Magento\Backend\App\Router\DefaultRouter'),
     array('Mage_Core_Model_Convert'),
     array('Mage_Core_Model_Config_Fieldset', 'Magento\Core\Model\Fieldset\Config'),
     array('Mage_Core_Model_Config_Options', 'Magento\App\Dir'),
@@ -978,8 +978,10 @@ return array(
     array('Mage_Sales_Model_Order_Creditmemo_Api_V2'),
     array('Mage_Sales_Model_Order_Creditmemo_Api'),
     array('Magento\ImportExport\Model\Config'),
+    array('Magento\Install\Model\EntryPoint\Console', 'Magento\Install\App\Console'),
+    array('Magento\Install\Model\EntryPoint\Output', 'Magento\Install\App\Output'),
     array('Magento\Data\Collection\Factory', 'Magento\Data\CollectionFactory'),
-    array('Magento\Adminhtml\Block\Customer\System\Config\ValidatevatFactory'),
+    array('Magento\Customer\Block\Adminhtml\System\Config\ValidatevatFactory'),
     array('Magento\Customer\Model\Attribute\Data'),
     array('Magento\Eav\Model\Attribute\Data'),
     array('Magento\Log\Model\Resource\Helper\Mysql4', 'Magento\Log\Model\Resource\Helper'),
@@ -991,8 +993,11 @@ return array(
     array('Magento\Core\Model\Resource\Helper\Mysql4', 'Magento\Core\Model\Resource\Helper'),
     array('Magento\Catalog\Model\Resource\Helper\Mysql4', 'Magento\Catalog\Model\Resource\Helper'),
     array('Magento\Eav\Model\Resource\Helper\Mysql4', 'Magento\Eav\Model\Resource\Helper'),
-    array('Magento\Eav\Model\Entity\Attribute\Backend\Array', 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend'),
-    array('Magento\Sales\Model\Resource\Helper\HelperInterface', 'Magento\Sales\Model\Resource\HelperInterface'),
+    array(
+        'Magento\Eav\Model\Entity\Attribute\Backend\Array',
+        'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend'),
+    array('Magento\Sales\Model\Resource\Helper\HelperInterface', 'Magento\Sales\Model\Resource\HelperInterface'
+    ),
     array('Magento\Reports\Model\Resource\Helper\HelperInterface', 'Magento\Reports\Model\Resource\HelperInterface'),
     array('Magento\Poll\Block\ActivePoll'),
     array('Magento\Poll\Controller\Vote'),
@@ -1005,43 +1010,77 @@ return array(
     array('Magento\Poll\Model\Resource\Poll\Answer\Collection'),
     array('Magento\Poll\Model\Resource\Poll\Collection'),
     array('Magento\Poll\Model\Resource\Poll\Vote'),
-    array('Magento\Backup', 'Magento\Backup\Factory'),
-    array('Magento\Core\Controller\Front\Router', 'Magento\Core\Controller\Request\HttpProxy'),
-    array('Magento\Core\Controller\Response\Http', 'Magento\Core\Controller\Varien\Action\Forward'),
-    array('Magento\Core\Controller\Varien\Action\Redirect', 'Magento\Core\Controller\Varien\DispatchableInterface'),
-    array('Magento\Core\Controller\Varien\Front'),
-    array('Magento\Core\Controller\FrontInterface', 'Magento\Core\Model\App\Handler'),
-    array('Magento\Core\Model\App\Proxy', 'Magento\Core\Model\Event\Config\SchemaLocator'),
-    array('Magento\Core\Controller\Varien\Router\AbstractRouter', 'Magento\Core\Controller\Varien\AbstractAction'),
-    array('Magento\Core\Controller\Varien\Exception', 'Magento\HTTP\HandlerFactory'),
-    array('Magento\Core\Controller\Request\Http', 'Magento\Core\Controller\Varien\Router\AbstractRouter'),
-    array('Magento\Core\Controller\Varien\Router\DefaultRouter', 'Magento\Core\Model\NoRouteHandlerList'),
-    array('Magento\Core\Controller\Varien\Action\Factory', 'Magento\Core\Model\Dir'),
-    array('Magento\Core\Model\ModuleList', 'Magento\Core\Model\ModuleListInterface'),
-    array('Magento\Core\Model\RouterList', 'Magento\Core\Model\App\State'),
-    array('Magento\Core\Model\Event\Config\Converter', 'Magento\Core\Model\Event\Config\Data'),
-    array('Magento\Core\Model\Event\Config\Reader', 'Magento\Core\Model\Event\Invoker\InvokerDefault'),
-    array('Magento\Core\Model\Event\Config', 'Magento\Core\Model\Event\ConfigInterface'),
-    array('Magento\Core\Model\Event\InvokerInterface', 'Magento\Core\Model\Event\Manager'),
-    array('Magento\HTTP\Handler\Composite', 'Magento\HTTP\HandlerInterface'),
-    array('Magento\Backend\Model\Request\PathInfoProcessor', 'Magento\Backend\Model\Router\NoRouteHandler'),
-    array('Magento\Core\Model\Request\PathInfoProcessor', 'Magento\Core\Model\Request\RewriteService'),
-    array('Magento\Core\Model\Router\NoRouteHandler', 'Magento\Core\Model\Resource\SetupFactory'),
-    array('Magento\Core\Model\Dir\Verification', 'Magento\Core\Model\Module\Declaration\Converter\Dom'),
-    array('Magento\Core\Model\Module\Declaration\Reader\Filesystem', 'Magento\Core\Model\Module\Dir'),
-    array('Magento\Core\Model\Module\Declaration\FileResolver', 'Magento\Core\Model\Module\Declaration\SchemaLocator'),
-    array('Magento\Core\Model\Module\Dir\ReverseResolver', 'Magento\Core\Model\Module\ResourceResolver'),
-    array('Magento\Core\Model\Module\ResourceResolverInterface', 'Magento\Core\Model\Resource\SetupInterface'),
-    array('Magento\Core\Model\Db\UpdaterInterface', 'Magento\Core\Model\Router\NoRouteHandlerInterface'),
-    array('Magento\Core\Model\Router\NoRouteHandlerInterface', 'Magento\Core\Model\UrlInterface'),
+    array('Magento\Backup'),
+    array('Magento\Core\Controller\Front\Router'),
+    array('Magento\Core\Controller\Request\HttpProxy'),
+    array('Magento\Core\Controller\Response\Http', 'Magento\App\Response\Http'),
+    array('Magento\Core\Controller\Varien\Action\Forward', 'Magento\App\Action\Forward'),
+    array('Magento\Core\Controller\Varien\Action\Redirect', 'Magento\App\Action\Redirect'),
+    array('Magento\Core\Controller\Varien\DispatchableInterface'),
+    array('Magento\Core\Controller\Varien\Front', 'Magento\App\FrontController'),
+    array('Magento\Core\Controller\FrontInterface', 'Magento\App\FrontControllerInterface'),
+    array('Magento\Core\Model\App\Handler'),
+    array('Magento\Core\Model\App\Proxy'),
+    array('Magento\Core\Model\Event\Config\SchemaLocator', 'Magento\Event\Config\SchemaLocator'),
+    array('Magento\Core\Controller\Varien\Router\AbstractRouter'),
+    array('Magento\Core\Controller\Varien\AbstractAction'),
+    array('Magento\Core\Controller\Varien\Exception'),
+    array('Magento\HTTP\HandlerFactory'),
+    array('Magento\Core\Controller\Request\Http'),
+    array('Magento\Core\Controller\Varien\Router\DefaultRouter'),
+    array('Magento\Core\Model\NoRouteHandlerList'),
+    array('Magento\Core\Controller\Varien\Action\Factory'),
+    array('Magento\Core\Model\Config\Loader\Primary'),
+    array('Magento\Core\Model\Config\AbstractStorage'),
+    array('Magento\Core\Model\Config\Loader'),
+    array('Magento\Core\Model\Config\LoaderInterface'),
+    array('Magento\Core\Model\Config\Primary'),
+    array('Magento\Core\Model\Config\Storage'),
+    array('Magento\Core\Model\Config\StorageInterface'),
+    array('Magento\Core\Model\Dir'),
+    array('Magento\Core\Model\ModuleList'),
+    array('Magento\Core\Model\ModuleListInterface'),
+    array('Magento\Core\Model\RouterList'),
+    array('Magento\Core\Model\App\State'),
+    array('Magento\Core\Model\Event\Config\Converter'),
+    array('Magento\Core\Model\Event\Config\Data'),
+    array('Magento\Core\Model\Event\Config\Reader'),
+    array('Magento\Core\Model\Event\Invoker\InvokerDefault'),
+    array('Magento\Core\Model\Event\Config'),
+    array('Magento\Core\Model\Event\ConfigInterface'),
+    array('Magento\Core\Model\Event\InvokerInterface'),
+    array('Magento\Core\Model\Event\Manager'),
+    array('Magento\HTTP\Handler\Composite'),
+    array('Magento\HTTP\HandlerInterface'),
+    array('Magento\Backend\Model\Request\PathInfoProcessor'),
+    array('Magento\Backend\Model\Router\NoRouteHandler'),
+    array('Magento\Core\Model\Request\PathInfoProcessor'),
+    array('Magento\Core\Model\Request\RewriteService'),
+    array('Magento\Core\Model\Router\NoRouteHandler'),
+    array('Magento\Core\Model\Resource\SetupFactory'),
+    array('Magento\Core\Model\Dir\Verification'),
+    array('Magento\Core\Model\Module\Declaration\Converter\Dom'),
+    array('Magento\Core\Model\Module\Declaration\Reader\Filesystem'),
+    array('Magento\Core\Model\Module\Dir'),
+    array('Magento\Core\Model\Module\Declaration\FileResolver'),
+    array('Magento\Core\Model\Module\Declaration\SchemaLocator'),
+    array('Magento\Core\Model\Module\Dir\ReverseResolver'),
+    array('Magento\Core\Model\Module\ResourceResolver'),
+    array('Magento\Core\Model\Module\ResourceResolverInterface'),
+    array('Magento\Core\Model\Resource\SetupInterface'),
+    array('Magento\Core\Model\Db\UpdaterInterface'),
+    array('Magento\Core\Model\Router\NoRouteHandlerInterface'),
+    array('Magento\Core\Model\UrlInterface'),
     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'),
+    array('Magento\Core\Helper\Http'),
     array('Magento\Core\Model\ThemeInterface', 'Magento\View\Design\ThemeInterface'),
     array('Magento\Core\Model\View\DesignInterface', 'Magento\View\DesignInterface'),
     array('Magento\Core\Model\Layout\Element', 'Magento\View\Layout\Element'),
+    array('Magento\Core\Helper\Hint', 'Magento\Backend\Block\Store\Switcher'),
     array('Magento\Core\Model\Design\Fallback\Rule\ModularSwitch', 'Magento\View\Design\Fallback\Rule\ModularSwitch'),
     array('Magento\Core\Model\Design\Fallback\Rule\RuleInterface', 'Magento\View\Design\Fallback\Rule\RuleInterface'),
     array('Magento\Core\Model\Design\Fallback\Rule\Simple', 'Magento\View\Design\Fallback\Rule\Simple'),
@@ -1084,4 +1123,301 @@ return array(
     array('Magento\Media\Model\File\Image'),
     array('Magento\Media\Model\Image'),
     array('Magento\Media\Helper\Data'),
+    array(
+        'Magento\Adminhtml\Block\Promo\Catalog\Edit\Form',
+        'Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Form'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Catalog\Edit\Js',
+        'Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Js'),
+    array(
+        'Magento\Adminhtml\Block\Promo\Catalog\Edit\Tab\Actions',
+        'Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Actions'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Catalog\Edit\Tab\Conditions',
+        'Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Conditions'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Catalog\Edit\Tab\Main',
+        'Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Main'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Catalog\Edit\Tabs',
+        'Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tabs'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Catalog\Edit',
+        'Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Catalog',
+        'Magento\CatalogRule\Block\Adminhtml\Promo\Catalog'
+    ),
+
+    array(
+        'Magento\Adminhtml\Block\Promo\Widget\Chooser\Daterange',
+        'Magento\CatalogRule\Block\Adminhtml\Widget\Chooser\Daterange'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Widget\Chooser\Sku',
+        'Magento\CatalogRule\Block\Adminhtml\Widget\Chooser\Sku'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Widget\Chooser',
+        'Magento\CatalogRule\Block\Adminhtml\Widget\Chooser'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit\Form',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Form'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Actions',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Actions'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Conditions',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Conditions'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons\Form',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Form'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons\Grid\Column\Renderer\Used',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid\Column\Renderer\Used'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons\Grid',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Coupons',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Labels',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Labels'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Main\Renderer\Checkbox',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Main\Renderer\Checkbox'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit\Tab\Main',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Main'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit\Tabs',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tabs'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote\Edit',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Promo\Quote',
+        'Magento\SalesRule\Block\Adminhtml\Promo\Quote'
+    ),
+    array(
+        'Magento\Adminhtml\Controller\Promo\Catalog',
+        'Magento\CatalogRule\Controller\Adminhtml\Promo\Catalog'
+    ),
+    array(
+        'Magento\Adminhtml\Controller\Promo\Quote',
+        'Magento\SalesRule\Controller\Adminhtml\Promo\Quote'
+    ),
+    array(
+        'Magento\Adminhtml\Controller\Promo\Widget',
+        'Magento\CatalogRule\Controller\Adminhtml\Promo\Widget'
+    ),
+    array(
+        'Magento\Adminhtml\Controller\Promo',
+        'Magento\CatalogRule\Controller\Adminhtml\Promo'
+    ),
+    array(
+        'Magento\Adminhtml\Controller\System\Account',
+        'Magento\Backend\Controller\Adminhtml\System\Account',
+    ),
+    array(
+        'Magento\Adminhtml\Controller\System\Backup',
+        'Magento\Backend\Controller\Adminhtml\System\Backup',
+    ),
+    array(
+        'Magento\Adminhtml\Controller\System\Config\System\Storage',
+        'Magento\Backend\Controller\Adminhtml\System\Config\System\Storage',
+    ),
+    array(
+        'Magento\Adminhtml\Controller\System\Design',
+        'Magento\Backend\Controller\Adminhtml\System\Design',
+    ),
+    array(
+        'Magento\Adminhtml\Controller\System\Email\Template',
+        'Magento\Backend\Controller\Adminhtml\System\Email\Template',
+    ),
+    array(
+        'Magento\Adminhtml\Controller\System\Store',
+        'Magento\Backend\Controller\Adminhtml\System\Store',
+    ),
+    array(
+        'Magento\Adminhtml\Controller\System\Variable',
+        'Magento\Backend\Controller\Adminhtml\System\Variable',
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Account\Edit\Form',
+        'Magento\Backend\Block\System\Account\Edit\Form'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Account\Edit',
+        'Magento\Backend\Block\System\Account\Edit'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Cache\Edit',
+        'Magento\Backend\Block\System\Cache\Edit'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Cache\Form',
+        'Magento\Backend\Block\System\Cache\Form'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Design\Edit\Tab\General',
+        'Magento\Backend\Block\System\Design\Edit\Tab\General'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Design\Edit\Tabs',
+        'Magento\Backend\Block\System\Design\Edit\Tabs'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Design\Edit',
+        'Magento\Backend\Block\System\Design\Edit'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Design',
+        'Magento\Backend\Block\System\Design'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Email\Template\Edit\Form',
+        'Magento\Backend\Block\System\Email\Template\Edit\Form'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Email\Template\Edit',
+        'Magento\Backend\Block\System\Email\Template\Edit'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Email\Template\Grid\Filter\Type',
+        'Magento\Backend\Block\System\Email\Template\Grid\Filter\Type'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer\Action',
+        'Magento\Backend\Block\System\Email\Template\Grid\Renderer\Action'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer\Sender',
+        'Magento\Backend\Block\System\Email\Template\Grid\Renderer\Sender'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer\Type',
+        'Magento\Backend\Block\System\Email\Template\Grid\Renderer\Type'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Email\Template\Preview',
+        'Magento\Backend\Block\System\Email\Template\Preview'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Email\Template',
+        'Magento\Backend\Block\System\Email\Template'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Shipping\Ups',
+        'Magento\Backend\Block\System\Shipping\Ups'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Delete\Form',
+        'Magento\Backend\Block\System\Store\Delete\Form'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Delete\Group',
+        'Magento\Backend\Block\System\Store\Delete\Group'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Delete\Website',
+        'Magento\Backend\Block\System\Store\Delete\Website'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Delete',
+        'Magento\Backend\Block\System\Store\Delete'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Edit\AbstractForm',
+        'Magento\Backend\Block\System\Store\Edit\AbstractForm'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Edit\Form\Group',
+        'Magento\Backend\Block\System\Store\Edit\Form\Group'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Edit\Form\Store',
+        'Magento\Backend\Block\System\Store\Edit\Form\Store'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Edit\Form\Website',
+        'Magento\Backend\Block\System\Store\Edit\Form\Website'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Edit',
+        'Magento\Backend\Block\System\Store\Edit'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Grid\Render\Group',
+        'Magento\Backend\Block\System\Store\Grid\Render\Group'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Grid\Render\Store',
+        'Magento\Backend\Block\System\Store\Grid\Render\Store'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Grid\Render\Website',
+        'Magento\Backend\Block\System\Store\Grid\Render\Website'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Store\Store',
+        'Magento\Backend\Block\System\Store\Store'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Variable\Edit\Form',
+        'Magento\Backend\Block\System\Variable\Edit\Form'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Variable\Edit',
+        'Magento\Backend\Block\System\Variable\Edit'
+    ),
+    array(
+        'Magento\Adminhtml\Block\System\Variable',
+        'Magento\Backend\Block\System\Variable'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Checkout\Agreement\Edit\Form',
+        'Magento\Checkout\Block\Adminhtml\Agreement\Edit\Form'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Checkout\Agreement\Edit',
+        'Magento\Checkout\Block\Adminhtml\Agreement\Edit'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Checkout\Agreement\Grid',
+        'Magento\Checkout\Block\Adminhtml\Agreement\Grid'
+    ),
+    array(
+        'Magento\Adminhtml\Block\Checkout\Agreement',
+        'Magento\Checkout\Block\Adminhtml\Agreement'
+    ),
+    array(
+        'Magento\Adminhtml\Controller\Checkout\Agreement',
+        'Magento\Checkout\Controller\Adminhtml\Agreement'
+    ),
+    array('Magento\Core\Model\EntryPoint\Cron', 'Magento\App\Cron'),
+    array('Magento\Log\Model\EntryPoint\Shell', 'Magento\Log\App\Shell'),
+    array('Magento\Index\Model\EntryPoint\Shell', 'Magento\Index\App\Shell'),
+    array('Magento\Index\Model\EntryPoint\Indexer', 'Magento\Index\App\Indexer'),
+    array('\Magento\Core\Model\EntryPoint\Media', '\Magento\Core\App\Media'),
 );
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php
index 68b8a2c4de0..35306594018 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php
@@ -29,6 +29,18 @@ return array(
     '/config/global/fieldsets'                 => '',
     '/config/global/cache/betatypes'           => '',
     '/config/admin/fieldsets'                  => '',
+    '/config/global/webhook'                   =>
+        'This configuration moved to Di configuration of \Magento\Webhook module models',
+    '/config/general/locale'                   =>
+        'This configuration moved to Di configuration of \Magento\Core\Model\Locale\Config model',
+    '/config/global/can_use_base_url'          =>
+        'This configuration moved to Di configuration of \Magento\Backend\Controller\Context class',
+    '/config/global/locale/allow/codes'        =>
+        'This configuration moved to Di configuration of \Magento\Core\Model\Locale\Config model',
+    '/config/global/locale/allow/currencies'   =>
+        'This configuration moved to Di configuration of \Magento\Core\Model\Locale\Config model',
+    '/config/global/mime/types'                =>
+        'This configuration moved to Di configuration for \Magento\Downloadable\Helper\File class',
     '/config/global/models/*/deprecatedNode'   => '',
     '/config/global/models/*/entities/*/table' => '',
     '/config/global/models/*/class'            => '',
@@ -42,6 +54,8 @@ return array(
     '/config/global/payment'                   => 'Move them to payment.xml.',
     '/config/adminhtml/menu'                   => 'Move them to adminhtml.xml.',
     '/config/adminhtml/acl'                    => 'Move them to adminhtml.xml.',
+    '/config/adminhtml/global_search'          =>
+        'This configuration moved to Di configuration of \Magento\Adminhtml\Controller\Index',
     '/config/*[self::global|self::adminhtml|self::frontend]/di' => 'This configuration moved to di.xml file',
     '/config/*[self::global|self::adminhtml|self::frontend]/events' => 'This configuration moved to events.xml file',
     '/config/*[self::global|self::adminhtml|self::frontend]/routers' =>
@@ -50,6 +64,9 @@ return array(
     '/config/global/importexport' => 'This configuration moved to import.xml and export.xml files',
     '/config/global/catalog/product/type' => 'This configuration moved to product_types.xml file',
     '/config/global/catalog/product/options' => 'This configuration moved to product_options.xml file',
+    '/config/global/catalog/product/media/image_types' =>
+        'This configuration moved to Di configuration of '
+        . '\Magento\Adminhtml\Block\Catalog\Product\Frontend\Product\Watermark',
     '/config/global/eav_attributes' => 'This configuration moved to eav_attributes.xml file',
     '/config/global/index' => 'This configuration moved to indexers.xml file',
     '/config/global/catalogrule' => 'This configuration moved to Di configuration of \Magento\CatalogRule\Model\Rule',
@@ -90,8 +107,8 @@ return array(
     '/config/global/eav_frontendclasses' =>
         'This configuration was removed. '
         . 'Please pluginize \Magento\Eav\Helper\Data::getFrontendClasses to extend frontend classes list',
-    '/config/global/resources' => 'This configuration moved to Di configuration of \Magento\Core\Model\Resource',
-    '/config/global/resource' => 'This configuration moved to Di configuration of \Magento\Core\Model\Resource',
+    '/config/global/resources' => 'This configuration moved to Di configuration of \Magento\App\Resource',
+    '/config/global/resource' => 'This configuration moved to Di configuration of \Magento\App\Resource',
     '/config/*/events/core_block_abstract_to_html_after' =>
     'Event has been replaced with "core_layout_render_element"',
     '/config/*/events/catalog_controller_product_delete' => '',
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 0cfb4ae052f..45f7151375c 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
@@ -30,7 +30,9 @@ return array(
     array('BACKORDERS_YES'),
     array('CACHE_TAG', 'Magento\Api\Model\Config', 'Magento_Api_Model_Cache_Type::CACHE_TAG'),
     array('CACHE_TAG', 'Magento\Core\Model\AppInterface'),
-    array('CACHE_TAG', 'Magento\Core\Model\Resource\Db\Collection\AbstractCollection',
+    array(
+        'CACHE_TAG',
+        'Magento\Core\Model\Resource\Db\Collection\AbstractCollection',
         'Magento_Core_Model_Cache_Type_Collection::CACHE_TAG'
     ),
     array('CACHE_TAG', 'Magento\Core\Model\Translate', 'Magento_Core_Model_Cache_Type_Translate::CACHE_TAG'),
@@ -50,19 +52,25 @@ return array(
     array('CONFIG_XML_PATH_DISPLAY_TAX_COLUMN'),
     array('CONFIG_XML_PATH_DISPLAY_ZERO_TAX'),
     array('CONFIG_XML_PATH_SHOW_IN_CATALOG'),
-    array('DEFAULT_SETUP_RESOURCE', 'Mage_Core_Model_Resource',
+    array(
+        'DEFAULT_SETUP_RESOURCE',
+        'Mage_Core_Model_Resource',
         'Magento_Core_Model_Config_Resource::DEFAULT_SETUP_CONNECTION'
     ),
-    array('DEFAULT_READ_RESOURCE', 'Mage_Core_Model_Resource',
+    array(
+        'DEFAULT_READ_RESOURCE',
+        'Mage_Core_Model_Resource',
         'Magento_Core_Model_Config_Resource::DEFAULT_READ_CONNECTION'
     ),
-    array('DEFAULT_WRITE_RESOURCE', 'Mage_Core_Model_Resource',
+    array(
+        'DEFAULT_WRITE_RESOURCE',
+        'Mage_Core_Model_Resource',
         'Magento_Core_Model_Config_Resource::DEFAULT_WRITE_CONNECTION'
     ),
     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_READ_CONNECTION', 'Magento\App\Resource\Config'),
+    array('DEFAULT_WRITE_CONNECTION', 'Magento\App\Resource\Config'),
     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'),
@@ -85,7 +93,11 @@ return array(
     array('INIT_OPTION_SCOPE_TYPE', 'Magento\Core\Model\App', 'Magento_Core_Model_App::PARAM_RUN_TYPE'),
     array('INIT_OPTION_URIS', 'Magento\Core\Model\App', 'Magento_Core_Model_App::PARAM_APP_URIS'),
     array('INSTALLER_HOST_RESPONSE', 'Magento\Install\Model\Installer'),
-    array('LAYOUT_GENERAL_CACHE_TAG', 'Magento\Core\Model\Layout\Merge', 'Magento_Core_Model_Cache_Type_Layout::CACHE_TAG'),
+    array(
+        'LAYOUT_GENERAL_CACHE_TAG',
+        'Magento\Core\Model\Layout\Merge',
+        'Magento_Core_Model_Cache_Type_Layout::CACHE_TAG'
+    ),
     array('LOCALE_CACHE_KEY', 'Magento\Adminhtml\Block\Page\Footer'),
     array('LOCALE_CACHE_LIFETIME', 'Magento\Adminhtml\Block\Page\Footer'),
     array('LOCALE_CACHE_TAG', 'Magento\Adminhtml\Block\Page\Footer'),
@@ -93,19 +105,29 @@ return array(
     array('PATH_PREFIX_CUSTOMIZED', 'Magento\Core\Model\Theme\Files'),
     array('PUBLIC_BASE_THEME_DIR', 'Magento\Core\Model\Design\PackageInterface'),
     array('PUBLIC_CACHE_TAG', 'Magento\Core\Model\Design\PackageInterface'),
-    array('PUBLIC_MODULE_DIR', 'Magento\Core\Model\Design\PackageInterface',
+    array(
+        'PUBLIC_MODULE_DIR',
+        'Magento\Core\Model\Design\PackageInterface',
         'Magento_Core_Model_Design_Package::PUBLIC_MODULE_DIR'
     ),
-    array('PUBLIC_THEME_DIR', 'Magento\Core\Model\Design\PackageInterface',
+    array(
+        'PUBLIC_THEME_DIR',
+        'Magento\Core\Model\Design\PackageInterface',
         'Magento_Core_Model_Design_Package::PUBLIC_THEME_DIR'
     ),
-    array('PUBLIC_VIEW_DIR', 'Magento\Core\Model\Design\PackageInterface',
+    array(
+        'PUBLIC_VIEW_DIR',
+        'Magento\Core\Model\Design\PackageInterface',
         'Magento_Core_Model_Design_Package::PUBLIC_VIEW_DIR'
     ),
     array('REGISTRY_FORM_PARAMS_KEY', null, 'direct value'),
     array('SCOPE_TYPE_GROUP', 'Magento\Core\Model\App', 'Magento_Core_Model_StoreManagerInterface::SCOPE_TYPE_GROUP'),
     array('SCOPE_TYPE_STORE', 'Magento\Core\Model\App', 'Magento_Core_Model_StoreManagerInterface::SCOPE_TYPE_STORE'),
-    array('SCOPE_TYPE_WEBSITE', 'Magento\Core\Model\App', 'Magento_Core_Model_StoreManagerInterface::SCOPE_TYPE_WEBSITE'),
+    array(
+        'SCOPE_TYPE_WEBSITE',
+        'Magento\Core\Model\App',
+        'Magento_Core_Model_StoreManagerInterface::SCOPE_TYPE_WEBSITE'
+    ),
     array('SEESION_MAX_COOKIE_LIFETIME'),
     array('TYPE_BINARY', null, 'Magento_DB_Ddl_Table::TYPE_BLOB'),
     array('TYPE_CHAR', null, 'Magento_DB_Ddl_Table::TYPE_TEXT'),
@@ -124,14 +146,17 @@ return array(
     array('XML_CHARSET_NODE', 'Magento\SalesRule\Helper\Coupon'),
     array('XML_CHARSET_SEPARATOR', 'Magento\SalesRule\Helper\Coupon'),
     array('XML_NODE_RELATED_CACHE', 'Magento\CatalogRule\Model\Rule'),
-    array('XML_NODE_ATTRIBUTE_NODES', 'Magento\Catalog\Model\Resource\Product\Flat\Indexer',
-        'XML_NODE_ATTRIBUTE_GROUPS'),
-    array('XML_PATH_ALLOW_CODES', 'Magento\Core\Model\Locale', 'Magento_Core_Model_LocaleInterface::XML_PATH_ALLOW_CODES'),
-    array('XML_PATH_ALLOW_CURRENCIES', 'Magento\Core\Model\Locale',
+    array(
+        'XML_NODE_ATTRIBUTE_NODES',
+        'Magento\Catalog\Model\Resource\Product\Flat\Indexer',
+        'XML_NODE_ATTRIBUTE_GROUPS'
+    ),
+    array(
+        'XML_PATH_ALLOW_CURRENCIES',
+        'Magento\Core\Model\Locale',
         'Magento_Core_Model_LocaleInterface::XML_PATH_ALLOW_CURRENCIES'
     ),
-    array('XML_PATH_ALLOW_CURRENCIES_INSTALLED', 'Magento\Core\Model\Locale',
-        'Magento_Core_Model_LocaleInterface::XML_PATH_ALLOW_CURRENCIES_INSTALLED'),
+    array('XML_PATH_ALLOW_CODES', 'Magento\Core\Model\LocaleInterface'),
     array('XML_PATH_ALLOW_DUPLICATION', 'Magento\Core\Model\Design\PackageInterface',
         'Magento_Core_Model_Design_Package::XML_PATH_ALLOW_DUPLICATION'
     ),
@@ -139,81 +164,116 @@ 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_CONNECTION_TYPE', 'Magento\App\Resource\Config'),
     array('XML_PATH_COUNTRY_DEFAULT', 'Magento\Paypal\Model\System\Config\Backend\MerchantCountry'),
-    array('XML_PATH_DEBUG_TEMPLATE_HINTS', 'Magento\Core\Block\Template',
-        'Magento\Core\Model\TemplateEngine\Plugin::XML_PATH_DEBUG_TEMPLATE_HINTS'),
-    array('XML_PATH_DEBUG_TEMPLATE_HINTS_BLOCKS', 'Magento\Core\Block\Template',
-        'Magento\Core\Model\TemplateEngine\Plugin::XML_PATH_DEBUG_TEMPLATE_HINTS_BLOCKS'),
+    array(
+        'XML_PATH_DEBUG_TEMPLATE_HINTS',
+        'Magento\Core\Block\Template',
+        'Magento\Core\Model\TemplateEngine\Plugin::XML_PATH_DEBUG_TEMPLATE_HINTS'
+    ),
+    array(
+        'XML_PATH_DEBUG_TEMPLATE_HINTS_BLOCKS',
+        'Magento\Core\Block\Template',
+        'Magento\Core\Model\TemplateEngine\Plugin::XML_PATH_DEBUG_TEMPLATE_HINTS_BLOCKS'
+    ),
     array('XML_PATH_DEFAULT_COUNTRY', 'Magento\Core\Model\Locale'),
-    array('XML_PATH_DEFAULT_LOCALE', 'Magento\Core\Model\Locale',
+    array(
+        'XML_PATH_DEFAULT_LOCALE',
+        'Magento\Core\Model\Locale',
         'Magento_Core_Model_LocaleInterface::XML_PATH_DEFAULT_LOCALE'
     ),
-    array('XML_PATH_DEFAULT_TIMEZONE', 'Magento\Core\Model\Locale',
+    array(
+        'XML_PATH_DEFAULT_TIMEZONE',
+        'Magento\Core\Model\Locale',
         'Magento_Core_Model_LocaleInterface::XML_PATH_DEFAULT_TIMEZONE'
     ),
     array('XML_PATH_INDEXER_DATA', 'Magento\Index\Model\Process'),
     array('XML_PATH_INSTALL_DATE', 'Mage_Core_Model_App', 'Mage_Core_Model_Config_Primary::XML_PATH_INSTALL_DATE'),
     array('XML_PATH_EXTERNAL_CACHE_CONTROLS', 'Magento\PageCache\Helper\Data'),
+    array('XML_PATH_EXTERNAL_CACHE_CONTROLS', 'Magento\PageCache\Model\CacheControlFactory'),
     array('XML_PATH_EXTERNAL_CACHE_CONTROL', 'Magento\PageCache\Helper\Data'),
     array('XML_PATH_LOCALE_INHERITANCE', 'Mage_Core_Model_Translate'),
     array('XML_PATH_PRODUCT_ATTRIBUTES', 'Magento\Wishlist\Model\Config'),
     array('XML_PATH_PRODUCT_COLLECTION_ATTRIBUTES', 'Magento\Catalog\Model\Config'),
     array('XML_PATH_QUOTE_PRODUCT_ATTRIBUTES', 'Magento\Sales\Model\Quote\Config'),
     array('XML_PATH_SENDING_SET_RETURN_PATH', 'Mage_Newsletter_Model_Subscriber'),
-    array('XML_PATH_SKIP_PROCESS_MODULES_UPDATES', 'Mage_Core_Model_App',
+    array(
+        'XML_PATH_SKIP_PROCESS_MODULES_UPDATES',
+        'Mage_Core_Model_App',
         'Mage_Core_Model_Db_UpdaterInterface::XML_PATH_SKIP_PROCESS_MODULES_UPDATES'
     ),
-    array('XML_PATH_STATIC_FILE_SIGNATURE', 'Magento\Core\Helper\Data',
+    array(
+        'XML_PATH_STATIC_FILE_SIGNATURE',
+        'Magento\Core\Helper\Data',
         'Magento_Core_Model_Design_Package::XML_PATH_STATIC_FILE_SIGNATURE'
     ),
     array('XML_PATH_TEMPLATE_EMAIL', 'Magento\Core\Model\Email\Template'),
-    array('XML_PATH_TEMPLATE_FILTER', 'Magento\Newsletter\Helper\Data',
+    array(
+        'XML_PATH_TEMPLATE_FILTER',
+        'Magento\Newsletter\Helper\Data',
         'Use directly model \Magento\Newsletter\Model\Template\Filter'
     ),
-    array('XML_PATH_THEME', 'Magento\Core\Model\Design\PackageInterface',
+    array(
+        'XML_PATH_THEME',
+        'Magento\Core\Model\Design\PackageInterface',
         'Magento_Core_Model_Design_Package::XML_PATH_THEME'
     ),
-    array('XML_PATH_THEME_ID', 'Magento\Core\Model\Design\PackageInterface',
+    array(
+        'XML_PATH_THEME_ID',
+        'Magento\Core\Model\Design\PackageInterface',
         'Magento_Core_Model_Design_Package::XML_PATH_THEME_ID'
     ),
     array('XML_STORE_ROUTERS_PATH', 'Mage_Core_Controller_Varien_Front'),
     array('XML_PATH_SESSION_MESSAGE_MODELS', 'Magento\Catalog\Helper\Product\View'),
-
-    array('VALIDATOR_KEY', 'Magento\Core\Model\Session\AbstractSession',
+    array(
+        'VALIDATOR_KEY',
+        'Magento\Core\Model\Session\AbstractSession',
         'Magento_Core_Model_Session_Validator::VALIDATOR_KEY'
     ),
-    array('VALIDATOR_HTTP_USER_AGENT_KEY', 'Magento\Core\Model\Session\AbstractSession',
+    array(
+        'VALIDATOR_HTTP_USER_AGENT_KEY',
+        'Magento\Core\Model\Session\AbstractSession',
         'Magento_Core_Model_Session_Validator::VALIDATOR_HTTP_USER_AGENT_KEY'
     ),
-    array('VALIDATOR_HTTP_X_FORVARDED_FOR_KEY', 'Magento\Core\Model\Session\AbstractSession',
+    array(
+        'VALIDATOR_HTTP_X_FORVARDED_FOR_KEY',
+        'Magento\Core\Model\Session\AbstractSession',
         'Magento_Core_Model_Session_Validator::VALIDATOR_HTTP_X_FORWARDED_FOR_KEY'
     ),
-    array('VALIDATOR_HTTP_VIA_KEY', 'Magento\Core\Model\Session\AbstractSession',
+    array(
+        'VALIDATOR_HTTP_VIA_KEY',
+        'Magento\Core\Model\Session\AbstractSession',
         'Magento_Core_Model_Session_Validator::VALIDATOR_HTTP_VIA_KEY'
     ),
-    array('VALIDATOR_REMOTE_ADDR_KEY', 'Magento\Core\Model\Session\AbstractSession',
+    array(
+        'VALIDATOR_REMOTE_ADDR_KEY',
+        'Magento\Core\Model\Session\AbstractSession',
         'Magento_Core_Model_Session_Validator::VALIDATOR_REMOTE_ADDR_KEY'
     ),
-    array('XML_PATH_USE_REMOTE_ADDR', 'Magento\Core\Model\Session\AbstractSession',
+    array(
+        'XML_PATH_USE_REMOTE_ADDR',
+        'Magento\Core\Model\Session\AbstractSession',
         'Magento_Core_Model_Session_Validator::XML_PATH_USE_REMOTE_ADDR'
     ),
-    array('XML_PATH_USE_HTTP_VIA', 'Magento\Core\Model\Session\AbstractSession',
+    array(
+        'XML_PATH_USE_HTTP_VIA',
+        'Magento\Core\Model\Session\AbstractSession',
         'Magento_Core_Model_Session_Validator::XML_PATH_USE_HTTP_VIA'
     ),
-    array('XML_PATH_USE_X_FORWARDED', 'Magento\Core\Model\Session\AbstractSession',
+    array(
+        'XML_PATH_USE_X_FORWARDED',
+        'Magento\Core\Model\Session\AbstractSession',
         'Magento_Core_Model_Session_Validator::XML_PATH_USE_X_FORWARDED'
     ),
-    array('XML_PATH_USE_USER_AGENT', 'Magento\Core\Model\Session\AbstractSession',
+    array(
+        'XML_PATH_USE_USER_AGENT',
+        'Magento\Core\Model\Session\AbstractSession',
         'Magento_Core_Model_Session_Validator::XML_PATH_USE_USER_AGENT'
     ),
-
     array('XML_NODE_DIRECT_FRONT_NAMES', 'Magento\App\Request\Http'),
-
     array('XML_NODE_USET_AGENT_SKIP', 'Magento\Core\Model\Session\AbstractSession'),
     array('XML_PAGE_TYPE_RENDER_INHERITED', 'Magento\Core\Controller\Varien\Action'),
     array('XML_PATH_ALLOW_MAP_UPDATE', 'Magento\Core\Model\Design\FileResolution\StrategyPool'),
-
     array('XML_PATH_WEBAPI_REQUEST_INTERPRETERS', 'Magento\Webapi\Controller\Request\Rest\Interpreter\Factory'),
     array('XML_PATH_WEBAPI_RESPONSE_RENDERS', 'Magento\Webapi\Controller\Response\Rest\Renderer\Factor'),
     array('XML_PATH_THEME'),
@@ -238,17 +298,58 @@ return array(
     array('XML_PATH_DISABLED_CACHE_TYPES', 'Magento\DesignEditor\Helper\Data'),
     array('XML_PATH_ENCRYPTION_MODEL', 'Magento\Core\Helper\Data'),
     array('CONFIG_KEY_PATH_TO_MAP_FILE', 'Magento\Core\Model\Resource\Setup\Migration'),
-    array('XML_PATH_IGNORE_DEV_MODE', 'Magento\App\UpdaterInterface'),
     array('XML_PATH_SKIP_PROCESS_MODULES_UPDATES', 'Magento\App\UpdaterInterface'),
-    array('XML_NODE_SESSION_SAVE', 'Magento\Core\Model\Session\AbstractSession',
-        'Magento_Core_Model_Session_AbstractSession::PARAM_SESSION_SAVE_METHOD'
+    array(
+        'XML_NODE_SESSION_SAVE',
+        'Magento\Core\Model\Session\AbstractSession',
+        'Magento\Core\Model\Session\AbstractSession::PARAM_SESSION_SAVE_METHOD'
     ),
-    array('XML_NODE_SESSION_SAVE_PATH', 'Magento\Core\Model\Session\AbstractSession',
-        'Magento_Core_Model_Session_AbstractSession::PARAM_SESSION_SAVE_PATH'
+    array('XML_PATH_IGNORE_DEV_MODE', 'Magento\Module\UpdaterInterface'),
+    array('XML_PATH_SKIP_PROCESS_MODULES_UPDATES', 'Magento\Module\UpdaterInterface'),
+    array(
+        'XML_NODE_SESSION_SAVE_PATH',
+        'Magento\Core\Model\Session\AbstractSession',
+        'Magento\Core\Model\Session\AbstractSession::PARAM_SESSION_SAVE_PATH'
     ),
     array('XML_PATH_USE_CUSTOM_ADMIN_PATH', 'Magento\Backend\Helper\Data'),
     array('XML_PATH_CUSTOM_ADMIN_PATH', 'Magento\Backend\Helper\Data'),
     array('XML_PATH_BACKEND_AREA_FRONTNAME', 'Magento\Backend\Helper\Data'),
     array('PARAM_BACKEND_FRONT_NAME', 'Magento\Backend\Helper\Data'),
-
+    array('CHARS_LOWERS', '\Magento\Core\Helper\Data', '\Magento\Math\Random::CHARS_LOWERS'),
+    array('CHARS_UPPERS', '\Magento\Core\Helper\Data', '\Magento\Math\Random::CHARS_UPPERS'),
+    array('CHARS_DIGITS', '\Magento\Core\Helper\Data', '\Magento\Math\Random::CHARS_DIGITS'),
+    array('CHARS_SPECIALS', '\Magento\Core\Helper\Data', '\Magento\Math\Random::CHARS_SPECIALS'),
+    array('CHARS_PASSWORD_LOWERS', '\Magento\Core\Helper\Data', '\Magento\Math\Random::CHARS_PASSWORD_LOWERS'),
+    array('CHARS_PASSWORD_UPPERS', '\Magento\Core\Helper\Data', '\Magento\Math\Random::CHARS_PASSWORD_UPPERS'),
+    array('CHARS_PASSWORD_DIGITS', '\Magento\Core\Helper\Data', '\Magento\Math\Random::CHARS_PASSWORD_DIGITS'),
+    array('CHARS_PASSWORD_SPECIALS', '\Magento\Core\Helper\Data', '\Magento\Math\Random::CHARS_PASSWORD_SPECIALS'),
+    array('XML_NODE_REMOTE_ADDR_HEADERS', '\Magento\Core\Helper\Http'),
+    array(
+        'XML_PATH_EU_COUNTRIES_LIST',
+        '\Magento\Core\Helper\Data',
+        'Magento\Customer\Helper\Data::XML_PATH_EU_COUNTRIES_LIST'
+    ),
+    array(
+        'XML_PATH_MERCHANT_COUNTRY_CODE',
+        '\Magento\Core\Helper\Data',
+        'Magento\Customer\Helper\Data::XML_PATH_MERCHANT_COUNTRY_CODE'
+    ),
+    array(
+        'XML_PATH_MERCHANT_VAT_NUMBER',
+        '\Magento\Core\Helper\Data',
+        'Magento\Customer\Helper\Data::XML_PATH_MERCHANT_VAT_NUMBER'
+    ),
+    array(
+        'XML_PATH_PROTECTED_FILE_EXTENSIONS',
+        '\Magento\Core\Helper\Data',
+        '\Magento\Core\Model\File\Validator\NotProtectedExtension::XML_PATH_PROTECTED_FILE_EXTENSIONS'
+    ),
+    array(
+        'XML_PATH_PUBLIC_FILES_VALID_PATHS',
+        '\Magento\Core\Helper\Data',
+        '\Magento\Adminhtml\Helper\Catalog::XML_PATH_PUBLIC_FILES_VALID_PATHS'
+    ),
+    array('XML_PATH_IMAGE_TYPES', 'Magento\Adminhtml\Block\Catalog\Product\Frontend\Product\Watermark'),
+    array('XML_PATH_WEBHOOK', 'Magento\Webhook\Model\Source\Hook'),
+    array('XML_PATH_SUBSCRIPTIONS', 'Magento\Webhook\Model\Subscription\Config'),
 );
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 212afbd9e02..3da69e71f11 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
@@ -78,7 +78,7 @@ return array(
     array('_getCookie', 'Magento\PageCache\Helper\Data'),
     array('_getCollapseState', 'Magento\Backend\Block\System\Config\Form\Fieldset', '_isCollapseState'),
     array('_getCollectionNames', 'Magento\Adminhtml\Controller\Report\Sales'),
-    array('_getConnectionAdapterClassName', 'Magento\Core\Model\Resource'),
+    array('_getConnectionAdapterClassName', 'Magento\App\Resource'),
     array('_getConnenctionType', 'Magento\Install\Model\Installer\Db'),
     array('_getDateFromToHtml', 'Magento\ImportExport\Block\Adminhtml\Export\Filter'),
     array('_getDeclaredModuleFiles', 'Magento\Core\Model\Config'),
@@ -198,7 +198,7 @@ return array(
     array('addKey', 'Magento\DB\Adapter\Pdo\Mysql'),
     array('addLinkRel', 'Magento\Page\Block\Html\Head'),
     array('addLogInLink', 'Magento\Customer\Block\Account\Link'),
-    array('addModule', 'Magento\Core\Controller\Varien\Router\Base'),
+    array('addModule', 'Magento\Core\App\Router\Base'),
     array('addRouter', 'Magento\App\FrontController'),
     array('addOptionRenderer', 'Magento\Catalog\Block\Product\View\Options'),
     array('addPageHandles', 'Magento\Core\Model\Layout\Update', 'Magento\Core\Model\Layout\Merge'),
@@ -233,9 +233,9 @@ return array(
     array('asSimplexml', 'Magento\Core\Model\Layout\Update', 'Magento\Core\Model\Layout\Merge'),
     array('asString', 'Magento\Core\Model\Layout\Update', 'Magento\Core\Model\Layout\Merge'),
     array('authAdmin'),
-    array('authFailed', '', 'Magento_Core_Helper_Http::failHttpAuthentication()'),
+    array('authFailed', '', '\Magento\HTTP\Authentication::setAuthenticationFailed'),
     array('authFrontend'),
-    array('authValidate', '', 'Magento_Core_Helper_Http::getHttpAuthCredentials()'),
+    array('authValidate', '', '\Magento\HTTP\Authentication::getCredentials'),
     array('baseInit', 'Magento\Core\Model\App'),
     array('bundlesAction', 'Magento\Catalog\Controller\Adminhtml\Product'),
     array('calcTaxAmount', 'Magento\Sales\Model\Quote\Item\AbstractItem'),
@@ -259,7 +259,7 @@ return array(
     array('checkDateTime', 'Magento\Core\Model\Date'),
     array('chooseTemplate', 'Magento\Checkout\Block\Cart'),
     array('cleanCache', 'Magento\Core\Model\Config'),
-    array('cleanDbRow', 'Magento\Core\Model\Resource'),
+    array('cleanDbRow', 'Magento\App\Resource'),
     array('cleanMergedJsCss', 'Magento\Core\Model\Design\Package', 'Magento\Core\Model\Page\Asset\MergeService'),
     array('cleanMergedJsCss', 'Magento\Core\Model\Design\Package\Proxy', 'Magento\Core\Model\Page\Asset\MergeService'),
     array(
@@ -271,8 +271,8 @@ return array(
     array('cleanVarSubFolders', '',
         'glob() on \Magento\App\Dir::getBaseDir(\Magento\Core\Model\App\Dir::VAR_DIR)'),
     array('cloneIndexTable', 'Magento\Index\Model\Resource\AbstractResource'),
-    array('collectRoutes', 'Magento\Backend\Controller\Router\DefaultRouter'),
-    array('collectRoutes', 'Magento\Core\Controller\Varien\Router\Base'),
+    array('collectRoutes', 'Magento\Backend\App\Router\DefaultRouter'),
+    array('collectRoutes', 'Magento\Core\App\Router\Base'),
     array('composeLocaleHierarchy', 'Magento\Core\Helper\Translate'),
     array('convertOldTaxData', 'Magento\Tax\Model\Resource\Setup'),
     array('convertOldTreeToNew', 'Magento\Catalog\Model\Resource\Setup'),
@@ -301,7 +301,7 @@ return array(
     array('fetchUpdatesByHandle', 'Magento\Core\Model\Resource\Layout', 'Magento\Core\Model\Resource\Layout\Update'),
     array('flush', 'Magento\Core\Model\Cache', 'Magento_Cache_FrontendInterface::clean()'),
     array('flush', 'Magento\Core\Model\Cache\Proxy', 'Magento_Cache_FrontendInterface::clean()'),
-    array('flush', 'Magento\Core\Model\CacheInterface', 'Magento_Cache_FrontendInterface::clean()'),
+    array('flush', 'Magento\App\CacheInterface', 'Magento_Cache_FrontendInterface::clean()'),
     array('forsedSave'),
     array('generateBlocks', '', 'generateElements()'),
     array('getAbsolutePath', '', 'normalizePath'),
@@ -337,7 +337,7 @@ return array(
     array('getConfigAsXml','Magento\Widget\Model\Widget'),
     array('getConfigData', 'Magento\Cms\Model\Wysiwyg\Images\Storage'),
     array('getConfigDataModel', 'Magento\Core\Model\Config'),
-    array('getConnectionTypeInstance', 'Magento\Core\Model\Resource'),
+    array('getConnectionTypeInstance', 'Magento\App\Resource'),
     array('getContainers', 'Magento\Core\Model\Layout\Update', 'Magento\Core\Model\Layout\Merge'),
     array('getCustomerData', 'Magento\Sales\Block\Adminhtml\Order\Create\Form\Account'),
     array('getDataForSave', 'Magento\Wishlist\Model\Item'),
@@ -345,7 +345,7 @@ return array(
     array('getDataMaxSizeInBytes', 'Magento\Adminhtml\Block\Media\Uploader', 'Magento_File_Size::getMaxFileSize()'),
     array('getDbAdapter', 'Magento\Core\Model\Cache'),
     array('getDbAdapter', 'Magento\Core\Model\Cache\Proxy'),
-    array('getDbAdapter', 'Magento\Core\Model\CacheInterface'),
+    array('getDbAdapter', 'Magento\App\CacheInterface'),
     array(
         'getDbVendorName',
         'Magento\TestFramework\Bootstrap',
@@ -412,7 +412,7 @@ return array(
     array('getMessageUserCreationProhibited', 'Magento\User\Model\Resource\User'),
     array('getMinQueryLenght'),
     array('getModelClassName', 'Magento\Core\Model\Config'),
-    array('getModuleByName', 'Magento\Core\Controller\Varien\Router\Base'),
+    array('getModuleByName', 'Magento\Core\App\Router\Base'),
     array('getModuleConfigurationFiles', 'Magento\Core\Model\Config'),
     array('getModuleSetup', 'Magento\Core\Model\Config'),
     array('getNeedUsePriceExcludeTax', '', 'Magento_Tax_Model_Config::priceIncludesTax()'),
@@ -446,7 +446,7 @@ return array(
     array('getPathVars', 'Magento\Core\Model\Config'),
     array('getParentProductIds', 'Magento\Catalog\Model\Resource\Product'),
     array('getPostMaxSize', 'Magento\Adminhtml\Block\Media\Uploader', 'Magento_File_Size::getPostMaxSize()'),
-    array('getPriceFormatted', 'Magento\Adminhtml\Block\Customer\Edit\Tab\View\Sales'),
+    array('getPriceFormatted', 'Magento\Customer\Block\Adminhtml\Edit\Tab\View\Sales'),
     array('getPrices', 'Magento\Bundle\Model\Product\Price'),
     array('getPricesDependingOnTax', 'Magento\Bundle\Model\Product\Price'),
     array('getPrintUrl', 'Magento\Checkout\Block\Onepage\Success'),
@@ -486,14 +486,8 @@ return array(
     array('getResourceTypeConfig', 'Magento\Core\Model\Config'),
     array('getResTreeJson', 'Magento\User\Block\Role\Tab\Edit', 'getTree'),
     array('getResTreeJson', 'Magento\Adminhtml\Block\Api\Tab\Rolesedit', 'getTree'),
-    array(
-        'getRouterByRoute',
-        'Magento\App\FrontController',
-        'Magento_Core_Model_RouterList::getRouterByFrontName'
-    ),
-    array('getRouterByFrontName', 'Magento\App\FrontController',
-        'Magento_Core_Model_RouterList::getRouterByFrontName'
-    ),
+    array('getRouterByRoute', 'Magento\App\FrontController'),
+    array('getRouterByFrontName', 'Magento\App\FrontController'),
     array('getRouters', 'Magento\Core\Model\Config'),
     array('getRowId', 'Magento\Sales\Block\Adminhtml\Order\Create\Customer\Grid'),
     array('getRowId', 'Magento\Adminhtml\Block\Widget\Grid'),
@@ -510,7 +504,7 @@ return array(
     array('getStateModelClass', 'Magento\Centinel\Model\Config'),
     array('getStatrupPageUrl'),
     array('getStore', 'Magento\Captcha\Helper\Data'),
-    array('getStore', 'Magento\Adminhtml\Block\Promo\Widget\Chooser\Sku'),
+    array('getStore', 'Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser\Sku'),
     array('getStoreButtonsHtml', 'Magento\Backend\Block\System\Config\Tabs'),
     array('getStoreCodeFromPath', 'Magento\App\Request\Http'),
     array('getStoreCurrency', 'Magento\Sales\Model\Order'),
@@ -522,7 +516,7 @@ return array(
     array('getTablePrefix', 'Magento\Core\Model\Config'),
     array('getTagsByType', 'Magento\Core\Model\Cache', 'Magento_Cache_Frontend_Decorator_TagScope::getTag()'),
     array('getTagsByType', 'Magento\Core\Model\Cache\Proxy', 'Magento_Cache_Frontend_Decorator_TagScope::getTag()'),
-    array('getTagsByType', 'Magento\Core\Model\CacheInterface', 'Magento_Cache_Frontend_Decorator_TagScope::getTag()'),
+    array('getTagsByType', 'Magento\App\CacheInterface', 'Magento_Cache_Frontend_Decorator_TagScope::getTag()'),
     array('getTaxAmount', 'Magento\Sales\Model\Quote\Item\AbstractItem'),
     array('getTaxRatesByProductClass', '', '_getAllRatesByProductClass'),
     array('getTemplateProcessor', 'Magento\Newsletter\Helper\Data',
@@ -681,7 +675,7 @@ return array(
     array('saveConfig', 'Magento\Core\Model\Config'),
     array('saveOptions', 'Magento\Core\Model\Cache'),
     array('saveOptions', 'Magento\Core\Model\Cache\Proxy'),
-    array('saveOptions', 'Magento\Core\Model\CacheInterface'),
+    array('saveOptions', 'Magento\App\CacheInterface'),
     array('saveRow__OLD'),
     array('saveSegmentCustomersFromSelect'),
     array('saveUseCache'),
@@ -705,7 +699,7 @@ return array(
     array('setParentBlock'),
     array('setProduct', 'Magento\Catalog\Model\Product\Type\AbstractType'),
     array('setProfile', 'Magento\Convert\Container\AbstractContainer'),
-    array('setResourceConfig', 'Magento\Core\Model\Resource'),
+    array('setResourceConfig', 'Magento\App\Resource'),
     array('setSaveTemplateFlag', 'Magento\Newsletter\Model\Queue'),
     array('setScriptPath'),
     array('setScriptPath', 'Magento\Core\Block\Template'),
@@ -876,10 +870,71 @@ return array(
     array('_initFrontController', '\Magento\Core\Model\App'),
     array('_getFrontControllerByCurrentArea', '\Magento\Core\Model\App'),
     array('run', '\Magento\Core\Model\AppInterface'),
-    array('setModuleDir', 'Magento\Core\Model\Config\Modules\Reader'),
+    array('setModuleDir', 'Magento\Module\Dir\Reader'),
     array('setModuleDir', 'Magento\Core\Model\Config'),
     array('getAreaConfig', 'Magento\Core\Model\Config'),
+    array('getRandomString', '\Magento\Core\Helper\Data'),
+    array('getHttpHost', '\Magento\Core\Helper\Http'),
+    array('getHttpUserAgent', '\Magento\Core\Helper\Http'),
+    array('getHttpUserAcceptLanguage', '\Magento\Core\Helper\Http'),
+    array('getHttpUserAcceptCharset', '\Magento\Core\Helper\Http'),
+    array('getHttpUserAcceptReferer', '\Magento\Core\Helper\Http'),
+    array('getHttpUserRemoteAddr', '\Magento\Core\Helper\Http'),
+    array('getHttpUserServerAddr', '\Magento\Core\Helper\Http'),
+    array('getEncryptor', '\Magento\Core\Helper\Data', '\Magento\Encryption\Encryptor'),
+    array('getCoreData', '\Magento\Sales\Model\Resource\Setup'),
+    array('encrypt', '\Magento\Core\Helper\Data'),
+    array('decrypt', '\Magento\Core\Helper\Data'),
+    array('validateKey', '\Magento\Core\Helper\Data', '\Magento\Encryption\EncryptorInterface'),
+    array('validateHash', '\Magento\Core\Helper\Data'),
+    array('getHash', '\Magento\Core\Helper\Data'),
+    array('escapeHtml', '\Magento\Core\Helper\AbstractHelper', '\Magento\Escaper::escapeHtml'),
+    array('escapeUrl', '\Magento\Core\Helper\AbstractHelper', '\Magento\Escaper::escapeUrl'),
+    array('jsQuoteEscape', '\Magento\Core\Helper\AbstractHelper', '\Magento\Escaper::escapeJsQuote'),
+    array('quoteEscape', '\Magento\Core\Helper\AbstractHelper', '\Magento\Escaper::escapeQuote'),
+    array('removeTags', '\Magento\Core\Helper\AbstractHelper', '\Magento\Filter\FilterManager'),
+    array('removeAccents', '\Magento\Core\Helper\Data', '\Magento\Filter\FilterManager'),
+    array('splitWords', '\Magento\Core\Helper\String', '\Magento\Filter\FilterManager'),
+    array('strlen', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::strlen'),
+    array('substr', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::substr'),
+    array('strrev', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::strrev'),
+    array('cleanString', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::cleanString'),
+    array('strpos', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::strpos'),
+    array('strSplit', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::split'),
+    array('splitInjection', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::splitInjection'),
+    array('truncate', '\Magento\Core\Helper\String', '\Magento\Filter\Truncate'),
+    array('ksortMultibyte', '\Magento\Core\Helper\String'),
+    array('uc_words'),
+    array('is_empty_date'),
+    array('now'),
+    array('uniqHash', '\Magento\Core\Helper\Data', '\Magento\Math\Random::getUniqueHash'),
+    array('getMerchantCountryCode', '\Magento\Core\Helper\Data', '\Magento\Customer\Helper\Data::getMerchantCountryCode'),
+    array('getMerchantVatNumber', '\Magento\Core\Helper\Data', '\Magento\Customer\Helper\Data::getMerchantVatNumber'),
+    array('isCountryInEU', '\Magento\Core\Helper\Data', '\Magento\Customer\Helper\Data::isCountryInEU'),
+    array('assocToXml', '\Magento\Core\Helper\Data', '\Magento\Convert\ConvertArray::assocToXml'),
+    array('xmlToAssoc', '\Magento\Core\Helper\Data', '\Magento\Convert\Xml::xmlToAssoc'),
+    array('checkLfiProtection', '\Magento\Core\Helper\Data', '\Magento\Filesystem::checkLfiProtection'),
+    array('getProtectedFileExtensions', '\Magento\Core\Helper\Data',
+          '\Magento\Core\Model\File\Validator\NotProtectedExtension::getProtectedFileExtensions'),
+    array('getStoreId', '\Magento\Core\Helper\Data'),
+    array('getExactDivision', '\Magento\Core\Helper\Data', '\Magento\Math\Division::getExactDivision'),
+    array('getPublicFilesValidPath', '\Magento\Core\Helper\Data'),
     array('getViewConfig', '\Magento\Core\Model\View\Config', 'get'),
     array('_getSession', '\Magento\Catalog\Helper\Product\Compare', '$this->_catalogSession'),
     array('getEnginePool', '\Magento\Core\Block\Template\Context', 'getEngineFactory'),
+    array('is_dir_writeable'),
+    array('destruct'),
+    array('mageDebugBacktrace'),
+    array('mageDelTree'),
+    array('mageParseCsv'),
+    array('getHttpAuthCredentials', '\Magento\Core\Helper\Http', '\Magento\HTTP\Authentication::getCredentials'),
+    array('failHttpAuthentication', '\Magento\Core\Helper\Http',
+        '\Magento\HTTP\Authentication::setAuthenticationFailed'
+    ),
+    array('getRequestUri', '\Magento\Core\Helper\Http', '\Magento\HTTP\Header::getRequestUri'),
+    array('validateIpAddr', '\Magento\Core\Helper\Http', '\Zend_Validate_Ip::isValid'),
+    array('getRemoteAddr', '\Magento\Core\Helper\Http', 'Magento\HTTP\PhpEnvironment\RemoteAddress::getRemoteAddress'),
+    array('getServerAddr', '\Magento\Core\Helper\Http', 'Magento\HTTP\PhpEnvironment\ServerAddress::getServerAddress'),
+    array('formatDate', 'Magento\Core\Model\Resource\AbstractResource', '\Magento\Stdlib\DateTime::formatDate'),
+    array('mktime', 'Magento\Core\Model\Resource\AbstractResource', '\Magento\Stdlib\DateTime::toTimestamp'),
 );
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 4d6d59c9447..921b76a3e71 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
@@ -30,7 +30,7 @@ return array(
     array('_addMinimalPrice', 'Magento\Catalog\Model\Resource\Product\Collection'),
     array('_alias', 'Magento\Core\Block\AbstractBlock'),
     array('_anonSuffix'),
-    array('_appMode', 'Magento\Core\Model\ObjectManager\ConfigLoader'),
+    array('_appMode', 'Magento\App\ObjectManager\ConfigLoader'),
     array('_baseDirCache', 'Magento\Core\Model\Config'),
     array('_cacheConf'),
     array('_canUseLocalModules'),
@@ -40,22 +40,22 @@ return array(
     array('_childGroups', 'Magento\Core\Block\AbstractBlock'),
     array('_combineHistory'),
     array('_config', 'Magento\Core\Model\Design\Package'),
-    array('_config', 'Magento\Core\Model\Logger', '_dirs'),
+    array('_config', 'Magento\Logger', '_dirs'),
     array('_config', 'Magento\Core\Model\Resource\Setup'),
     array('_configModel', 'Magento\Backend\Model\Menu\AbstractDirector'),
     array('_configuration', 'Magento\Index\Model\Lock\Storage', '_dirs'),
     array('_connectionConfig', 'Magento\Core\Model\Resource\Setup'),
-    array('_connectionTypes', 'Magento\Core\Model\Resource'),
+    array('_connectionTypes', 'Magento\App\Resource'),
     array('_currency', 'Magento\GoogleCheckout\Model\Api\Xml\Checkout'),
     array('_currencyNameTable'),
     array('_customEtcDir', 'Magento\Core\Model\Config'),
     array('_defaultTemplates', 'Magento\Core\Model\Email\Template'),
     array('_designProductSettingsApplied'),
     array('_directOutput', 'Magento\Core\Model\Layout'),
-    array('_dirs', 'Magento\Core\Model\Resource'),
+    array('_dirs', 'Magento\App\Resource'),
     array('_distroServerVars'),
     array('_entityIdsToIncrementIds'),
-    array('entities', 'Magento\Core\Model\Resource'),
+    array('entities', 'Magento\App\Resource'),
     array('_entityTypeIdsToTypes'),
     array('_factory', 'Magento\Backend\Model\Menu\Config'),
     array('_factory', 'Magento\Backend\Model\Menu\AbstractDirector', '_commandFactory'),
@@ -67,7 +67,7 @@ return array(
     array('_loadDefault', 'Magento\Core\Model\Resource\Website\Collection'),
     array('_mapper', 'Magento\ObjectManager\Config\Reader\Dom'),
     array('_menu', 'Magento\Backend\Model\Menu\Builder'),
-    array('_modulesReader', 'Magento\Core\Model\ObjectManager\ConfigLoader'),
+    array('_modulesReader', 'Magento\App\ObjectManager\ConfigLoader'),
     array('_moduleReader', 'Magento\Backend\Model\Menu\Config'),
     array('_option', 'Magento\Captcha\Helper\Data', '_dirs'),
     array('_options', 'Magento\Core\Model\Config', 'Magento\App\Dir'),
@@ -79,7 +79,7 @@ return array(
     array('_persistentCustomerGroupId'),
     array('_queriesHooked', 'Magento\Core\Model\Resource\Setup'),
     array('_ratingOptionTable', 'Magento\Rating\Model\Resource\Rating\Option\Collection'),
-    array('_readerFactory', 'Magento\Core\Model\ObjectManager\ConfigLoader'),
+    array('_readerFactory', 'Magento\App\ObjectManager\ConfigLoader'),
     array('_resourceConfig', 'Magento\Core\Model\Resource\Setup'),
     array('_saveTemplateFlag', 'Magento\Newsletter\Model\Queue'),
     array('_searchTextFields'),
@@ -106,7 +106,6 @@ return array(
     array('_useAnalyticFunction'),
     array('_defaultIndexer', 'Magento\CatalogInventory\Model\Resource\Indexer\Stock'),
     array('_engine', 'Magento\CatalogSearch\Model\Resource\Fulltext'),
-    array('_moduleNamespaces', 'Magento\Core\Model\Config'),
     array('_allowedAreas', 'Magento\Core\Model\Config'),
     array('_app', 'Magento\Core\Block\AbstractBlock'),
     array('_app', 'Magento\Core\Block\Template'),
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 f51bc4fce82..48008e71d27 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
@@ -38,14 +38,10 @@ 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
 lib/Magento/Data/Collection/Db/FetchStrategy/Cache.php
@@ -94,8 +90,8 @@ lib/Magento/Data/Tree/Db.php
 lib/Magento/Data/Tree/Dbp.php
 lib/Magento/Data/Tree/Node.php
 lib/Magento/Data/Tree/Node/Collection.php
-lib/Magento/Date.php
 lib/Magento/DB
+lib/Magento/Stdlib/DateTime.php
 lib/Magento/Debug.php
 lib/Magento/Event.php
 lib/Magento/Event
@@ -103,7 +99,6 @@ lib/Magento/File/Csv.php
 lib/Magento/File/CsvMulty.php
 lib/Magento/File/Transfer/Adapter/Http.php
 lib/Magento/File/Uploader.php
-lib/Magento/Filter
 lib/Magento/Gdata
 lib/Magento/HTTP/Adapter/Curl.php
 lib/Magento/HTTP/Client.php
@@ -121,6 +116,3 @@ lib/Magento/Simplexml
 lib/Magento/System
 lib/Magento/Util.php
 lib/Magento/Xml
-lib/Magento/Validator
-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/phpcpd/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt
index 2b12c8effe6..fe12bc4fcae 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt
@@ -7,6 +7,7 @@ Magento/Catalog/Block/Product/ProductList
 Magento/Catalog/Model/Category/Attribute/Source
 Magento/Catalog/Model/Category/Indexer
 Magento/Catalog/Model/Product
+Magento/Core/Model/Resource/Design
 Zend
 downloader
 dev
@@ -39,12 +40,15 @@ Magento/Sales/Controller/Adminhtml/Order
 Magento/Sales/Model/Resource/Helper
 Magento/Sales/Model/Resource/Order
 Magento/Catalog/Model/Resource/Product
+Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab
 Magento/Checkout/Block/Onepage
+Magento/Cms/Block/Adminhtml/Page/Edit
 Magento/Core/Model/Design/Backend
 Magento/Core/Model/Layout/File/Source/Override
 Magento/Core/Model/Store
 Magento/Cron/Model/Config/Backend/Product
 Magento/Customer/Block/Account/Dashboard
+Magento/Customer/Block/Adminhtml/Edit/Tab
 Magento/Customer/Model/Config/Backend/Show
 Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code
 Magento/DesignEditor/Block/Adminhtml/Theme/Selector/Tab
@@ -68,6 +72,7 @@ Magento/Sales/Block/Adminhtml
 Magento/Sales/Model/Resource
 Magento/Sales/Model/Quote/Address/Total
 Magento/Sales/Model/Resource/Report/Order
+Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab
 Magento/Shipping/Model/Carrier
 Magento/CatalogRule/Model
 Magento/Tax/Block/Checkout
@@ -95,3 +100,4 @@ Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit
 Magento/User/Block/User/Edit
 var/generation
 Magento/Newsletter/Model/Template/Filter
+
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
index 0e31503b64c..b3f11828c12 100644
--- 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
@@ -15,23 +15,21 @@ app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php
 # Formatter intorduces long line
 app/code/Magento/Catalog/Block/Adminhtml/Product/Options/Ajax.php
 # Formatter intorduces long line
-app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php
+app/code/Magento/Cms/Block/Adminhtml/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
+app/code/Magento/Backend/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
+dev/tests/functional-old
 # PSR-1 not applied to
 dev/tests/js
 # Example files that are expected to fail code sniffer
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/ruleset.xml b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/ruleset.xml
index f5d34c3cd44..63a04bb2144 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/ruleset.xml
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/ruleset.xml
@@ -40,6 +40,7 @@
     <rule ref="PEAR.NamingConventions.ValidClassName"/>
     <rule ref="Squiz.Functions.GlobalFunction"/>
     <rule ref="Zend.NamingConventions.ValidVariableName">
+        <!-- Excluding as it conflicts with the PSR2 standard which over rides this one -->
         <exclude name="Zend.NamingConventions.ValidVariableName.PrivateNoUnderscore"/>
     </rule>
     <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
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 85e7a4d5454..aa62825238e 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
@@ -2,17 +2,15 @@
 # Glob patterns are supported
 #
 app/bootstrap.php
-app/code/Magento/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php
-app/code/Magento/Adminhtml/Block/Customer/Edit/Tab/Account.php
 app/code/Magento/Adminhtml/Model/Observer.php
 app/code/Magento/Adminhtml/Block/Urlrewrite
 app/code/Magento/Adminhtml/Block/Page/System/Config/Robots/Reset.php
-app/code/Magento/Adminhtml/Block/System/Store/Edit
-app/code/Magento/Adminhtml/Block/System/Store/Edit.php
 app/code/Magento/Adminhtml/Controller/Report/Customer.php
 app/code/Magento/Adminhtml/Controller/Report/Product.php
 app/code/Magento/Adminhtml/Controller/Report/Product.php
 app/code/Magento/Adminhtml/Controller/Urlrewrite.php
+app/code/Magento/Backend/Block/System/Store/Edit
+app/code/Magento/Backend/Block/System/Store/Edit.php
 app/code/Magento/Bundle/Model/Plugin
 app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php
 app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php
@@ -39,6 +37,7 @@ app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php
 app/code/Magento/Centinel/Model/State/Jcb.php
 app/code/Magento/Checkout/Block/Cart/Link.php
 app/code/Magento/Checkout/Block/Link.php
+app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php
 app/code/Magento/Cms/Controller/Router.php
 app/code/Magento/Cms/Model/Template/FilterProvider.php
 app/code/Magento/Core/data
@@ -49,14 +48,11 @@ app/code/Magento/Core/Model/DataService
 app/code/Magento/Core/Model/Design.php
 app/code/Magento/Core/Model/Email/Template/Config
 app/code/Magento/Core/Model/Email/Template/Config.php
-app/code/Magento/Core/Model/EntryPoint
-app/code/Magento/Core/Model/AbstractEntryPoint.php
 app/code/Magento/Core/Model/Layout/Factory.php
 app/code/Magento/Core/Model/Layout/Update.php
 app/code/Magento/Core/Model/Layout/Argument
 app/code/Magento/Core/Model/Locale/Validator.php
 app/code/Magento/Core/Model/LocaleInterface.php
-app/code/Magento/Core/Model/ObjectManager
 app/code/Magento/Core/Model/Page
 app/code/Magento/Core/Model/Page.php
 app/code/Magento/Core/Model/Resource/Theme
@@ -78,6 +74,7 @@ app/code/Magento/Cron/Model/Config.php
 app/code/Magento/Cron/Model/ConfigInterface.php
 app/code/Magento/Directory/Helper
 app/code/Magento/Customer/Block/Account/{Authorization,Register}Link.php
+app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php
 app/code/Magento/Customer/Model/Address/Config
 app/code/Magento/Customer/Model/Address/Config.php
 app/code/Magento/Directory/Model/Currency/DefaultLocator.php
@@ -103,11 +100,7 @@ app/code/Magento/Index/Model/Indexer/Config.php
 app/code/Magento/Index/Model/Indexer/ConfigInterface.php
 app/code/Magento/Index/Model/Indexer/Factory.php
 app/code/Magento/Index/Model/Indexer/AbstractIndexer.php
-app/code/Magento/Index/Model/EntryPoint/Shell.php
-app/code/Magento/Index/Model/EntryPoint/Indexer.php
 app/code/Magento/Index/Model/Shell.php
-app/code/Magento/Install/Model/EntryPoint
-app/code/Magento/Log/Model/EntryPoint
 app/code/Magento/Log/Model/Resource/Helper.php
 app/code/Magento/Log/Model/Resource/Shell.php
 app/code/Magento/Log/Model/Shell.php
@@ -148,7 +141,8 @@ lib/Magento/Backup/Db
 lib/Magento/Backup/Factory.php
 lib/Magento/Cache/Core.php
 lib/Magento/Convert
-lib/Magento/Date.php
+lib/Magento/Stdlib/DateTime.php
 lib/Magento/Object.php
 lib/Magento/App
+lib/Magento/ObjectManager
 lib/Magento/View
diff --git a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php
index 64a3009dc11..c9c872acdb3 100644
--- a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php
+++ b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php
@@ -90,6 +90,9 @@ class Adminhtml extends \PHPUnit_Framework_TestCase
     /** @var  \PHPUnit_Framework_MockObject_MockObject|\Magento\Core\Model\LocaleInterface */
     protected $_localeMock;
 
+    /** @var  \PHPUnit_Framework_MockObject_MockObject|\Magento\Math\Random */
+    protected $_mathMock;
+
     protected function setUp()
     {
         // These mocks are accessed via context
@@ -103,9 +106,9 @@ class Adminhtml extends \PHPUnit_Framework_TestCase
         $this->_eventManagerMock    = $this->_makeMock('Magento\Event\ManagerInterface');
         $this->_controllerMock      = $this->_makeMock('Magento\App\FrontController');
         $this->_dirMock             = $this->_makeMock('Magento\App\Dir');
-        $this->_loggerMock          = $this->_makeMock('Magento\Core\Model\Logger');
+        $this->_loggerMock          = $this->_makeMock('Magento\Logger');
         $this->_filesystemMock      = $this->_makeMock('Magento\Filesystem');
-        $this->_cacheMock           = $this->_makeMock('Magento\Core\Model\CacheInterface');
+        $this->_cacheMock           = $this->_makeMock('Magento\App\CacheInterface');
         $this->_storeConfigMock     = $this->_makeMock('Magento\Core\Model\Store\Config');
         $this->_storeManagerMock    = $this->_makeMock('Magento\Core\Model\StoreManager');
         $this->_helperFactoryMock   = $this->_makeMock('Magento\Core\Model\Factory\Helper');
@@ -116,8 +119,14 @@ class Adminhtml extends \PHPUnit_Framework_TestCase
         $authorizationMock          = $this->_makeMock('Magento\AuthorizationInterface');
         $cacheStateMock             = $this->_makeMock('Magento\Core\Model\Cache\StateInterface');
         $appMock                    = $this->_makeMock('Magento\Core\Model\App');
+        $escaperMock                = $this->_makeMock('Magento\Escaper');
+        $filterManagerMock          = $this->_makeMock('Magento\Filter\FilterManager');
         $backendSessionMock         = $this->_makeMock('Magento\Backend\Model\Session');
         $this->_localeMock          = $this->_makeMock('Magento\Core\Model\LocaleInterface');
+        $appState                   = $this->_makeMock('Magento\App\State');
+        $this->_mathMock            = $this->_makeMock('Magento\Math\Random');
+
+        $appState->setAreaCode(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
 
         $this->_translatorMock
             ->expects($this->any())
@@ -147,8 +156,12 @@ class Adminhtml extends \PHPUnit_Framework_TestCase
             $templateFactoryMock,
             $authorizationMock,
             $appMock,
+            $appState,
+            $escaperMock,
+            $filterManagerMock,
             $backendSessionMock,
-            $this->_localeMock
+            $this->_localeMock,
+            $this->_mathMock
         );
     }
 
diff --git a/dev/tests/unit/framework/bootstrap.php b/dev/tests/unit/framework/bootstrap.php
index 80d8bf18901..6f62ed8039e 100755
--- a/dev/tests/unit/framework/bootstrap.php
+++ b/dev/tests/unit/framework/bootstrap.php
@@ -25,7 +25,8 @@
 define('BP', realpath(__DIR__ . '/../../../../'));
 define('TESTS_TEMP_DIR', dirname(__DIR__) . DIRECTORY_SEPARATOR . 'tmp');
 define('DS', DIRECTORY_SEPARATOR);
-require BP . '/app/code/Magento/Core/functions.php';
+
+require BP . '/app/functions.php';
 require BP . '/app/autoload.php';
 \Magento\Autoload\IncludePath::addIncludePath(array(
     __DIR__,
diff --git a/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php b/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php
index f1a4503a09d..ea326c7cd0e 100644
--- a/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php
+++ b/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php
@@ -39,7 +39,7 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
         'layout'          => 'Magento\View\LayoutInterface',
         'eventManager'    => 'Magento\Event\ManagerInterface',
         'translator'      => 'Magento\Core\Model\Translate',
-        'cache'           => 'Magento\Core\Model\CacheInterface',
+        'cache'           => 'Magento\App\CacheInterface',
         'design'          => 'Magento\View\DesignInterface',
         'session'         => 'Magento\Core\Model\Session',
         'storeConfig'     => 'Magento\Core\Model\Store\Config',
@@ -53,7 +53,7 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
      */
     protected $_modelDependencies = array(
         'eventDispatcher'    => 'Magento\Event\ManagerInterface',
-        'cacheManager'       => 'Magento\Core\Model\CacheInterface',
+        'cacheManager'       => 'Magento\App\CacheInterface',
         'resource'           => 'Magento\Core\Model\Resource\AbstractResource',
         'resourceCollection' => 'Magento\Data\Collection\Db'
     );
@@ -72,15 +72,17 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
         }
 
         $area = 'frontend';
-        /** @var $layoutMock \Magento\Core\Model\Layout */
-        $layoutMock = $this->getMockBuilder('Magento\View\LayoutInterface')->getMockForAbstractClass();
-        $layoutMock->expects($this->once())
-            ->method('getArea')
-            ->will($this->returnValue($area));
+        /** @var $appStateMock \Magento\App\State|\PHPUnit_Framework_MockObject_MockObject */
+        $appStateMock = $this->getMock('Magento\App\State', array('getAreaCode'), array(), '', false);
+        $appStateMock->expects($this->once())->method('getAreaCode')->will($this->returnValue($area));
+
+        $context = $objectManager->getObject('Magento\Core\Block\Template\Context');
+        $appStateProperty = new \ReflectionProperty('Magento\Core\Block\Template\Context', '_appState');
+        $appStateProperty->setAccessible(true);
+        $appStateProperty->setValue($context, $appStateMock);
 
-        $arguments = array('layout' => $layoutMock);
         /** @var $template \Magento\Core\Block\Template */
-        $template = $objectManager->getObject('Magento\Core\Block\Template', $arguments);
+        $template = $objectManager->getObject('Magento\Core\Block\Template', array('context' => $context));
         $this->assertEquals($area, $template->getArea());
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Acl/Resource/ProviderTest.php b/dev/tests/unit/testsuite/Magento/Acl/Resource/ProviderTest.php
index 77a9b25b8fe..99b0e80021e 100644
--- a/dev/tests/unit/testsuite/Magento/Acl/Resource/ProviderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Acl/Resource/ProviderTest.php
@@ -38,23 +38,23 @@ class ProviderTest extends \PHPUnit_Framework_TestCase
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_configScopeMock;
+    protected $_treeBuilderMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\State|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_treeBuilderMock;
+    protected $_appState;
 
     protected function setUp()
     {
         $this->_configReaderMock = $this->getMock('Magento\Config\ReaderInterface');
-        $this->_configScopeMock = $this->getMock('Magento\Config\ScopeInterface');
+        $this->_appState = $this->getMock('Magento\App\State', array('getAreaCode'), array(), '', false);
         $this->_treeBuilderMock =
             $this->getMock('Magento\Acl\Resource\TreeBuilder', array(), array(), '', false);
         $this->_model = new \Magento\Acl\Resource\Provider(
             $this->_configReaderMock,
-            $this->_configScopeMock,
-            $this->_treeBuilderMock
+            $this->_treeBuilderMock,
+            $this->_appState
         );
     }
 
@@ -62,7 +62,7 @@ class ProviderTest extends \PHPUnit_Framework_TestCase
     {
         $aclResourceConfig['config']['acl']['resources'] = array('ExpectedValue');
         $scope = 'scopeName';
-        $this->_configScopeMock->expects($this->once())->method('getCurrentScope')->will($this->returnValue($scope));
+        $this->_appState->expects($this->once())->method('getAreaCode')->will($this->returnValue($scope));
         $this->_configReaderMock->expects($this->once())
             ->method('read')->with($scope)->will($this->returnValue($aclResourceConfig));
         $this->_treeBuilderMock->expects($this->once())
@@ -73,7 +73,7 @@ class ProviderTest extends \PHPUnit_Framework_TestCase
     public function testGetIfAclResourcesEmpty()
     {
         $scope = 'scopeName';
-        $this->_configScopeMock->expects($this->once())->method('getCurrentScope')->will($this->returnValue($scope));
+        $this->_appState->expects($this->once())->method('getAreaCode')->will($this->returnValue($scope));
         $this->_configReaderMock->expects($this->once())
             ->method('read')->with($scope)->will($this->returnValue(array()));
         $this->_treeBuilderMock->expects($this->never())->method('build');
diff --git a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/SecurityTest.php b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/SecurityTest.php
index 785d5112869..efff85fdf5c 100644
--- a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/SecurityTest.php
+++ b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/SecurityTest.php
@@ -53,7 +53,7 @@ class SecurityTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         //Prepare objects for constructor
-        $this->_cacheMock = $this->getMock('Magento\Core\Model\CacheInterface');
+        $this->_cacheMock = $this->getMock('Magento\App\CacheInterface');
         $this->_storeConfigMock = $this->getMock('Magento\Core\Model\Store\Config',
             array('getConfig'), array(), '', false);
         $this->_curlFactoryMock = $this->getMock('Magento\HTTP\Adapter\CurlFactory',
diff --git a/dev/tests/unit/testsuite/Magento/Adminhtml/Block/Page/System/Config/Robots/ResetTest.php b/dev/tests/unit/testsuite/Magento/Adminhtml/Block/Page/System/Config/Robots/ResetTest.php
index 1fb038fd69a..73fdb3df357 100644
--- a/dev/tests/unit/testsuite/Magento/Adminhtml/Block/Page/System/Config/Robots/ResetTest.php
+++ b/dev/tests/unit/testsuite/Magento/Adminhtml/Block/Page/System/Config/Robots/ResetTest.php
@@ -70,7 +70,7 @@ class ResetTest extends \PHPUnit_Framework_TestCase
             ->method('get')
             ->with('Magento\Core\Model\Registry')
             ->will($this->returnValue($coreRegisterMock));
-        \Magento\Core\Model\ObjectManager::setInstance($objectManagerMock);
+        \Magento\App\ObjectManager::setInstance($objectManagerMock);
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Adminhtml/DashboardTest.php b/dev/tests/unit/testsuite/Magento/Adminhtml/DashboardTest.php
index 43a5caa5ff4..5dfb0e59451 100644
--- a/dev/tests/unit/testsuite/Magento/Adminhtml/DashboardTest.php
+++ b/dev/tests/unit/testsuite/Magento/Adminhtml/DashboardTest.php
@@ -128,11 +128,11 @@ class DashboardTest extends \PHPUnit_Framework_TestCase
             ->method('create')
             ->with('Magento\HTTP\ZendClient')
             ->will($this->throwException($exceptionMock));
-        $loggerMock = $this->getMock('Magento\Core\Model\Logger', array('logException'), array(), '', false);
+        $loggerMock = $this->getMock('Magento\Logger', array('logException'), array(), '', false);
         $loggerMock->expects($this->once())->method('logException')->with($exceptionMock);
         $objectManager->expects($this->at(2))
             ->method('get')
-            ->with('Magento\Core\Model\Logger')
+            ->with('Magento\Logger')
             ->will($this->returnValue($loggerMock));
 
         $this->_response->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Adminhtml/Model/LayoutUpdate/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Adminhtml/Model/LayoutUpdate/ValidatorTest.php
index fcbfc7e2cf8..31c776f5af8 100644
--- a/dev/tests/unit/testsuite/Magento/Adminhtml/Model/LayoutUpdate/ValidatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Adminhtml/Model/LayoutUpdate/ValidatorTest.php
@@ -46,7 +46,7 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase
      */
     protected function _createValidator($layoutUpdate, $isSchemaValid = true)
     {
-        $modulesReader = $this->getMockBuilder('Magento\Core\Model\Config\Modules\Reader')
+        $modulesReader = $this->getMockBuilder('Magento\Module\Dir\Reader')
             ->disableOriginalConstructor()
             ->getMock();
         $modulesReader->expects($this->exactly(2))
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/FileResolver/PrimaryTest.php b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/PrimaryTest.php
similarity index 92%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Config/FileResolver/PrimaryTest.php
rename to dev/tests/unit/testsuite/Magento/App/Config/FileResolver/PrimaryTest.php
index 4363a073a3c..518b774b0d0 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/FileResolver/PrimaryTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/PrimaryTest.php
@@ -21,12 +21,12 @@
  * @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\Config\FileResolver;
+namespace Magento\App\Config\FileResolver;
 
 class PrimaryTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Config\FileResolver\Primary
+     * @var \Magento\App\Config\FileResolver\Primary
      */
     protected $_model;
 
@@ -42,7 +42,7 @@ class PrimaryTest extends \PHPUnit_Framework_TestCase
             ->with(\Magento\App\Dir::CONFIG)
             ->will($this->returnValue($appConfigDir));
 
-        $this->_model = new \Magento\Core\Model\Config\FileResolver\Primary($applicationDirsMock);
+        $this->_model = new \Magento\App\Config\FileResolver\Primary($applicationDirsMock);
     }
 
     /**
diff --git a/app/code/Magento/Page/view/frontend/page_fragment.phtml b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/app/etc/config.xml
similarity index 91%
rename from app/code/Magento/Page/view/frontend/page_fragment.phtml
rename to dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/app/etc/config.xml
index aacde2c9dc2..f6c9778e915 100644
--- a/app/code/Magento/Page/view/frontend/page_fragment.phtml
+++ b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/app/etc/config.xml
@@ -1,4 +1,5 @@
-<?php
+<?xml version="1.0"?>
+<!--
 /**
  * Magento
  *
@@ -18,10 +19,11 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    design
+ * @category    Magento
  * @package     Magento_Core
+ * @subpackage  unit_tests
  * @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)
  */
-?>
-<?php echo $this->getChildHtml() ?>
\ No newline at end of file
+-->
+<config/>
diff --git a/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/app/etc/custom/config.xml b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/app/etc/custom/config.xml
new file mode 100644
index 00000000000..f6c9778e915
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/app/etc/custom/config.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Magento
+ * @package     Magento_Core
+ * @subpackage  unit_tests
+ * @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/>
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/_files/Acme/Subscriber/etc/module.xml b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/primary/app/etc/di.xml
similarity index 91%
rename from dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/_files/Acme/Subscriber/etc/module.xml
rename to dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/primary/app/etc/di.xml
index 3c8188df6d8..b75f5d5381c 100644
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/_files/Acme/Subscriber/etc/module.xml
+++ b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/primary/app/etc/di.xml
@@ -23,6 +23,4 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<config>
-    <module name="Acme_Subscriber" version="0.0.1" active="true" />
-</config>
+<config/>
diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Model/Subscription/_files/Acme/Subscriber/etc/module.xml b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/primary/app/etc/some_config/di.xml
similarity index 91%
rename from dev/tests/integration/testsuite/Magento/Webhook/Model/Subscription/_files/Acme/Subscriber/etc/module.xml
rename to dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/primary/app/etc/some_config/di.xml
index 0ca00952114..b75f5d5381c 100644
--- a/dev/tests/integration/testsuite/Magento/Webhook/Model/Subscription/_files/Acme/Subscriber/etc/module.xml
+++ b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/_files/primary/app/etc/some_config/di.xml
@@ -23,6 +23,4 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<config>
-    <module name="Acme_Subscriber" version="1.0.0.1" active="true" />
-</config>
+<config/>
diff --git a/dev/tests/unit/testsuite/Magento/App/Config/LoaderTest.php b/dev/tests/unit/testsuite/Magento/App/Config/LoaderTest.php
new file mode 100644
index 00000000000..204ab3ee606
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/Config/LoaderTest.php
@@ -0,0 +1,76 @@
+<?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\App\Config;
+
+class LoaderTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\App\Config\Loader
+     */
+    protected $_model;
+
+    /**
+     * @var \Magento\App\Dir | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_dirs;
+
+    public function setUp()
+    {
+        $this->_dirs = $this->getMock('\Magento\App\Dir', array('getDir'), array(), '', false);
+    }
+
+    public function testWithOneXmlFile()
+    {
+        $this->_dirs->expects($this->once())->method('getDir')->will($this->returnValue(__DIR__ . '/_files'));
+        $this->_model = new \Magento\App\Config\Loader($this->_dirs);
+        $expected = array(
+            'resource' => 'resource name',
+            'connection' => 'connection name',
+            'other' => 'other value',
+        );
+        $this->assertEquals($expected, $this->_model->load());
+    }
+
+    public function testWithTwoXmlFileMerging()
+    {
+        $this->_dirs->expects($this->once())->method('getDir')->will($this->returnValue(__DIR__ . '/_files'));
+        $this->_model = new \Magento\App\Config\Loader($this->_dirs, 'other/local_developer.xml');
+        $expected = array(
+            'resource' => 'resource name2',
+            'connection' => 'connection name2',
+            'other' => 'new other value',
+            'new' => 'new value',
+        );
+        $this->assertEquals($expected, $this->_model->load());
+    }
+
+    public function testWithoutXmlFiles()
+    {
+        $this->_dirs->expects($this->once())->method('getDir')->will($this->returnValue(__DIR__ . '/notExistFolder'));
+        $this->_model = new \Magento\App\Config\Loader($this->_dirs);
+        $this->assertEquals(array(), $this->_model->load());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/App/Config/_files/local.xml b/dev/tests/unit/testsuite/Magento/App/Config/_files/local.xml
new file mode 100644
index 00000000000..e14230a3d40
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/Config/_files/local.xml
@@ -0,0 +1,30 @@
+<?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>
+    <resource>resource name</resource>
+    <connection>connection name</connection>
+    <other>other value</other>
+</config>
diff --git a/dev/tests/unit/testsuite/Magento/App/Config/_files/other/local_developer.xml b/dev/tests/unit/testsuite/Magento/App/Config/_files/other/local_developer.xml
new file mode 100644
index 00000000000..9b17bb0856a
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/Config/_files/other/local_developer.xml
@@ -0,0 +1,31 @@
+<?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>
+    <resource>resource name2</resource>
+    <connection>connection name2</connection>
+    <other>new other value</other>
+    <new>new value</new>
+</config>
diff --git a/dev/tests/unit/testsuite/Magento/App/ConfigTest.php b/dev/tests/unit/testsuite/Magento/App/ConfigTest.php
new file mode 100644
index 00000000000..58724b2ce03
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/ConfigTest.php
@@ -0,0 +1,74 @@
+<?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\App;
+
+class ConfigTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\App\Config
+     */
+    protected $_config;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_loaderMock;
+
+    protected function setUp()
+    {
+        $this->_loaderMock = $this->getMock('Magento\App\Config\Loader', array(), array(), '', false);
+        $params = array(
+          'connection' => array('default' => array('connection_name')),
+          'resource' => array('name' => array('default_setup'))
+        );
+        $this->_loaderMock->expects($this->any())->method('load')->will($this->returnValue($params));
+        $this->_config = new \Magento\App\Config(
+            array(),
+            $this->_loaderMock
+        );
+    }
+
+    /**
+     * @param string $connectionName
+     * @param array|null $connectionDetail
+     * @dataProvider getConnectionDataProvider
+     */
+    public function testGetConnection($connectionDetail, $connectionName)
+    {
+        $this->assertEquals($connectionDetail, $this->_config->getConnection($connectionName));
+    }
+
+    public function getConnectionDataProvider()
+    {
+        return array(
+            'connection_name_exist' => array(array('connection_name'), 'default'),
+            'connection_name_not_exist' => array(null, 'new_default')
+        );
+    }
+
+    public function testGetConnections()
+    {
+        $this->assertEquals(array('default' => array('connection_name')), $this->_config->getConnections());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/App/CronTest.php b/dev/tests/unit/testsuite/Magento/App/CronTest.php
new file mode 100644
index 00000000000..e73c8d5e316
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/CronTest.php
@@ -0,0 +1,64 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\App;
+
+class CronTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\App\Cron
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_eventManagerMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_configScopeMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_stateMock;
+
+    protected function setUp()
+    {
+        $this->_eventManagerMock = $this->getMock('Magento\Event\ManagerInterface');
+        $this->_stateMock = $this->getMock('Magento\App\State', array(), array(), '', false);
+        $this->_model = new Cron(
+            $this->_eventManagerMock,
+            $this->_stateMock
+        );
+    }
+
+    public function testExecuteDispatchesCronEvent()
+    {
+        $this->_stateMock->expects($this->once())->method('setAreaCode')->with('crontab');
+        $this->_eventManagerMock->expects($this->once())->method('dispatch')->with('default');
+        $this->assertEquals(0, $this->_model->execute());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/App/Dir/VerificationTest.php b/dev/tests/unit/testsuite/Magento/App/Dir/VerificationTest.php
index 3c6bc232a4e..11a250abf17 100644
--- a/dev/tests/unit/testsuite/Magento/App/Dir/VerificationTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Dir/VerificationTest.php
@@ -69,7 +69,11 @@ class VerificationTest extends \PHPUnit_Framework_TestCase
     protected function _createModelForVerification($mode, $isExist, &$actualCreatedDirs, &$actualVerifiedDirs)
     {
         $dirs = new \Magento\App\Dir('base_dir');
-        $appState = new \Magento\App\State(time(), $mode);
+        $appState = new \Magento\App\State(
+            $this->getMockForAbstractClass('Magento\Config\ScopeInterface', array(), '', false),
+            time(),
+            $mode
+        );
 
         $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
         $filesystem->expects($this->any())
@@ -151,7 +155,10 @@ class VerificationTest extends \PHPUnit_Framework_TestCase
             'Cannot create or verify write access: base_dir/var/log, base_dir/var/session');
 
         $dirs = new \Magento\App\Dir('base_dir');
-        $appState = new \Magento\App\State(time());
+        $appState = new \Magento\App\State(
+            $this->getMockForAbstractClass('Magento\Config\ScopeInterface', array(), '', false),
+            time()
+        );
 
         $callback = function ($dir) {
             if (($dir == 'base_dir/var/log') || ($dir == 'base_dir/var/session')) {
@@ -179,7 +186,10 @@ class VerificationTest extends \PHPUnit_Framework_TestCase
             'Cannot create or verify write access: base_dir/var/log, base_dir/var/session');
 
         $dirs = new \Magento\App\Dir('base_dir');
-        $appState = new \Magento\App\State(time());
+        $appState = new \Magento\App\State(
+            $this->getMockForAbstractClass('Magento\Config\ScopeInterface', array(), '', false),
+            time()
+        );
 
         $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
         $filesystem->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/App/EntryPoint/EntryPointTest.php b/dev/tests/unit/testsuite/Magento/App/EntryPoint/EntryPointTest.php
new file mode 100644
index 00000000000..425626d29a7
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/EntryPoint/EntryPointTest.php
@@ -0,0 +1,89 @@
+<?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\App\EntryPoint;
+
+class EntryPointTest extends  \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\App\EntryPoint\EntryPoint
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_objectManagerMock;
+
+    /**
+     * @var string
+     */
+    protected $_rootDir;
+
+    /**
+     * @var array()
+     */
+    protected $_parameters;
+
+    protected function setUp()
+    {
+        $this->_parameters = array(
+            'MAGE_MODE' => 'developer',
+        );
+        $this->_objectManagerMock = $this->getMock('Magento\ObjectManager');
+        $this->_rootDir = realpath(__DIR__ . '/../../../../../../../');
+        $this->_model = new \Magento\App\EntryPoint\EntryPoint(
+            $this->_rootDir,
+            $this->_parameters,
+            $this->_objectManagerMock
+        );
+    }
+
+    public function testRunExecutesApplication()
+    {
+        $applicationName = '\Magento\App\TestApplication';
+        $applicationMock = $this->getMock('\Magento\AppInterface');
+        $applicationMock->expects($this->once())->method('execute')->will($this->returnValue(0));
+        $this->_objectManagerMock->expects($this->once())->method('create')->with($applicationName, array())
+            ->will($this->returnValue($applicationMock));
+
+        $this->assertEquals(0, $this->_model->run($applicationName));
+    }
+
+    public function testRunCatchesExceptionThrownByApplication()
+    {
+        $applicationName = '\Magento\App\TestApplication';
+        $applicationMock = $this->getMock('\Magento\AppInterface');
+        $applicationMock->expects($this->once())
+            ->method('execute')
+            ->will($this->throwException(new \Exception('Something went wrong.')));
+        $this->_objectManagerMock->expects($this->once())
+            ->method('create')
+            ->with($applicationName, array())
+            ->will($this->returnValue($applicationMock));
+        // clean output
+        ob_start();
+        $this->assertEquals(1, $this->_model->run($applicationName));
+        ob_end_clean();
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php b/dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php
new file mode 100644
index 00000000000..beee931fd0c
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php
@@ -0,0 +1,130 @@
+<?php
+/**
+ * Unit Test for \Magento\App\Error\Handler
+ *
+ * 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\App\Error;
+
+class HandlerTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_loggerMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_dirMock;
+
+    /**
+     * @var  \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_appStateMock;
+
+    protected function setUp()
+    {
+        $this->_loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false);
+        $this->_dirMock = $this->getMock('Magento\App\Dir', array(), array(BP), '', true);
+        $this->_appStateMock = $this->getMock('Magento\App\State', array(), array(), '', false);
+    }
+
+    /**
+     * @covers \Magento\Error\Handler::__construct
+     * @covers \Magento\Error\Handler::processException
+     */
+    public function testProcessExceptionPrint()
+    {
+        $handler = new \Magento\App\Error\Handler($this->_loggerMock, $this->_dirMock, $this->_appStateMock);
+        $this->_appStateMock->expects($this->any())->method('getMode')
+            ->will($this->returnValue(\Magento\App\State::MODE_DEVELOPER));
+        $exception = new \Exception('TestMessage');
+
+        ob_start();
+        $handler->processException($exception);
+        $actualResult = ob_get_contents();
+        ob_end_clean();
+        $this->assertRegExp('/TestMessage/', $actualResult);
+    }
+
+    /**
+     * @covers \Magento\Error\Handler::__construct
+     * @covers \Magento\Error\Handler::processException
+     */
+    public function testProcessExceptionReport()
+    {
+        $handler = new \Magento\App\Error\Handler($this->_loggerMock, $this->_dirMock, $this->_appStateMock);
+        $this->_appStateMock->expects($this->any())->method('getMode')
+            ->will($this->returnValue(\Magento\App\State::MODE_DEFAULT));
+        $this->_dirMock->expects($this->atLeastOnce())
+            ->method('getDir')
+            ->with(\Magento\App\Dir::PUB)
+            ->will($this->returnValue(dirname(__DIR__) . DS . '..' . DS . '_files'));
+
+        $exception = new \Exception('TestMessage');
+        $handler->processException($exception);
+    }
+
+    /**
+     * @covers \Magento\Error\Handler::__construct
+     * @covers \Magento\Error\Handler::handler
+     * @throws \Exception
+     */
+    public function testErrorHandlerLogging()
+    {
+        $handler = new \Magento\App\Error\Handler($this->_loggerMock, $this->_dirMock, $this->_appStateMock);
+        $this->_appStateMock->expects($this->any())->method('getMode')
+            ->will($this->returnValue(\Magento\App\State::MODE_DEFAULT));
+        $this->_loggerMock->expects($this->once())
+            ->method('log')
+            ->with($this->stringContains('testErrorHandlerLogging'), \Zend_Log::ERR);
+        set_error_handler(array($handler, 'handler'));
+        try {
+            trigger_error('testErrorHandlerLogging', E_USER_NOTICE);
+            restore_error_handler();
+        } catch (\Exception $e) {
+            restore_error_handler();
+            throw $e;
+        }
+    }
+
+    /**
+     * @covers \Magento\Error\Handler::__construct
+     * @covers \Magento\Error\Handler::handler
+     * @expectedException \Exception
+     * @throws \Exception
+     */
+    public function testErrorHandlerPrint()
+    {
+        $handler = new \Magento\App\Error\Handler($this->_loggerMock, $this->_dirMock, $this->_appStateMock);
+        $this->_appStateMock->expects($this->any())->method('getMode')
+            ->will($this->returnValue(\Magento\App\State::MODE_DEVELOPER));
+        set_error_handler(array($handler, 'handler'));
+        try {
+            trigger_error('testErrorHandlerPrint', E_USER_NOTICE);
+        } catch (\Exception $e) {
+            restore_error_handler();
+            throw $e;
+        }
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/FrontClass.php b/dev/tests/unit/testsuite/Magento/App/FrontClass.php
similarity index 97%
rename from dev/tests/unit/testsuite/Magento/Core/Model/FrontClass.php
rename to dev/tests/unit/testsuite/Magento/App/FrontClass.php
index 9fa02871d73..e869a008b80 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/FrontClass.php
+++ b/dev/tests/unit/testsuite/Magento/App/FrontClass.php
@@ -24,7 +24,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Core\Model;
+namespace Magento\App;
 
 
 class FrontClass
diff --git a/dev/tests/unit/testsuite/Magento/App/FrontControllerTest.php b/dev/tests/unit/testsuite/Magento/App/FrontControllerTest.php
index 38335400c91..f08a293fce9 100644
--- a/dev/tests/unit/testsuite/Magento/App/FrontControllerTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/FrontControllerTest.php
@@ -31,11 +31,6 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase
      */
     protected $_model;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_eventManager;
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -58,48 +53,39 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
-        $this->_response = $this->getMock('Magento\App\ResponseInterface', array(), array(), '', false);
-        $this->_routerList = $this->getMock('Magento\App\RouterList', array('getRouters'), array(), '', false);
-        $this->_request = $this->getMock('Magento\App\RequestInterface', array('isDispatched', 'getModuleName',
-            'setModuleName', 'getActionName', 'setActionName', 'getParam'));
+        $this->_response = $this->getMock('Magento\App\Response\Http', array(), array(), '', false);
+        $this->_request = $this->getMock('Magento\App\Request\Http', array(), array(), '', false);
         $this->_router = $this->getMock('Magento\App\Router\AbstractRouter',
-            array('setFront', 'match'), array(), '', false);
-        $this->_model = new \Magento\App\FrontController($this->_eventManager, $this->_response, $this->_routerList);
+            array('match'), array(), '', false);
+        $this->_routerList = $this->getMock('Magento\App\RouterList', array(), array(), '', false);
+        $this->_routerList->expects($this->any())
+            ->method('getIterator')->will($this->returnValue($this->_routerList));
+        $this->_model = new \Magento\App\FrontController($this->_response, $this->_routerList);
     }
 
     /**
      * @expectedException \LogicException
+     * @expectedExceptionMessage  Front controller reached 100 router match iterations
      */
     public function testDispatchThrowException()
     {
-        $this->_routerList->expects($this->any())->method('getRouters')->will($this->returnValue($this->_router));
-        $this->_model->dispatch($this->_request);
-        $this->_eventManager->expects($this->never())->method('dispatch');
-    }
-
-    public function testWhenRequestDispatched()
-    {
-        $this->_request->expects($this->once())->method('isDispatched')->will($this->returnValue(true));
-        $this->_routerList->expects($this->never())->method('getRouters');
-        $this->_eventManager->expects($this->atLeastOnce())->method('dispatch');
+        $this->_request->expects($this->any())->method('isDispatched')->will($this->returnValue(false));
         $this->_model->dispatch($this->_request);
     }
 
     /**
      * @expectedException \LogicException
+     * @expectedExceptionMessage  Front controller reached 100 router match iterations
      */
     public function testWhenDispatchedActionInterface()
     {
-        $this->_router = $this->getMock('Magento\App\Router\AbstractRouter',
-            array('setFront', 'match'), array(), '', false);
-        $this->_routerList->expects($this->atLeastOnce())->method('getRouters')
-            ->will($this->returnValue(array($this->_router)));
+        $this->_request->expects($this->any())->method('isDispatched')->will($this->returnValue(false));
+        $this->_routerList->expects($this->atLeastOnce())->method('valid')->will($this->returnValue(true));
+        $this->_routerList->expects($this->atLeastOnce())->method('current')->will($this->returnValue($this->_router));
         $controllerInstance = $this->getMock('\Magento\App\ActionInterface');
         $this->_router->expects($this->atLeastOnce())->method('match')->will($this->returnValue($controllerInstance));
         $this->_request->expects($this->atLeastOnce())->method('getActionName')->will($this->returnValue('testString'));
         $controllerInstance->expects($this->atLeastOnce())->method('dispatch')->with('testString');
-
         $this->_model->dispatch($this->_request);
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/App/ObjectManager/ConfigCacheTest.php b/dev/tests/unit/testsuite/Magento/App/ObjectManager/ConfigCacheTest.php
new file mode 100644
index 00000000000..f77c1db2f3d
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/ObjectManager/ConfigCacheTest.php
@@ -0,0 +1,66 @@
+<?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\App\ObjectManager;
+class ConfigCacheTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var Magento\App\ObjectManager\ConfigCache
+     */
+    protected $_configCache;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_cacheFrontendMock;
+
+    protected function setUp()
+    {
+        $this->_cacheFrontendMock = $this->getMock('\Magento\Cache\FrontendInterface');
+        $this->_configCache = new \Magento\App\ObjectManager\ConfigCache($this->_cacheFrontendMock);
+    }
+
+    protected function tearDown()
+    {
+        unset($this->_configCache);
+    }
+
+    public function testGet()
+    {
+        $key = 'key';
+        $this->_cacheFrontendMock
+            ->expects($this->once())
+            ->method('load')
+            ->with('diConfig' . $key)
+            ->will($this->returnValue(false));
+        $this->assertEquals(false, $this->_configCache->get($key));
+    }
+
+    public function testSave()
+    {
+        $key = 'key';
+        $config = array('config');
+        $this->_cacheFrontendMock->expects($this->once())->method('save')->with(serialize($config), 'diConfig' . $key);
+        $this->_configCache->save($config, $key);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/ObjectManager/ConfigLoaderTest.php b/dev/tests/unit/testsuite/Magento/App/ObjectManager/ConfigLoaderTest.php
similarity index 91%
rename from dev/tests/unit/testsuite/Magento/Core/Model/ObjectManager/ConfigLoaderTest.php
rename to dev/tests/unit/testsuite/Magento/App/ObjectManager/ConfigLoaderTest.php
index ff9b1308220..bcba0ebeca6 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/ObjectManager/ConfigLoaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/ObjectManager/ConfigLoaderTest.php
@@ -21,12 +21,12 @@
  * @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\ObjectManager;
+namespace Magento\App\ObjectManager;
 
 class ConfigLoaderTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\ObjectManager\ConfigLoader
+     * @var \Magento\App\ObjectManager\ConfigLoader
      */
     protected $_model;
 
@@ -47,7 +47,7 @@ class ConfigLoaderTest extends \PHPUnit_Framework_TestCase
         );
 
         $this->_cacheMock = $this->getMock('Magento\Core\Model\Cache\Type\Config', array(), array(), '', false);
-        $this->_model = new \Magento\Core\Model\ObjectManager\ConfigLoader($this->_cacheMock, $this->_readerMock);
+        $this->_model = new \Magento\App\ObjectManager\ConfigLoader($this->_cacheMock, $this->_readerMock);
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/App/Request/HttpTest.php b/dev/tests/unit/testsuite/Magento/App/Request/HttpTest.php
index 43be63bc46b..51699cbe102 100644
--- a/dev/tests/unit/testsuite/Magento/App/Request/HttpTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Request/HttpTest.php
@@ -38,7 +38,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_routerListMock = $this->getMock('\Magento\App\RouterList', array(), array(), '', false);
+        $this->_routerListMock = $this->getMock('Magento\App\Route\ConfigInterface');
     }
 
     public function testGetOriginalPathInfoWithTestUri()
@@ -122,8 +122,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase
     public function testSetRouteNameWithRouter()
     {
         $router = $this->getMock('\Magento\App\Router\AbstractRouter', array(), array(), '', false);
-        $this->_routerListMock->expects($this->any())->method('getRouterByRoute')->will($this->returnValue($router));
-        $router->expects($this->once())->method('getFrontNameByRoute')->will($this->returnValue('string'));
+        $this->_routerListMock->expects($this->any())->method('getRouteFrontName')->will($this->returnValue($router));
         $this->_model = new \Magento\App\Request\Http($this->_routerListMock);
         $this->_model->setRouteName('RouterName');
         $this->assertEquals('RouterName', $this->_model->getRouteName());
@@ -132,9 +131,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase
     public function testSetRouteNameWithNullRouterValue()
     {
         $this->_model = new \Magento\App\Request\Http($this->_routerListMock);
-        $router = $this->getMock('\Magento\App\Router\AbstractRouter', array(), array(), '', false);
-        $this->_routerListMock->expects($this->once())->method('getRouterByRoute')->will($this->returnValue(null));
-        $router->expects($this->never())->method('getFrontNameByRoute');
+        $this->_routerListMock->expects($this->once())->method('getRouteFrontName')->will($this->returnValue(null));
         $this->_model->setRouteName('RouterName');
     }
 
@@ -187,15 +184,11 @@ class HttpTest extends \PHPUnit_Framework_TestCase
     public function testGetRequestedRouteNameWithRewritePathInfo()
     {
         $this->_model = new \Magento\App\Request\Http($this->_routerListMock);
-        $routerAbstract = $this->getMock('\Magento\App\Router\AbstractRouter', array(), array(), '', false);
         $expected = 'TestValue';
         $this->_model->setPathInfo($expected);
         $this->_model->rewritePathInfo($expected . '/other');
-        $this->_routerListMock->expects($this->any())->method('getRouterByFrontName')->with($expected)
-            ->will($this->returnValue($routerAbstract));
-        $routerAbstract->expects($this->any())->method('getRouteByFrontName')->with($expected)
+        $this->_routerListMock->expects($this->once())->method('getRouteByFrontName')->with($expected)
             ->will($this->returnValue($expected));
-
         $this->assertEquals($expected, $this->_model->getRequestedRouteName());
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/App/Resource/Config/ConverterTest.php
similarity index 85%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/ConverterTest.php
rename to dev/tests/unit/testsuite/Magento/App/Resource/Config/ConverterTest.php
index f25035b2bb5..c16cdfaceb5 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/ConverterTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Resource/Config/ConverterTest.php
@@ -21,12 +21,12 @@
  * @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\Resource\Config;
+namespace Magento\App\Resource\Config;
 
 class ConverterTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Resource\Config\Converter
+     * @var \Magento\App\Resource\Config\Converter
      */
     protected $_model;
 
@@ -44,12 +44,9 @@ class ConverterTest extends \PHPUnit_Framework_TestCase
     {
         $this->_filePath = __DIR__ . '/_files' . DIRECTORY_SEPARATOR;
         $this->_source = new \DOMDocument();
-        $this->_model = new \Magento\Core\Model\Resource\Config\Converter();
+        $this->_model = new \Magento\App\Resource\Config\Converter();
     }
 
-    /**
-     * @covers \Magento\Core\Model\Resource\Config\Converter::convert
-     */
     public function testConvert()
     {
         $this->_source->loadXML(file_get_contents($this->_filePath . 'resources.xml'));
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/App/Resource/Config/ReaderTest.php
similarity index 78%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/ReaderTest.php
rename to dev/tests/unit/testsuite/Magento/App/Resource/Config/ReaderTest.php
index 170cf6824fd..b5dae34873c 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Resource/Config/ReaderTest.php
@@ -21,12 +21,12 @@
  * @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\Resource\Config;
+namespace Magento\App\Resource\Config;
 
 class ReaderTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Resource\Config\Reader
+     * @var \Magento\App\Resource\Config\Reader
      */
     protected $_model;
 
@@ -66,18 +66,18 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
 
         $this->_fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface');
         $this->_validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface');
-        $this->_schemaLocatorMock = $this->getMock('Magento\Core\Model\Resource\Config\SchemaLocator',
+        $this->_schemaLocatorMock = $this->getMock('Magento\App\Resource\Config\SchemaLocator',
             array(), array(), '', false);
 
         $this->_converterMock = $this->getMock(
-            'Magento\Core\Model\Resource\Config\Converter', array(), array(), '', false
+            'Magento\App\Resource\Config\Converter', array(), array(), '', false
         );
 
         $this->_configLocalMock = $this->getMock(
-            'Magento\Core\Model\Config\Local', array(), array(), '', false
+            'Magento\App\Config', array(), array(), '', false
         );
 
-        $this->_model = new \Magento\Core\Model\Resource\Config\Reader(
+        $this->_model = new \Magento\App\Resource\Config\Reader(
             $this->_fileResolverMock,
             $this->_converterMock,
             $this->_schemaLocatorMock,
@@ -87,18 +87,8 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    /**
-     * @covers \Magento\Core\Model\Resource\Config\Reader::read
-     */
     public function testRead()
     {
-        $localConfig = array(
-            'defaultSetup' => array(
-                'name' => 'defaultSetup',
-                'connection' => 'defaultConnection'
-            )
-        );
-
         $modulesConfig = include ($this->_filePath . 'resources.php');
 
         $expectedResult = array(
@@ -112,14 +102,10 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
             ),
             'defaultSetup' => array(
                 'name' => 'defaultSetup',
-                'connection' => 'defaultConnection'
+                'connection' => 'customConnection'
             ),
         );
 
-        $this->_configLocalMock->expects($this->once())
-            ->method('getResources')
-            ->will($this->returnValue($localConfig));
-
         $this->_fileResolverMock->expects($this->once())
             ->method('get')
             ->will($this->returnValue(array($this->_filePath .  'resources.xml')));
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/App/Resource/Config/SchemaLocatorTest.php
similarity index 58%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/SchemaLocatorTest.php
rename to dev/tests/unit/testsuite/Magento/App/Resource/Config/SchemaLocatorTest.php
index 438b0d050ae..9ff830d4b94 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Resource/Config/SchemaLocatorTest.php
@@ -21,37 +21,33 @@
  * @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\Route\Config;
+namespace Magento\App\Resource\Config;
 
 class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var string
      */
-    protected $_moduleReaderMock;
+    protected $_expected;
 
     /**
-     * @var \Magento\Core\Model\Route\Config\SchemaLocator
+     * @var \Magento\App\Resource\Config\SchemaLocator
      */
     protected $_model;
 
     protected function setUp()
     {
-        $this->_moduleReaderMock = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false
-        );
-        $this->_moduleReaderMock->expects($this->any())
-            ->method('getModuleDir')->with('etc', 'Magento_Core')->will($this->returnValue('schema_dir'));
-        $this->_model = new \Magento\Core\Model\Route\Config\SchemaLocator($this->_moduleReaderMock);
+        $this->_expected = BP . str_replace('\\', DIRECTORY_SEPARATOR, '\lib\Magento\App\etc\resources.xsd');
+        $this->_model = new \Magento\App\Resource\Config\SchemaLocator();
     }
 
     public function testGetSchema()
     {
-        $this->assertEquals('schema_dir' . DIRECTORY_SEPARATOR . 'routes_merged.xsd', $this->_model->getSchema());
+        $this->assertEquals($this->_expected, $this->_model->getSchema());
     }
 
     public function testGetPerFileSchema()
     {
-        $this->assertEquals('schema_dir' . DIRECTORY_SEPARATOR . 'routes.xsd', $this->_model->getPerFileSchema());
+        $this->assertEquals($this->_expected, $this->_model->getPerFileSchema());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/App/Resource/Config/XsdTest.php
similarity index 94%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/XsdTest.php
rename to dev/tests/unit/testsuite/Magento/App/Resource/Config/XsdTest.php
index 2f71bbdbbb3..fa4be927a4f 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/XsdTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Resource/Config/XsdTest.php
@@ -21,7 +21,7 @@
  * @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\Resource\Config;
+namespace Magento\App\Resource\Config;
 
 class XsdTest extends \PHPUnit_Framework_TestCase
 {
@@ -38,7 +38,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_xsdSchema = BP . '/app/code/Magento/Core/etc/resources.xsd';
+        $this->_xsdSchema = BP . '/lib/Magento/App/etc/resources.xsd';
         $this->_xsdValidator = new \Magento\TestFramework\Utility\XsdValidator();
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/_files/invalidResourcesXmlArray.php b/dev/tests/unit/testsuite/Magento/App/Resource/Config/_files/invalidResourcesXmlArray.php
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/_files/invalidResourcesXmlArray.php
rename to dev/tests/unit/testsuite/Magento/App/Resource/Config/_files/invalidResourcesXmlArray.php
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/_files/resources.php b/dev/tests/unit/testsuite/Magento/App/Resource/Config/_files/resources.php
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/_files/resources.php
rename to dev/tests/unit/testsuite/Magento/App/Resource/Config/_files/resources.php
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/_files/resources.xml b/dev/tests/unit/testsuite/Magento/App/Resource/Config/_files/resources.xml
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/_files/resources.xml
rename to dev/tests/unit/testsuite/Magento/App/Resource/Config/_files/resources.xml
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/_files/valid_resources.xml b/dev/tests/unit/testsuite/Magento/App/Resource/Config/_files/valid_resources.xml
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/_files/valid_resources.xml
rename to dev/tests/unit/testsuite/Magento/App/Resource/Config/_files/valid_resources.xml
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/ResourceTest.php b/dev/tests/unit/testsuite/Magento/App/Resource/ConfigTest.php
similarity index 88%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Config/ResourceTest.php
rename to dev/tests/unit/testsuite/Magento/App/Resource/ConfigTest.php
index 350e6033c75..ddf48737c37 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/ResourceTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Resource/ConfigTest.php
@@ -21,12 +21,12 @@
  * @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\Config;
+namespace Magento\App\Resource;
 
-class ResourceTest extends \PHPUnit_Framework_TestCase
+class ConfigTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Config\Resource
+     * @var \Magento\App\Resource\Config
      */
     protected $_model;
 
@@ -56,7 +56,7 @@ class ResourceTest extends \PHPUnit_Framework_TestCase
         $this->_cacheMock = $this->getMock('Magento\Config\CacheInterface');
 
         $this->_readerMock = $this->getMock(
-            'Magento\Core\Model\Resource\Config\Reader', array(), array(), '', false
+            'Magento\App\Resource\Config\Reader', array(), array(), '', false
         );
 
         $this->_resourcesConfig = array(
@@ -82,7 +82,7 @@ class ResourceTest extends \PHPUnit_Framework_TestCase
             ->method('load')
             ->will($this->returnValue(serialize($this->_resourcesConfig)));
 
-        $this->_model = new \Magento\Core\Model\Config\Resource(
+        $this->_model = new \Magento\App\Resource\Config(
             $this->_readerMock,
             $this->_scopeMock,
             $this->_cacheMock,
@@ -91,7 +91,6 @@ class ResourceTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @covers \Magento\Core\Model\Config\Resource::getConnectionName
      * @dataProvider getConnectionNameDataProvider
      * @param string $resourceName
      * @param string $connectionName
@@ -117,7 +116,7 @@ class ResourceTest extends \PHPUnit_Framework_TestCase
             ),
             array(
                 'resourceName' => 'brokenResourceName',
-                'connectionName' => \Magento\Core\Model\Config\Resource::DEFAULT_SETUP_CONNECTION,
+                'connectionName' => \Magento\App\Resource\Config::DEFAULT_SETUP_CONNECTION,
             )
         );
     }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/App/Route/Config/ConverterTest.php
similarity index 89%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/ConverterTest.php
rename to dev/tests/unit/testsuite/Magento/App/Route/Config/ConverterTest.php
index 85d133b4a45..026828f802e 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/ConverterTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Route/Config/ConverterTest.php
@@ -21,18 +21,18 @@
  * @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\Route\Config;
+namespace Magento\App\Route\Config;
 
 class ConverterTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Route\Config\Converter
+     * @var \Magento\App\Route\Config\Converter
      */
     protected $_model;
 
     protected function setUp()
     {
-        $this->_model = new \Magento\Core\Model\Route\Config\Converter();
+        $this->_model = new \Magento\App\Route\Config\Converter();
     }
 
     public function testConvert()
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/_files/routes.php b/dev/tests/unit/testsuite/Magento/App/Route/Config/_files/routes.php
similarity index 95%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/_files/routes.php
rename to dev/tests/unit/testsuite/Magento/App/Route/Config/_files/routes.php
index 84b994d970e..c038e4c4c12 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/_files/routes.php
+++ b/dev/tests/unit/testsuite/Magento/App/Route/Config/_files/routes.php
@@ -33,8 +33,8 @@ return array(
                     'Magento_Catalog',
                     'Magento_Wishlist',
                     'Magento_Adminhtml',
-                    'Magento_GiftCard',
-                    'Magento_GiftCardAccount',
+                    'Magento_Customer',
+                    'Magento_Paypal',
                 ),
             ),
             'customer' => array(
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/_files/routes.xml b/dev/tests/unit/testsuite/Magento/App/Route/Config/_files/routes.xml
similarity index 92%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/_files/routes.xml
rename to dev/tests/unit/testsuite/Magento/App/Route/Config/_files/routes.xml
index 2cce07cd5e1..5d9c5a47982 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Route/Config/_files/routes.xml
+++ b/dev/tests/unit/testsuite/Magento/App/Route/Config/_files/routes.xml
@@ -30,8 +30,8 @@
             <module name="Magento_Catalog" before="Magento_Adminhtml" />
             <module name="Magento_Wishlist" before="Magento_Adminhtml" />
             <module name="Magento_Sales" before="Magento_Catalog" />
-            <module name="Magento_GiftCard" />
-            <module name="Magento_GiftCardAccount" after="Magento_GiftCard" />
+            <module name="Magento_Customer" />
+            <module name="Magento_Paypal" after="Magento_Customer" />
         </route>
         <route id="customer" frontName="customer">
             <module name="Magento_Customer" before="Magento_Wishlist" />
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Route/ConfigTest.php b/dev/tests/unit/testsuite/Magento/App/Route/ConfigTest.php
similarity index 53%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Route/ConfigTest.php
rename to dev/tests/unit/testsuite/Magento/App/Route/ConfigTest.php
index 4ec644cfef5..ffaf1f1f5f7 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Route/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Route/ConfigTest.php
@@ -21,12 +21,12 @@
  * @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\Route;
+namespace Magento\App\Route;
 
 class ConfigTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Route\Config
+     * @var \Magento\App\Route\Config
      */
     protected $_config;
 
@@ -40,38 +40,40 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
      */
     protected $_cacheMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_configScopeMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_areaList;
+
     protected function setUp()
     {
-        $this->_readerMock = $this->getMock('Magento\Core\Model\Route\Config\Reader', array(), array(), '', false);
+        $this->_readerMock = $this->getMock('Magento\App\Route\Config\Reader', array(), array(), '', false);
         $this->_cacheMock = $this->getMock('Magento\Config\CacheInterface');
-        $this->_config = new \Magento\Core\Model\Route\Config(
+        $this->_configScopeMock = $this->getMock('\Magento\Config\ScopeInterface');
+        $this->_areaList = $this->getMock('\Magento\App\AreaList', array(), array(), '', false);
+        $this->_configScopeMock
+            ->expects($this->any())
+            ->method('getCurrentScope')
+            ->will($this->returnValue('areaCode'));
+        $this->_config = new \Magento\App\Route\Config(
             $this->_readerMock,
-            $this->_cacheMock
+            $this->_cacheMock,
+            $this->_configScopeMock,
+            $this->_areaList
         );
     }
 
-    public function testGetIfCacheIsArray()
+    public function testGetRouteFrontNameIfCacheIfRouterIdNotExist()
     {
         $this->_cacheMock->expects($this->once())
-            ->method('load')->with('areaCode::RoutesConfig-routerCode')
+            ->method('load')->with('areaCode::RoutesConfig')
             ->will($this->returnValue(serialize(array('expected'))));
-        $this->assertEquals(array('expected'), $this->_config->getRoutes('areaCode', 'routerCode'));
-    }
-
-    public function testGetIfKeyExist()
-    {
-        $this->_readerMock->expects($this->once())
-            ->method('read')->with('areaCode')->will($this->returnValue(array()));
-        $this->assertEquals(array(), $this->_config->getRoutes('areaCode', 'routerCode'));
+        $this->assertEquals('routerCode', $this->_config->getRouteFrontName('routerCode'));
     }
 
-    public function testGetRoutes()
-    {
-        $areaConfig['routerCode']['routes'] = 'Expected Value';
-        $this->_readerMock->expects($this->once())
-            ->method('read')->with('areaCode')->will($this->returnValue($areaConfig));
-        $this->_cacheMock->expects($this->once())
-            ->method('save')->with(serialize('Expected Value'), 'areaCode::RoutesConfig-routerCode');
-        $this->assertEquals('Expected Value', $this->_config->getRoutes('areaCode', 'routerCode'));
-    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/RouterListTest.php b/dev/tests/unit/testsuite/Magento/App/RouterListTest.php
similarity index 80%
rename from dev/tests/unit/testsuite/Magento/Core/Model/RouterListTest.php
rename to dev/tests/unit/testsuite/Magento/App/RouterListTest.php
index 947dc27b876..14a6969dadf 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/RouterListTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/RouterListTest.php
@@ -23,7 +23,7 @@
  * @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;
+namespace Magento\App;
 
 class RouterListTest extends \PHPUnit_Framework_TestCase
 {
@@ -55,7 +55,7 @@ class RouterListTest extends \PHPUnit_Framework_TestCase
                 'disable'   => false,
                 'sortOrder' => 10
             ),
-            'defaultRouter' => array(
+            'default' => array(
                 'instance'     => 'DefaultClass',
                 'disable'   => false,
                 'sortOrder' => 5
@@ -68,20 +68,12 @@ class RouterListTest extends \PHPUnit_Framework_TestCase
 
     public function testGetRoutes()
     {
-        $expectedResult = array(
-            'defaultRouter'  => new DefaultClass(),
-            'frontendRouter' => new FrontClass(),
-        );
-
+        $expectedClass = new FrontClass();
         $this->_objectManagerMock
             ->expects($this->at(0))
             ->method('create')
-            ->will($this->returnValue(new DefaultClass()));
-        $this->_objectManagerMock
-            ->expects($this->at(1))
-            ->method('create')
-            ->will($this->returnValue(new FrontClass()));
+            ->will($this->returnValue($expectedClass));
 
-        $this->assertEquals($this->_model->getRouters(), $expectedResult);
+        $this->assertEquals($expectedClass, $this->_model->current('frontendRouter'));
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/App/StateTest.php b/dev/tests/unit/testsuite/Magento/App/StateTest.php
new file mode 100644
index 00000000000..6a728fe6557
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/StateTest.php
@@ -0,0 +1,90 @@
+<?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\App;
+
+class StateTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_model;
+
+    /**
+     * @var \Magento\Config\ScopeInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_scopeMock;
+
+    protected function setUp()
+    {
+        $this->_scopeMock = $this->getMockForAbstractClass(
+            'Magento\Config\ScopeInterface',
+            array('setCurrentScope'),
+            '',
+            false
+        );
+        $this->_model = new \Magento\App\State($this->_scopeMock, time());
+    }
+
+    public function testSetAreaCode()
+    {
+        $areaCode = 'some code';
+        $this->_scopeMock->expects($this->once())->method('setCurrentScope')->with($areaCode);
+        $this->_model->setAreaCode($areaCode);
+        $this->setExpectedException('Magento\Exception');
+        $this->_model->setAreaCode('any code');
+    }
+
+    public function testGetAreaCodeException()
+    {
+        $this->_scopeMock->expects($this->never())->method('setCurrentScope');
+        $this->setExpectedException('Magento\Exception');
+        $this->_model->getAreaCode();
+    }
+
+    public function testGetAreaCode()
+    {
+        $areaCode = 'some code';
+        $this->_scopeMock->expects($this->once())->method('setCurrentScope')->with($areaCode);
+        $this->_model->setAreaCode($areaCode);
+        $this->assertEquals($areaCode, $this->_model->getAreaCode());
+    }
+
+    public function testEmulateAreaCode()
+    {
+        $areaCode = 'original code';
+        $emulatedCode = 'emulated code';
+        $this->_scopeMock->expects($this->once())->method('setCurrentScope')->with($areaCode);
+        $this->_model->setAreaCode($areaCode);
+        $this->assertEquals(
+            $emulatedCode,
+            $this->_model->emulateAreaCode($emulatedCode, array($this, 'emulateAreaCodeCallback'))
+        );
+        $this->assertEquals($this->_model->getAreaCode(), $areaCode);
+    }
+
+    public function emulateAreaCodeCallback()
+    {
+        return $this->_model->getAreaCode();
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Backend/App/Area/FrontNameResolverTest.php b/dev/tests/unit/testsuite/Magento/Backend/App/Area/FrontNameResolverTest.php
index f3047d1b966..3ddc6eb5cb6 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/App/Area/FrontNameResolverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/App/Area/FrontNameResolverTest.php
@@ -43,7 +43,7 @@ class FrontNameResolverTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_configMock
-            = $this->getMock('\Magento\Core\Model\ConfigInterface', array('getValue', 'getNode', 'setNode', 'reinit'));
+            = $this->getMock('\Magento\Core\Model\ConfigInterface');
         $this->_model = new \Magento\Backend\App\Area\FrontNameResolver($this->_configMock, $this->_defaultFrontName);
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ExportTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ExportTest.php
index e36220e4fe0..4a67f14b304 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ExportTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ExportTest.php
@@ -45,11 +45,9 @@ class ExportTest extends \PHPUnit_Framework_TestCase
             array(), array(), '', false, false
         );
 
-        $coreHelper = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
-        $factory = $this->getMock('Magento\Data\Form\Element\Factory', array(), array(), '', false);
-        $factoryColl = $this->getMock('Magento\Data\Form\Element\CollectionFactory', array(), array(), '', false);
-        $this->_object = new \Magento\Backend\Block\System\Config\Form\Field\Export(
-            $coreHelper, $factory, $factoryColl, $this->_helperFactoryMock
+        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->_object = $objectManager->getObject('Magento\Backend\Block\System\Config\Form\Field\Export', array(
+            'helperFactory' => $this->_helperFactoryMock)
         );
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractTest.php
index 89c4d1b48e1..e984fce1173 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractTest.php
@@ -44,11 +44,9 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $block->expects($this->any())
             ->method('escapeHtml')
             ->will($this->returnArgument(0));
-        $coreHelper = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
-        $factory = $this->getMock('Magento\Data\Form\Element\Factory', array(), array(), '', false);
-        $collectionFactory = $this->getMock('Magento\Data\Form\Element\CollectionFactory', array('create'),
-            array(), '', false);
-        $element = new \Magento\Data\Form\Element\Multiselect($coreHelper, $factory, $collectionFactory);
+
+        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $element = $objectManager->getObject('Magento\Data\Form\Element\Multiselect');
         $element->setValue(array(
             array(
                 'test' => 'test',
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php
index 6dd3c291b8a..8c109d795c0 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php
@@ -98,7 +98,7 @@ class FormTest extends \PHPUnit_Framework_TestCase
 
         $this->_urlModelMock = $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false, false);
         $configFactoryMock = $this->getMock('Magento\Backend\Model\Config\Factory', array(), array(), '', false, false);
-        $this->_formFactoryMock = $this->getMock('Magento\Data\Form\Factory', array('create'),
+        $this->_formFactoryMock = $this->getMock('Magento\Data\FormFactory', array('create'),
             array(), '', false, false);
         $this->_fieldsetFactoryMock = $this->getMock('Magento\Backend\Block\System\Config\Form\Fieldset\Factory',
             array(), array(), '', false, false
diff --git a/dev/tests/unit/testsuite/Magento/Adminhtml/Block/System/Email/Template/EditTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Email/Template/EditTest.php
similarity index 95%
rename from dev/tests/unit/testsuite/Magento/Adminhtml/Block/System/Email/Template/EditTest.php
rename to dev/tests/unit/testsuite/Magento/Backend/Block/System/Email/Template/EditTest.php
index 434ae78c810..62fcbfbbc8b 100644
--- a/dev/tests/unit/testsuite/Magento/Adminhtml/Block/System/Email/Template/EditTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Email/Template/EditTest.php
@@ -25,12 +25,12 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Block\System\Email\Template;
+namespace Magento\Backend\Block\System\Email\Template;
 
 class EditTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Adminhtml\Block\System\Email\Template\Edit
+     * @var \Magento\Backend\Block\System\Email\Template\Edit
      */
     protected $_block;
 
@@ -96,7 +96,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
             'emailConfig' => $this->_emailConfigMock,
         );
         $arguments = $objectManager->getConstructArguments(
-            'Magento\Adminhtml\Block\System\Email\Template\Edit',
+            'Magento\Backend\Block\System\Email\Template\Edit',
             $params
         );
 
@@ -107,7 +107,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
 
         $layoutMock->expects($this->any())->method('helper')->will($this->returnValue($helperMock));
 
-        $this->_block = $objectManager->getObject('Magento\Adminhtml\Block\System\Email\Template\Edit', $arguments);
+        $this->_block = $objectManager->getObject('Magento\Backend\Block\System\Email\Template\Edit', $arguments);
     }
 
     public function testGetUsedCurrentlyForPaths()
@@ -147,7 +147,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
         $this->_configStructureMock->expects($this->any())
             ->method('getElementByPathParts')->will($this->returnValueMap($map));
 
-        $templateMock = $this->getMock('Magento\Adminhtml\Model\Email\Template', array(), array(), '', false, false);
+        $templateMock = $this->getMock('Magento\Backend\Model\Email\Template', array(), array(), '', false, false);
         $templateMock->expects($this->once())
             ->method('getSystemConfigPathsWhereUsedCurrently')
             ->will($this->returnValue($this->_fixtureConfigPath));
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
index 9872fba8f15..c648d6b3f80 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
@@ -37,11 +37,6 @@ class ButtonTest extends \PHPUnit_Framework_TestCase
      */
     protected $_layoutMock;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_helperMock;
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -64,15 +59,8 @@ class ButtonTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_helperMock =
-            $this->getMock('Magento\Backend\Helper\Data', array('uniqHash'), array(), '', false, false);
-
         $this->_layoutMock =
             $this->getMock('Magento\Core\Model\Layout', array(), array(), '', false, false);
-        $this->_layoutMock
-            ->expects($this->any())
-            ->method('helper')
-            ->will($this->returnValue($this->_helperMock));
 
         $this->_helperFactoryMock = $this->getMock(
             'Magento\Core\Model\Factory\Helper', array('get'), array(), '', false, false
@@ -93,7 +81,6 @@ class ButtonTest extends \PHPUnit_Framework_TestCase
     protected function tearDown()
     {
         unset($this->_layoutMock);
-        unset($this->_helperMock);
         unset($this->_buttonMock);
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php
index 8b35e0d36c5..3bfe1e2654c 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php
@@ -48,16 +48,11 @@ class GridTest extends \PHPUnit_Framework_TestCase
      * @covers \Magento\Backend\Block\Widget\Grid::getRssLists
      * @dataProvider addGetClearRssDataProvider
      */
-    public function testAddGetClearRss($isUseStoreInUrl, $setStoreCount)
+    public function testAddGetClearRss($isUseStoreInUrl)
     {
         $helperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
 
         $urlMock = $this->getMock('Magento\Core\Model\Url', array(), array(), '', false);
-        $urlMock->expects($this->at($setStoreCount))
-            ->method('setStore');
-        $urlMock->expects($this->any())
-            ->method('getUrl')
-            ->will($this->returnValue('some_url'));
 
         $storeMock = $this->getMock('Magento\Core\Model\Store', array(), array(), '', false);
         $storeMock->expects($this->any())
@@ -73,14 +68,23 @@ class GridTest extends \PHPUnit_Framework_TestCase
         $appMock->expects($this->any())
             ->method('getDefaultStoreView')
             ->will($this->returnValue($storeMock));
+        $urlBuilderMock = $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false);
 
-        $contextMock = $this->getMock('\Magento\Backend\Block\Template\Context', array(), array(), '', false);
+        $contextMock = $this->getMock('Magento\Backend\Block\Template\Context', array(), array(), '', false);
         $contextMock->expects($this->any())
             ->method('getStoreManager')
             ->will($this->returnValue($storeManagerMock));
         $contextMock->expects($this->any())
             ->method('getApp')
             ->will($this->returnValue($appMock));
+        $contextMock->expects($this->any())
+            ->method('getUrlBuilder')
+            ->will($this->returnValue($urlBuilderMock));
+
+        $urlBuilderMock->expects($this->any())
+            ->method('getUrl')
+            ->will($this->returnValue('some_url'));
+
 
         $block = new \Magento\Backend\Block\Widget\Grid($helperMock, $contextMock, $storeManagerMock, $urlMock);
 
@@ -103,8 +107,8 @@ class GridTest extends \PHPUnit_Framework_TestCase
     public function addGetClearRssDataProvider()
     {
          return array(
-            array(true, 1),
-            array(false, 0),
+            array(true),
+            array(false)
          );
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Adminhtml/Controller/System/AccountTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php
similarity index 96%
rename from dev/tests/unit/testsuite/Magento/Adminhtml/Controller/System/AccountTest.php
rename to dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php
index db832d341ef..89261dddbb0 100644
--- a/dev/tests/unit/testsuite/Magento/Adminhtml/Controller/System/AccountTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Unit test for \Magento\Adminhtml\Controller\System\Account controller
+ * Unit test for \Magento\Backend\Controller\Adminhtml\System\Account controller
  *
  * Magento
  *
@@ -25,11 +25,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Adminhtml\Controller\System;
+namespace Magento\Backend\Controller\Adminhtml\System;
 
 class AccountTest extends \PHPUnit_Framework_TestCase
 {
-    /** @var \Magento\Adminhtml\Controller\System\Account */
+    /** @var \Magento\Backend\Controller\Adminhtml\System\Account */
     protected $_controller;
 
     /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\App\RequestInterface */
@@ -138,7 +138,7 @@ class AccountTest extends \PHPUnit_Framework_TestCase
         $args = array('context' => $contextMock);
 
         $testHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $this->_controller = $testHelper->getObject('Magento\Adminhtml\Controller\System\Account', $args);
+        $this->_controller = $testHelper->getObject('Magento\Backend\Controller\Adminhtml\System\Account', $args);
     }
 
     public function testSaveAction()
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php
index a3342f3175c..67a3a59f84a 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php
@@ -129,7 +129,7 @@ class SaveTest extends \PHPUnit_Framework_TestCase
                 $configStructureMock,
                 $this->_configFactoryMock,
                 $this->_cacheMock,
-                null,
+                new \Magento\Stdlib\String,
             )
         );
     }
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php
index ea1b48b51ef..f22f08adfbf 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php
@@ -39,11 +39,6 @@ class DataTest extends \PHPUnit_Framework_TestCase
      */
     protected $_configMock;
 
-    /**
-     * @var \Magento\Core\Model\Config\Primary
-     */
-    protected $_primaryConfigMock;
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -52,19 +47,16 @@ class DataTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_configMock = $this->getMock('Magento\Core\Model\Config', array(), array(), '', false, false);
-        $this->_primaryConfigMock =
-            $this->getMock('Magento\Core\Model\Config\Primary', array(), array(), '', false, false);
         $this->_frontResolverMock
             = $this->getMock('\Magento\Backend\App\Area\FrontNameResolver', array(), array(), '', false);
         $this->_helper = new \Magento\Backend\Helper\Data(
             $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false),
-            $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false, false),
-            $this->_primaryConfigMock,
-            $this->getMock('Magento\App\RouterList', array(), array(), '', false),
+            $this->getMock('\Magento\App\Route\Config', 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),
-            $this->_frontResolverMock
+            $this->_frontResolverMock,
+            $this->getMock('\Magento\Math\Random', array(), array(), '', false)
         );
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php
index f8a5fa53762..025f350bb0e 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php
@@ -30,8 +30,8 @@ class BaseurlTest extends \PHPUnit_Framework_TestCase
         $eventDispatcher = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
         $appState = $this->getMock('Magento\App\State', array(), array(), '', false);
         $storeManager = $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false);
-        $cacheManager = $this->getMock('Magento\Core\Model\CacheInterface');
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $cacheManager = $this->getMock('Magento\App\CacheInterface');
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $context = new \Magento\Core\Model\Context(
             $logger,
             $eventDispatcher,
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 986df699b34..795d2b5cec0 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
@@ -26,7 +26,7 @@ namespace Magento\Backend\Model\Config\Backend;
 class EncryptedTest extends \PHPUnit_Framework_TestCase
 {
     /** @var \PHPUnit_Framework_MockObject_MockObject */
-    protected $_helperMock;
+    protected $_encryptorMock;
 
     /** @var \PHPUnit_Framework_MockObject_MockObject */
     protected $_configMock;
@@ -56,11 +56,12 @@ class EncryptedTest extends \PHPUnit_Framework_TestCase
         );
         $this->_configMock = $this->getMock('Magento\Core\Model\Config', array(), array(), '', false);
         $this->_helperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
+        $this->_encryptorMock = $this->getMock('Magento\Encryption\EncryptorInterface', 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,
+            'encryptor' => $this->_encryptorMock
         ));
 
     }
@@ -69,7 +70,8 @@ class EncryptedTest extends \PHPUnit_Framework_TestCase
     {
         $value = 'someValue';
         $result = 'some value from parent class';
-        $this->_helperMock->expects($this->once())->method('decrypt')->with($value)->will($this->returnValue($result));
+        $this->_encryptorMock->expects($this->once())->method('decrypt')->with($value)
+            ->will($this->returnValue($result));
         $this->assertEquals($result, $this->_model->processValue($value));
     }
 
@@ -93,7 +95,7 @@ class EncryptedTest extends \PHPUnit_Framework_TestCase
             ->method('getValue')
             ->with('some/path')
             ->will($this->returnValue('oldValue'));
-        $this->_helperMock->expects($this->once())
+        $this->_encryptorMock->expects($this->once())
             ->method('encrypt')
             ->with($valueToSave)
             ->will($this->returnValue('encrypted'));
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/SecureTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/SecureTest.php
index 72c21528ce3..15bebde7390 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/SecureTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/SecureTest.php
@@ -30,8 +30,8 @@ class SecureTest extends \PHPUnit_Framework_TestCase
         $eventDispatcher = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
         $appState = $this->getMock('Magento\App\State', array(), array(), '', false);
         $storeManager = $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false);
-        $cacheManager = $this->getMock('Magento\Core\Model\CacheInterface');
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $cacheManager = $this->getMock('Magento\App\CacheInterface');
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $context = new \Magento\Core\Model\Context(
             $logger,
             $eventDispatcher,
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/SchemaLocatorTest.php
index 3348c8c247a..4ba7c7a3d8d 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/SchemaLocatorTest.php
@@ -38,7 +38,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_moduleReaderMock = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false
+            'Magento\Module\Dir\Reader', array(), array(), '', false
         );
 
         $this->_moduleReaderMock->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Admin/PageTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Admin/PageTest.php
index 821880dbd85..df574e010a7 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Admin/PageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Admin/PageTest.php
@@ -55,7 +55,7 @@ class PageTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $this->_menuModel = new \Magento\Backend\Model\Menu($logger);
         $this->_menuSubModel = new \Magento\Backend\Model\Menu($logger);
 
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/BuilderTest.php
index 4af09d18f82..93f2a00f737 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/BuilderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/BuilderTest.php
@@ -50,7 +50,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
     {
         $this->_factoryMock = $this->getMock("Magento\Backend\Model\Menu\Item\Factory", array(), array(), '', false);
         $this->_menuMock = $this->getMock('Magento\Backend\Model\Menu', array(),
-            array($this->getMock('Magento\Core\Model\Logger', array(), array(), '', false)));
+            array($this->getMock('Magento\Logger', array(), array(), '', false)));
 
         $this->_model = new \Magento\Backend\Model\Menu\Builder($this->_factoryMock, $this->_menuMock);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Config/SchemaLocatorTest.php
index 8160d56b4d7..663e2cafb39 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Config/SchemaLocatorTest.php
@@ -38,7 +38,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_moduleReaderMock = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false
+            'Magento\Module\Dir\Reader', array(), array(), '', false
         );
         $this->_moduleReaderMock->expects($this->once())
             ->method('getModuleDir')->with('etc', 'Magento_Backend')->will($this->returnValue('schema_dir'));
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ConfigTest.php
index 9e965e1495a..73adf6b5af4 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ConfigTest.php
@@ -93,7 +93,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             false, false);
 
         $this->_logger = $this->getMock(
-            'Magento\Core\Model\Logger', array('addStoreLog', 'log', 'logException'), array(), '', false
+            'Magento\Logger', array('addStoreLog', 'log', 'logException'), array(), '', false
         );
 
         $this->_menuMock = $this->getMock('Magento\Backend\Model\Menu', array(), array(), '', false);
@@ -110,6 +110,10 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
 
         $this->_configReaderMock->expects($this->any())->method('read')->will($this->returnValue(array()));
 
+        $appState = $this->getMock('Magento\App\State', array('getAreaCode'), array(), '', false);
+        $appState->expects($this->any())->method('getAreaCode')
+            ->will($this->returnValue(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE));
+
         $this->_model = new \Magento\Backend\Model\Menu\Config(
             $this->_menuBuilderMock,
             $this->_directorMock,
@@ -118,7 +122,8 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             $this->_cacheInstanceMock,
             $this->_eventManagerMock,
             $this->_logger,
-            $storeManagerMock
+            $storeManagerMock,
+            $appState
         );
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Director/DirectorTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Director/DirectorTest.php
index 756a98e140f..14f79704db3 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Director/DirectorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Director/DirectorTest.php
@@ -64,7 +64,7 @@ class DirectorTest extends \PHPUnit_Framework_TestCase
         $this->_builderMock =
             $this->getMock('Magento\Backend\Model\Menu\Builder', array(), array(), '', false);
         $this->_logger = $this->getMock(
-            'Magento\Core\Model\Logger', array('addStoreLog', 'log', 'logException'), array(), '', false
+            'Magento\Logger', array('addStoreLog', 'log', 'logException'), array(), '', false
         );
         $this->_commandMock =
             $this->getMock('Magento\Backend\Model\Menu\Builder\AbstractCommand',
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Filter/IteratorTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Filter/IteratorTest.php
index e7d6610f94d..8f368291dc9 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Filter/IteratorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Filter/IteratorTest.php
@@ -61,7 +61,7 @@ class IteratorTest extends \PHPUnit_Framework_TestCase
         $this->_items['item3']->expects($this->any())->method('isDisabled')->will($this->returnValue(false));
         $this->_items['item3']->expects($this->any())->method('isAllowed')->will($this->returnValue(false));
 
-        $loggerMock = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false);
 
         $this->_menuModel = new \Magento\Backend\Model\Menu($loggerMock);
         $this->_filterIteratorModel = new \Magento\Backend\Model\Menu\Filter\Iterator($this->_menuModel->getIterator());
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ItemTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ItemTest.php
index 902dd9c5682..a550df6cd33 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ItemTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ItemTest.php
@@ -93,7 +93,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase
         $this->_validatorMock = $this->getMock('Magento\Backend\Model\Menu\Item\Validator');
         $this->_validatorMock->expects($this->any())
             ->method('validate');
-        $this->_moduleListMock = $this->getMock('Magento\App\ModuleListInterface');
+        $this->_moduleListMock = $this->getMock('Magento\Module\ModuleListInterface');
 
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
         $this->_model = $helper->getObject('Magento\Backend\Model\Menu\Item', array(
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/MenuTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/MenuTest.php
index 3309d3d76f4..aaf8c4652c0 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/MenuTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/MenuTest.php
@@ -35,7 +35,7 @@ class MenuTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -55,7 +55,7 @@ class MenuTest extends \PHPUnit_Framework_TestCase
         $this->_items['item3'] = $this->getMock('Magento\Backend\Model\Menu\Item', array(), array(), '', false);
         $this->_items['item3']->expects($this->any())->method('getId')->will($this->returnValue('item3'));
 
-        $this->_logger = $this->getMock('Magento\Core\Model\Logger', array('log'), array(), '', false);
+        $this->_logger = $this->getMock('Magento\Logger', array('log'), array(), '', false);
 
         $this->_model = new \Magento\Backend\Model\Menu($this->_logger);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Router/NoRouteHandlerTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Router/NoRouteHandlerTest.php
index f13e8035a48..97ea067968f 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Router/NoRouteHandlerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Router/NoRouteHandlerTest.php
@@ -61,7 +61,7 @@ class NoRouteHandlerTest extends \PHPUnit_Framework_TestCase
         $this->_requestMock
             ->expects($this->once())
             ->method('setModuleName')
-            ->with('core')
+            ->with('admin')
             ->will($this->returnValue($this->_requestMock));
 
         $this->_requestMock
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php
index d7d8004226b..e79ef9f95b1 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php
@@ -80,6 +80,11 @@ class UrlTest extends \PHPUnit_Framework_TestCase
      */
     protected $_authSessionMock;
 
+    /**
+     * @var \Magento\Encryption\EncryptorInterface
+     */
+    protected $_encryptor;
+
     protected function setUp()
     {
         $this->_menuMock = $this->getMock('Magento\Backend\Model\Menu', array(), array(), '', false);
@@ -120,13 +125,15 @@ class UrlTest extends \PHPUnit_Framework_TestCase
         $this->_authSessionMock = $this->getMock('Magento\Backend\Model\Auth\Session', array(), array(),
             '', false, false);
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->_encryptor = $this->getMock('Magento\Encryption\Encryptor', null, array(), '', false);
         $this->_model = $helper->getObject('Magento\Backend\Model\Url', array(
             'coreStoreConfig' => $this->_storeConfigMock,
             'backendHelper'   => $helperMock,
             'session'         => $this->_coreSessionMock,
             'menuConfig'      => $this->_menuConfigMock,
             'coreData'        => $this->_coreDataMock,
-            'authSession'     => $this->_authSessionMock
+            'authSession'     => $this->_authSessionMock,
+            'encryptor'       => $this->_encryptor
         ));
 
         $this->_requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php
index 9f33456ef03..fc023bf4429 100644
--- a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php
@@ -98,7 +98,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @covers \Magento\Captcha\Helper\Data::getConfigNode
+     * @covers \Magento\Captcha\Helper\Data::getConfig
      */
     public function testGetConfigNode()
     {
@@ -114,7 +114,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
 
         $factoryMock = $this->getMock('Magento\Captcha\Model\CaptchaFactory', array(), array(), '', false);
         $object = $this->_getHelper($store, $this->_getConfigStub(), $factoryMock);
-        $object->getConfigNode('enable');
+        $object->getConfig('enable');
     }
 
     public function testGetFonts()
diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php
index 46b7640828e..8806fdca255 100644
--- a/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php
+++ b/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php
@@ -279,11 +279,11 @@ class DefaultTest extends \PHPUnit_Framework_TestCase
     {
         $helper = $this->getMockBuilder('Magento\Captcha\Helper\Data')
             ->disableOriginalConstructor()
-            ->setMethods(array('getConfigNode', 'getFonts', '_getWebsiteCode', 'getImgUrl'))
+            ->setMethods(array('getConfig', 'getFonts', '_getWebsiteCode', 'getImgUrl'))
             ->getMock();
 
         $helper->expects($this->any())
-            ->method('getConfigNode')
+            ->method('getConfig')
             ->will($this->returnCallback('Magento\Captcha\Model\DefaultTest::getConfigNodeStub'));
 
         $helper->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php
index c6fc8bdbdc1..50bb19c79b9 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php
@@ -36,7 +36,7 @@ class GridTest extends \PHPUnit_Framework_TestCase
             ->method('getAttributeId')
             ->will($this->returnValue(2));
 
-        $dirs = $this->getMock('Magento\App\Module\Dir', array(), array(), '', false);
+        $dirs = $this->getMock('Magento\App\Dir', array(), array(), '', false);
 
         $urlBuilder = $this->getMock('Magento\UrlInterface', array(), array(), '', false);
         $urlBuilder->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php
index d32dd65321f..f4c98982f1f 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php
@@ -50,7 +50,7 @@ class MatrixTest extends \PHPUnit_Framework_TestCase
         $data = array(
             'application' => $this->_application,
             'locale' => $this->_locale,
-            'formFactory' => $this->getMock('Magento\Data\Form\Factory', array(), array(), '', false),
+            'formFactory' => $this->getMock('Magento\Data\FormFactory', array(), array(), '', false),
             'productFactory' => $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false),
         );
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php
index 9dac38efc2d..3ca7789496c 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php
@@ -43,12 +43,15 @@ class WeightTest extends \PHPUnit_Framework_TestCase
 
     public function testSetForm()
     {
-        $coreHelper = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
+        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+
         $factory = $this->getMock('Magento\Data\Form\Element\Factory', array(), array(), '', false);
+
         $collectionFactory = $this->getMock('Magento\Data\Form\Element\CollectionFactory', array('create'),
             array(), '', false);
+        $session = $this->getMock('\Magento\Core\Model\Session', array(), array(), '', false);
 
-        $form = new \Magento\Data\Form($factory, $collectionFactory);
+        $form = new \Magento\Data\Form($session, $factory, $collectionFactory);
 
         $helper = $this->getMock('Magento\Catalog\Helper\Product', array('getTypeSwitcherControlLabel'),
             array(), '', false, false
@@ -73,13 +76,18 @@ class WeightTest extends \PHPUnit_Framework_TestCase
             ->with($this->equalTo($form))
             ->will($this->returnSelf());
 
+        $factory = $this->getMock('Magento\Data\Form\Element\Factory', array(), array(), '', false);
         $factory->expects($this->once())
             ->method('create')
             ->with($this->equalTo('checkbox'))
             ->will($this->returnValue($this->_virtual));
 
-        $this->_model = new \Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Weight($coreHelper, $factory,
-            $collectionFactory, $helper);
+        $this->_model = $objectManager->getObject('\Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Weight', array(
+            'factoryElement' => $factory,
+            'factoryCollection' => $collectionFactory,
+            'helper' => $helper,
+        ));
+
         $this->_model->setForm($form);
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/FlatTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/FlatTest.php
new file mode 100644
index 00000000000..e79291db674
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/FlatTest.php
@@ -0,0 +1,37 @@
+<?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\Catalog\Helper\Product;
+
+class FlatTest extends \PHPUnit_Framework_TestCase
+{
+    public function testConstruct()
+    {
+        $flatFlag = $this->getMock('Magento\Catalog\Model\Product\Flat\Flag', array(), array(), '', false);
+        $flatFlag->expects($this->once())->method('loadSelf');
+
+        $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $objectHelper->getObject('Magento\Catalog\Helper\Product\Flat', array('flatFlag' => $flatFlag));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/ReaderTest.php
index 5539248f127..4f257ee39f1 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/ReaderTest.php
@@ -66,7 +66,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         $this->_converter = $this->getMock('Magento\Catalog\Model\Attribute\Config\Converter', array('convert'));
 
         $moduleReader = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array('getModuleDir'), array(), '', false
+            'Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false
         );
         $moduleReader
             ->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/SchemaLocatorTest.php
index a94bf4945ee..299b01a1bd0 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/SchemaLocatorTest.php
@@ -31,14 +31,14 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_moduleReader;
 
     protected function setUp()
     {
         $this->_moduleReader = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array('getModuleDir'), array(), '', false
+            'Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false
         );
         $this->_moduleReader
             ->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/CategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/CategoryTest.php
index 4dcfce3d768..6339719cf97 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/CategoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/CategoryTest.php
@@ -47,7 +47,7 @@ class CategoryTest extends \PHPUnit_Framework_TestCase
             ->method('getAttributeCode')
             ->will($this->returnValue('category_ids'));
 
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $model = new \Magento\Catalog\Model\Product\Attribute\Backend\Category($logger);
         $model->setAttribute($categoryAttribute);
 
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractTest.php
index 8518dc94698..38a1e588417 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractTest.php
@@ -48,7 +48,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
             ->method('isPriceGlobal')
             ->will($this->returnValue(true));
 
-        $loggerMock = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false);
         $currencyFactoryMock = $this->getMock('Magento\Directory\Model\CurrencyFactory', array(), array(), '', false);
         $storeManagerMock = $this->getMock('Magento\Core\Model\StoreManagerInterface', array(), array(), '', false);
         $productTypeMock = $this->getMock('Magento\Catalog\Model\Product\Type', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/ConfigurableTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/ConfigurableTest.php
index a7022f10cd9..e6e14033f9e 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/ConfigurableTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/ConfigurableTest.php
@@ -52,7 +52,7 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase
         $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
         $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false);
         $confFactoryMock = $this->getMock('Magento\Catalog\Model\Resource\Product\Type\ConfigurableFactory',
             array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/GroupedTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/GroupedTest.php
index 4e93dbdc2f4..e89a63624dc 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/GroupedTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/GroupedTest.php
@@ -42,7 +42,7 @@ class GroupedTest extends \PHPUnit_Framework_TestCase
         $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
         $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false);
         $this->_model = $objectHelper->getObject('Magento\Catalog\Model\Product\Type\Grouped', array(
             'eventManager' => $eventManager,
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php
index a90a1eda776..3cc5eb8d84e 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php
@@ -42,7 +42,7 @@ class SimpleTest extends \PHPUnit_Framework_TestCase
         $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
         $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false);
         $this->_model = $objectHelper->getObject('Magento\Catalog\Model\Product\Type\Simple', array(
             'productFactory' => $productFactoryMock,
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php
index 6166330f6d8..5f1bc3804e5 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php
@@ -42,7 +42,7 @@ class VirtualTest extends \PHPUnit_Framework_TestCase
         $coreRegistryMock = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
         $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
         $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false);
         $this->_model = $objectHelper->getObject('Magento\Catalog\Model\Product\Type\Virtual', array(
             'eventManager' => $eventManager,
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/SchemaLocatorTest.php
index b5875da0f67..23f9e94c558 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/SchemaLocatorTest.php
@@ -38,7 +38,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_moduleReaderMock = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false
+            'Magento\Module\Dir\Reader', array(), array(), '', false
         );
         $this->_moduleReaderMock->expects($this->once())
             ->method('getModuleDir')->with('etc', 'Magento_Catalog')->will($this->returnValue('schema_dir'));
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/_files/product_types.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/_files/product_types.php
index e40fd2ecf95..861299d1339 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/_files/product_types.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/_files/product_types.php
@@ -43,10 +43,25 @@ return array(
         'model' => 'Instance_Type',
         'composite' => false,
         'index_priority' => 0,
-        'can_use_qty_decimals' => false,
+        'can_use_qty_decimals' => true,
         'is_qty' => false,
         'allowed_selection_types' => array(
             'type_two' => 'type_two'
         )
+    ),
+    'type_three' => array(
+        'name' => 'type_three',
+        'label' => 'Label Three',
+        'model' => 'Instance_Type',
+        'composite' => false,
+        'index_priority' => 20,
+        'can_use_qty_decimals' => false,
+        'is_qty' => false,
+        'price_model' => 'Instance_Type_Three',
+        'price_indexer' => 'Instance_Type_Three',
+        'stock_indexer' => 'Instance_Type_Three',
+        'allow_product_types' => array(
+            'type_three' => 'type_three'
+        )
     )
 );
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/_files/product_types.xml b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/_files/product_types.xml
index 6d71f197083..b9966347d09 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/_files/product_types.xml
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/_files/product_types.xml
@@ -38,4 +38,13 @@
             <type name="type_two" />
         </allowedSelectionTypes>
     </type>
+    <type name="type_three" label="Label Three" modelInstance="Instance_Type" composite="false" indexPriority="20" canUseQtyDecimals="false" isQty="false">
+        <priceModel instance="Instance_Type_Three" />
+        <indexerModel instance="Instance_Type_Three" />
+        <false/>
+        <stockIndexerModel instance="Instance_Type_Three" />
+        <allowProductTypes>
+            <type name="type_three" />
+        </allowProductTypes>
+    </type>
 </config>
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/AbstractTest.php
index a09bd8234bf..138452d2b37 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/AbstractTest.php
@@ -104,7 +104,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
             'Magento\Catalog\Model\Resource\AbstractResource',
             array('getAttributesByCode'),
             array(
-                $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false, false),
+                $this->getMock('Magento\App\Resource', array(), array(), '', false, false),
                 $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false, false),
                 $this->getMock('Magento\Eav\Model\Entity\Attribute\Set', array(), array(), '', false, false),
                 $this->getMock('Magento\Core\Model\LocaleInterface'),
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php
index b7b02ff0d13..c0cd7ae4b51 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php
@@ -52,7 +52,7 @@ class TreeTest extends \PHPUnit_Framework_TestCase
         $select->expects($this->once())->method('from')->with('catalog_category_entity');
         $connection = $this->getMock('Magento\DB\Adapter\AdapterInterface');
         $connection->expects($this->once())->method('select')->will($this->returnValue($select));
-        $this->_resource = $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false);
+        $this->_resource = $this->getMock('Magento\App\Resource', array(), array(), '', false);
         $this->_resource
             ->expects($this->once())
             ->method('getConnection')
@@ -87,9 +87,7 @@ class TreeTest extends \PHPUnit_Framework_TestCase
             ->with('catalog_category')
             ->will($this->returnValue($attributes))
         ;
-        $collection = $this->getMock(
-            'Magento\Catalog\Model\Resource\Category\Collection', array(), array(), '', false
-        );
+        $collection = $this->getCollectionMock();
         $collection->expects($this->once())->method('addAttributeToSelect')->with($attributes);
         $this->_collectionFactory
             ->expects($this->once())
@@ -100,4 +98,30 @@ class TreeTest extends \PHPUnit_Framework_TestCase
         // Makes sure the value is calculated only once
         $this->assertSame($collection, $this->_model->getCollection());
     }
+
+    /**
+     * @return \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected function getCollectionMock()
+    {
+        return $this->getMock('Magento\Catalog\Model\Resource\Category\Collection', array(), array(), '', false);
+    }
+
+    public function testSetCollection()
+    {
+        $collection = $this->getCollectionMock();
+        $this->_model->setCollection($collection);
+
+        $this->assertSame($collection, $this->_model->getCollection());
+    }
+
+    public function testCallCleaningDuringSetCollection()
+    {
+        /** @var \Magento\Catalog\Model\Resource\Category\Tree $model */
+        $model = $this->getMock('Magento\Catalog\Model\Resource\Category\Tree', array('_clean'), array(), '', false);
+        $model->expects($this->once())->method('_clean')->will($this->returnSelf());
+
+        $this->assertEquals($model, $model->setCollection($this->getCollectionMock()));
+        $this->assertEquals($model, $model->setCollection($this->getCollectionMock()));
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/StockTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/StockTest.php
index 18da746a452..96db86e4a28 100644
--- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/StockTest.php
+++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/StockTest.php
@@ -63,7 +63,6 @@ class StockTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_coreHelperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);        
         $this->_factoryElementMock = $this->getMock('Magento\Data\Form\Element\Factory', array(), array(), '', false);
         $this->_collectionFactoryMock = $this->getMock('Magento\Data\Form\Element\CollectionFactory', array(),
             array(), '', false);
@@ -74,7 +73,6 @@ class StockTest extends \PHPUnit_Framework_TestCase
         $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
         $this->_block = $objectManagerHelper->getObject('Magento\CatalogInventory\Block\Adminhtml\Form\Field\Stock',
             array(
-                'coreData' => $this->_coreHelperMock,
                 'factoryElement' => $this->_factoryElementMock,
                 'factoryCollection' => $this->_collectionFactoryMock,
                 'factoryText' => $this->_factoryTextMock,
@@ -91,11 +89,11 @@ class StockTest extends \PHPUnit_Framework_TestCase
         $this->_qtyMock->expects($this->once())->method('setForm')
             ->with($this->isInstanceOf('Magento\Data\Form\Element\AbstractElement'));
 
-        $this->_block->setForm(new \Magento\Data\Form\Element\Text(
-            $this->_coreHelperMock, 
-            $this->_factoryElementMock, 
-            $this->_collectionFactoryMock
-        ));
+        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->_block->setForm($objectManager->getObject('Magento\Data\Form\Element\Text', array(
+            'factoryElement' => $this->_factoryElementMock,
+            'factoryCollection' => $this->_collectionFactoryMock
+        )));
     }
 
     public function testSetValue()
diff --git a/dev/tests/unit/testsuite/Magento/Code/Generator/ClassTest.php b/dev/tests/unit/testsuite/Magento/Code/Generator/ClassTest.php
deleted file mode 100644
index c2825d3a3e5..00000000000
--- a/dev/tests/unit/testsuite/Magento/Code/Generator/ClassTest.php
+++ /dev/null
@@ -1,60 +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_Code
- * @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\Code\Generator;
-
-class ClassTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * Test class name for generation test
-     */
-    const TEST_CLASS_NAME = 'Magento\Code\Generator\TestAsset\TestGenerationClass';
-
-    /**
-     * Expected arguments for test class constructor
-     *
-     * @var array
-     */
-    protected $_expectedArguments = array(
-        0 => 'Magento\Code\Generator\TestAsset\ParentClass',
-        1 => 'Magento\Code\Generator\TestAsset\SourceClass',
-        2 => 'Not_Existing_Class',
-    );
-
-    public function testGenerateForConstructor()
-    {
-        $generatorMock = $this->getMock('Magento\Code\Generator', array('generateClass'), array(), '', false);
-        foreach ($this->_expectedArguments as $order => $class) {
-            $generatorMock->expects($this->at($order))
-                ->method('generateClass')
-                ->with($class);
-        }
-
-        $classGenerator = new \Magento\Code\Generator\ClassGenerator($generatorMock);
-        $classGenerator->generateForConstructor(self::TEST_CLASS_NAME);
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Code/Model/File/Validator/NotProtectedExtensionTest.php b/dev/tests/unit/testsuite/Magento/Code/Model/File/Validator/NotProtectedExtensionTest.php
new file mode 100644
index 00000000000..14037433759
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Code/Model/File/Validator/NotProtectedExtensionTest.php
@@ -0,0 +1,86 @@
+<?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\Code\Model\File\Validator;
+
+class NotProtectedExtensionTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Core\Model\File\Validator\NotProtectedExtension
+     */
+    protected $_model;
+
+    /**
+     * @var \Magento\Core\Model\Store\Config|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_coreStoreConfig;
+
+    /**
+     * @var string
+     */
+    protected $_protectedList = 'exe,php,jar';
+
+    protected function setUp()
+    {
+        $this->_coreStoreConfig = $this->getMock('\Magento\Core\Model\Store\Config', array('getConfig'),
+            array(), '', false);
+        $this->_coreStoreConfig->expects($this->atLeastOnce())->method('getConfig')->with($this->equalTo(
+                \Magento\Core\Model\File\Validator\NotProtectedExtension::XML_PATH_PROTECTED_FILE_EXTENSIONS
+            ), $this->equalTo(null))->will($this->returnValue($this->_protectedList));
+        $this->_model = new \Magento\Core\Model\File\Validator\NotProtectedExtension($this->_coreStoreConfig);
+    }
+    public function testGetProtectedFileExtensions()
+    {
+        $this->assertEquals($this->_protectedList, $this->_model->getProtectedFileExtensions());
+    }
+
+    public function testInitialization()
+    {
+        $property = new \ReflectionProperty(
+            '\Magento\Core\Model\File\Validator\NotProtectedExtension',
+            '_messageTemplates'
+        );
+        $property->setAccessible(true);
+        $defaultMess = array('protectedExtension'
+                             => __('File with an extension "%value%" is protected and cannot be uploaded'));
+        $this->assertEquals($defaultMess, $property->getValue($this->_model));
+
+        $property = new \ReflectionProperty(
+            '\Magento\Core\Model\File\Validator\NotProtectedExtension',
+            '_protectedFileExtensions'
+        );
+        $property->setAccessible(true);
+        $protectedList = array('exe', 'php', 'jar');
+        $this->assertEquals($protectedList, $property->getValue($this->_model));
+    }
+
+    public function testIsValid()
+    {
+        $this->assertTrue($this->_model->isValid('html'));
+        $this->assertTrue($this->_model->isValid('jpg'));
+        $this->assertFalse($this->_model->isValid('php'));
+        $this->assertFalse($this->_model->isValid('jar'));
+        $this->assertFalse($this->_model->isValid('exe'));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Code/Plugin/GeneratorTest/SimpleObjectManager.php b/dev/tests/unit/testsuite/Magento/Code/Plugin/GeneratorTest/SimpleObjectManager.php
index 2111dadcde8..f7ef6d18559 100644
--- a/dev/tests/unit/testsuite/Magento/Code/Plugin/GeneratorTest/SimpleObjectManager.php
+++ b/dev/tests/unit/testsuite/Magento/Code/Plugin/GeneratorTest/SimpleObjectManager.php
@@ -25,6 +25,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 namespace Magento\Code\Plugin\GeneratorTest;
+use Magento\ObjectManager;
 
 /**
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
@@ -64,4 +65,16 @@ class SimpleObjectManager implements \Magento\ObjectManager
     public function configure(array $configuration)
     {
     }
+
+    /**
+     * Set factory
+     *
+     * @param ObjectManager\Factory $factory
+     */
+    public function setFactory(ObjectManager\Factory $factory)
+    {
+
+    }
+
+
 }
diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/ConstructorIntegrityTest.php b/dev/tests/unit/testsuite/Magento/Code/Validator/ConstructorIntegrityTest.php
new file mode 100644
index 00000000000..008756fe0c4
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Code/Validator/ConstructorIntegrityTest.php
@@ -0,0 +1,91 @@
+<?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\Code\Validator;
+
+require_once __DIR__ .  '/../_files/app/code/Magento/SomeModule/Model/Three/Test.php';
+require_once __DIR__ .  '/../_files/app/code/Magento/SomeModule/Model/Two/Test.php';
+require_once __DIR__ .  '/../_files/app/code/Magento/SomeModule/Model/One/Test.php';
+require_once __DIR__ .  '/../_files/app/code/Magento/SomeModule/Model/Four/Test.php';
+require_once __DIR__ .  '/../_files/app/code/Magento/SomeModule/Model/Five/Test.php';
+require_once __DIR__ .  '/../_files/app/code/Magento/SomeModule/Model/Six/Test.php';
+
+class ConstructorIntegrityTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Code\Validator\ConstructorIntegrity
+     */
+    protected $_model;
+
+    protected function setUp()
+    {
+        $this->_model = new \Magento\Code\Validator\ConstructorIntegrity();
+    }
+
+    public function testValidateIfParentClassExist()
+    {
+        $this->assertEquals(true, $this->_model->validate('Magento\SomeModule\Model\One\Test'));
+    }
+
+    public function testValidateIfClassHasParentConstructCall()
+    {
+        $this->assertEquals(true, $this->_model->validate('Magento\SomeModule\Model\Two\Test'));
+    }
+
+    public function testValidateIfClassHasArgumentsQtyEqualToParentClass()
+    {
+        $this->assertEquals(true, $this->_model->validate('Magento\SomeModule\Model\Three\Test'));
+    }
+
+    public function testValidateIfClassHasExtraArgumentInTheParentConstructor()
+    {
+        $fileName = realpath(__DIR__ . '/../_files/app/code/Magento/SomeModule/Model/Four/Test.php');
+        $this->setExpectedException(
+            '\Magento\Code\ValidationException',
+            'Extra parameters passed to parent construct: $factory. File: ' . $fileName
+        );
+        $this->_model->validate('Magento\SomeModule\Model\Four\Test');
+    }
+
+    public function testValidateIfClassHasMissingRequiredArguments()
+    {
+        $fileName = realpath(__DIR__ . '/../_files/app/code/Magento/SomeModule/Model/Five/Test.php');
+        $this->setExpectedException(
+            '\Magento\Code\ValidationException',
+            'Missed required argument factory in parent::__construct call. File: ' . $fileName
+        );
+        $this->_model->validate('Magento\SomeModule\Model\Five\Test');
+    }
+
+    public function testValidateIfClassHasIncompatibleArguments()
+    {
+        $fileName = realpath(__DIR__ . '/../_files/app/code/Magento/SomeModule/Model/Six/Test.php');
+        $this->setExpectedException(
+            '\Magento\Code\ValidationException',
+            'Incompatible argument type: Required type: Magento\SomeModule\Model\Proxy. ' .
+            'Actual type: Magento\SomeModule\Model\ElementFactory; File: ' . $fileName
+        );
+        $this->_model->validate('Magento\SomeModule\Model\Six\Test');
+    }
+}
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php
new file mode 100644
index 00000000000..83e0a1a5a7a
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php
@@ -0,0 +1,28 @@
+<?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\SomeModule\Model;
+class ElementFactory
+{
+    
+}
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php
new file mode 100644
index 00000000000..1b0eb26211d
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php
@@ -0,0 +1,42 @@
+<?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\SomeModule\Model\Five;
+
+require_once __DIR__ .  '/../Three/Test.php';
+require_once __DIR__ .  '/../Proxy.php';
+
+class Test extends \Magento\SomeModule\Model\Three\Test
+{
+    /**
+     * @var \Magento\SomeModule\Model\Proxy
+     */
+    protected $_proxy;
+
+    public function __construct(
+        \Magento\SomeModule\Model\Proxy $proxy
+    ) {
+        parent::__construct($proxy);
+    }
+
+}
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php
new file mode 100644
index 00000000000..5117bc9847f
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php
@@ -0,0 +1,43 @@
+<?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\SomeModule\Model\Four;
+
+require_once __DIR__ .  '/../One/Test.php';
+require_once __DIR__ .  '/../ElementFactory.php';
+require_once __DIR__ .  '/../Proxy.php';
+class Test extends \Magento\SomeModule\Model\One\Test
+{
+    /**
+     * @var \Magento\SomeModule\Model\ElementFactory
+     */
+    protected $_factory;
+
+    public function __construct(
+        \Magento\SomeModule\Model\Proxy $proxy,
+        \Magento\SomeModule\Model\ElementFactory $factory
+    ) {
+        $this->_factory = $factory;
+        parent::__construct($proxy, $factory);
+    }
+}
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php
new file mode 100644
index 00000000000..01a3d1fde21
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php
@@ -0,0 +1,39 @@
+<?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\SomeModule\Model\One;
+
+require_once __DIR__ .  '/../Proxy.php';
+class Test
+{
+    /**
+     * @var \Magento\SomeModule\Model\Proxy
+     */
+    protected $_proxy;
+
+    public function __construct(
+        \Magento\SomeModule\Model\Proxy $proxy
+    ) {
+        $this->_proxy = $proxy;
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php
new file mode 100644
index 00000000000..16203433481
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php
@@ -0,0 +1,28 @@
+<?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\SomeModule\Model;
+class Proxy
+{
+
+}
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php
new file mode 100644
index 00000000000..706c6cc747a
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php
@@ -0,0 +1,43 @@
+<?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\SomeModule\Model\Six;
+
+require_once __DIR__ .  '/../One/Test.php';
+require_once __DIR__ .  '/../Proxy.php';
+require_once __DIR__ .  '/../ElementFactory.php';
+class Test extends \Magento\SomeModule\Model\One\Test
+{
+    /**
+     * @var \Magento\SomeModule\Model\ElementFactory
+     */
+    protected $_factory;
+
+    public function __construct(
+        \Magento\SomeModule\Model\Proxy $proxy,
+        \Magento\SomeModule\Model\ElementFactory $factory
+    ) {
+        $this->_factory = $factory;
+        parent::__construct($factory);
+    }
+}
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php
new file mode 100644
index 00000000000..b555eb94a3c
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\SomeModule\Model\Three;
+
+require_once __DIR__ .  '/../Two/Test.php';
+require_once __DIR__ .  '/../ElementFactory.php';
+require_once __DIR__ .  '/../Proxy.php';
+class Test extends \Magento\SomeModule\Model\Two\Test
+{
+    /**
+     * @var \Magento\SomeModule\Model\ElementFactory
+     */
+    protected $_factory;
+
+    /**
+     * @var \Magento\SomeModule\Model\Proxy
+     */
+    protected $_proxy;
+
+    public function __construct(
+        \Magento\SomeModule\Model\Proxy $proxy,
+        \Magento\SomeModule\Model\ElementFactory $factory
+    ) {
+        $this->_factory = $factory;
+        parent::__construct($proxy);
+    }
+}
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php
new file mode 100644
index 00000000000..d93f87e1b80
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php
@@ -0,0 +1,41 @@
+<?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\SomeModule\Model\Two;
+
+require_once __DIR__ .  '/../One/Test.php';
+require_once __DIR__ .  '/../Proxy.php';
+class Test extends \Magento\SomeModule\Model\One\Test
+{
+    /**
+     * @var \Magento\SomeModule\Model\Proxy
+     */
+    protected $_proxy;
+
+    public function __construct(
+        \Magento\SomeModule\Model\Proxy $proxy,
+        $data = array()
+    ) {
+        $this->_proxy = $proxy;
+    }
+}
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Config/ValidationStateTest.php b/dev/tests/unit/testsuite/Magento/Config/ValidationStateTest.php
index 58782327e43..61daa02be5c 100644
--- a/dev/tests/unit/testsuite/Magento/Config/ValidationStateTest.php
+++ b/dev/tests/unit/testsuite/Magento/Config/ValidationStateTest.php
@@ -32,7 +32,7 @@ class ValidationStateTest extends \PHPUnit_Framework_TestCase
      */
     public function testIsValidated($appMode, $expectedResult)
     {
-        $model = new \Magento\Core\Model\Config\ValidationState($appMode);
+        $model = new \Magento\App\Config\ValidationState($appMode);
         $this->assertEquals($model->isValidated(), $expectedResult);
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Convert/ConvertArrayTest.php b/dev/tests/unit/testsuite/Magento/Convert/ConvertArrayTest.php
new file mode 100644
index 00000000000..1ca647e71f2
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Convert/ConvertArrayTest.php
@@ -0,0 +1,83 @@
+<?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     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\Convert;
+
+class ConvertArrayTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Convert\ConvertArray
+     */
+    protected $_model;
+
+    protected function setUp()
+    {
+        $this->_model = new \Magento\Convert\ConvertArray;
+    }
+
+    public function testAssocToXml()
+    {
+        $data = array(
+            'one' => 1,
+            'two' => array(
+                'three' => 3,
+                'four' => '4',
+            ),
+        );
+        $result = $this->_model->assocToXml($data);
+        $expectedResult = <<<XML
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<_><one>1</one><two><three>3</three><four>4</four></two></_>
+
+XML;
+        $this->assertInstanceOf('SimpleXMLElement', $result);
+        $this->assertEquals($expectedResult, $result->asXML());
+    }
+
+    /**
+     * @param array $array
+     * @param string $rootName
+     * @expectedException \Magento\Exception
+     * @dataProvider assocToXmlExceptionDataProvider
+     */
+    public function testAssocToXmlException($array, $rootName = '_')
+    {
+        $this->_model->assocToXml($array, $rootName);
+    }
+
+    /**
+     * @return array
+     */
+    public function assocToXmlExceptionDataProvider()
+    {
+        return array(
+            array(array(), ''),
+            array(array(), 0),
+            array(array(1, 2, 3)),
+            array(array('root' => 1), 'root'),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Convert/XmlTest.php b/dev/tests/unit/testsuite/Magento/Convert/XmlTest.php
new file mode 100644
index 00000000000..7f94572ad5b
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Convert/XmlTest.php
@@ -0,0 +1,50 @@
+<?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     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\Convert;
+
+class XmlTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Convert\Xml
+     */
+    protected $_model;
+
+    protected function setUp()
+    {
+        $this->_model = new \Magento\Convert\Xml;
+    }
+
+    public function testXmlToAssoc()
+    {
+        $xmlstr = <<<XML
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<_><one>1</one><two><three>3</three><four>4</four></two></_>
+XML;
+        $result = $this->_model->xmlToAssoc(new \SimpleXMLElement($xmlstr));
+        $this->assertEquals(array('one' => '1', 'two' => array('three' => '3', 'four'  => '4')), $result);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandlerTest.php b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandlerTest.php
new file mode 100644
index 00000000000..fd2763214ef
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandlerTest.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\App\FrontController\Plugin;
+
+class DispatchExceptionHandlerTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Core\App\FrontController\Plugin\DispatchExceptionHandler
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_storeManagerMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_dirMock;
+
+    protected function setUp()
+    {
+        $this->_storeManagerMock = $this->getMock('\Magento\Core\Model\StoreManager', array(), array(), '', false);
+        $this->_dirMock = $this->getMock('\Magento\App\Dir', array(), array(), '', false);
+        $this->_model = new DispatchExceptionHandler(
+            $this->_storeManagerMock,
+            $this->_dirMock
+        );
+    }
+
+    public function testAroundDispatch()
+    {
+        $invocationChainMock = $this->getMock('\Magento\Code\Plugin\InvocationChain', array(), array(), '', false);
+        $arguments = array();
+        $invocationChainMock->expects($this->once())->method('proceed')->with($arguments);
+        $this->_model->aroundDispatch($arguments, $invocationChainMock);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/InstallTest.php b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/InstallTest.php
index 751a223ef5a..644200b3d53 100644
--- a/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/InstallTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/InstallTest.php
@@ -25,7 +25,7 @@ namespace Magento\Core\App\FrontController\Plugin;
 class InstallTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\App\FrontController\Plugin\Install
+     * @var \Magento\Module\FrontController\Plugin\Install
      */
     protected $_model;
 
@@ -53,10 +53,10 @@ class InstallTest extends \PHPUnit_Framework_TestCase
     {
         $this->_appStateMock = $this->getMock('\Magento\App\State', array(), array(), '', false);
         $this->_cacheMock = $this->getMock('\Magento\Cache\FrontendInterface');
-        $this->_dbUpdaterMock = $this->getMock('\Magento\App\UpdaterInterface');
+        $this->_dbUpdaterMock = $this->getMock('\Magento\Module\UpdaterInterface');
         $this->_invocationChainMock =
             $this->getMock('\Magento\Code\Plugin\InvocationChain', array(), array(), '', false);
-        $this->_model = new \Magento\Core\App\FrontController\Plugin\Install(
+        $this->_model = new \Magento\Module\FrontController\Plugin\Install(
             $this->_appStateMock,
             $this->_cacheMock,
             $this->_dbUpdaterMock
diff --git a/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/RequestPreprocessorTest.php b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/RequestPreprocessorTest.php
index f3d62062b84..9f4b51dc8ce 100644
--- a/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/RequestPreprocessorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/RequestPreprocessorTest.php
@@ -22,6 +22,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 namespace Magento\Core\App\FrontController\Plugin;
+
 class RequestPreprocessorTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -29,11 +30,6 @@ class RequestPreprocessorTest extends \PHPUnit_Framework_TestCase
      */
     protected $_model;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_rewriteServiceMock;
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -49,11 +45,6 @@ class RequestPreprocessorTest extends \PHPUnit_Framework_TestCase
      */
     protected $_urlMock;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_backendDataMock;
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -80,20 +71,15 @@ class RequestPreprocessorTest extends \PHPUnit_Framework_TestCase
         $this->_requestMock = $this->getMock('\Magento\App\Request\Http', array(), array(), '', false);
         $this->_invocationChainMock
             = $this->getMock('\Magento\Code\Plugin\InvocationChain', array(), array(), '', false);
-        $this->_rewriteServiceMock =
-            $this->getMock('\Magento\Core\App\Request\RewriteService', array(), array(), '', false);
         $this->_storeManagerMock = $this->getMock('\Magento\Core\Model\StoreManager', array(), array(), '', false);
         $this->_appStateMock = $this->getMock('\Magento\App\State', array(), array(), '', false);
         $this->_urlMock = $this->getMock('\Magento\Core\Model\Url', array(), array(), '', false);
-        $this->_backendDataMock = $this->getMock('\Magento\Backend\Helper\Data', array(), array(), '', false);
-        $this->_storeConfigMock = $this->getMock('\Magento\Core\Model\Store\Config', array(), array(), '', false);;
+        $this->_storeConfigMock = $this->getMock('\Magento\Core\Model\Store\Config', array(), array(), '', false);
 
         $this->_model = new \Magento\Core\App\FrontController\Plugin\RequestPreprocessor(
-            $this->_rewriteServiceMock,
             $this->_storeManagerMock,
             $this->_appStateMock,
             $this->_urlMock,
-            $this->_backendDataMock,
             $this->_storeConfigMock,
             $this->getMock('\Magento\App\ResponseFactory', array(), array(), '', false)
         );
@@ -104,7 +90,6 @@ class RequestPreprocessorTest extends \PHPUnit_Framework_TestCase
         $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(false));
         $this->_requestMock->expects($this->once())->method('setDispatched')->with(false);
         $this->_storeConfigMock->expects($this->never())->method('getConfig');
-        $this->_rewriteServiceMock->expects($this->once())->method('applyRewrites')->with($this->_requestMock);
         $this->_invocationChainMock->expects($this->once())->method('proceed')->with(array($this->_requestMock));
         $this->_model->aroundDispatch(array($this->_requestMock), $this->_invocationChainMock);
     }
@@ -114,9 +99,8 @@ class RequestPreprocessorTest extends \PHPUnit_Framework_TestCase
         $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(true));
         $this->_requestMock->expects($this->once())->method('setDispatched')->with(false);
         $this->_storeConfigMock->expects($this->once())->method('getConfig')->with('web/url/redirect_to_base');
-        $this->_rewriteServiceMock->expects($this->once())->method('applyRewrites')->with($this->_requestMock);
         $this->_invocationChainMock->expects($this->once())->method('proceed')->with(array($this->_requestMock));
-        $this->_requestMock->expects($this->never())->method('getPathInfo');
+        $this->_requestMock->expects($this->never())->method('getRequestUri');
         $this->_model->aroundDispatch(array($this->_requestMock), $this->_invocationChainMock);
     }
 
@@ -127,16 +111,15 @@ class RequestPreprocessorTest extends \PHPUnit_Framework_TestCase
         $this->_storeConfigMock
             ->expects($this->once())->method('getConfig')
             ->with('web/url/redirect_to_base')->will($this->returnValue(302));
-        $this->_requestMock->expects($this->once())->method('getPathInfo')->will($this->returnValue('node/'));
-        $this->_backendDataMock->expects($this->once())->method('getAreaFrontName')->will($this->returnValue('node'));
-        $this->_storeManagerMock->expects($this->never())->method('getStore');
-        $this->_rewriteServiceMock->expects($this->once())->method('applyRewrites')->with($this->_requestMock);
+        $this->_storeManagerMock->expects($this->any())
+            ->method('getStore')
+            ->will($this->returnValue($this->_storeMock));
+        $this->_storeMock->expects($this->once())->method('getBaseUrl');
         $this->_invocationChainMock->expects($this->once())->method('proceed')->with(array($this->_requestMock));
-
+        $this->_requestMock->expects($this->never())->method('getRequestUri');
         $this->_model->aroundDispatch(array($this->_requestMock), $this->_invocationChainMock);
     }
 
-
     public function testAroundDispatchIfBaseUrlNotExists()
     {
         $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(true));
@@ -144,15 +127,11 @@ class RequestPreprocessorTest extends \PHPUnit_Framework_TestCase
         $this->_storeConfigMock
             ->expects($this->once())->method('getConfig')
             ->with('web/url/redirect_to_base')->will($this->returnValue(302));
-        $this->_requestMock->expects($this->once())->method('getPathInfo')->will($this->returnValue('node/'));
-        $this->_backendDataMock->expects($this->once())->method('getAreaFrontName')->will($this->returnValue('node1'));
         $this->_storeManagerMock
             ->expects($this->any())->method('getStore')->will($this->returnValue($this->_storeMock));
         $this->_storeMock->expects($this->once())->method('getBaseUrl')->will($this->returnValue(false));
         $this->_requestMock->expects($this->never())->method('getRequestUri');
-        $this->_rewriteServiceMock->expects($this->once())->method('applyRewrites')->with($this->_requestMock);
         $this->_invocationChainMock->expects($this->once())->method('proceed')->with(array($this->_requestMock));
-
         $this->_model->aroundDispatch(array($this->_requestMock), $this->_invocationChainMock);
     }
-}
\ No newline at end of file
+}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/EntryPoint/MediaTest.php b/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php
similarity index 84%
rename from dev/tests/unit/testsuite/Magento/Core/Model/EntryPoint/MediaTest.php
rename to dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php
index 1d9f4a31588..1de5691a351 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/EntryPoint/MediaTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php
@@ -21,12 +21,12 @@
  * @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\EntryPoint;
+namespace Magento\Core\App;
 
 class MediaTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\EntryPoint\Media
+     * @var \Magento\Core\App\Media
      */
     protected $_model;
 
@@ -50,11 +50,6 @@ class MediaTest extends \PHPUnit_Framework_TestCase
      */
     protected $_dirVerificationMock;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_config;
-
     /**
      * @var callable
      */
@@ -75,11 +70,6 @@ class MediaTest extends \PHPUnit_Framework_TestCase
      */
     protected $_mediaDirectory = 'mediaDirectory';
 
-    /**
-     * @var string
-     */
-    protected $_relativeFileName = 'relativeFileName';
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -87,7 +77,6 @@ class MediaTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_config = $this->getMock('Magento\Core\Model\Config\Primary', array(), array(), '', false);
         $this->_requestMock = $this->getMock('Magento\Core\Model\File\Storage\Request', array(), array(), '', false);
         $this->_closure = function () {
             return true;
@@ -107,17 +96,16 @@ class MediaTest extends \PHPUnit_Framework_TestCase
             array('Magento\Core\Model\File\Storage\Request', $this->_requestMock),
             array('Magento\Core\Model\File\Storage\Synchronization', $this->_sync),
         );
-
-        $this->_model = new \Magento\Core\Model\EntryPoint\Media(
-            $this->_config,
+        $this->_model = new \Magento\Core\App\Media(
+            $this->_appState,
+            $this->_objectManagerMock,
             $this->_requestMock,
+            $this->_responseMock,
             $this->_closure,
+            'baseDir',
+            'mediaDirectory',
             'var',
-            $this->_mediaDirectory,
-            'cacheFile',
-            $this->_relativeFileName,
-            $this->_objectManagerMock,
-            $this->_responseMock
+            'params'
         );
         $this->_objectManagerMock->expects($this->any())->method('get')->will($this->returnValueMap($map));
     }
@@ -132,28 +120,28 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $this->_appState->expects($this->once())->method('isInstalled')->will($this->returnValue(false));
         $this->_responseMock->expects($this->once())->method('sendNotFound');
         $this->_requestMock->expects($this->never())->method('getPathInfo');
-        $this->_model->processRequest();
+        $this->assertEquals(-1, $this->_model->execute());
     }
 
     public function testProcessRequestCreatesConfigFileMediaDirectoryIsNotProvided()
     {
-        $this->_model = new \Magento\Core\Model\EntryPoint\Media(
-            $this->_config,
+        $this->_model = new \Magento\Core\App\Media(
+            $this->_appState,
+            $this->_objectManagerMock,
             $this->_requestMock,
+            $this->_responseMock,
             $this->_closure,
-            'var',
+            'baseDir',
             false,
-            'cacheFile',
-            'relativeFileName',
-            $this->_objectManagerMock,
-            $this->_responseMock
+            'var',
+            'params'
         );
         $this->_appState->expects($this->once())->method('isInstalled')->will($this->returnValue(true));
         $this->_objectManagerMock->expects($this->once())->method('create')
             ->with('Magento\Core\Model\File\Storage\Config')
             ->will($this->returnValue($this->_configMock));
         $this->_configMock->expects($this->once())->method('save');
-        $this->_model->processRequest();
+        $this->assertEquals(-1, $this->_model->execute());
 
     }
 
@@ -162,16 +150,25 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $this->_closure = function () {
             return false;
         };
-        $this->_model = new \Magento\Core\Model\EntryPoint\Media(
-            $this->_config, $this->_requestMock, $this->_closure, 'var', false, 'cacheFile', 'relativeFileName',
-                $this->_objectManagerMock, $this->_responseMock);
+        $this->_model = new \Magento\Core\App\Media(
+            $this->_appState,
+            $this->_objectManagerMock,
+            $this->_requestMock,
+            $this->_responseMock,
+            $this->_closure,
+            'baseDir',
+            false,
+            'var',
+            'params'
+        );
         $this->_appState->expects($this->once())->method('isInstalled')->will($this->returnValue(true));
         $this->_responseMock->expects($this->once())->method('sendNotFound');
         $this->_requestMock->expects($this->once())->method('getPathInfo');
         $this->_objectManagerMock->expects($this->once())->method('create')
             ->with('Magento\Core\Model\File\Storage\Config')
             ->will($this->returnValue($this->_configMock));
-        $this->_model->processRequest();
+        $this->_configMock->expects($this->once())->method('getAllowedResources')->will($this->returnValue(false));
+        $this->assertEquals(-1, $this->_model->execute());
 
     }
 
@@ -182,7 +179,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $this->_requestMock->expects($this->once())->method('getPathInfo');
         $this->_responseMock->expects($this->once())->method('sendNotFound');
         $this->_requestMock->expects($this->never())->method('getFilePath');
-        $this->_model->processRequest();
+        $this->assertEquals(-1, $this->_model->execute());
     }
 
     public function testProcessRequestReturnsFileIfItsProperlySynchronized()
@@ -196,7 +193,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase
              ->method('getFilePath')->will($this->returnValue(realpath($filePath)));
         $this->_responseMock->expects($this->once())->method('sendFile')->with($filePath);
         $this->_responseMock->expects($this->never())->method('sendNotFound');
-        $this->_model->processRequest();
+        $this->assertEquals(0, $this->_model->execute());
     }
 
     public function testProcessRequestReturnsNotFoundIfFileIsNotSynchronized()
@@ -209,6 +206,6 @@ class MediaTest extends \PHPUnit_Framework_TestCase
             ->method('getFilePath')->will($this->returnValue('non_existing_file_name'));
         $this->_responseMock->expects($this->never())->method('sendFile');
         $this->_responseMock->expects($this->once())->method('sendNotFound');
-        $this->_model->processRequest();
+        $this->assertEquals(-1, $this->_model->execute());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/ResourceResolver/_files/Module/data/module_first_setup/.gitignore b/dev/tests/unit/testsuite/Magento/Core/App/_files/.gitignore
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/App/Module/ResourceResolver/_files/Module/data/module_first_setup/.gitignore
rename to dev/tests/unit/testsuite/Magento/Core/App/_files/.gitignore
diff --git a/dev/tests/unit/testsuite/Magento/Core/Block/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Core/Block/TemplateTest.php
index da0aba30b63..45ecad0fe63 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Block/TemplateTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Block/TemplateTest.php
@@ -70,16 +70,20 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
             ->with('phtml')
             ->will($this->returnValue($this->_templateEngine));
 
-        $context = $this->getMock('\Magento\Core\Block\Template\Context', array(), array(), '', false);
+        $appState = $this->getMock('Magento\App\State', array('getAreaCode'), array(), '', false);
+        $appState->expects($this->any())->method('getAreaCode')->will($this->returnValue('frontend'));
+
+        $context = $this->getMock('Magento\Core\Block\Template\Context', array(), array(), '', false);
         $context->expects($this->any())->method('getEngineFactory')->will($this->returnValue($enginePool));
         $context->expects($this->any())->method('getDirs')->will($this->returnValue($dirs));
         $context->expects($this->any())->method('getFilesystem')->will($this->returnValue($this->_filesystem));
         $context->expects($this->any())->method('getViewFileSystem')->will($this->returnValue($this->_viewFileSystem));
+        $context->expects($this->any())->method('getAppState')->will($this->returnValue($appState));
 
         $this->_block = new \Magento\Core\Block\Template(
             $this->getMock('\Magento\Core\Helper\Data', array(), array(), '', false),
             $context,
-            array('template' => 'template.phtml', 'area' => 'frontend', 'module_name' => 'Fixture_Module')
+            array('template' => 'template.phtml', 'module_name' => 'Fixture_Module')
         );
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/Request/HttpTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/Request/HttpTest.php
index ea3b74f9a8c..573c3ab53de 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Controller/Request/HttpTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Controller/Request/HttpTest.php
@@ -36,7 +36,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_routerListMock = $this->getMock('\Magento\App\RouterList', array(), array(), '', false);
+        $this->_routerListMock = $this->getMock('\Magento\App\Route\ConfigInterface');
         $this->_model = new \Magento\App\Request\Http($this->_routerListMock);
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/AbstractActionTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/AbstractActionTest.php
index 3e3349b41dc..10a92e5847a 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/AbstractActionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/AbstractActionTest.php
@@ -90,7 +90,7 @@ class AbstractActionTest extends \PHPUnit_Framework_TestCase
      */
     public function testResponseHeaders()
     {
-        $routerListMock = $this->getMock('\Magento\App\RouterList', array(), array(), '', false);
+        $routerListMock = $this->getMock('Magento\App\Route\ConfigInterface');
         $request = new \Magento\App\Request\Http($routerListMock);
         $response = new \Magento\App\Response\Http();
         $response->headersSentThrowsException = false;
diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/ForwardTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/ForwardTest.php
index b16faca1071..4ab9a3a2f97 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/ForwardTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/ForwardTest.php
@@ -54,7 +54,7 @@ class ForwardTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_routerListMock = $this->getMock('\Magento\App\RouterList', array(), array(), '', false);
+        $this->_routerListMock = $this->getMock('Magento\App\Route\ConfigInterface');
         $this->_request  = new \Magento\App\Request\Http($this->_routerListMock);
         $this->_response = new \Magento\App\Response\Http();
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/RedirectTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/RedirectTest.php
index d94b9d6a312..0c5d634213d 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/RedirectTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/RedirectTest.php
@@ -54,7 +54,7 @@ class RedirectTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_routerListMock = $this->getMock('\Magento\App\RouterList', array(), array(), '', false);
+        $this->_routerListMock = $this->getMock('Magento\App\Route\ConfigInterface', array(), array(), '', false);
         $this->_request  = new \Magento\App\Request\Http($this->_routerListMock);
         $this->_response = new \Magento\App\Response\Http();
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/StringTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/StringTest.php
new file mode 100644
index 00000000000..0c4b1f06b2f
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Core/Helper/StringTest.php
@@ -0,0 +1,108 @@
+<?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.
+ *
+ * @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\Core\Helper;
+
+class StringTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Core\Helper\String
+     */
+    protected $_helper;
+
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $_objectManager;
+
+    protected function setUp()
+    {
+        $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->_helper = $this->_objectManager->getObject('Magento\Core\Helper\String');
+    }
+
+    /**
+     * @param string $testString
+     * @param string $expected
+     *
+     * @dataProvider upperCaseWordsDataProvider
+     */
+    public function testUpperCaseWords($testString, $expected)
+    {
+        $string = new \Magento\Stdlib\String;
+        $actual = $string->upperCaseWords($testString);
+        $this->assertEquals($expected, $actual);
+    }
+
+    /**
+     * @return array
+     */
+    public function upperCaseWordsDataProvider()
+    {
+        return array(
+            array(
+                'test test2',
+                'Test_Test2',
+            ),
+            array(
+                'test_test2',
+                'Test_Test2',
+            ),
+            array(
+                'test_test2 test3',
+                'Test_Test2_Test3',
+            ),
+        );
+    }
+
+    /**
+     * @param string $testString
+     * @param string $sourceSeparator
+     * @param string $destinationSeparator
+     * @param string $expected
+     *
+     * @dataProvider upperCaseWordsWithSeparatorsDataProvider
+     */
+    public function testUpperCaseWordsWithSeparators($testString, $sourceSeparator, $destinationSeparator, $expected)
+    {
+        $string = new \Magento\Stdlib\String;
+        $actual = $string->upperCaseWords($testString, $sourceSeparator, $destinationSeparator);
+        $this->assertEquals($expected, $actual);
+    }
+
+    /**
+     * @return array
+     */
+    public function upperCaseWordsWithSeparatorsDataProvider()
+    {
+        return array(
+            array(
+                'test test2_test3\test4|test5',
+                '|',
+                '\\',
+                'Test\Test2_test3\test4\Test5',
+            ),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/Url/RewriteTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/Url/RewriteTest.php
index dce225407c3..4a1b7694ef1 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Helper/Url/RewriteTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Helper/Url/RewriteTest.php
@@ -51,7 +51,7 @@ class RewriteTest extends \PHPUnit_Framework_TestCase
             ->with('Magento\Core\Model\Registry')
             ->will($this->returnValue($coreRegisterMock));
 
-        \Magento\Core\Model\ObjectManager::setInstance($objectManagerMock);
+        \Magento\App\ObjectManager::setInstance($objectManagerMock);
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php
index 482e65b0fc5..8c6c83c1a17 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php
@@ -40,7 +40,11 @@ class StateTest extends \PHPUnit_Framework_TestCase
      */
     public function testConstructor($mode)
     {
-        $model = new \Magento\App\State(time(), $mode);
+        $model = new \Magento\App\State(
+            $this->getMockForAbstractClass('Magento\Config\ScopeInterface', array(), '', false),
+            time(),
+            $mode
+        );
         $this->assertEquals($mode, $model->getMode());
     }
 
@@ -68,6 +72,10 @@ class StateTest extends \PHPUnit_Framework_TestCase
      */
     public function testConstructorException()
     {
-        new \Magento\App\State(time(), "unknown mode");
+        new \Magento\App\State(
+            $this->getMockForAbstractClass('Magento\Config\ScopeInterface', array(), '', false),
+            time(),
+            "unknown mode"
+        );
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/AppTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/AppTest.php
index bbb792414c3..aff4c08f3aa 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/AppTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/AppTest.php
@@ -78,7 +78,7 @@ class AppTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_configMock = $this->getMock('Magento\Core\Model\Config', array(), array(), '', false, false);
-        $this->_cacheMock = $this->getMock('Magento\Core\Model\CacheInterface');
+        $this->_cacheMock = $this->getMock('Magento\App\CacheInterface');
         $this->_objectManagerMock = $this->getMock('Magento\ObjectManager', array(), array(), '', false, false);
         $this->_storeManagerMock = $this->getMock('Magento\Core\Model\StoreManagerInterface');
         $this->_eventManagerMock = $this->getMock('Magento\Event\ManagerInterface');
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Cache/Frontend/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Cache/Frontend/FactoryTest.php
index 6c4a7a40505..1b73bf6e5fe 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Cache/Frontend/FactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Cache/Frontend/FactoryTest.php
@@ -186,7 +186,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
             array(\Magento\App\Dir::CONFIG, 'CONFIG_DIR'),
         );
         $dirs = $this->getMock('Magento\App\Dir', array('getDir'), array(), '', false);
-        $resource = $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false);
+        $resource = $this->getMock('Magento\App\Resource', array(), array(), '', false);
         $dirs->expects($this->any())
             ->method('getDir')
             ->will($this->returnValueMap($map));
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/FileResolverTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/FileResolverTest.php
index 8a8ad1355aa..e0b9688faed 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/FileResolverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Config/FileResolverTest.php
@@ -41,7 +41,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
             ->with(\Magento\App\Dir::CONFIG)
             ->will($this->returnValue($appConfigDir));
 
-        $moduleReader = $this->getMock('Magento\Core\Model\Config\Modules\Reader', array(),
+        $moduleReader = $this->getMock('Magento\Module\Dir\Reader', array(),
             array('getConfigurationFiles'), '', false);
         $moduleReader->expects($this->any())
             ->method('getConfigurationFiles')
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/ReaderTest.php
index 7bc8ad2524f..fe3dc925350 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/ReaderTest.php
@@ -50,10 +50,17 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         $this->_filePath = __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR;
         $this->_fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface');
         $this->_converterMock = $this->getMock('Magento\Core\Model\Config\Initial\Converter');
-
+        $schemaLocatorMock =
+            $this->getMock('Magento\Core\Model\Config\Initial\SchemaLocator', array(), array(), '', false);
+        $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface');
+        $validationStateMock->expects($this->once())->method('isValidated')->will($this->returnValue(true));
+        $schemaFile = $this->_filePath . 'config.xsd';
+        $schemaLocatorMock->expects($this->once())->method('getSchema')->will($this->returnValue($schemaFile));
         $this->_model = new \Magento\Core\Model\Config\Initial\Reader(
             $this->_fileResolverMock,
-            $this->_converterMock
+            $this->_converterMock,
+            $schemaLocatorMock,
+            $validationStateMock
         );
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/XsdTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/XsdTest.php
new file mode 100644
index 00000000000..3b25882a3ee
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/XsdTest.php
@@ -0,0 +1,71 @@
+<?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\Config\Initial;
+
+class XsdTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Path to xsd schema file
+     * @var string
+     */
+    protected $_xsdSchema;
+
+    /**
+     * @var \Magento\TestFramework\Utility\XsdValidator
+     */
+    protected $_xsdValidator;
+
+    protected function setUp()
+    {
+        $this->_xsdSchema = BP . '/app/code/Magento/Core/etc/config.xsd';
+        $this->_xsdValidator = new \Magento\TestFramework\Utility\XsdValidator();
+    }
+
+    /**
+     * @param string $xmlString
+     * @param array $expectedError
+     * @dataProvider schemaCorrectlyIdentifiesInvalidXmlDataProvider
+     */
+    public function testSchemaCorrectlyIdentifiesInvalidXml($xmlString, $expectedError)
+    {
+        $actualError = $this->_xsdValidator->validate($this->_xsdSchema, $xmlString);
+        $this->assertEquals($expectedError, $actualError);
+    }
+
+    public function testSchemaCorrectlyIdentifiesValidXml()
+    {
+        $xmlString = file_get_contents(__DIR__ . '/_files/valid_config.xml');
+        $actualResult = $this->_xsdValidator->validate($this->_xsdSchema, $xmlString);
+        $this->assertEmpty($actualResult);
+    }
+
+    /**
+     * Data provider with invalid xml array according to config.xsd
+     */
+    public function schemaCorrectlyIdentifiesInvalidXmlDataProvider()
+    {
+        return include(__DIR__ . '/_files/invalidConfigXmlArray.php');
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/config.xsd b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/config.xsd
new file mode 100644
index 00000000000..970496d7273
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/config.xsd
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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)
+ */
+-->
+<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  <xs:element name="config" type="xs:string"/>
+</xs:schema>
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/invalidConfigXmlArray.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/invalidConfigXmlArray.php
new file mode 100644
index 00000000000..829752bba38
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/invalidConfigXmlArray.php
@@ -0,0 +1,29 @@
+<?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)
+ */
+return array(
+    'with_notallowed_handle' => array(
+        '<?xml version="1.0"?><config><notallowe></notallowe></config>',
+        array("Element 'notallowe': This element is not expected. Expected is one of ( default, stores, websites ).")),
+);
diff --git a/app/design/frontend/magento_backup/Magento_PaypalUk/layput/override/paypaluk_express_review_details.xml b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/valid_config.xml
similarity index 84%
rename from app/design/frontend/magento_backup/Magento_PaypalUk/layput/override/paypaluk_express_review_details.xml
rename to dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/valid_config.xml
index 4f46c82923b..dafd3fe3e08 100644
--- a/app/design/frontend/magento_backup/Magento_PaypalUk/layput/override/paypaluk_express_review_details.xml
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/_files/valid_config.xml
@@ -23,6 +23,14 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Page\Block\Html" name="root" output="1" template="page_fragment.phtml"/>
-</layout>
+<config>
+    <default>
+        <some></some>
+    </default>
+    <websites>
+        <some></some>
+    </websites>
+    <stores>
+        <some></some>
+    </stores>
+</config>
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/LoaderTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/LoaderTest.php
deleted file mode 100644
index 5f1c890819d..00000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/LoaderTest.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-/**
- * Test class for \Magento\Core\Model\Config\Loader
- *
- * 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\Config;
-
-class LoaderTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Core\Model\Config\Loader
-     */
-    protected $_model;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_primaryConfigMock;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_modulesReaderMock;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_baseConfigMock;
-
-    protected function setUp()
-    {
-        $this->_primaryConfigMock = $this->getMock(
-            'Magento\Core\Model\Config\Primary', array(), array(), '', false, false
-        );
-
-        $this->_modulesReaderMock = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false, false
-        );
-
-        $this->_baseConfigMock = $this->getMock(
-            'Magento\Core\Model\Config\Base', array(), array(), '', false, false
-        );
-
-        $this->_model = new \Magento\Core\Model\Config\Loader(
-            $this->_primaryConfigMock,
-            $this->_modulesReaderMock
-        );
-    }
-
-    public function testLoadWithEmptyConfig()
-    {
-        /** Test load initial xml */
-        $this->_baseConfigMock->expects($this->once())->method('getNode')->will($this->returnValue(null));
-        $this->_baseConfigMock->expects($this->once())->method('loadString')->with('<config></config>');
-
-        /** Test extends config with primary config values */
-        $this->_baseConfigMock->expects($this->once())->method('extend')->with($this->_primaryConfigMock);
-
-        /** Test loading of DB provider specific config files */
-        $this->_modulesReaderMock->expects($this->once())
-            ->method('loadModulesConfiguration')
-            ->with(array('config.xml'), $this->_baseConfigMock);
-
-        /** Test merging of all config data */
-        $this->_baseConfigMock->expects($this->once())->method('applyExtends');
-
-        $this->_model->load($this->_baseConfigMock);
-    }
-
-    /**
-     * @depends testLoadWithEmptyConfig
-     */
-    public function testLoadWithNotEmptyConfig()
-    {
-        /** Test load initial xml */
-        $this->_baseConfigMock->expects($this->once())->method('getNode')->will($this->returnValue('some value'));
-        $this->_baseConfigMock->expects($this->never())->method('loadString');
-
-        $this->_model->load($this->_baseConfigMock);
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/PrimaryTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/PrimaryTest.php
deleted file mode 100644
index a70e5482023..00000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/PrimaryTest.php
+++ /dev/null
@@ -1,111 +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.
- * 
- * @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\Config;
-
-class PrimaryTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Core\Model\Config\Primary
-     */
-    protected $_model;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_dirMock;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_loaderMock;
-
-    /**
-     * @var string
-     */
-    protected $_configString;
-
-    protected function setUp()
-    {
-        $this->_dirMock = $this->getMock('Magento\App\Dir', array(), array(), '', false);
-        $this->_dirMock->expects($this->any())->method('getDir')->will($this->returnValueMap(array(
-            array(\Magento\App\Dir::DI, '/path_to_root/var/di'),
-            array(\Magento\App\Dir::ROOT, '/path_to_root'),
-        )));
-        $this->_loaderMock = $this->getMock('Magento\Core\Model\Config\LoaderInterface');
-        $that = $this;
-        $this->_loaderMock->expects($this->once())->method('load')->will($this->returnCallback(
-            function ($config) use ($that) {
-                $testConfig = new \Magento\Core\Model\Config\Base($that->getConfigString());
-                $config->getNode()->extend($testConfig->getNode());
-            }
-        ));
-    }
-
-    protected function tearDown()
-    {
-        unset($this->_dirMock);
-        unset($this->_loaderMock);
-        unset($this->_model);
-    }
-
-    public function getConfigString()
-    {
-        return $this->_configString;
-    }
-
-    public function testGetDefinitionPathReturnsDefaultPathIfNothingSpecified()
-    {
-        $this->_model = new \Magento\Core\Model\Config\Primary(BP, array(), $this->_dirMock, $this->_loaderMock);
-        $expectedPath = '/path_to_root/var/di';
-        $this->assertEquals($expectedPath, $this->_model->getDefinitionPath());
-    }
-
-    public function testGetDefinitionPathReturnsAbsolutePath()
-    {
-        $this->_configString = '<config><global><di>'
-            . '<definitions><path>customPath</path></definitions>'
-            . '</di></global></config>';
-        $this->_model = new \Magento\Core\Model\Config\Primary(BP, array(), $this->_dirMock, $this->_loaderMock);
-        $this->assertEquals('customPath', $this->_model->getDefinitionPath());
-    }
-
-    public function testGetDefinitionPathReturnsRelativePath()
-    {
-        $this->_configString = '<config><global><di>'
-            . '<definitions><relativePath>customPath</relativePath></definitions>'
-            . '</di></global></config>';
-        $this->_model = new \Magento\Core\Model\Config\Primary(BP, array(), $this->_dirMock, $this->_loaderMock);
-        $expectedPath = '/path_to_root' . DIRECTORY_SEPARATOR . 'customPath';
-        $this->assertEquals($expectedPath, $this->_model->getDefinitionPath());
-    }
-
-    public function getDefinitionFormatReturnsConfiguredFormat()
-    {
-        $this->_configString = '<config><global><di>'
-            . '<definitions><format>igbinary</format></definitions>'
-            . '</di></global></config>';
-        $this->_model = new \Magento\Core\Model\Config\Primary(BP, array(), $this->_dirMock, $this->_loaderMock);
-        $this->assertEquals('igbinary', $this->_model->getDefinitionFormat());
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/StorageTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/StorageTest.php
deleted file mode 100644
index 27d15f1d4f8..00000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/StorageTest.php
+++ /dev/null
@@ -1,98 +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.
- *
- *
- * @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\Core\Model\Config\Storage
- */
-namespace Magento\Core\Model\Config;
-
-class StorageTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Core\Model\Config\Storage
-     */
-    protected $_model;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_configMock;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_cacheMock;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_loaderMock;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_factoryMock;
-
-    protected function setUp()
-    {
-        $this->_configMock = $this->getMock('Magento\Core\Model\ConfigInterface',
-            array(), array(), '', false, false);
-        $this->_cacheMock = $this->getMock('Magento\Core\Model\Config\Cache',
-            array(), array(), '', false, false);
-        $this->_loaderMock = $this->getMock('Magento\Core\Model\Config\Loader',
-            array(), array(), '', false, false);
-        $this->_factoryMock = $this->getMock('Magento\Core\Model\Config\BaseFactory',
-            array(), array(), '', false, false);
-        $this->_model = new \Magento\Core\Model\Config\Storage($this->_cacheMock, $this->_loaderMock,
-            $this->_factoryMock);
-    }
-
-    public function testGetConfigurationWithData()
-    {
-        $this->_cacheMock->expects($this->once())->method('load')->will($this->returnValue($this->_configMock));
-        $this->_factoryMock->expects($this->never())->method('create');
-        $this->_loaderMock->expects($this->never())->method('load');
-        $this->_cacheMock->expects($this->never())->method('save');
-        $this->_model->getConfiguration();
-    }
-
-    public function testGetConfigurationWithoutData()
-    {
-        $mockConfigBase = $this->getMockBuilder('Magento\Core\Model\Config\Base')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $this->_cacheMock->expects($this->once())->method('load')->will($this->returnValue(false));
-        $this->_factoryMock->expects($this->once())->method('create')->will($this->returnValue($mockConfigBase));
-        $this->_loaderMock->expects($this->once())->method('load');
-        $this->_cacheMock->expects($this->once())->method('save');
-        $this->_model->getConfiguration();
-    }
-
-    public function testRemoveCache()
-    {
-        $this->_cacheMock->expects($this->once())->method('clean');
-        $this->_model->removeCache();
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/XsdTest.php
index d84f823d7c6..d797793ad2a 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/XsdTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Config/XsdTest.php
@@ -38,7 +38,8 @@ class XsdTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_xsdSchema = BP . '/app/code/Magento/Core/etc/routes.xsd';
+        $this->_xsdSchema = BP . '/lib/Magento/App/etc/routes.xsd';
+
         $this->_xsdValidator = new \Magento\TestFramework\Utility\XsdValidator();
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/ConfigTest.php
deleted file mode 100644
index 1c410e31709..00000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/ConfigTest.php
+++ /dev/null
@@ -1,144 +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_Core
- * @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\Core\Model;
-
-class ConfigTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Core\Model\Config
-     */
-    protected $_model;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_configScopeMock;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_objectManagerMock;
-
-    /**
-     * @var \Magento\App\ModuleListInterface
-     */
-    protected $_moduleListMock;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_sectionPoolMock;
-
-    protected function setUp()
-    {
-        $xml = '<config>
-                    <default>
-                        <first>
-                            <custom>
-                                <node>value</node>
-                            </custom>
-                        </first>
-                    </default>
-                </config>';
-
-        $areas = array('adminhtml' => array(
-            'base_controller' => 'base_controller',
-            'routers' => array(
-                'admin' => array(
-                    'class' => 'class'
-                )
-            ),
-            'frontName' => 'backend'
-        ));
-
-        $configBase = new \Magento\Core\Model\Config\Base($xml);
-        $this->_objectManagerMock = $this->getMock('Magento\Core\Model\ObjectManager', array(), array(), '', false);
-        $configStorageMock = $this->getMock('Magento\Core\Model\Config\StorageInterface');
-        $configStorageMock->expects($this->any())->method('getConfiguration')->will($this->returnValue($configBase));
-        $modulesReaderMock = $this->getMock('Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false);
-        $this->_configScopeMock = $this->getMock('Magento\Config\ScopeInterface');
-        $this->_moduleListMock = $this->getMock('Magento\App\ModuleListInterface');
-        $this->_sectionPoolMock = $this->getMock('Magento\Core\Model\Config\SectionPool', array(), array(), '', false);
-
-        $this->_model = new \Magento\Core\Model\Config(
-            $this->_objectManagerMock,
-            $configStorageMock,
-            $modulesReaderMock,
-            $this->_moduleListMock,
-            $this->_configScopeMock,
-            $this->_sectionPoolMock,
-            $areas
-        );
-    }
-    public function testSetNodeData()
-    {
-        $this->_model->setNode('some/custom/node', 'true');
-
-        $actual = (string)$this->_model->getNode('some/custom/node');
-        $this->assertEquals('true', $actual);
-    }
-
-    public function testGetNode()
-    {
-        $this->assertInstanceOf(
-            'Magento\Core\Model\Config\Element',
-            $this->_model->getNode('default/first/custom/node')
-        );
-    }
-
-    public function testSetValue()
-    {
-        $scope = 'default';
-        $scopeCode = null;
-        $value = 'test';
-        $path = 'test/path';
-        $sectionMock = $this->getMock('Magento\Core\Model\Config\Data', array(), array(), '', false);
-        $this->_sectionPoolMock->expects($this->once())
-            ->method('getSection')
-            ->with($scope, $scopeCode)
-            ->will($this->returnValue($sectionMock));
-        $sectionMock->expects($this->once())
-            ->method('setValue')
-            ->with($path, $value);
-        $this->_model->setValue($path, $value);
-    }
-
-    public function testGetValue()
-    {
-        $path = 'test/path';
-        $scope = 'default';
-        $scopeCode = null;
-        $sectionMock = $this->getMock('Magento\Core\Model\Config\Data', array(), array(), '', false);
-        $this->_sectionPoolMock->expects($this->once())->method('getSection')->with($scope, $scopeCode)
-            ->will($this->returnValue($sectionMock));
-        $sectionMock->expects($this->once())
-            ->method('getValue')
-            ->with($path);
-        $this->_model->getValue($path);
-    }
-
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Config/ReaderTest.php
index af51f903157..e217d93ecdb 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Config/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Config/ReaderTest.php
@@ -40,7 +40,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
     {
         $path = array(__DIR__, '..', '_files', 'service_calls.xml');
         $path = realpath(implode('/', $path));
-        $this->_modulesReaderMock = $this->getMockBuilder('Magento\Core\Model\Config\Modules\Reader')
+        $this->_modulesReaderMock = $this->getMockBuilder('Magento\Module\Dir\Reader')
             ->disableOriginalConstructor()
             ->getMock();
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/ConfigTest.php
index 9c0fa242e0d..f1c845a4236 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/ConfigTest.php
@@ -55,8 +55,8 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             ->method('createReader')
             ->will($this->returnValue($reader));
 
-        /** @var \Magento\Core\Model\Config\Modules\Reader $modulesReaderMock */
-        $modulesReaderMock = $this->getMockBuilder('Magento\Core\Model\Config\Modules\Reader')
+        /** @var \Magento\Module\Dir\Reader $modulesReaderMock */
+        $modulesReaderMock = $this->getMockBuilder('Magento\Module\Dir\Reader')
             ->disableOriginalConstructor()
             ->getMock();
         $modulesReaderMock->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/ReaderTest.php
index 0ab2abcd808..49cc3d2ef2e 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/ReaderTest.php
@@ -36,7 +36,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
     protected $_converter;
 
     /**
-     * @var \Magento\App\Module\Dir\ReverseResolver|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Module\Dir\ReverseResolver|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_moduleDirResolver;
 
@@ -56,7 +56,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         $this->_converter = $this->getMock('Magento\Core\Model\Email\Template\Config\Converter', array('convert'));
 
         $moduleReader = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array('getModuleDir'), array(), '', false
+            'Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false
         );
         $moduleReader
             ->expects($this->once())
@@ -69,7 +69,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         $validationState->expects($this->once())->method('isValidated')->will($this->returnValue(false));
 
         $this->_moduleDirResolver = $this->getMock(
-            'Magento\App\Module\Dir\ReverseResolver', array(), array(), '', false
+            'Magento\Module\Dir\ReverseResolver', array(), array(), '', false
         );
 
         $this->_model = new \Magento\Core\Model\Email\Template\Config\Reader(
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/SchemaLocatorTest.php
index f9de2073af2..39aa0ba8097 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/SchemaLocatorTest.php
@@ -31,14 +31,14 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_moduleReader;
 
     protected function setUp()
     {
         $this->_moduleReader = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array('getModuleDir'), array(), '', false
+            'Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false
         );
         $this->_moduleReader
             ->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/ConfigTest.php
index f619f5d19ff..0c254fbeefc 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/ConfigTest.php
@@ -36,7 +36,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     protected $_dataStorage;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_moduleReader;
 
@@ -51,7 +51,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue(require __DIR__ . '/Config/_files/email_templates_merged.php'))
         ;
         $this->_moduleReader = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array('getModuleDir'), array(), '', false
+            'Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false
         );
         $this->_model = new \Magento\Core\Model\Email\Template\Config($this->_dataStorage, $this->_moduleReader);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/EncryptionTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/EncryptionTest.php
deleted file mode 100644
index 733948afa11..00000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/EncryptionTest.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @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;
-
-class EncryptionTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @dataProvider setHelperGetHashDataProvider
-     */
-    public function testSetHelperGetHash($input)
-    {
-        $helper = $this->getMockBuilder('Magento\Core\Helper\Data')
-                      ->disableOriginalConstructor()
-                      ->setMockClassName('Magento_Core_Helper_Data_Stub')
-                      ->getMock();
-        $objectManager = $this->getMock('Magento\ObjectManager');
-        $objectManager->expects($this->once())
-            ->method('get')
-            ->with($this->stringContains('Magento_Core_Helper_Data_Stub'))
-            ->will($this->returnValue($helper));
-        $coreConfig = $this->getMock('Magento\Core\Model\Config', array(), array(), '', false);
-
-        /**
-         * @var \Magento\Core\Model\Encryption
-         */
-        $model = new \Magento\Core\Model\Encryption($objectManager, $coreConfig, 'cryptKey');
-        $model->setHelper($input);
-        $model->getHash('password', 1);
-    }
-
-    /**
-     * @return array
-     */
-    public function setHelperGetHashDataProvider()
-    {
-        $helper = $this->getMockBuilder('Magento\Core\Helper\Data')
-                      ->disableOriginalConstructor()
-                      ->setMockClassName('Magento_Core_Helper_Data_Stub')
-                      ->getMock();
-        return array(
-            'string' => array('Magento_Core_Helper_Data_Stub'),
-            'object' => array($helper),
-        );
-    }
-
-    /**
-     * @expectedException \InvalidArgumentException
-     */
-    public function testSetHelperException()
-    {
-        $objectManager = $this->getMock('Magento\ObjectManager');
-        $coreConfig = $this->getMock('Magento\Core\Model\Config', array(), array(), '', false);
-
-        /**
-         * @var \Magento\Core\Model\Encryption
-         */
-        $model = new \Magento\Core\Model\Encryption($objectManager, $coreConfig);
-        /** Mock object is not instance of \Magento\Code\Helper\Data and should not pass validation */
-        $input = $this->getMock('Magento\Code\Helper\Data', array(), array(), '', false);
-        $model->setHelper($input);
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/EntryPoint/CronTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/EntryPoint/CronTest.php
deleted file mode 100644
index 7e8366b4de9..00000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/EntryPoint/CronTest.php
+++ /dev/null
@@ -1,68 +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.
- *
- * @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\EntryPoint;
-
-class CronTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_model;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_objectManagerMock;
-
-    protected function setUp()
-    {
-        $this->_objectManagerMock = $this->getMock('Magento\ObjectManager');
-        $config = $this->getMock('Magento\Core\Model\Config\Primary', array(), array(), '', false);
-
-        $this->_model = new \Magento\Core\Model\EntryPoint\Cron($config, $this->_objectManagerMock);
-    }
-
-    public function testProcessRequest()
-    {
-        $appMock = $this->getMock('Magento\Core\Model\App', array(), array(), '', false);
-        $eventManagerMock = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
-        $configScopeMock = $this->getMock('Magento\Config\Scope', array(), array(), '', false);
-
-        $map = array(
-            array('Magento\Core\Model\App', $appMock),
-            array('Magento\Event\ManagerInterface', $eventManagerMock),
-            array('Magento\Config\ScopeInterface', $configScopeMock),
-        );
-
-        $this->_objectManagerMock->expects($this->any())->method('get')->will($this->returnValueMap($map));
-
-        $appMock->expects($this->once())->method('setUseSessionInUrl')->with(false);
-        $appMock->expects($this->once())->method('requireInstalledInstance');
-
-        $configScopeMock->expects($this->once())->method('setCurrentScope')->with('crontab');
-        $eventManagerMock->expects($this->once())->method('dispatch')->with('default');
-
-        $this->_model->processRequest();
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php
new file mode 100644
index 00000000000..17e6d421d17
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php
@@ -0,0 +1,105 @@
+<?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\File\Storage;
+
+/**
+ * Class MediaTest
+ */
+class MediaTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Core\Model\File\Storage\File
+     */
+    protected $_model;
+    /**
+     * @var \Magento\Core\Helper\File\Media
+     */
+    protected $_loggerMock;
+
+    /**
+     * @var \Magento\Core\Helper\Context
+     */
+    protected $_storageHelperMock;
+
+    /**
+     * @var \Magento\Core\Model\Date
+     */
+    protected $_mediaHelperMock;
+
+    /**
+     * @var \Magento\Core\Model\Resource\File\Storage\File
+     */
+    protected $_fileUtilityMock;
+
+    protected function setUp()
+    {
+        $this->_loggerMock =
+            $this->getMock('Magento\Logger', array(), array(), '', false);
+        $this->_storageHelperMock =
+            $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
+        $this->_mediaHelperMock =
+            $this->getMock('Magento\Core\Helper\File\Media', array(), array(), '', false);
+        $this->_fileUtilityMock =
+            $this->getMock('Magento\Core\Model\Resource\File\Storage\File', array(), array(), '', false);
+
+        $this->_model = new \Magento\Core\Model\File\Storage\File(
+            $this->_loggerMock,
+            $this->_storageHelperMock,
+            $this->_mediaHelperMock,
+            $this->_fileUtilityMock
+        );
+    }
+
+    protected function tearDown()
+    {
+        unset($this->_model);
+    }
+
+    public function testCollectDataSuccess()
+    {
+        $this->_fileUtilityMock
+            ->expects($this->any())
+            ->method('getStorageData')
+            ->will($this->returnValue(array('files' => array('value1', 'value2'))));
+        $this->assertEmpty(array_diff($this->_model->collectData(0, 1), array('value1')));
+    }
+
+    public function testCollectDataFailureWrongType()
+    {
+        $this->_fileUtilityMock
+            ->expects($this->any())
+            ->method('getStorageData')
+            ->will($this->returnValue(array('files' => array('value1', 'value2'))));
+        $this->assertFalse($this->_model->collectData(0, 1, 'some-wrong-key'));
+    }
+
+    public function testCollectDataFailureEmptyDataWasGiven()
+    {
+        $this->_fileUtilityMock
+            ->expects($this->any())
+            ->method('getStorageData')
+            ->will($this->returnValue(array('files' => array())));
+        $this->assertFalse($this->_model->collectData(0, 1));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/UpdateTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/UpdateTest.php
index 72c0d9d41cc..eafcc7b703e 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/UpdateTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/UpdateTest.php
@@ -38,22 +38,27 @@ class UpdateTest extends \PHPUnit_Framework_TestCase
     {
         $resourceModel = $this->getMock(
             'Magento\Core\Model\Resource\Layout\Update',
-            array('formatDate', 'getIdFieldName', 'beginTransaction', 'save', 'addCommitCallback', 'commit'),
+            array('__wakeup', 'formatDate', 'getIdFieldName', 'beginTransaction', 'save', 'addCommitCallback',
+                'commit'),
             array(),
             '',
             false
         );
         $resourceModel->expects($this->once())
+            ->method('addCommitCallback')
+            ->will($this->returnSelf());
+        $dateTime = $this->getMock('\Magento\Stdlib\DateTime', array(), array());
+        $dateTime->expects($this->once())
             ->method('formatDate')
             ->with($this->isType('int'))
             ->will($this->returnValue(self::TEST_FORMATTED_TIME));
-        $resourceModel->expects($this->once())
-            ->method('addCommitCallback')
-            ->will($this->returnSelf());
 
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
         /** @var $model \Magento\Core\Model\Layout\Update */
-        $model = $helper->getObject('Magento\Core\Model\Layout\Update', array('resource' => $resourceModel));
+        $model = $helper->getObject('Magento\Core\Model\Layout\Update', array(
+            'resource' => $resourceModel,
+            'dateTime' => $dateTime
+        ));
         $model->setId(0); // set any data to set _hasDataChanges flag
         $model->save();
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Locale/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Locale/ValidatorTest.php
index abe9072459e..8e1dfeafe24 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Locale/ValidatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Locale/ValidatorTest.php
@@ -36,8 +36,7 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $coreConfig = $this->getMock('Magento\Core\Model\Config', array(), array(), '', false);
-        $localeConfigMock = $this->getMock('Magento\Core\Model\Locale\Config', array(), array($coreConfig));
+        $localeConfigMock = $this->getMock('Magento\Core\Model\Locale\Config', array(), array(), '', false);
         $localeConfigMock->expects($this->any())
             ->method('getAllowedLocales')
             ->will($this->returnValue(array('en_US', 'de_DE', 'es_ES')));
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/ModuleManagerTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/ModuleManagerTest.php
index e144aa99cb7..42969fe2e1a 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/ModuleManagerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/ModuleManagerTest.php
@@ -48,7 +48,7 @@ class ModuleManagerTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_moduleList = $this->getMockForAbstractClass('Magento\App\ModuleListInterface');
+        $this->_moduleList = $this->getMockForAbstractClass('Magento\Module\ModuleListInterface');
         $this->_storeConfig = $this->getMockForAbstractClass('Magento\Core\Model\Store\ConfigInterface');
         $this->_model = new \Magento\Core\Model\ModuleManager($this->_storeConfig, $this->_moduleList, array(
             'Module_DisabledOutputOne' => self::XML_PATH_OUTPUT_ENABLED,
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Page/Asset/MergedTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Page/Asset/MergedTest.php
index fe4dd87fa6a..fa4f329c34e 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Page/Asset/MergedTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Page/Asset/MergedTest.php
@@ -73,7 +73,7 @@ class MergedTest extends \PHPUnit_Framework_TestCase
         $this->_assetJsTwo->expects($this->any())->method('getSourceFile')
             ->will($this->returnValue('/pub/script_two.js'));
 
-        $this->_logger = $this->getMock('Magento\Core\Model\Logger', array('logException'), array(), '', false);
+        $this->_logger = $this->getMock('Magento\Logger', array('logException'), array(), '', false);
 
         $this->_dirs = $this->getMock('Magento\App\Dir', array(), array(), '', false);
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Page/Asset/MinifiedTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Page/Asset/MinifiedTest.php
index 63c7e93aebd..69d22a86f5c 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Page/Asset/MinifiedTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Page/Asset/MinifiedTest.php
@@ -47,7 +47,7 @@ class MinifiedTest extends \PHPUnit_Framework_TestCase
     protected $_viewUrl;
 
     /**
-     * @var \Magento\Core\Model\Logger|PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Logger|PHPUnit_Framework_MockObject_MockObject
      */
     protected $_logger;
 
@@ -66,7 +66,7 @@ class MinifiedTest extends \PHPUnit_Framework_TestCase
         );
         $this->_minifier = $this->getMock('Magento\Code\Minifier', array('getMinifiedFile'), array(), '', false);
         $this->_viewUrl = $this->getMock('Magento\Core\Model\View\Url', array(), array(), '', false);
-        $this->_logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $this->_logger = $this->getMock('Magento\Logger', array(), array(), '', false);
 
         $this->_model = new \Magento\Core\Model\Page\Asset\Minified($this->_asset, $this->_minifier, $this->_viewUrl,
             $this->_logger
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/SchemaLocatorTest.php
deleted file mode 100644
index 0effbc4eb83..00000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Config/SchemaLocatorTest.php
+++ /dev/null
@@ -1,68 +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.
- *
- * @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\Resource\Config;
-
-class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_modulesReaderMock;
-
-    /**
-     * @var \Magento\Core\Model\Resource\Config\SchemaLocator
-     */
-    protected $_model;
-
-    protected function setUp()
-    {
-        $this->_modulesReaderMock = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false
-        );
-
-        $this->_modulesReaderMock->expects($this->once())
-            ->method('getModuleDir')
-            ->with('etc', 'Magento_Core')
-            ->will($this->returnValue('some_path'));
-
-        $this->_model = new \Magento\Core\Model\Resource\Config\SchemaLocator($this->_modulesReaderMock);
-    }
-
-    /**
-     * @covers \Magento\Core\Model\Resource\Config\SchemaLocator::getSchema
-     */
-    public function testGetSchema()
-    {
-        $expectedSchemaPath = 'some_path' . DIRECTORY_SEPARATOR . 'resources.xsd';
-        $this->assertEquals($expectedSchemaPath, $this->_model->getSchema());
-    }
-
-    /**
-     * @covers \Magento\Core\Model\Resource\Config\SchemaLocator::getPerFileSchema
-     */
-    public function testGetPerFileSchema()
-    {
-        $this->assertNull($this->_model->getPerFileSchema());
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php
index 4cf96e75574..42fd76b180a 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php
@@ -38,13 +38,13 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Core\Model\Resource|PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Resource|PHPUnit_Framework_MockObject_MockObject
      */
     protected $_resource;
 
     protected function setUp()
     {
-        $this->_resource = $this->getMock('Magento\Core\Model\Resource',
+        $this->_resource = $this->getMock('Magento\App\Resource',
             array('getConnection'), array(), '', false, false
         );
         $this->_model = $this->getMock(
@@ -76,7 +76,9 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
     public function testGetConnectionInMemoryCaching()
     {
         $dir = $this->getMock('Magento\App\Dir', array(), array(), '', false);
-        $connection = new \Magento\DB\Adapter\Pdo\Mysql($dir, array(
+        $string = $this->getMock('Magento\Stdlib\String', array(), array(), '', false);
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
+        $connection = new \Magento\DB\Adapter\Pdo\Mysql($dir, $string, $dateTime, array(
             'dbname'   => 'test_dbname',
             'username' => 'test_username',
             'password' => 'test_password',
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/AbstractTestCase.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/AbstractTestCase.php
index 11b80a0be25..66ba811362c 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/AbstractTestCase.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/AbstractTestCase.php
@@ -89,7 +89,7 @@ abstract class AbstractTestCase extends \PHPUnit_Framework_TestCase
 
         $resource = $this->getMockForAbstractClass('Magento\Core\Model\Resource\Db\AbstractDb',
             array(), '', false, true,
-            true, array('getReadConnection', 'getMainTable', 'getTable'));
+            true, array('getReadConnection', 'getMainTable', 'getTable', '__wakeup'));
         $resource->expects($this->any())
             ->method('getReadConnection')
             ->will($this->returnValue($connection));
@@ -126,7 +126,8 @@ abstract class AbstractTestCase extends \PHPUnit_Framework_TestCase
         $datetime = new \DateTime();
         $storeInterval = new \DateInterval('P' . self::TEST_DAYS_BEFORE . 'D');
         $datetime->sub($storeInterval);
-        $expectedDate = \Magento\Date::formatDate($datetime->getTimestamp());
+        $dateTimeLib = new \Magento\Stdlib\DateTime;
+        $expectedDate = $dateTimeLib->formatDate($datetime->getTimestamp());
         $this->_expectedConditions['data'][1][1]['lt'] = $expectedDate;
 
         $collection->addUpdatedDaysBeforeFilter(self::TEST_DAYS_BEFORE);
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php
index 7325f6ec32a..f31f926ac64 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php
@@ -51,9 +51,10 @@ class CollectionTest extends \Magento\Core\Model\Resource\Layout\AbstractTestCas
 
         return new \Magento\Core\Model\Resource\Layout\Link\Collection(
             $eventManager,
-            $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false),
+            $this->getMock('Magento\Logger', array(), array(), '', false),
             $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface'),
             $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false),
+            $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true),
             $this->_getResource($select)
         );
     }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php
index 5207f571fb8..dcedd355146 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php
@@ -42,9 +42,10 @@ class CollectionTest
 
         return new \Magento\Core\Model\Resource\Layout\Update\Collection(
             $eventManager,
-            $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false),
+            $this->getMock('Magento\Logger', array(), array(), '', false),
             $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface'),
             $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false),
+            $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true),
             $this->_getResource($select)
         );
     }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/SessionTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/SessionTest.php
index 4126cb942bb..11ca61ffb13 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/SessionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/SessionTest.php
@@ -98,7 +98,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase
      */
     protected function _prepareResourceMock($connection)
     {
-        $resource = $this->getMock('Magento\Core\Model\Resource', array('getTableName', 'getConnection'),
+        $resource = $this->getMock('Magento\App\Resource', array('getTableName', 'getConnection'),
             array(), '', false, false);
         $resource->expects($this->once())
             ->method('getTableName')
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 71fa50d2e05..e296da35ad5 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,7 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
      */
     public function testAppendClassAliasReplace()
     {
-        $moduleListMock = $this->getMock('Magento\App\ModuleListInterface');
+        $moduleListMock = $this->getMock('Magento\Module\ModuleListInterface');
         $moduleListMock->expects($this->once())
             ->method('getModule')
             ->will($this->returnValue(array()));
@@ -163,14 +163,14 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false)));
         $contextMock->expects($this->once())
             ->method('getResourceModel')
-            ->will($this->returnValue($this->getMock('Magento\Core\Model\Resource', array(), array(), '', false)));
+            ->will($this->returnValue($this->getMock('Magento\App\Resource', array(), array(), '', false)));
         $contextMock->expects($this->once())
             ->method('getLogger')
-            ->will($this->returnValue($this->getMock('Magento\Core\Model\Logger', array(), array(), '', false)));
+            ->will($this->returnValue($this->getMock('Magento\Logger', array(), array(), '', false)));
         $contextMock->expects($this->once())
             ->method('getModulesReader')
             ->will($this->returnValue(
-                $this->getMock('Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false)
+                $this->getMock('Magento\Module\Dir\Reader', array(), array(), '', false)
             ));
         $contextMock->expects($this->once())
             ->method('getModuleList')
@@ -233,15 +233,15 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
         $tableRowsCount = count($tableData);
 
         $setupModel = new \Magento\Core\Model\Resource\Setup\Migration(
-            $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false, false),
+            $this->getMock('Magento\App\Resource', array(), array(), '', false, false),
             $this->getMock('Magento\Filesystem', array(), array(), '', false),
             $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false),
             $this->getMock('Magento\App\Dir', array(), array(), '', false),
-            $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false),
+            $this->getMock('Magento\Logger', array(), array(), '', false),
             $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false),
             $this->getMock('Magento\Core\Model\Config', array(), array(), '', false, false),
-            $this->getMock('Magento\App\ModuleListInterface'),
-            $this->getMock('Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false, false),
+            $this->getMock('Magento\Module\ModuleListInterface'),
+            $this->getMock('Magento\Module\Dir\Reader', array(), array(), '', false, false),
             $this->getMock('Magento\Core\Model\Resource\Resource', array(), array(), '', false),
             $this->getMock('Magento\Core\Model\Resource\Theme\CollectionFactory', array(), array(), '', false),
             $this->getMock('Magento\Core\Model\Theme\CollectionFactory', array(), array(), '', false),
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Store/Storage/DefaultTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Store/Storage/DefaultTest.php
index bb9dea385ac..6759bc39523 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Store/Storage/DefaultTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Store/Storage/DefaultTest.php
@@ -22,16 +22,15 @@
  * @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\Store\Storage;
 
 /**
  * Test class for \Magento\Core\Model\Store\Storage\DefaultStorage
  */
-namespace Magento\Core\Model\Store\Storage;
-
 class DefaultTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Store\Storage\DefaultStorage
+     * @var DefaultStorage
      */
     protected $_model;
 
@@ -91,7 +90,7 @@ class DefaultTest extends \PHPUnit_Framework_TestCase
         $this->_storeFactoryMock->expects($this->once())
             ->method('create')
             ->will($this->returnValue($this->_storeMock));
-        $this->_model = new \Magento\Core\Model\Store\Storage\DefaultStorage(
+        $this->_model = new DefaultStorage(
             $this->_storeFactoryMock,
             $this->_websiteFactoryMock,
             $this->_groupFactoryMock
@@ -131,6 +130,12 @@ class DefaultTest extends \PHPUnit_Framework_TestCase
         $this->assertInstanceOf('Magento\Core\Model\Website', $this->_model->getWebsite($websiteId));
     }
 
+    public function testGetWebsiteEmptyString()
+    {
+        $websiteId = '';
+        $this->assertInstanceOf('Magento\Core\Model\Website', $this->_model->getWebsite($websiteId));
+    }
+
     public function testGetWebsitesWithDefault()
     {
         $withDefault = true;
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Store/StorageFactoryTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Store/StorageFactoryTest.php
index 6bd253b0572..bc1a3078196 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Store/StorageFactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Store/StorageFactoryTest.php
@@ -51,11 +51,6 @@ class StorageFactoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $_logMock;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_configMock;
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -91,17 +86,9 @@ class StorageFactoryTest extends \PHPUnit_Framework_TestCase
         $this->_arguments = array('test' => 'argument');
         $this->_objectManagerMock = $this->getMock('Magento\ObjectManager');
         $this->_eventManagerMock = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
-        $this->_logMock = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
-        $this->_configMock = $this->getMock('Magento\Core\Model\ConfigInterface', array(), array(), '', false);
-        $this->_appMock = $this->getMockForAbstractClass(
-            'Magento\Core\Model\AppInterface',
-            [],
-            '',
-            false,
-            false,
-            false,
-            ['setUseSessionInUrl']
-        );
+        $this->_logMock = $this->getMock('Magento\Logger', array(), array(), '', false);
+        $this->_appMock
+            = $this->getMock('\Magento\Core\Model\AppInterface');
         $this->_appStateMock = $this->getMock('Magento\App\State', array(), array(), '', false);
         $this->_storage = $this->getMock('Magento\Core\Model\Store\StorageInterface');
 
@@ -109,7 +96,6 @@ class StorageFactoryTest extends \PHPUnit_Framework_TestCase
             $this->_objectManagerMock,
             $this->_eventManagerMock,
             $this->_logMock,
-            $this->_configMock,
             $this->_appMock,
             $this->_appStateMock,
             $this->_defaultStorage,
@@ -149,11 +135,15 @@ class StorageFactoryTest extends \PHPUnit_Framework_TestCase
             ->method('getStore')
             ->will($this->returnValue($store));
 
-        $store->expects($this->once())
+        $store->expects($this->at(0))
             ->method('getConfig')
-            ->with(\Magento\Core\Model\Session\AbstractSession::XML_PATH_USE_FRONTEND_SID)
+            ->with($this->equalTo(\Magento\Core\Model\Session\AbstractSession::XML_PATH_USE_FRONTEND_SID))
             ->will($this->returnValue(true));
 
+        $store->expects($this->at(1))
+            ->method('getConfig')
+            ->with($this->equalTo('dev/log/active'))
+            ->will($this->returnValue(true));
 
         $this->_objectManagerMock
             ->expects($this->once())
@@ -164,8 +154,10 @@ class StorageFactoryTest extends \PHPUnit_Framework_TestCase
         $this->_eventManagerMock->expects($this->once())->method('dispatch')->with('core_app_init_current_store_after');
         $this->_logMock
             ->expects($this->once())
-            ->method('initForStore')
-            ->with($store, $this->_configMock);
+            ->method('unsetLoggers');
+        $this->_logMock
+            ->expects($this->exactly(2))
+            ->method('addStreamLog');
 
         $this->_appMock->expects($this->once())
             ->method('setUseSessionInUrl')->with(true);
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Customization/PathTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Customization/PathTest.php
index 0daccfaaadc..69de1bb17ca 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Customization/PathTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Customization/PathTest.php
@@ -47,9 +47,18 @@ class PathTest extends \PHPUnit_Framework_TestCase
      */
     protected $_theme;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_appState;
+
     protected function setUp()
     {
         $this->_theme = $this->getMock('Magento\Core\Model\Theme', null, array(), '', false);
+        $this->_appState = $this->getMock('Magento\App\State', array('getAreaCode'), array(), '', false);
+        $appStateProperty = new \ReflectionProperty('\Magento\Core\Model\Theme', '_appState');
+        $appStateProperty->setAccessible(true);
+        $appStateProperty->setValue($this->_theme, $this->_appState);
         $this->_dir = $this->getMock('Magento\App\Dir', array(), array(), '', false);
         $this->_model = new \Magento\Core\Model\Theme\Customization\Path($this->_dir);
     }
@@ -82,7 +91,7 @@ class PathTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetThemeFilesPath()
     {
-        $this->_theme->setArea('area51');
+        $this->_appState->expects($this->any())->method('getAreaCode')->will($this->returnValue('area51'));
         $this->_dir->expects($this->once())->method('getDir')->with(\Magento\App\Dir::THEMES)
             ->will($this->returnValue('/themes_dir'));
         $expectedPath = implode(
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php
index a8cfbbc9bbe..ed175d02440 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php
@@ -69,6 +69,10 @@ class VirtualTest extends \PHPUnit_Framework_TestCase
     {
         $theme = $this->getMock('Magento\Core\Model\Theme', array('getStagingVersion'), array(), '', false, false);
         $theme->expects($this->once())->method('getStagingVersion')->will($this->returnValue(null));
+        $appState = $this->getMock('Magento\App\State', array('getAreaCode'), array(), '', false);
+        $appState->expects($this->any())->method('getAreaCode')->will($this->returnValue('fixture_area'));
+        $appStateProperty = new \ReflectionProperty('Magento\Core\Model\Theme', '_appState');
+        $appStateProperty->setAccessible(true);
         /** @var $theme \Magento\Object */
         $theme->setData(array(
             'id'                    => 'fixture_theme_id',
@@ -76,9 +80,9 @@ class VirtualTest extends \PHPUnit_Framework_TestCase
             'theme_title'           => 'fixture_theme_title',
             'preview_image'         => 'fixture_preview_image',
             'is_featured'           => 'fixture_is_featured',
-            'area'                  => 'fixture_area',
             'type'                  => \Magento\Core\Model\Theme::TYPE_VIRTUAL
         ));
+        $appStateProperty->setValue($theme, $appState);
 
         $themeStaging = $this->getMock('Magento\Core\Model\Theme', array('setData', 'save'), array(), '', false, false);
         $themeStaging->expects($this->at(0))->method('setData')->with(array(
@@ -88,9 +92,9 @@ class VirtualTest extends \PHPUnit_Framework_TestCase
             'theme_title'           => 'fixture_theme_title - Staging',
             'preview_image'         => 'fixture_preview_image',
             'is_featured'           => 'fixture_is_featured',
-            'area'                  => 'fixture_area',
             'type'                  => \Magento\Core\Model\Theme::TYPE_STAGING,
         ));
+        $appStateProperty->setValue($themeStaging, $appState);
         $themeStaging->expects($this->at(1))->method('save');
 
         $themeFactory = $this->getMock('Magento\Core\Model\ThemeFactory', array('create'), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ImageTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ImageTest.php
index f836d3d75ff..603b03a6e01 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ImageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ImageTest.php
@@ -67,7 +67,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
         $this->_themeMock = $this->getMock('Magento\Core\Model\Theme', null, array(), '', false, false);
         $this->_uploaderMock = $this->getMock('Magento\Core\Model\Theme\Image\Uploader',
             array(), array(), 'UploaderProxy', false, false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false, false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false, false);
 
         $this->_model = new \Magento\Core\Model\Theme\Image(
             $this->_filesystemMock,
@@ -134,7 +134,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
             $this->getMock('Magento\Core\Model\Image\Factory', array(), array(), '', false, false),
             $this->_uploaderMock,
             $this->_getImagePathMock(),
-            $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false, false),
+            $this->getMock('Magento\Logger', array(), array(), '', false, false),
             $this->_themeMock
         );
         $this->assertNotEmpty($themeImage);
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/UrlTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/UrlTest.php
index 6388dd0cc7b..93c822b6d85 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/UrlTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/UrlTest.php
@@ -37,14 +37,17 @@ class UrlTest extends \PHPUnit_Framework_TestCase
      */
     protected $_model;
 
+
+    protected $_sessionMock;
+
     protected function setUp()
     {
+        $this->_sessionMock = $this->getMock('Magento\Core\Model\Session\AbstractSession', array(), array(), '', false);
         $this->_model = new \Magento\Core\Model\Url(
-            $this->getMock('Magento\App\RouterListInterface'),
+            $this->getMock('\Magento\App\Route\ConfigInterface'),
             $this->getMock('Magento\App\Request\Http', array(), array(), '', false),
             $this->getMock('Magento\Core\Model\Url\SecurityInfoInterface'),
             $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false),
-            $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)
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Validator/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Validator/FactoryTest.php
index f7e695a2f46..88bd8eaa7ab 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Validator/FactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Validator/FactoryTest.php
@@ -33,7 +33,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
     protected $_objectManager;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_config;
 
@@ -75,7 +75,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($this->_validatorConfig));
 
         // Config mock
-        $this->_config = $this->getMockBuilder('Magento\Core\Model\Config\Modules\Reader')
+        $this->_config = $this->getMockBuilder('Magento\Module\Dir\Reader')
             ->setMethods(array('getConfigurationFiles'))
             ->disableOriginalConstructor()
             ->getMock();
diff --git a/dev/tests/unit/testsuite/Magento/Cron/App/Cron/Plugin/ApplicationInitializerTest.php b/dev/tests/unit/testsuite/Magento/Cron/App/Cron/Plugin/ApplicationInitializerTest.php
new file mode 100644
index 00000000000..3cca4b93b7b
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Cron/App/Cron/Plugin/ApplicationInitializerTest.php
@@ -0,0 +1,52 @@
+<?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\Cron\App\Cron\Plugin;
+
+class ApplicationInitializerTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Cron\App\Cron\Plugin\ApplicationInitializer
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_applicationMock;
+
+    protected function setUp()
+    {
+        $this->_applicationMock = $this->getMock('Magento\Core\Model\AppInterface');
+        $this->_model = new ApplicationInitializer(
+            $this->_applicationMock
+        );
+    }
+
+    public function testBeforeExecutePerformsRequiredChecks()
+    {
+        $this->_applicationMock->expects($this->once())->method('requireInstalledInstance');
+        $this->_applicationMock->expects($this->once())->method('setUseSessionInUrl')->with(false);
+        $this->_model->beforeExecute(array());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Reader/XmlTest.php b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Reader/XmlTest.php
index 69bcebe30c9..8a4b131003e 100644
--- a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Reader/XmlTest.php
+++ b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Reader/XmlTest.php
@@ -46,7 +46,7 @@ class XmlTest extends \PHPUnit_Framework_TestCase
         $schema = $this->getMockBuilder('Magento\Cron\Model\Config\SchemaLocator')
             ->disableOriginalConstructor()
             ->getMock();
-        $validator = $this->getMockBuilder('Magento\Core\Model\Config\ValidationState')
+        $validator = $this->getMockBuilder('\Magento\Config\ValidationStateInterface')
             ->disableOriginalConstructor()
             ->getMock();
         $this->_xmlReader = new \Magento\Cron\Model\Config\Reader\Xml($fileResolver, $converter, $schema, $validator);
diff --git a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/SchemaLocatorTest.php
index 40df84d5809..b2739a0f270 100644
--- a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/SchemaLocatorTest.php
@@ -42,7 +42,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
-        $this->_moduleReaderMock = $this->getMockBuilder('Magento\Core\Model\Config\Modules\Reader')
+        $this->_moduleReaderMock = $this->getMockBuilder('Magento\Module\Dir\Reader')
             ->disableOriginalConstructor()
             ->getMock();
         $this->_moduleReaderMock->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Cron/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Cron/Model/ObserverTest.php
index f4fcbf3a320..65446f35993 100644
--- a/dev/tests/unit/testsuite/Magento/Cron/Model/ObserverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Cron/Model/ObserverTest.php
@@ -36,7 +36,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
     protected $_observer;
 
     /**
-     * @var \Magento\Core\Model\ObjectManager|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\ObjectManager|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_objectManager;
 
@@ -63,7 +63,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
      */
     public function setUp()
     {
-        $this->_objectManager = $this->getMockBuilder('Magento\Core\Model\ObjectManager')
+        $this->_objectManager = $this->getMockBuilder('Magento\App\ObjectManager')
             ->disableOriginalConstructor()
             ->getMock();
         $this->_app = $this->getMockBuilder('Magento\Core\Model\App')
diff --git a/dev/tests/unit/testsuite/Magento/Adminhtml/Controller/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
similarity index 93%
rename from dev/tests/unit/testsuite/Magento/Adminhtml/Controller/CustomerTest.php
rename to dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
index e00c0a8668c..6cc18143e84 100644
--- a/dev/tests/unit/testsuite/Magento/Adminhtml/Controller/CustomerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Unit test for \Magento\Adminhtml\Controller\Customer controller
+ * Unit test for \Magento\Customer\Controller\Adminhtml\Index controller
  *
  * Magento
  *
@@ -26,11 +26,11 @@
  */
 
 /**
- * Class \Magento\Adminhtml\Controller\CustomerTest
+ * Class \Magento\Customer\Controller\Adminhtml\IndexTest
  */
-namespace Magento\Adminhtml\Controller;
+namespace Magento\Customer\Controller\Adminhtml;
 
-class CustomerTest extends \PHPUnit_Framework_TestCase
+class IndexTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * Request mock instance
@@ -49,14 +49,14 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
     /**
      * Instance of mocked tested object
      *
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Adminhtml\Controller\Customer
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Customer\Controller\Adminhtml\Index
      */
     protected $_testedObject;
 
     /**
      * ObjectManager mock instance
      *
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Core\Model\ObjectManager
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\App\ObjectManager
      */
     protected $_objectManager;
 
@@ -93,7 +93,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
             ->with($this->equalTo('X-Frame-Options'))
             ->will($this->returnValue(true));
 
-        $this->_objectManager = $this->getMockBuilder('Magento\Core\Model\ObjectManager')
+        $this->_objectManager = $this->getMockBuilder('Magento\App\ObjectManager')
             ->disableOriginalConstructor()
             ->setMethods(array('get', 'create'))
             ->getMock();
@@ -141,7 +141,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
         $args = array('context' => $contextMock);
 
         $helperObjectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $this->_testedObject = $helperObjectManager->getObject('Magento\Adminhtml\Controller\Customer', $args);
+        $this->_testedObject = $helperObjectManager->getObject('Magento\Customer\Controller\Adminhtml\Index', $args);
     }
 
     /**
@@ -157,7 +157,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
         );
         $this->_helper->expects($this->once())
             ->method('getUrl')
-            ->with($this->equalTo('adminhtml/customer'), $this->equalTo(array()))
+            ->with($this->equalTo('customer/index'), $this->equalTo(array()))
             ->will($this->returnValue($redirectLink));
 
         $this->_response->expects($this->once())->method('setRedirect')->with($this->equalTo($redirectLink));
@@ -187,7 +187,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
 
         $this->_helper->expects($this->any())
             ->method('getUrl')
-            ->with($this->equalTo('adminhtml/customer'), $this->equalTo(array()))
+            ->with($this->equalTo('customer/index'), $this->equalTo(array()))
             ->will($this->returnValue($redirectLink));
 
         $this->_response->expects($this->once())->method('setRedirect')->with($this->equalTo($redirectLink));
diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/ReaderTest.php
index 7438c40eb2c..7568b457434 100644
--- a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/ReaderTest.php
@@ -66,7 +66,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         $this->_converter = $this->getMock('Magento\Customer\Model\Address\Config\Converter', array('convert'));
 
         $moduleReader = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array('getModuleDir'), array(), '', false
+            'Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false
         );
 
         $moduleReader->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/SchemaLocatorTest.php
index 4f1f4b418f0..cf7be744842 100644
--- a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/SchemaLocatorTest.php
@@ -32,7 +32,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader|PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Module\Dir\Reader|PHPUnit_Framework_MockObject_MockObject
      */
     protected $_moduleReader;
 
@@ -50,7 +50,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     {
         $this->_xsdFile = $this->_xsdDir . '/address_formats.xsd';
         $this->_moduleReader = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array('getModuleDir'), array(), '', false
+            'Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false
         );
         $this->_moduleReader
             ->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php
index 36493d26c95..291820d962e 100644
--- a/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php
@@ -37,9 +37,6 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
     /** @var  \Magento\Customer\Helper\Data */
     protected $_customerData;
 
-    /** @var  \Magento\Core\Helper\Data */
-    protected $_coreData;
-
     /** @var \Magento\Core\Model\Website|\PHPUnit_Framework_MockObject_MockObject */
     protected $_website;
 
@@ -73,10 +70,6 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->setMethods(array('getResetPasswordLinkExpirationPeriod'))
             ->getMock();
-        $this->_coreData = $this->getMockBuilder('Magento\Core\Helper\Data')
-            ->disableOriginalConstructor()
-            ->setMethods(array())
-            ->getMock();
         $this->_website = $this->getMockBuilder('Magento\Core\Model\Website')
             ->disableOriginalConstructor()
             ->setMethods(array('getStoreIds', '__wakeup'))
@@ -103,6 +96,10 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
             ->getMock();
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
+        $encryptor = $this->getMockBuilder('\Magento\Encryption\EncryptorInterface')
+            ->disableOriginalConstructor()
+            ->setMethods(array())
+            ->getMock();
 
         $this->_storeManager = $this->getMockBuilder('Magento\Core\Model\StoreManager')
             ->disableOriginalConstructor()
@@ -118,7 +115,6 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
         $this->_model = new \Magento\Customer\Model\Customer(
             $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false),
             $this->_customerData,
-            $this->_coreData,
             $this->_contextMock,
             $coreRegistry,
             $this->_senderMock,
@@ -133,6 +129,9 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
             $this->getMock('Magento\Core\Model\Email\InfoFactory', array(), array(), '', false),
             $this->getMock('Magento\Customer\Model\GroupFactory', array(), array(), '', false),
             $this->getMock('Magento\Customer\Model\AttributeFactory', array(), array(), '', false),
+            $encryptor,
+            new \Magento\Math\Random,
+            new \Magento\Stdlib\DateTime,
             $this->_collectionMock,
             array()
         );
diff --git a/dev/tests/unit/testsuite/Magento/Data/Collection/DbTest.php b/dev/tests/unit/testsuite/Magento/Data/Collection/DbTest.php
index 7a555a7d504..dde697b6e56 100644
--- a/dev/tests/unit/testsuite/Magento/Data/Collection/DbTest.php
+++ b/dev/tests/unit/testsuite/Magento/Data/Collection/DbTest.php
@@ -38,7 +38,7 @@ class DbTest extends \PHPUnit_Framework_TestCase
     {
         $fetchStrategy = $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface');
         $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $this->_collection = new \Magento\Data\Collection\Db($logger, $fetchStrategy, $entityFactory);
     }
 
@@ -252,7 +252,7 @@ class DbTest extends \PHPUnit_Framework_TestCase
     {
         $fetchStrategy = $this->getMock('Magento\Data\Collection\Db\FetchStrategyInterface');
         $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $collection = $this->getMock(
             'Magento\Data\Collection\Db',
             array('_logQuery'),
diff --git a/dev/tests/unit/testsuite/Magento/Data/Form/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Data/FormFactoryTest.php
similarity index 73%
rename from dev/tests/unit/testsuite/Magento/Data/Form/FactoryTest.php
rename to dev/tests/unit/testsuite/Magento/Data/FormFactoryTest.php
index ed73af499f3..8bec99ac5f2 100644
--- a/dev/tests/unit/testsuite/Magento/Data/Form/FactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Data/FormFactoryTest.php
@@ -22,32 +22,26 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Data\Form;
+namespace Magento\Data;
 
 /**
- * Tests for \Magento\Data\Form\Factory
+ * Tests for \Magento\Data\FormFactory
  */
-class FactoryTest extends \PHPUnit_Framework_TestCase
+class FormFactoryTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
     protected $_objectManagerMock;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_sessionMock;
-
     protected function setUp()
     {
         $this->_objectManagerMock = $this->getMock('Magento\ObjectManager\ObjectManager', array(), array(), '', false);
-        $this->_sessionMock = $this->getMock('Magento\Core\Model\Session', array(), array(), '', false);
     }
 
     /**
      * @expectedException \Magento\Exception
-     * @expectedExceptionMessage WrongClass doesn't extends \Magento\Data\Form
+     * @expectedExceptionMessage WrongClass doesn't extend \Magento\Data\Form
      */
     public function testWrongTypeException()
     {
@@ -56,7 +50,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
         $formMock = $this->getMock($className, array(), array(), '', false);
         $this->_objectManagerMock->expects($this->once())->method('create')->will($this->returnValue($formMock));
 
-        $formFactory = new Factory($this->_objectManagerMock, $this->_sessionMock, $className);
+        $formFactory = new FormFactory($this->_objectManagerMock, $className);
         $formFactory->create();
     }
 
@@ -68,11 +62,8 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
             ->method('create')
             ->with($className)
             ->will($this->returnValue($formMock));
-        $formMock->expects($this->once())
-            ->method('setSession')
-            ->with($this->_sessionMock);
 
-        $formFactory = new Factory($this->_objectManagerMock, $this->_sessionMock, $className);
+        $formFactory = new FormFactory($this->_objectManagerMock, $className);
         $this->assertSame($formMock, $formFactory->create());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Data/FormTest.php b/dev/tests/unit/testsuite/Magento/Data/FormTest.php
index 76cd58b11ad..6abaafa466f 100644
--- a/dev/tests/unit/testsuite/Magento/Data/FormTest.php
+++ b/dev/tests/unit/testsuite/Magento/Data/FormTest.php
@@ -25,7 +25,7 @@
 namespace Magento\Data;
 
 /**
- * Tests for \Magento\Data\Form\Factory
+ * Tests for \Magento\Data\FormFactory
  * @SuppressWarnings(PHPMD.LongVariable)
  */
 class FormTest extends \PHPUnit_Framework_TestCase
@@ -40,6 +40,11 @@ class FormTest extends \PHPUnit_Framework_TestCase
      */
     protected $_factoryCollectionMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_sessionMock;
+
     /**
      * @var \Magento\Data\Form
      */
@@ -52,30 +57,20 @@ class FormTest extends \PHPUnit_Framework_TestCase
         $this->_factoryCollectionMock = $this->getMock('Magento\Data\Form\Element\CollectionFactory',
             array('create'), array(), '', false);
         $this->_factoryCollectionMock->expects($this->any())->method('create')->will($this->returnValue(array()));
+        $this->_sessionMock = $this->getMock(
+            'Magento\Core\Model\Session', array('getFormKey'), array(), '', false
+        );
 
-        $this->_form = new Form($this->_factoryElementMock, $this->_factoryCollectionMock);
-    }
-
-    /**
-     * @expectedException \Magento\Exception
-     */
-    public function testRenderWithoutSetSession()
-    {
-        $this->_form->setUseContainer(true);
-        $this->_form->setMethod('post');
-        $this->_form->toHtml();
+        $this->_form = new Form($this->_sessionMock, $this->_factoryElementMock, $this->_factoryCollectionMock);
     }
 
     public function testFormKeyUsing()
     {
         $formKey = 'form-key';
-        $sessionMock = $this->getMock('Magento\Core\Model\Session\AbstractSession', array('getFormKey'), array(), '',
-            false);
-        $sessionMock->expects($this->once())->method('getFormKey')->will($this->returnValue($formKey));
+        $this->_sessionMock->expects($this->once())->method('getFormKey')->will($this->returnValue($formKey));
 
         $this->_form->setUseContainer(true);
         $this->_form->setMethod('post');
-        $this->_form->setSession($sessionMock);
         $this->assertContains($formKey, $this->_form->toHtml());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/SaveTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/SaveTest.php
index f8c985b0dcc..2c9601dc93e 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/SaveTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/SaveTest.php
@@ -43,41 +43,33 @@ class SaveTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        // 1. Get helper mock
-        /** @var $helper \Magento\Backend\Helper\Data|\PHPUnit_Framework_MockObject_MockObject */
-        $helper = $this->getMock('Magento\Backend\Helper\Data', array('escapeHtml'), array(), '', false);
-        $helper->expects($this->any())
+        /** @var $escaper \Magento\Escaper|\PHPUnit_Framework_MockObject_MockObject */
+        $escaper = $this->getMockBuilder('Magento\Escaper')
+            ->disableOriginalConstructor()
+            ->setMethods(array('escapeHtml'))
+            ->getMock();
+        $escaper->expects($this->any())
             ->method('escapeHtml')
             ->will($this->returnArgument(0));
 
-        // 2. Inject helper to helper factory
-        /** @var $helperFactory \Magento\Core\Model\Factory\Helper|\PHPUnit_Framework_MockObject_MockObject */
-        $helperFactory = $this->getMock('Magento\Core\Model\Factory\Helper', array('get'), array(), '', false);
-        $helperFactory->expects($this->any())
-            ->method('get')
-            ->with('Magento\Backend\Helper\Data')
-            ->will($this->returnValue($helper));
-
-        // 3. Get service mock
-        /** @var $service \Magento\Backend\Helper\Data|\PHPUnit_Framework_MockObject_MockObject */
-        $service = $this->getMock('Magento\Backend\Helper\Data', array('escapeHtml'), array(), '', false);
-
-        // 4. Get URL model
         /** @var $urlBuilder \Magento\Core\Model\Url|\PHPUnit_Framework_MockObject_MockObject */
         $urlBuilder = $this->getMock('Magento\Core\Model\Url', array('getUrl'), array(), '', false);
         $urlBuilder->expects($this->any())
             ->method('getUrl')
             ->will($this->returnValue($this->_url));
 
-        //5. Run functionality
-        $testHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $data = array(
-            'helperFactory' => $helperFactory,
-            'service'       => $service,
-            'urlBuilder'    => $urlBuilder
+        $context = $this->getMockBuilder('Magento\Backend\Block\Template\Context')
+            ->disableOriginalConstructor()
+            ->setMethods(array('getEscaper', 'getUrlBuilder'))
+            ->getMock();
+        $context->expects($this->any())->method('getEscaper')->will($this->returnValue($escaper));
+        $context->expects($this->any())->method('getUrlBuilder')->will($this->returnValue($urlBuilder));
+
+        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->_block = $objectManager->getObject(
+            'Magento\DesignEditor\Block\Adminhtml\Editor\Toolbar\Buttons\Save',
+            array('context' => $context)
         );
-        $this->_block = $testHelper->getObject('Magento\DesignEditor\Block\Adminhtml\Editor\Toolbar\Buttons\Save',
-            $data);
     }
 
     /**
@@ -88,12 +80,10 @@ class SaveTest extends \PHPUnit_Framework_TestCase
      */
     public function testInit($theme, $expected, $expectedOptions)
     {
-        $block = $this->_block;
-
-        $block->setTheme($theme);
-        $block->init();
-        $data = $block->getData();
-        $options = $block->getOptions();
+        $this->_block->setTheme($theme);
+        $this->_block->init();
+        $data = $this->_block->getData();
+        $options = $this->_block->getOptions();
         $mainAction = json_decode($data['data_attribute']['mage-init'], true);
 
         if ($mainAction['button']['eventData']['confirm'] !== false) {
@@ -140,8 +130,8 @@ class SaveTest extends \PHPUnit_Framework_TestCase
                         'event'     => 'assign',
                         'target'    => 'body',
                         'eventData' => array(
-                            'theme_id'        => 123,
-                            'confirm' => array()
+                            'theme_id' => 123,
+                            'confirm'  => array()
                         )
                     )
                 ),
@@ -154,9 +144,9 @@ class SaveTest extends \PHPUnit_Framework_TestCase
                         'event'     => 'save',
                         'target'    => 'body',
                         'eventData' => array(
-                            'theme_id'        => 123,
-                            'save_url'        => $this->_url,
-                            'confirm' => array()
+                            'theme_id' => 123,
+                            'save_url' => $this->_url,
+                            'confirm'  => array()
                         )
                     )
                 ),
@@ -169,9 +159,9 @@ class SaveTest extends \PHPUnit_Framework_TestCase
                         'event'     => 'save',
                         'target'    => 'body',
                         'eventData' => array(
-                            'theme_id'        => 123,
-                            'save_url'        => $this->_url,
-                            'confirm' => array()
+                            'theme_id' => 123,
+                            'save_url' => $this->_url,
+                            'confirm'  => array()
                         )
                     ),
                 ),
@@ -183,7 +173,7 @@ class SaveTest extends \PHPUnit_Framework_TestCase
                             'eventData' => array(
                                 'theme_id' => 123,
                                 'save_url' => $this->_url,
-                                'confirm' => array()
+                                'confirm'  => array()
                             )
                         ),
                     ),
@@ -194,7 +184,7 @@ class SaveTest extends \PHPUnit_Framework_TestCase
                             'eventData' => array(
                                 'theme_id' => 123,
                                 'save_url' => $this->_url,
-                                'confirm' => array()
+                                'confirm'  => array()
                             )
                         ),
                     )
@@ -211,11 +201,8 @@ class SaveTest extends \PHPUnit_Framework_TestCase
     {
         // 1. Get theme mock
         $stagingTheme = $this->_getThemeMock(\Magento\Core\Model\Theme::TYPE_STAGING);
-
-        $block = $this->_block;
-
-        $block->setTheme($stagingTheme);
-        $block->init();
+        $this->_block->setTheme($stagingTheme);
+        $this->_block->init();
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php
index bd69efb763d..a0aeaa2ce10 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php
@@ -71,7 +71,7 @@ class CustomTest extends \PHPUnit_Framework_TestCase
             'Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Custom',
             array(
                 'config'       => $this->getMock('Magento\Core\Model\Config', array(), array(), '', false),
-                'formFactory'  => $this->getMock('Magento\Data\Form\Factory', array(), array(), '', false),
+                'formFactory'  => $this->getMock('Magento\Data\FormFactory', array(), array(), '', false),
                 'urlBuilder'   => $this->_urlBuilder,
                 'themeContext' => $this->_themeContext
         ));
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php
index 95cb6d6f3e7..0eea369a3fd 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php
@@ -72,7 +72,7 @@ class JsTest extends \PHPUnit_Framework_TestCase
             array(
                 'urlBuilder' => $this->_urlBuilder,
                 'themeContext' => $this->_themeContext,
-                'formFactory' => $this->getMock('Magento\Data\Form\Factory', array(), array(), '', false),
+                'formFactory' => $this->getMock('Magento\Data\FormFactory', array(), array(), '', false),
         ));
         $this->_model = $this->getMock(
             'Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Js',
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php
index 10837f626e8..05b1b85f212 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php
@@ -59,7 +59,6 @@ class StandardTest extends \PHPUnit_Framework_TestCase
      * @param \Magento\App\RequestInterface $request
      * @param bool $isVde
      * @param bool $isLoggedIn
-     * @param bool $isConfiguration
      * @param array $routers
      * @param string|null $matchedValue
      *
@@ -69,11 +68,10 @@ class StandardTest extends \PHPUnit_Framework_TestCase
         \Magento\App\RequestInterface $request,
         $isVde,
         $isLoggedIn,
-        $isConfiguration,
         array $routers = array(),
         $matchedValue = null
     ) {
-        $this->_model = $this->_prepareMocksForTestMatch($request, $isVde, $isLoggedIn, $isConfiguration, $routers);
+        $this->_model = $this->_prepareMocksForTestMatch($request, $isVde, $isLoggedIn, $routers);
 
         $this->assertEquals($matchedValue, $this->_model->match($request));
         if ($isVde && $isLoggedIn) {
@@ -96,7 +94,7 @@ class StandardTest extends \PHPUnit_Framework_TestCase
             'vde'   => 'vde router',
         );
 
-        $routerListMock = $this->getMock('Magento\App\RouterListInterface');
+        $routerListMock = $this->getMock('\Magento\App\Route\ConfigInterface');
 
         // test data to verify routers match logic
         $matchedRequest = $this->getMock('Magento\App\Request\Http',
@@ -109,7 +107,7 @@ class StandardTest extends \PHPUnit_Framework_TestCase
 
         // method "match" will be invoked for this router because it's first in the list
         $matchedRouter = $this->getMock(
-            'Magento\Core\Controller\Varien\Router\Base', array(), array(), '', false
+            'Magento\Core\App\Router\Base', array(), array(), '', false
         );
         $matchedRouter->expects($this->once())
             ->method('match')
@@ -118,7 +116,7 @@ class StandardTest extends \PHPUnit_Framework_TestCase
 
         // method "match" will not be invoked for this router because controller will be found by first router
         $notMatchedRouter = $this->getMock(
-            'Magento\Core\Controller\Varien\Router\Base', array(), array(), '', false
+            'Magento\Core\App\Router\Base', array(), array(), '', false
         );
         $notMatchedRouter->expects($this->never())
             ->method('match');
@@ -136,7 +134,6 @@ class StandardTest extends \PHPUnit_Framework_TestCase
                 ),
                 '$isVde'           => false,
                 '$isLoggedIn'      => true,
-                '$isConfiguration' => false,
             ),
             'not logged as admin' => array(
                 '$request' => $this->getMock(
@@ -144,7 +141,6 @@ class StandardTest extends \PHPUnit_Framework_TestCase
                 ),
                 '$isVde'           => true,
                 '$isLoggedIn'      => false,
-                '$isConfiguration' => false,
             ),
             'no matched routers' => array(
                 '$request' => $this->getMock(
@@ -152,14 +148,12 @@ class StandardTest extends \PHPUnit_Framework_TestCase
                 ),
                 '$isVde'           => true,
                 '$isLoggedIn'      => true,
-                '$isConfiguration' => false,
                 '$routers'         => $excludedRouters
             ),
             'matched routers' => array(
                 '$request'         => $matchedRequest,
                 '$isVde'           => true,
                 '$isLoggedIn'      => true,
-                '$isConfiguration' => true,
                 '$routers'         => $matchedRouters,
                 '$matchedValue'    => $matchedController,
             ),
@@ -170,7 +164,6 @@ class StandardTest extends \PHPUnit_Framework_TestCase
      * @param \Magento\App\RequestInterface $request
      * @param bool $isVde
      * @param bool $isLoggedIn
-     * @param bool $isConfiguration
      * @param array $routers
      * @return \Magento\DesignEditor\Controller\Varien\Router\Standard
      */
@@ -178,7 +171,6 @@ class StandardTest extends \PHPUnit_Framework_TestCase
         \Magento\App\RequestInterface $request,
         $isVde,
         $isLoggedIn,
-        $isConfiguration,
         array $routers
     ) {
         // default mocks - not affected on method functionality
@@ -186,9 +178,8 @@ class StandardTest extends \PHPUnit_Framework_TestCase
         $helperMock         = $this->_getHelperMock($isVde);
         $backendSessionMock = $this->_getBackendSessionMock($isVde, $isLoggedIn);
         $stateMock          = $this->_getStateModelMock($routers);
-        $configurationMock  = $this->_getConfigurationMock($isVde, $isLoggedIn, $isConfiguration);
 
-        $callback = function ($name) use ($helperMock, $backendSessionMock, $stateMock, $configurationMock) {
+        $callback = function ($name) use ($helperMock, $backendSessionMock, $stateMock) {
             switch ($name) {
                 case 'Magento\DesignEditor\Helper\Data':
                     return $helperMock;
@@ -196,8 +187,6 @@ class StandardTest extends \PHPUnit_Framework_TestCase
                     return $backendSessionMock;
                 case 'Magento\DesignEditor\Model\State':
                     return $stateMock;
-                case 'Magento\Core\Model\Config':
-                    return $configurationMock;
                 default:
                     return null;
             }
@@ -207,9 +196,17 @@ class StandardTest extends \PHPUnit_Framework_TestCase
             ->method('get')
             ->will($this->returnCallback($callback));
 
-        $frontControllerMock = $this->getMock('Magento\App\FrontController', array(), array(), '', false);
         $rewriteServiceMock = $this->getMock('Magento\Core\App\Request\RewriteService', array(), array(), '', false);
-        $routerListMock = $this->getMock('Magento\App\RouterListInterface');
+        $routerListMock = $this->getMock('Magento\App\RouterListInterface',
+            array(
+                'getRouters',
+                'current',
+                'next',
+                'key',
+                'valid',
+                'rewind'
+            )
+        );
 
         if ($isVde && $isLoggedIn) {
             $rewriteServiceMock->expects($this->once())
@@ -221,24 +218,20 @@ class StandardTest extends \PHPUnit_Framework_TestCase
         }
 
         $router = new \Magento\DesignEditor\Controller\Varien\Router\Standard(
-            $routerListMock,
             $this->getMock('Magento\App\ActionFactory', array(), array(), '', false),
-            $objectManager,
-            $this->getMock('Magento\Filesystem', array(), array(), '', false),
-            $this->getMock('Magento\Core\Model\App', array(), array(), '', false),
-            $this->getMock('Magento\Core\Model\Route\Config', array(), array(), '', false),
-            $this->getMock('Magento\Core\Model\Url\SecurityInfoInterface'),
-            $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false),
-            $this->getMock('Magento\Core\Model\Config', array(), array(), '', false),
-            $this->getMock('Magento\Core\Model\Url', array(), array(), '', false),
-            $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false),
+            $this->getMock('Magento\App\DefaultPathInterface'),
+            $this->getMock('Magento\App\ResponseFactory', array(), array(), '', false),
+            $this->getMock('Magento\App\Route\Config', array(), array(), '', false),
             $this->getMock('Magento\App\State', array(), array(), '', false),
+            $this->getMock('Magento\UrlInterface'),
+            $this->getMock('Magento\Core\Model\StoreManagerInterface'),
+            $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false),
+            $this->getMock('Magento\Core\Model\Url\SecurityInfoInterface'),
+            $routerListMock,
+            $objectManager,
             $rewriteServiceMock,
-            'frontend',
-            'Magento\Core\Controller\Varien\Action',
-            'vde'
+            'frontend'
         );
-        $router->setFront($frontControllerMock);
         return $router;
     }
 
@@ -286,39 +279,4 @@ class StandardTest extends \PHPUnit_Framework_TestCase
 
         return $stateModel;
     }
-
-    /**
-     * @param bool $isVde
-     * @param bool $isLoggedIn
-     * @param bool $isConfiguration
-     * @return \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected function _getConfigurationMock($isVde, $isLoggedIn, $isConfiguration)
-    {
-        $configuration = $this->getMock('Magento\Core\Model\Config', array(), array(), '', false);
-
-        if ($isVde && $isLoggedIn) {
-            $configurationData = null;
-            if ($isConfiguration) {
-                $configurationData = self::VDE_CONFIGURATION_DATA;
-            }
-            $configuration->expects($this->at(0))
-                ->method('getNode')
-                ->with(\Magento\DesignEditor\Model\Area::AREA_VDE)
-                ->will($this->returnValue($configurationData));
-
-            if ($isConfiguration) {
-                $elementMock = $this->getMock('stdClass', array('extend'), array(), '', false);
-                $elementMock->expects($this->once())
-                    ->method('extend')
-                    ->with(self::VDE_CONFIGURATION_DATA, true);
-
-                $configuration->expects($this->at(1))
-                    ->method('getNode')
-                    ->with(\Magento\Core\Model\App\Area::AREA_FRONTEND)
-                    ->will($this->returnValue($elementMock));
-            }
-        }
-        return $configuration;
-    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Config/Control/QuickStylesTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Config/Control/QuickStylesTest.php
index 91372497f18..b9b46b5bfb7 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Config/Control/QuickStylesTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Config/Control/QuickStylesTest.php
@@ -31,8 +31,8 @@ class QuickStylesTest extends \PHPUnit_Framework_TestCase
 {
     public function testGetSchemaFile()
     {
-        /** @var $moduleReader \Magento\Core\Model\Config\Modules\Reader|PHPUnit_Framework_MockObject_MockObject */
-        $moduleReader = $this->getMockBuilder('Magento\Core\Model\Config\Modules\Reader')
+        /** @var $moduleReader \Magento\Module\Dir\Reader|PHPUnit_Framework_MockObject_MockObject */
+        $moduleReader = $this->getMockBuilder('Magento\Module\Dir\Reader')
             ->setMethods(array('getModuleDir'))
             ->disableOriginalConstructor()
             ->getMock();
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 2a287d2d1e0..fe3e60eecb6 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/NavigationModeTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/NavigationModeTest.php
@@ -79,7 +79,7 @@ class NavigationModeTest extends \PHPUnit_Framework_TestCase
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_routerListMock;
+    protected $_configInterfaceMock;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
@@ -94,13 +94,12 @@ class NavigationModeTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_designHelperMock = $this->getMock('Magento\DesignEditor\Helper\Data', array(), array(), '', false);
-        $this->_coreHelperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
         $this->_requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false);
         $this->_storeConfigMock = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
         $this->_appMock = $this->getMock('Magento\Core\Model\App', array(), array(), '', false);
         $this->_storeManagerMock = $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false);
         $this->_sessionMock = $this->getMock('Magento\Core\Model\Session', array(), array(), '', false);
-        $this->_routerListMock = $this->getMock('\Magento\App\RouterListInterface');
+        $this->_configInterfaceMock = $this->getMock('\Magento\App\Route\ConfigInterface');
         $this->_securityInfoMock = $this->getMock('Magento\Core\Model\Url\SecurityInfoInterface');
 
         $this->_requestMock->expects($this->any())
@@ -110,15 +109,15 @@ class NavigationModeTest extends \PHPUnit_Framework_TestCase
                 array('themeId', 1))));
 
         $this->_model = new \Magento\DesignEditor\Model\Url\NavigationMode(
-            $this->_routerListMock,
+            $this->_configInterfaceMock,
             $this->_requestMock,
             $this->_securityInfoMock,
             $this->_designHelperMock,
             $this->_storeConfigMock,
-            $this->_coreHelperMock,
             $this->_appMock,
             $this->_storeManagerMock,
             $this->_sessionMock,
+            'string',
             $this->_testData
         );
         $this->_model->setRequest($this->_requestMock);
diff --git a/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php
index 9744401d95f..fe4276e5fcc 100644
--- a/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php
@@ -60,7 +60,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
         $fetchStrategy = $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface');
         $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false);
         $storeConfigMock = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $countryFactory = $this->getMock('Magento\Directory\Model\Resource\CountryFactory',
             array(), array(), '', false);
         $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php
index 9247b021608..16d089cb713 100644
--- a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php
@@ -45,12 +45,12 @@ class TypeTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()->getMock();
         $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false);
         $sampleResFactory = $this->getMock(
             'Magento\Downloadable\Model\Resource\SampleFactory', array(), array(), '', false);
         $linkResource = $this->getMock('Magento\Downloadable\Model\Resource\Link', array(), array(), '', false);
-        $linksFactory = $this->getMock('Magento\Downloadable\Model\Resource\Link\Collection\Factory',
+        $linksFactory = $this->getMock('Magento\Downloadable\Model\Resource\Link\CollectionFactory',
             array(), array(), '', false
         );
         $samplesFactory = $this->getMock('Magento\Downloadable\Model\Resource\Sample\CollectionFactory',
diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php
index 26a306d0f3d..f114f127582 100644
--- a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php
+++ b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php
@@ -84,11 +84,9 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase
             'Magento\Sales\Model\Order\Pdf\AbstractPdf', array('drawLineBlocks', 'getPdf'), array(), '', false, false
         );
 
-        $context = $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false);
-        $locale = $this->getMock('Magento\Core\Model\Locale', array(), array(), '', false, false);
         $modelConstructorArgs = $objectManager
             ->getConstructArguments('Magento\Downloadable\Model\Sales\Order\Pdf\Items\Creditmemo', array(
-                'helper' => new \Magento\Core\Helper\String($context, $locale)
+                'string' => new \Magento\Stdlib\String()
         ));
 
         $this->_model = $this->getMock(
@@ -97,8 +95,6 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase
             $modelConstructorArgs
         );
 
-        $context = $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false);
-        $this->_model->setStringHelper(new \Magento\Core\Helper\String($context, $locale));
         $this->_model->setOrder($this->_order);
         $this->_model->setPdf($this->_pdf);
         $this->_model->setPage(new \Zend_Pdf_Page('a4'));
@@ -191,7 +187,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase
         ;
 
         $this->assertNotSame($expectedPdfPage, $this->_model->getPage());
-        $this->_model->draw();
+        $this->assertNull($this->_model->draw());
         $this->assertSame($expectedPdfPage, $this->_model->getPage());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/TextTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/TextTest.php
index 34d1d34df1d..d9508c4ce74 100644
--- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/TextTest.php
+++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/TextTest.php
@@ -37,8 +37,10 @@ class TextTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $locale = $this->getMock('Magento\Core\Model\LocaleInterface', array(), array(), '', false, false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false, false);
-        $helper = $this->getMock('Magento\Core\Helper\String', array(), array(), '', false, false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false, false);
+        $helper = $this->getMock('Magento\Stdlib\String', array(), array(), '', false, false);
+
+
 
         $attributeData = array(
             'store_label' => 'Test',
diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/AbstractTest.php
index 20b2d1588cd..8fd68ba7339 100644
--- a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/AbstractTest.php
@@ -40,7 +40,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $this->_model = $this->getMockForAbstractClass(
             'Magento\Eav\Model\Entity\AbstractEntity',
             array(
-                $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false),
+                $this->getMock('Magento\App\Resource', array(), array(), '', false),
                 $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false),
                 $this->getMock('Magento\Eav\Model\Entity\Attribute\Set', array(), array(), '', false),
                 $this->getMock('Magento\Core\Model\LocaleInterface'),
@@ -129,7 +129,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
             );
             $mock->setAttributeId($code);
 
-            $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+            $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
             /** @var $backendModel \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend */
             $backendModel = $this->getMock(
                 'Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend',
@@ -256,7 +256,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
 
         $attribute = $this->_getAttributeMock($attributeCode, $attributeSetId);
 
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         /** @var $backendModel \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend */
         $backendModel = $this->getMock(
             'Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend',
@@ -302,7 +302,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $attributes[$attributeCode] = $attribute;
 
         $data = array(
-            $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false),
+            $this->getMock('Magento\App\Resource', array(), array(), '', false),
             $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false),
             $this->getMock('Magento\Eav\Model\Entity\Attribute\Set', array(), array(), '', false),
             $this->getMock('Magento\Core\Model\LocaleInterface'),
diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/ArrayTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/ArrayTest.php
index b19d790353c..1f223d433f3 100644
--- a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/ArrayTest.php
+++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/ArrayTest.php
@@ -44,7 +44,7 @@ class ArrayTest extends \PHPUnit_Framework_TestCase
         $this->_attribute = $this->getMock(
             'Magento\Eav\Model\Entity\Attribute', array('getAttributeCode'), array(), '', false
         );
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $this->_model = new \Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend($logger);
         $this->_model->setAttribute($this->_attribute);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php
index 6e4db10d4b2..f700a8cfcf2 100644
--- a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php
@@ -214,8 +214,8 @@ class AttributeTest extends \PHPUnit_Framework_TestCase
                 new \Magento\Object(array('id' => 1)),
             )));
 
-        /** @var $resource \Magento\Core\Model\Resource */
-        $resource = $this->getMock('Magento\Core\Model\Resource',
+        /** @var $resource \Magento\App\Resource */
+        $resource = $this->getMock('Magento\App\Resource',
             array('getTableName', 'getConnection'), array(), '', false, false
         );
         $resource->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Validator/Attribute/DataTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Validator/Attribute/DataTest.php
index 2b676151943..73f7f65edd5 100644
--- a/dev/tests/unit/testsuite/Magento/Eav/Model/Validator/Attribute/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Validator/Attribute/DataTest.php
@@ -50,7 +50,10 @@ class DataTest extends \PHPUnit_Framework_TestCase
         $attrDataFactory = $this->getMock(
             'Magento\Eav\Model\AttributeDataFactory',
             array('create'),
-            array('objectManager' => $this->getMock('Magento\ObjectManager'))
+            array(
+                'objectManager' => $this->getMock('Magento\ObjectManager'),
+                'string'        => $this->getMock('Magento\Stdlib\String')
+            )
         );
 
         $validator = new \Magento\Eav\Model\Validator\Attribute\Data($attrDataFactory);
@@ -166,7 +169,10 @@ class DataTest extends \PHPUnit_Framework_TestCase
         $attrDataFactory = $this->getMock(
             'Magento\Eav\Model\AttributeDataFactory',
             array('create'),
-            array('objectManager' => $this->getMock('Magento\ObjectManager'))
+            array(
+                'objectManager' => $this->getMock('Magento\ObjectManager'),
+                'string'        => $this->getMock('Magento\Stdlib\String')
+            )
         );
         $attrDataFactory->expects($this->once())
             ->method('create')
@@ -203,7 +209,10 @@ class DataTest extends \PHPUnit_Framework_TestCase
         $attrDataFactory = $this->getMock(
             'Magento\Eav\Model\AttributeDataFactory',
             array('create'),
-            array('objectManager' => $this->getMock('Magento\ObjectManager'))
+            array(
+                'objectManager' => $this->getMock('Magento\ObjectManager'),
+                'string'        => $this->getMock('Magento\Stdlib\String')
+            )
         );
         $attrDataFactory->expects($this->once())
             ->method('create')
@@ -240,7 +249,10 @@ class DataTest extends \PHPUnit_Framework_TestCase
         $attrDataFactory = $this->getMock(
             'Magento\Eav\Model\AttributeDataFactory',
             array(),
-            array('objectManager' => $this->getMock('Magento\ObjectManager'))
+            array(
+                'objectManager' => $this->getMock('Magento\ObjectManager'),
+                'string'        => $this->getMock('Magento\Stdlib\String')
+            )
         );
         $validator = new \Magento\Eav\Model\Validator\Attribute\Data($attrDataFactory);
         $result = $validator->setAttributesWhiteList($attributes);
@@ -254,7 +266,10 @@ class DataTest extends \PHPUnit_Framework_TestCase
         $attrDataFactory = $this->getMock(
             'Magento\Eav\Model\AttributeDataFactory',
             array(),
-            array('objectManager' => $this->getMock('Magento\ObjectManager'))
+            array(
+                'objectManager' => $this->getMock('Magento\ObjectManager'),
+                'string'        => $this->getMock('Magento\Stdlib\String')
+            )
         );
         $validator = new \Magento\Eav\Model\Validator\Attribute\Data($attrDataFactory);
         $result = $validator->setAttributesBlackList($attributes);
@@ -290,8 +305,11 @@ class DataTest extends \PHPUnit_Framework_TestCase
         $factory = $this->getMock(
             'Magento\Eav\Model\AttributeDataFactory',
             array('create'),
-            array('objectManager' => $this->getMock('Magento\ObjectManager'))
-        );;
+            array(
+                'objectManager' => $this->getMock('Magento\ObjectManager'),
+                'string'        => $this->getMock('Magento\Stdlib\String')
+            )
+        );
         $validator = new \Magento\Eav\Model\Validator\Attribute\Data($factory);
         $validator->setAttributes(array($firstAttribute, $secondAttribute))
             ->setData($data);
diff --git a/dev/tests/unit/testsuite/Magento/Crypt/_files/_cipher_info.php b/dev/tests/unit/testsuite/Magento/Encryption/Crypt/_files/_cipher_info.php
old mode 100755
new mode 100644
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/Crypt/_files/_cipher_info.php
rename to dev/tests/unit/testsuite/Magento/Encryption/Crypt/_files/_cipher_info.php
diff --git a/dev/tests/unit/testsuite/Magento/Crypt/_files/_crypt_fixtures.php b/dev/tests/unit/testsuite/Magento/Encryption/Crypt/_files/_crypt_fixtures.php
old mode 100755
new mode 100644
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/Crypt/_files/_crypt_fixtures.php
rename to dev/tests/unit/testsuite/Magento/Encryption/Crypt/_files/_crypt_fixtures.php
diff --git a/dev/tests/unit/testsuite/Magento/CryptTest.php b/dev/tests/unit/testsuite/Magento/Encryption/CryptTest.php
old mode 100755
new mode 100644
similarity index 88%
rename from dev/tests/unit/testsuite/Magento/CryptTest.php
rename to dev/tests/unit/testsuite/Magento/Encryption/CryptTest.php
index 9b9f503e16a..4959ea57298
--- a/dev/tests/unit/testsuite/Magento/CryptTest.php
+++ b/dev/tests/unit/testsuite/Magento/Encryption/CryptTest.php
@@ -19,16 +19,16 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Crypt
+ * @package     Magento_Encryption
  * @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 case for \Magento\Crypt
+ * Test case for \Magento\Encryption\Crypt
  */
-namespace Magento;
+namespace Magento\Encryption;
 
 class CryptTest extends \PHPUnit_Framework_TestCase
 {
@@ -115,7 +115,7 @@ class CryptTest extends \PHPUnit_Framework_TestCase
         /* Generate random init vector */
         $initVector = $this->_getRandomString($this->_getInitVectorSize($cipher, $mode));
 
-        $crypt = new \Magento\Crypt($this->_key, $cipher, $mode, $initVector);
+        $crypt = new \Magento\Encryption\Crypt($this->_key, $cipher, $mode, $initVector);
 
         $this->assertEquals($cipher, $crypt->getCipher());
         $this->assertEquals($mode, $crypt->getMode());
@@ -144,13 +144,13 @@ class CryptTest extends \PHPUnit_Framework_TestCase
      */
     public function testConstructorException($key, $cipher, $mode, $initVector)
     {
-        new \Magento\Crypt($key, $cipher, $mode, $initVector);
+        new \Magento\Encryption\Crypt($key, $cipher, $mode, $initVector);
     }
 
     public function testConstructorDefaults()
     {
-        $cryptExpected = new \Magento\Crypt($this->_key, MCRYPT_BLOWFISH, MCRYPT_MODE_ECB, false);
-        $cryptActual = new \Magento\Crypt($this->_key);
+        $cryptExpected = new \Magento\Encryption\Crypt($this->_key, MCRYPT_BLOWFISH, MCRYPT_MODE_ECB, false);
+        $cryptActual = new \Magento\Encryption\Crypt($this->_key);
 
         $this->assertEquals($cryptExpected->getCipher(), $cryptActual->getCipher());
         $this->assertEquals($cryptExpected->getMode(), $cryptActual->getMode());
@@ -167,7 +167,7 @@ class CryptTest extends \PHPUnit_Framework_TestCase
                 foreach ($this->_supportedModes as $mode) {
                     $randomKey = $this->_getRandomString($this->_getKeySize($cipher, $mode));
                     $randomInitVector = $this->_getRandomString($this->_getInitVectorSize($cipher, $mode));
-                    $crypt = new \Magento\Crypt($randomKey, $cipher, $mode, $randomInitVector);
+                    $crypt = new \Magento\Encryption\Crypt($randomKey, $cipher, $mode, $randomInitVector);
                     $fixtures[] = array(
                         $randomKey, // Encryption key
                         $cipher,
@@ -195,7 +195,7 @@ class CryptTest extends \PHPUnit_Framework_TestCase
      */
     public function testEncrypt($key, $cipher, $mode, $initVector, $inputData, $expectedData)
     {
-        $crypt = new \Magento\Crypt($key, $cipher, $mode, $initVector);
+        $crypt = new \Magento\Encryption\Crypt($key, $cipher, $mode, $initVector);
         $actualData = $crypt->encrypt($inputData);
         $this->assertEquals($expectedData, $actualData);
     }
@@ -205,7 +205,7 @@ class CryptTest extends \PHPUnit_Framework_TestCase
      */
     public function testDecrypt($key, $cipher, $mode, $initVector, $expectedData, $inputData)
     {
-        $crypt = new \Magento\Crypt($key, $cipher, $mode, $initVector);
+        $crypt = new \Magento\Encryption\Crypt($key, $cipher, $mode, $initVector);
         $actualData = $crypt->decrypt($inputData);
         $this->assertEquals($expectedData, $actualData);
     }
@@ -215,10 +215,10 @@ class CryptTest extends \PHPUnit_Framework_TestCase
      */
     public function testInitVectorRandom($cipher, $mode)
     {
-        $crypt1 = new \Magento\Crypt($this->_key, $cipher, $mode, true);
+        $crypt1 = new \Magento\Encryption\Crypt($this->_key, $cipher, $mode, true);
         $initVector1 = $crypt1->getInitVector();
 
-        $crypt2 = new \Magento\Crypt($this->_key, $cipher, $mode, true);
+        $crypt2 = new \Magento\Encryption\Crypt($this->_key, $cipher, $mode, true);
         $initVector2 = $crypt2->getInitVector();
 
         $expectedSize = $this->_getInitVectorSize($cipher, $mode);
@@ -232,7 +232,7 @@ class CryptTest extends \PHPUnit_Framework_TestCase
      */
     public function testInitVectorNone($cipher, $mode)
     {
-        $crypt = new \Magento\Crypt($this->_key, $cipher, $mode, false);
+        $crypt = new \Magento\Encryption\Crypt($this->_key, $cipher, $mode, false);
         $actualInitVector = $crypt->getInitVector();
 
         $expectedInitVector = str_repeat("\0", $this->_getInitVectorSize($cipher, $mode));
diff --git a/dev/tests/unit/testsuite/Magento/Encryption/EncryptorTest.php b/dev/tests/unit/testsuite/Magento/Encryption/EncryptorTest.php
new file mode 100644
index 00000000000..715062101b9
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Encryption/EncryptorTest.php
@@ -0,0 +1,238 @@
+<?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\Encryption;
+
+class EncryptorTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var @var \Magento\Encryption\Encryptor
+     */
+    protected $_model;
+
+    public function testGetHash()
+    {
+        $hash = $this->_getEncryptor()->getHash('password', 'some_salt_string');
+
+        $this->assertEquals('a42f82cf25f63f40ff85f8c9b3ff0cb4:some_salt_string', $hash);
+    }
+
+    /**
+     * @param string $password
+     * @param string $hash
+     * @param bool $expected
+     *
+     * @dataProvider validateHashDataProvider
+     */
+    public function testValidateHash($password, $hash, $expected)
+    {
+        $actual = $this->_getEncryptor()->validateHash($password, $hash);
+
+        $this->assertEquals($expected, $actual);
+    }
+
+    public function validateHashDataProvider()
+    {
+        return array(
+            array('password', 'hash', false),
+            array('password', 'hash:salt', false),
+            array('password', md5('password'), true),
+            array('password', md5('saltpassword') . ':' . 'salt', true),
+        );
+    }
+
+    /**
+     * @param string $password
+     * @param string $hash
+     *
+     * @expectedException \InvalidArgumentException
+     * @expectedExceptionMessage Invalid hash.
+     * @dataProvider validateHashExceptionDataProvider
+     */
+    public function testValidateHashException($password, $hash)
+    {
+        $this->_getEncryptor()->validateHash($password, $hash);
+    }
+
+    public function validateHashExceptionDataProvider()
+    {
+        return array(
+            array('password', 'hash1:hash2:hash3'),
+            array('password', 'hash1:hash2:hash3:hash4'),
+        );
+    }
+
+    /**
+     * @param mixed $key
+     *
+     * @dataProvider encryptWithEmptyKeyDataProvider
+     */
+    public function testEncryptWithEmptyKey($key)
+    {
+        $encryptor = new \Magento\Encryption\Encryptor(
+            $this->getMock('\Magento\Math\Random', array(), array(), '', false),
+            $this->getMock('Magento\Encryption\CryptFactory', array(), array(), '', false),
+            $key
+        );
+
+        $value = 'arbitrary_string';
+
+        $this->assertEquals($value, $encryptor->encrypt($value));
+    }
+
+    public function encryptWithEmptyKeyDataProvider()
+    {
+        return array(
+            array(null),
+            array(0),
+            array(''),
+            array('0'),
+        );
+    }
+
+    /**
+     * @param string $value
+     * @param string $expected
+     *
+     * @dataProvider encryptDataProvider
+     */
+    public function testEncrypt($value, $expected)
+    {
+        $crypt = $this->getMock('Magento\Encryption\Crypt', array(), array(), '', false);
+        $cryptFactory = $this->getMock('Magento\Encryption\CryptFactory', array(), array(), '', false);
+        $encryptor = new \Magento\Encryption\Encryptor(
+            $this->getMock('\Magento\Math\Random', array(), array(), '', false),
+            $cryptFactory,
+            'cryptKey'
+        );
+
+        $cryptFactory->expects($this->any())
+            ->method('create')
+            ->will($this->returnValue($crypt));
+        $crypt->expects($this->any())
+            ->method('encrypt')
+            ->with($value)
+            ->will($this->returnArgument(0));
+
+        $actual = $encryptor->encrypt($value);
+
+        $this->assertEquals($expected, $actual);
+    }
+
+    public function encryptDataProvider()
+    {
+        return array(
+            array('value1', base64_encode('value1')),
+            array(true, base64_encode('1')),
+        );
+    }
+
+    /**
+     * @param string $value
+     * @param string $expected
+     *
+     * @dataProvider decryptDataProvider
+     */
+    public function testDecrypt($value, $expected)
+    {
+        $crypt = $this->getMock('Magento\Encryption\Crypt', array(), array(), '', false);
+        $cryptFactory = $this->getMock('Magento\Encryption\CryptFactory', array(), array(), '', false);
+        $encryptor = new \Magento\Encryption\Encryptor(
+            $this->getMock('\Magento\Math\Random', array(), array(), '', false),
+            $cryptFactory,
+            'cryptKey'
+        );
+
+        $cryptFactory->expects($this->any())
+            ->method('create')
+            ->will($this->returnValue($crypt));
+        $crypt->expects($this->any())
+            ->method('decrypt')
+            ->with($expected)
+            ->will($this->returnValue($expected));
+
+        $actual = $encryptor->decrypt($value);
+
+        $this->assertEquals($expected, $actual);
+    }
+
+    public function decryptDataProvider()
+    {
+        return array(
+            array(base64_encode('value1'), 'value1'),
+        );
+    }
+
+    public function testValidateKey()
+    {
+        $key = 'some_key';
+
+        $crypt = $this->getMock('Magento\Encryption\Crypt', array(), array(), '', false);
+        $cryptFactory = $this->getMock('Magento\Encryption\CryptFactory', array(), array(), '', false);
+        $encryptor = new \Magento\Encryption\Encryptor(
+            $this->getMock('\Magento\Math\Random', array(), array(), '', false),
+            $cryptFactory,
+            'cryptKey'
+        );
+
+        $cryptFactory->expects($this->any())
+            ->method('create')
+            ->with(array('key' => $key))
+            ->will($this->returnValue($crypt));
+
+        $encryptor->validateKey($key);
+    }
+
+    public function testValidateKeyDefault()
+    {
+        $key = null;
+
+        $crypt = $this->getMock('Magento\Encryption\Crypt', array(), array(), '', false);
+        $cryptFactory = $this->getMock('Magento\Encryption\CryptFactory', array(), array(), '', false);
+        $encryptor = new \Magento\Encryption\Encryptor(
+            $this->getMock('\Magento\Math\Random', array(), array(), '', false),
+            $cryptFactory,
+            'cryptKey'
+        );
+
+        $cryptFactory->expects($this->any())
+            ->method('create')
+            ->with(array('key' => 'cryptKey'))
+            ->will($this->returnValue($crypt));
+
+        $encryptor->validateKey($key);
+    }
+
+    /**
+     * @return \Magento\Encryption\Encryptor
+     */
+    protected function _getEncryptor()
+    {
+        return new \Magento\Encryption\Encryptor(
+            $this->getMock('\Magento\Math\Random', array(), array(), '', false),
+            $this->getMock('Magento\Encryption\CryptFactory', array(), array(), '', false),
+            'cryptKey'
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/EscaperTest.php b/dev/tests/unit/testsuite/Magento/EscaperTest.php
new file mode 100644
index 00000000000..95cdb821297
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/EscaperTest.php
@@ -0,0 +1,106 @@
+<?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;
+/**
+ * \Magento\Escaper test case
+ */
+class EscaperTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $_escaper = null;
+
+    protected function setUp()
+    {
+        $this->_escaper = new Escaper();
+    }
+
+    /**
+     * @covers \Magento\Escaper::escapeHtml
+     * @dataProvider escapeHtmlDataProvider
+     */
+    public function testEscapeHtml($data, $expected)
+    {
+        $actual = $this->_escaper->escapeHtml($data);
+        $this->assertEquals($expected, $actual);
+    }
+
+    /**
+     * @return array
+     */
+    public function escapeHtmlDataProvider()
+    {
+        return array(
+            'array data' => array(
+                'data' => array('one', '<two>three</two>'),
+                'expected' => array('one', '&lt;two&gt;three&lt;/two&gt;')
+            ),
+            'string data conversion' => array(
+                'data' => '<two>three</two>',
+                'expected' => '&lt;two&gt;three&lt;/two&gt;'
+            ),
+            'string data no conversion' => array(
+                'data' => 'one',
+                'expected' => 'one'
+            )
+        );
+    }
+
+    /**
+     * @covers \Magento\Escaper::escapeUrl
+     */
+    public function testEscapeUrl()
+    {
+        $data = '<two>"three</two>';
+        $expected = '&lt;two&gt;&quot;three&lt;/two&gt;';
+        $this->assertEquals($expected, $this->_escaper->escapeUrl($data));
+    }
+
+    /**
+     * @covers \Magento\Escaper::escapeJsQuote
+     */
+    public function testEscapeJsQuote()
+    {
+        $data = array("Don't do that.", 'lost_key' => "Can't do that.");
+        $expected = array("Don\\'t do that.", "Can\\'t do that.");
+        $this->assertEquals($expected, $this->_escaper->escapeJsQuote($data));
+        $this->assertEquals($expected[0], $this->_escaper->escapeJsQuote($data[0]));
+    }
+
+    /**
+     * @covers \Magento\Escaper::escapeQuote
+     */
+    public function testEscapeQuote()
+    {
+        $data = "Text with 'single' and \"double\" quotes";
+        $expected = array(
+            "Text with &#039;single&#039; and &quot;double&quot; quotes",
+            "Text with \\&#039;single\\&#039; and \\&quot;double\\&quot; quotes",
+        );
+        $this->assertEquals($expected[0], $this->_escaper->escapeQuote($data));
+        $this->assertEquals($expected[1], $this->_escaper->escapeQuote($data, true));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Event/Invoker/InvokerDefaultTest.php b/dev/tests/unit/testsuite/Magento/Event/Invoker/InvokerDefaultTest.php
index f93497fdfb9..c76d6443f56 100644
--- a/dev/tests/unit/testsuite/Magento/Event/Invoker/InvokerDefaultTest.php
+++ b/dev/tests/unit/testsuite/Magento/Event/Invoker/InvokerDefaultTest.php
@@ -103,7 +103,7 @@ class InvokerDefaultTest extends \PHPUnit_Framework_TestCase
     /**
      * @param string $shared
      * @dataProvider dataProviderForMethodIsNotDefined
-     * @expectedException \Magento\Core\Exception
+     * @expectedException \LogicException
      */
     public function testMethodIsNotDefinedExceptionWithEnabledDeveloperMode($shared)
     {
diff --git a/dev/tests/unit/testsuite/Magento/Event/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Event/ManagerTest.php
index 8186551d630..c3734b6b32a 100644
--- a/dev/tests/unit/testsuite/Magento/Event/ManagerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Event/ManagerTest.php
@@ -63,36 +63,15 @@ class ManagerTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_invoker = $this->getMock('Magento\Event\InvokerInterface');
-        $this->_eventFactory = $this->getMock('Magento\EventFactory', array('create'), array(), '', false);
-        $this->_event = $this->getMock('Magento\Event', array(), array(), '', false);
-        $this->_wrapperFactory = $this->getMock('Magento\Event\WrapperFactory', array(), array(), '',
-            false);
-        $this->_observer = $this->getMock('Magento\Event\Observer', array(), array(), '', false);
         $this->_eventConfigMock = $this->getMock('Magento\Event\ConfigInterface');
 
         $this->_eventManager = new \Magento\Event\Manager(
-            $this->_invoker, $this->_eventConfigMock, $this->_eventFactory, $this->_wrapperFactory
+            $this->_invoker, $this->_eventConfigMock
         );
     }
 
     public function testDispatch()
     {
-        $data = array('123');
-
-        $this->_event->expects($this->once())->method('setName')->with('some_event')->will($this->returnSelf());
-        $this->_eventFactory->expects($this->once())->method('create')->with(array('data' => $data))
-            ->will($this->returnValue($this->_event));
-
-        $this->_observer->expects($this->once())->method('setData')
-            ->with(array_merge(array('event' => $this->_event), $data))->will($this->returnSelf());
-        $this->_wrapperFactory->expects($this->once())->method('create')
-            ->will($this->returnValue($this->_observer));
-        $this->_invoker->expects($this->once())->method('dispatch')->with(array(
-            'instance' => 'class',
-            'method' => 'method',
-            'name' => 'observer'
-        ), $this->_observer);
-
         $this->_eventConfigMock->expects($this->once())
             ->method('getObservers')
             ->with('some_event')
diff --git a/dev/tests/unit/testsuite/Magento/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/FilesystemTest.php
index 40da58a1daf..5814e4b4ddf 100644
--- a/dev/tests/unit/testsuite/Magento/FilesystemTest.php
+++ b/dev/tests/unit/testsuite/Magento/FilesystemTest.php
@@ -934,6 +934,9 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals($searchResult, $filesystem->searchKeys($baseDirectory, $pattern));
     }
 
+    /**
+     * @return array
+     */
     public function testSearchFilesDataProvider()
     {
         return array(
@@ -966,6 +969,9 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
         $filesystem->searchKeys($baseDirectory, $pattern);
     }
 
+    /**
+     * @return array
+     */
     public function searchFilesIsolationDataProvider()
     {
         return array(
@@ -983,4 +989,39 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
             ),
         );
     }
+
+    public function testCheckLfiProtection()
+    {
+        $adapterMock = $this->getMockBuilder('Magento\Filesystem\AdapterInterface')->getMock();
+        $filesystem = new \Magento\Filesystem($adapterMock);
+        $this->assertTrue($filesystem->checkLfiProtection('/some/path/to/a/file.txt'));
+        $this->assertTrue($filesystem->checkLfiProtection('/some/path/to/a/file.with.dot.txt'));
+        $this->assertTrue($filesystem->checkLfiProtection('/some/path/to/a/dir'));
+    }
+
+    /**
+     * @dataProvider checkLfiProtectionDataProvider
+     * @expectedException \InvalidArgumentException
+     * @expectedExceptionMessage Requested file may not include parent directory traversal ("../", "..\" notation)
+     */
+    public function testCheckLfiProtectionException($path)
+    {
+        $adapterMock = $this->getMockBuilder('Magento\Filesystem\AdapterInterface')->getMock();
+        $filesystem = new \Magento\Filesystem($adapterMock);
+        $filesystem->checkLfiProtection($path);
+    }
+
+    /**
+     * @return array
+     */
+    public function checkLfiProtectionDataProvider()
+    {
+        return array(
+            array('../asd/'),
+            array('../../'),
+            array('asd/../asda'),
+            array('/asd/../asda'),
+            array('asd/../../asda'),
+        );
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Filter/AbstractFactoryTest.php b/dev/tests/unit/testsuite/Magento/Filter/AbstractFactoryTest.php
new file mode 100644
index 00000000000..94a5c0d1706
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Filter/AbstractFactoryTest.php
@@ -0,0 +1,153 @@
+<?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\Filter;
+
+class AbstractFactoryTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Filter\AbstractFactory
+     */
+    protected $_factory;
+
+    /**
+     * @var array
+     */
+    protected $_invokableList = array(
+        'sprintf'       => 'Magento\Filter\Sprintf',
+        'template'      => 'Magento\Filter\Template',
+        'arrayFilter'   => 'Magento\Filter\ArrayFilter',
+    );
+
+    /**
+     * @var array
+     */
+    protected $_sharedList = array(
+        'Magento\Filter\Template' => true,
+        'Magento\Filter\ArrayFilter' => false,
+    );
+
+    /**
+     * @var \Magento\ObjectManager
+     */
+    protected $_objectManager;
+
+    public function setUp()
+    {
+        $this->_objectManager = $this->getMockForAbstractClass('\Magento\ObjectManager', array(), '', true, true,
+            true, array('create'));
+
+        $this->_factory = $this->getMockForAbstractClass('Magento\Filter\AbstractFactory', array(
+            'objectManger' => $this->_objectManager
+        ));
+        $property = new \ReflectionProperty('Magento\Filter\AbstractFactory', 'invokableClasses');
+        $property->setAccessible(true);
+        $property->setValue($this->_factory, $this->_invokableList);
+
+        $property = new \ReflectionProperty('Magento\Filter\AbstractFactory', 'shared');
+        $property->setAccessible(true);
+        $property->setValue($this->_factory, $this->_sharedList);
+    }
+
+    /**
+     * @dataProvider canCreateFilterDataProvider
+     * @param string $alias
+     * @param bool $expectedResult
+     */
+    public function testCanCreateFilter($alias, $expectedResult)
+    {
+        $this->assertEquals($expectedResult, $this->_factory->canCreateFilter($alias));
+    }
+
+    /**
+     * @return array
+     */
+    public function canCreateFilterDataProvider()
+    {
+        return array(
+            array('arrayFilter', true),
+            array('notExist', false),
+        );
+    }
+
+    /**
+     * @dataProvider isSharedDataProvider
+     * @param string $alias
+     * @param bool $expectedResult
+     */
+    public function testIsShared($alias, $expectedResult)
+    {
+        $this->assertEquals($expectedResult, $this->_factory->isShared($alias));
+    }
+
+    /**
+     * @return array
+     */
+    public function isSharedDataProvider()
+    {
+        return array(
+            'shared' => array('Magento\Filter\Template', true),
+            'not shared' => array('Magento\Filter\ArrayFilter', false),
+            'default value' => array('Magento\Filter\Sprintf', true),
+        );
+    }
+
+    /**
+     * @dataProvider createFilterDataProvider
+     * @param string $alias
+     * @param array $arguments
+     * @param bool $isShared
+     */
+    public function testCreateFilter($alias, $arguments, $isShared)
+    {
+        $property = new \ReflectionProperty('Magento\Filter\AbstractFactory', 'sharedInstances');
+        $property->setAccessible(true);
+
+        $filterMock = $this->getMock('FactoryInterface', array('filter'));
+        $this->_objectManager->expects($this->atLeastOnce())->method('create')
+            ->with($this->equalTo($this->_invokableList[$alias]), $this->equalTo($arguments))
+            ->will($this->returnValue($filterMock));
+
+        $this->assertEquals($filterMock, $this->_factory->createFilter($alias, $arguments));
+        if ($isShared) {
+            $sharedList = $property->getValue($this->_factory);
+            $this->assertTrue(array_key_exists($alias, $sharedList));
+            $this->assertEquals($filterMock, $sharedList[$alias]);
+        } else {
+            $this->assertEmpty($property->getValue($this->_factory));
+        }
+    }
+
+    /**
+     * @return array
+     */
+    public function createFilterDataProvider()
+    {
+        return array(
+            'not shared with args' => array('arrayFilter', array('123', '231'), false),
+            'not shared without args' => array('arrayFilter', array(), true),
+            'shared' => array('template', array(), true),
+            'default shared' => array('sprintf', array(), true),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Filter/FilterManager/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Filter/FilterManager/ConfigTest.php
new file mode 100644
index 00000000000..3eac8dea622
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Filter/FilterManager/ConfigTest.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\Filter\FilterManager;
+
+class ConfigTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Filter\FilterManager\Config
+     */
+    protected $_config;
+
+    protected function setUp()
+    {
+        $this->_config = new \Magento\Filter\FilterManager\Config(array('test' => 'test'));
+    }
+
+    public function testGetFactories()
+    {
+        $expectedConfig = array(
+            'test' => 'test',
+            'Magento\Filter\Factory',
+            'Magento\Filter\ZendFactory',
+        );
+        $this->assertEquals($expectedConfig, $this->_config->getFactories());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Filter/FilterManagerTest.php b/dev/tests/unit/testsuite/Magento/Filter/FilterManagerTest.php
new file mode 100644
index 00000000000..23805ae61df
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Filter/FilterManagerTest.php
@@ -0,0 +1,153 @@
+<?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\Filter;
+
+class FilterManagerTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Filter\FilterManager
+     */
+    protected $_filterManager;
+
+    /**
+     * @var \Magento\Filter\Factory
+     */
+    protected $_factoryMock;
+
+    /**
+     * @var \Magento\ObjectManager
+     */
+    protected $_objectManager;
+
+    /**
+     * @var \Magento\Filter\FilterManager\Config
+     */
+    protected $_config;
+
+    protected function initMocks()
+    {
+        $factoryName = 'Magento\Filter\Factory';
+        $this->_factoryMock = $this->getMock($factoryName, array('canCreateFilter', 'createFilter'),
+            array(), '', false);
+        $this->_objectManager = $this->getMockForAbstractClass('\Magento\ObjectManager', array(), '', true, true,
+            true, array('create'));
+        $this->_objectManager->expects($this->atLeastOnce())->method('create')
+            ->with($this->equalTo($factoryName))
+            ->will($this->returnValue($this->_factoryMock));
+        $this->_config = $this->getMock('\Magento\Filter\FilterManager\Config', array('getFactories'),
+            array(), '', false);
+        $this->_config->expects($this->atLeastOnce())->method('getFactories')
+            ->will($this->returnValue(array($factoryName)));
+        $this->_filterManager = new \Magento\Filter\FilterManager($this->_objectManager, $this->_config);
+    }
+
+    public function testGetFilterFactories()
+    {
+        $this->initMocks();
+        $method = new \ReflectionMethod('Magento\Filter\FilterManager', 'getFilterFactories');
+        $method->setAccessible(true);
+        $this->assertEquals(array($this->_factoryMock), $method->invoke($this->_filterManager));
+    }
+
+    /**
+     * @expectedException \UnexpectedValueException
+     * @expectedExceptionMessage Filter factory must implement FilterFactoryInterface interface, stdClass was given.
+     */
+    public function testGetFilterFactoriesWrongInstance()
+    {
+        $factoryName = 'Magento\Filter\Factory';
+        $this->_factoryMock = new \stdClass();
+        $this->_objectManager = $this->getMockForAbstractClass('\Magento\ObjectManager', array(), '', true, true,
+            true, array('create'));
+        $this->_objectManager->expects($this->atLeastOnce())->method('create')
+            ->with($this->equalTo($factoryName))
+            ->will($this->returnValue($this->_factoryMock));
+        $this->_config = $this->getMock('\Magento\Filter\FilterManager\Config',
+            array('getFactories'), array(), '', false);
+        $this->_config->expects($this->atLeastOnce())->method('getFactories')
+            ->will($this->returnValue(array($factoryName)));
+        $this->_filterManager = new \Magento\Filter\FilterManager($this->_objectManager, $this->_config);
+
+        $method = new \ReflectionMethod('Magento\Filter\FilterManager', 'getFilterFactories');
+        $method->setAccessible(true);
+        $method->invoke($this->_filterManager);
+    }
+
+    public function testCreateFilterInstance()
+    {
+        $this->initMocks();
+        $filterMock = $this->getMock('FactoryInterface');
+        $this->configureFactoryMock($filterMock, 'alias', array('123'));
+
+
+        $method = new \ReflectionMethod('Magento\Filter\FilterManager', 'createFilterInstance');
+        $method->setAccessible(true);
+        $this->assertEquals($filterMock, $method->invoke($this->_filterManager, 'alias', array('123')));
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     * @expectedExceptionMessage Filter was not found by given alias wrongAlias
+     */
+    public function testCreateFilterInstanceWrongAlias()
+    {
+        $this->initMocks();
+        $filterAlias = 'wrongAlias';
+        $this->_factoryMock->expects($this->atLeastOnce())->method('canCreateFilter')
+            ->with($this->equalTo($filterAlias))
+            ->will($this->returnValue(false));
+
+        $method = new \ReflectionMethod('Magento\Filter\FilterManager', 'createFilterInstance');
+        $method->setAccessible(true);
+        $method->invoke($this->_filterManager, $filterAlias, array());
+    }
+
+    /**
+     * @param object $filter
+     * @param string $alias
+     * @param array $arguments
+     */
+    protected function configureFactoryMock($filter, $alias, $arguments = array())
+    {
+        $this->_factoryMock->expects($this->atLeastOnce())->method('canCreateFilter')
+            ->with($this->equalTo($alias))
+            ->will($this->returnValue(true));
+
+        $this->_factoryMock->expects($this->atLeastOnce())->method('createFilter')
+            ->with($this->equalTo($alias), $this->equalTo($arguments))
+            ->will($this->returnValue($filter));
+    }
+
+    public function testCall()
+    {
+        $value = 'testValue';
+        $this->initMocks();
+        $filterMock = $this->getMock('FactoryInterface', array('filter'));
+        $filterMock->expects($this->atLeastOnce())->method('filter')
+            ->with($this->equalTo($value))
+            ->will($this->returnValue($value));
+        $this->configureFactoryMock($filterMock, 'alias', array('123'));
+        $this->assertEquals($value, $this->_filterManager->alias($value, array('123')));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Filter/RemoveAccentsTest.php
similarity index 73%
rename from dev/tests/unit/testsuite/Magento/Core/Helper/DataTest.php
rename to dev/tests/unit/testsuite/Magento/Filter/RemoveAccentsTest.php
index ec6c8487493..9ee50f9a43c 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Helper/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Filter/RemoveAccentsTest.php
@@ -18,30 +18,14 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @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\Core\Helper;
 
-class DataTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_helper;
-
-    /**
-     * @var \Magento\TestFramework\Helper\ObjectManager
-     */
-    protected $_objectManager;
-
-    protected function setUp()
-    {
-        $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $this->_helper = $this->_objectManager->getObject('Magento\Core\Helper\Data');
-    }
+namespace Magento\Filter;
 
+class RemoveAccentsTest extends \PHPUnit_Framework_TestCase
+{
     /**
      * @param string $string
      * @param bool $german
@@ -51,7 +35,8 @@ class DataTest extends \PHPUnit_Framework_TestCase
      */
     public function testRemoveAccents($string, $german, $expected)
     {
-        $this->assertEquals($expected, $this->_helper->removeAccents($string, $german));
+        $filter = new \Magento\Filter\RemoveAccents($german);
+        $this->assertEquals($expected, $filter->filter($string));
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Filter/RemoveTagsTest.php
similarity index 78%
rename from dev/tests/unit/testsuite/Magento/Core/Helper/AbstractTest.php
rename to dev/tests/unit/testsuite/Magento/Filter/RemoveTagsTest.php
index f92a7aa58c9..8da997cafdd 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Helper/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Filter/RemoveTagsTest.php
@@ -21,16 +21,19 @@
  * @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\Helper;
+namespace Magento\Filter;
 
-class AbstractTest extends \PHPUnit_Framework_TestCase
+class RemoveTagsTest extends \PHPUnit_Framework_TestCase
 {
+    /**
+     * @covers \Magento\Filter\RemoveTags::filter
+     * @covers \Magento\Filter\RemoveTags::_convertEntities
+     */
     public function testRemoveTags()
     {
         $input = '<div>10</div> < <a>11</a> > <span>10</span>';
-        /** @var \Magento\Core\Helper\AbstractHelper $helper */
-        $helper = $this->getMockForAbstractClass('Magento\Core\Helper\AbstractHelper', array(), '', false);
-        $actual = $helper->removeTags($input);
+        $removeTags = new \Magento\Filter\RemoveTags();
+        $actual = $removeTags->filter($input);
         $expected = '10 < 11 > 10';
         $this->assertSame($expected, $actual);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Filter/SplitWordsTest.php b/dev/tests/unit/testsuite/Magento/Filter/SplitWordsTest.php
new file mode 100644
index 00000000000..0ed108d6c15
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Filter/SplitWordsTest.php
@@ -0,0 +1,40 @@
+<?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\Filter;
+
+class SplitWordsTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Bug: $maxWordLength parameter has a misleading name. It limits qty of words in the result.
+     */
+    public function testSplitWords()
+    {
+        $words = '123  123  45 789';
+        $filter = new \Magento\Filter\SplitWords(false, 3);
+        $this->assertEquals(array('123', '123', '45'), $filter->filter($words));
+        $filter = new \Magento\Filter\SplitWords(true, 2);
+        $this->assertEquals(array('123', '45'), $filter->filter($words));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Filter/StripTagsTest.php b/dev/tests/unit/testsuite/Magento/Filter/StripTagsTest.php
new file mode 100644
index 00000000000..30f259b39d0
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Filter/StripTagsTest.php
@@ -0,0 +1,37 @@
+<?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\Filter;
+
+class StripTagsTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @covers \Magento\Filter\StripTags::_construct
+     * @covers \Magento\Filter\StripTags::filter
+     */
+    public function testStripTags()
+    {
+        $stripTags = new \Magento\Filter\StripTags(new \Magento\Escaper());
+        $this->assertEquals('three', $stripTags->filter('<two>three</two>'));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Filter/TruncateTest.php b/dev/tests/unit/testsuite/Magento/Filter/TruncateTest.php
new file mode 100644
index 00000000000..6ccc19c0e41
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Filter/TruncateTest.php
@@ -0,0 +1,66 @@
+<?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\Filter;
+
+class TruncateTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @param string $string
+     * @param array $args
+     * @param string $expected
+     * @param string $expectedReminder
+     * @dataProvider truncateDataProvider
+     */
+    public function testTruncate($string, $args, $expected, $expectedReminder)
+    {
+        list($strLib, $length, $etc, $reminder, $breakWords) = $args;
+        $filter = new \Magento\Filter\Truncate($strLib, $length, $etc, $reminder, $breakWords);
+        $this->assertEquals($expected, $filter->filter($string));
+
+        $this->assertEquals($expectedReminder, $reminder);
+    }
+
+    /**
+     * @return array
+     */
+    public function truncateDataProvider()
+    {
+        $remainder = '';
+        return array(
+            '1' => array(
+                '1234567890',
+                array(new \Magento\Stdlib\String, 5, '...', '', true),
+                '12...',
+                '34567890'
+            ),
+            '2' => array(
+                '123 456 789',
+                array(new \Magento\Stdlib\String, 8, '..', $remainder, false),
+                '123..',
+                ' 456 789'
+            )
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/GoogleAdwords/Model/Validator/FactoryTest.php b/dev/tests/unit/testsuite/Magento/GoogleAdwords/Model/Validator/FactoryTest.php
index 73cd794187e..ae6f59a4f77 100644
--- a/dev/tests/unit/testsuite/Magento/GoogleAdwords/Model/Validator/FactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/GoogleAdwords/Model/Validator/FactoryTest.php
@@ -1,7 +1,4 @@
 <?php
-
-namespace Magento\GoogleAdwords\Model\Validator;
-
 /**
  * Magento
  *
@@ -25,6 +22,12 @@ namespace Magento\GoogleAdwords\Model\Validator;
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  * @SuppressWarnings(PHPMD.LongVariable)
  */
+namespace Magento\GoogleAdwords\Model\Validator;
+
+use Magento\TestFramework\Helper\ObjectManager;
+use Magento\Validator\Int;
+use Magento\Validator\Regex;
+
 class FactoryTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -64,7 +67,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
         $this->_vbMock = $this->getMock('Magento\Validator\Builder', array(), array(), '', false);
         $this->_validatorMock = $this->getMock('Magento\Validator\ValidatorInterface', array(), array(), '', false);
 
-        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $objectManager = new ObjectManager($this);
         $this->_factory = $objectManager->getObject('Magento\GoogleAdwords\Model\Validator\Factory', array(
             'validatorBuilderFactory' => $this->_vbFactoryMock,
         ));
@@ -77,21 +80,23 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
             $currentColor);
 
         $this->_vbFactoryMock->expects($this->once())->method('create')
-            ->with(array(
+            ->with('Magento\Validator\Builder', array(
                 'constraints' => array(
                     array(
                         'alias' => 'Regex',
                         'type' => '',
                         'class' => 'Magento\Validator\Regex',
                         'options' => array(
-                            'arguments' => array('/^[0-9a-f]{6}$/i'),
+                            'arguments' => array(
+                                'pattern' => '/^[0-9a-f]{6}$/i'
+                            ),
                             'methods' => array(
                                 array(
                                     'method' => 'setMessages',
                                     'arguments' => array(
                                         array(
-                                            \Magento\Validator\Regex::NOT_MATCH => $message,
-                                            \Magento\Validator\Regex::INVALID => $message,
+                                            Regex::NOT_MATCH => $message,
+                                            Regex::INVALID => $message,
                                         ),
                                     ),
                                 ),
@@ -114,7 +119,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
         $message = sprintf('Conversion Id value is not valid "%s". Conversion Id should be an integer.', $conversionId);
 
         $this->_vbFactoryMock->expects($this->once())->method('create')
-            ->with(array(
+            ->with('Magento\Validator\Builder', array(
                 'constraints' => array(
                     array(
                         'alias' => 'Int',
@@ -126,8 +131,8 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
                                     'method' => 'setMessages',
                                     'arguments' => array(
                                         array(
-                                            \Magento\Validator\Int::NOT_INT => $message,
-                                            \Magento\Validator\Int::INVALID => $message,
+                                            Int::NOT_INT => $message,
+                                            Int::INVALID => $message,
                                         ),
                                     ),
                                 ),
diff --git a/dev/tests/unit/testsuite/Magento/GoogleShopping/Block/SiteVerificationTest.php b/dev/tests/unit/testsuite/Magento/GoogleShopping/Block/SiteVerificationTest.php
index c6a51c5738f..2184796f176 100644
--- a/dev/tests/unit/testsuite/Magento/GoogleShopping/Block/SiteVerificationTest.php
+++ b/dev/tests/unit/testsuite/Magento/GoogleShopping/Block/SiteVerificationTest.php
@@ -34,24 +34,25 @@ class SiteVerificationTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $layout = $this->getMock('Magento\Core\Model\Layout', array(), array(), '', false);
-        $coreHelper = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
-        $coreHelper->expects($this->any())
-            ->method('escapeHtml')->with('Valor & Honor')->will($this->returnValue('Valor &amp; Honor'));
-        $helperFactory = $this->getMockBuilder('Magento\Core\Model\Factory\Helper')
+
+        $escaper = $this->getMockBuilder('Magento\Escaper')
             ->disableOriginalConstructor()
-            ->setMethods(array('get'))
+            ->setMethods(array('escapeHtml'))
             ->getMock();
-        $helperFactory->expects($this->any())->method('get')->will($this->returnValue($coreHelper));
-        $layout->expects($this->any())
-            ->method('helper')->with('Magento\Core\Helper\Data')->will($this->returnValue($coreHelper));
+        $escaper->expects($this->any())
+            ->method('escapeHtml')
+            ->with('Valor & Honor')->will($this->returnValue('Valor &amp; Honor'));
+
         $context = $objectHelper->getObject('Magento\Core\Block\Context', array(
-            'eventManager' => $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false),
-            'layout' => $layout,
-            'helperFactory' => $helperFactory
+            'escaper' => $escaper
         ));
+
         $this->_config = $this->getMock('Magento\GoogleShopping\Model\Config', array(), array(), '', false);
-        $this->_block = new \Magento\GoogleShopping\Block\SiteVerification($context, $this->_config);
+
+        $this->_block = $objectHelper->getObject('Magento\GoogleShopping\Block\SiteVerification', array(
+            'context' => $context,
+            'config' => $this->_config
+        ));
     }
 
     public function testToHtmlWithContent()
diff --git a/dev/tests/unit/testsuite/Magento/GoogleShopping/Model/AttributeFactoryTest.php b/dev/tests/unit/testsuite/Magento/GoogleShopping/Model/AttributeFactoryTest.php
index 038afcc93fa..1b67f09dfd2 100644
--- a/dev/tests/unit/testsuite/Magento/GoogleShopping/Model/AttributeFactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/GoogleShopping/Model/AttributeFactoryTest.php
@@ -60,7 +60,7 @@ class AttributeFactoryTest extends \PHPUnit_Framework_TestCase
     {
         return $this->getMockBuilder('Magento\GoogleShopping\Model\Attribute\DefaultAttribute')
             ->disableOriginalConstructor()
-            ->setMethods(null)
+            ->setMethods(array('__wakeup'))
             ->getMock();
     }
 
@@ -76,7 +76,11 @@ class AttributeFactoryTest extends \PHPUnit_Framework_TestCase
             ->method('create')
             ->with($this->equalTo('Magento\GoogleShopping\Model\Attribute\\' . $expected))
             ->will($this->returnValue($this->_createDefaultAttribute()));
-        $attributeFactory = new \Magento\GoogleShopping\Model\AttributeFactory($objectManager, $this->_createGsData());
+        $attributeFactory = new \Magento\GoogleShopping\Model\AttributeFactory(
+            $objectManager,
+            $this->_createGsData(),
+            new \Magento\Stdlib\String
+        );
         $attribute = $attributeFactory->createAttribute($name);
         $this->assertEquals($name, $attribute->getName());
     }
@@ -105,7 +109,11 @@ class AttributeFactoryTest extends \PHPUnit_Framework_TestCase
             ->method('create')
             ->with($this->equalTo('Magento\GoogleShopping\Model\Attribute\DefaultAttribute'))
             ->will($this->returnValue($this->_createDefaultAttribute()));
-        $attributeFactory = new \Magento\GoogleShopping\Model\AttributeFactory($objectManager, $this->_createGsData());
+        $attributeFactory = new \Magento\GoogleShopping\Model\AttributeFactory(
+            $objectManager,
+            $this->_createGsData(),
+            new \Magento\Stdlib\String
+        );
         $attribute = $attributeFactory->createAttribute('name');
         $this->assertEquals('name', $attribute->getName());
     }
@@ -122,7 +130,11 @@ class AttributeFactoryTest extends \PHPUnit_Framework_TestCase
             ->method('create')
             ->with('Magento\GoogleShopping\Model\Attribute')
             ->will($this->returnValue('some value'));
-        $attributeFactory = new \Magento\GoogleShopping\Model\AttributeFactory($objectManager, $this->_createGsData());
+        $attributeFactory = new \Magento\GoogleShopping\Model\AttributeFactory(
+            $objectManager,
+            $this->_createGsData(),
+            new \Magento\Stdlib\String
+        );
         $attribute = $attributeFactory->create();
         $this->assertEquals('some value', $attribute);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/HttpTest.php b/dev/tests/unit/testsuite/Magento/Http/AuthenticationTest.php
similarity index 77%
rename from dev/tests/unit/testsuite/Magento/Core/Helper/HttpTest.php
rename to dev/tests/unit/testsuite/Magento/Http/AuthenticationTest.php
index 282b4ee9bbd..64c419d9895 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Helper/HttpTest.php
+++ b/dev/tests/unit/testsuite/Magento/Http/AuthenticationTest.php
@@ -25,41 +25,29 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Core\Helper;
+namespace Magento\Http;
 
-class HttpTest extends \PHPUnit_Framework_TestCase
+class AuthenticationTest extends \PHPUnit_Framework_TestCase
 {
-    /**
-     * @var \Magento\Core\Helper\Http
-     */
-    protected $_object = null;
-
-    protected function setUp()
-    {
-        $this->_object = new \Magento\Core\Helper\Http(
-            $this->getMock('Magento\Core\Helper\String', array(), array(), '', false, false),
-            $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false),
-            $this->getMock('Magento\Core\Model\Config', array(), array(), '', false, false)
-        );
-    }
-
     /**
      * @param array $server
      * @param string $expectedLogin
      * @param string $expectedPass
-     * @dataProvider getHttpAuthCredentialsDataProvider
+     * @dataProvider getCredentialsDataProvider
      */
-    public function testGetHttpAuthCredentials($server, $expectedLogin, $expectedPass)
+    public function testGetCredentials($server, $expectedLogin, $expectedPass)
     {
         $request = $this->getMock('\Magento\App\Request\Http', array(), array(), '', false);
         $request->expects($this->once())->method('getServer')->will($this->returnValue($server));
-        $this->assertSame(array($expectedLogin, $expectedPass), $this->_object->getHttpAuthCredentials($request));
+        $response = $this->getMock('\Magento\App\Response\Http', array(), array(), '', false);
+        $authentication = new \Magento\HTTP\Authentication($request, $response);
+        $this->assertSame(array($expectedLogin, $expectedPass), $authentication->getCredentials());
     }
 
     /**
      * @return array
      */
-    public function getHttpAuthCredentialsDataProvider()
+    public function getCredentialsDataProvider()
     {
         $login    = 'login';
         $password = 'password';
@@ -93,12 +81,14 @@ class HttpTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    public function testFailHttpAuthentication()
+    public function testSetAuthenticationFailed()
     {
+        $request = $this->getMock('\Magento\App\Request\Http', array(), array(), '', false);;
         $response = new \Magento\App\Response\Http();
+        $authentication = new \Magento\HTTP\Authentication($request, $response);
         $realm = uniqid();
         $response->headersSentThrowsException = false;
-        $this->_object->failHttpAuthentication($response, $realm);
+        $authentication->setAuthenticationFailed($realm);
         $headers = $response->getHeaders();
         $this->assertArrayHasKey(0, $headers);
         $this->assertEquals('401 Unauthorized', $headers[0]['value']);
diff --git a/dev/tests/unit/testsuite/Magento/Http/HeaderTest.php b/dev/tests/unit/testsuite/Magento/Http/HeaderTest.php
new file mode 100644
index 00000000000..ac272bb4ec2
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Http/HeaderTest.php
@@ -0,0 +1,207 @@
+<?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_Connect
+ * @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\Http;
+
+class HeaderTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $_objectManager;
+
+    /**
+     * @var \Magento\App\Request\Http
+     */
+    protected $_request;
+
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $_converter;
+
+    protected function setUp()
+    {
+        $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $this->_request = $this->getMock(
+            'Magento\App\Request\Http',
+            array('getServer', 'getRequestUri'),
+            array(),
+            '',
+            false
+        );
+
+        $this->_converter = $this->getMock('\Magento\Stdlib\String', array('cleanString'));
+    }
+
+    /**
+     * @param string $method
+     * @param boolean $clean
+     * @param string $expectedValue
+     *
+     * @dataProvider methodsDataProvider
+     *
+     * @covers \Magento\HTTP\Header::getHttpHost
+     * @covers \Magento\HTTP\Header::getHttpUserAgent
+     * @covers \Magento\HTTP\Header::getHttpAcceptLanguage
+     * @covers \Magento\HTTP\Header::getHttpAcceptCharset
+     * @covers \Magento\HTTP\Header::getHttpReferer
+     */
+    public function testHttpMethods($method, $clean, $expectedValue)
+    {
+        $this->_request->expects($this->once())
+            ->method('getServer')
+            ->will($this->returnValue('value'));
+
+        $this->_prepareCleanString($clean);
+
+        $headerObject = $this->_objectManager->getObject(
+            '\Magento\HTTP\Header',
+            array('httpRequest' => $this->_request, 'converter' => $this->_converter)
+        );
+
+        $method = new \ReflectionMethod('\Magento\HTTP\Header', $method);
+        $result = $method->invokeArgs($headerObject, array('clean' => $clean));
+
+        $this->assertEquals($expectedValue, $result);
+    }
+
+    /**
+     * @return array
+     */
+    public function methodsDataProvider()
+    {
+        return array(
+            'getHttpHost clean true' => array(
+                'method' => 'getHttpHost',
+                'clean' => true,
+                'expectedValue' => 'converted value'
+            ),
+            'getHttpHost clean false' => array(
+                'method' => 'getHttpHost',
+                'clean' => false,
+                'expectedValue' => 'value'
+            ),
+            'getHttpUserAgent clean true' => array(
+                'method' => 'getHttpUserAgent',
+                'clean' => true,
+                'expectedValue' => 'converted value'
+            ),
+            'getHttpUserAgent clean false' => array(
+                'method' => 'getHttpUserAgent',
+                'clean' => false,
+                'expectedValue' => 'value'
+            ),
+            'getHttpAcceptLanguage clean true' => array(
+                'method' => 'getHttpAcceptLanguage',
+                'clean' => true,
+                'expectedValue' => 'converted value'
+            ),
+            'getHttpAcceptLanguage clean false' => array(
+                'method' => 'getHttpAcceptLanguage',
+                'clean' => false,
+                'expectedValue' => 'value'
+            ),
+            'getHttpAcceptCharset clean true' => array(
+                'method' => 'getHttpAcceptCharset',
+                'clean' => true,
+                'expectedValue' => 'converted value'
+            ),
+            'getHttpAcceptCharset clean false' => array(
+                'method' => 'getHttpAcceptCharset',
+                'clean' => false,
+                'expectedValue' => 'value'
+            ),
+            'getHttpReferer clean true' => array(
+                'method' => 'getHttpReferer',
+                'clean' => true,
+                'expectedValue' => 'converted value'
+            ),
+            'getHttpReferer clean false' => array(
+                'method' => 'getHttpReferer',
+                'clean' => false,
+                'expectedValue' => 'value'
+            ),
+        );
+    }
+
+    /**
+     * @param boolean $clean
+     * @param string $expectedValue
+     *
+     * @dataProvider getRequestUriDataProvider
+     */
+    public function testGetRequestUri($clean, $expectedValue)
+    {
+        $this->_request->expects($this->once())
+            ->method('getRequestUri')
+            ->will($this->returnValue('value'));
+
+        $this->_prepareCleanString($clean);
+
+        $headerObject = $this->_objectManager->getObject(
+            '\Magento\HTTP\Header',
+            array('httpRequest' => $this->_request, 'converter' => $this->_converter)
+        );
+
+        $result = $headerObject->getRequestUri($clean);
+
+        $this->assertEquals($expectedValue, $result);
+    }
+
+    /**
+     * @return array
+     */
+    public function getRequestUriDataProvider()
+    {
+        return array(
+            'getRequestUri clean true' => array(
+                'clean' => true,
+                'expectedValue' => 'converted value'
+            ),
+            'getRequestUri clean false' => array(
+                'clean' => false,
+                'expectedValue' => 'value'
+            ),
+        );
+    }
+
+    /**
+     * @param boolean $clean
+     * @return $this
+     */
+    protected function _prepareCleanString($clean)
+    {
+        $cleanStringExpects = $clean ? $this->once() : $this->never();
+
+        $this->_converter->expects($cleanStringExpects)
+            ->method('cleanString')
+            ->will($this->returnValue('converted value'));
+        return $this;
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/RemoteAddressTest.php b/dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/RemoteAddressTest.php
new file mode 100644
index 00000000000..41d25b9c122
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/RemoteAddressTest.php
@@ -0,0 +1,115 @@
+<?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_Core
+ * @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\Http\PhpEnvironment;
+
+class RemoteAddressTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\App\Request\Http
+     */
+    protected $_request;
+
+    /**
+     * @var TestFramework\Helper\ObjectManager
+     */
+    protected $_objectManager;
+
+
+    protected function setUp()
+    {
+        $this->_request = $this->getMockBuilder('Magento\App\Request\Http')
+            ->disableOriginalConstructor()
+            ->setMethods(array('getServer'))
+            ->getMock();
+
+        $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+    }
+
+    /**
+     * @dataProvider getRemoteAddressProvider
+     */
+    public function testGetRemoteAddress($alternativeHeaders, $serverValueMap, $expected, $ipToLong)
+    {
+        $remoteAddress = $this->_objectManager->getObject('Magento\HTTP\PhpEnvironment\RemoteAddress', array(
+            'httpRequest' => $this->_request,
+            'alternativeHeaders' => $alternativeHeaders
+        ));
+        $this->_request->expects($this->any())
+            ->method('getServer')
+            ->will($this->returnValueMap($serverValueMap));
+        $this->assertEquals($expected, $remoteAddress->getRemoteAddress($ipToLong));
+    }
+
+    /**
+     * @return array
+     */
+    public function getRemoteAddressProvider()
+    {
+        return array(
+            array(
+                'alternativeHeaders' => array(),
+                'serverValueMap' => array(array('REMOTE_ADDR', null, null)),
+                'expected' => false,
+                'ipToLong' => false
+            ),
+            array(
+                'alternativeHeaders' => array(),
+                'serverValueMap' => array(array('REMOTE_ADDR', null, '192.168.0.1')),
+                'expected' => '192.168.0.1',
+                'ipToLong' => false
+            ),
+            array(
+                'alternativeHeaders' => array(),
+                'serverValueMap' => array(array('REMOTE_ADDR', null, '192.168.1.1')),
+                'expected' => ip2long('192.168.1.1'),
+                'ipToLong' => true
+            ),
+            array(
+                'alternativeHeaders' => array('TEST_HEADER'),
+                'serverValueMap' => array(
+                    array('REMOTE_ADDR', null, '192.168.1.1'),
+                    array('TEST_HEADER', null, '192.168.0.1'),
+                    array('TEST_HEADER', false, '192.168.0.1')
+                ),
+                'expected' => '192.168.0.1',
+                'ipToLong' => false
+            ),
+            array(
+                'alternativeHeaders' => array('TEST_HEADER'),
+                'serverValueMap' => array(
+                    array('REMOTE_ADDR', null, '192.168.1.1'),
+                    array('TEST_HEADER', null, '192.168.0.1'),
+                    array('TEST_HEADER', false, '192.168.0.1')
+                ),
+                'expected' => ip2long('192.168.0.1'),
+                'ipToLong' => true
+            )
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/ServerAddressTest.php b/dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/ServerAddressTest.php
new file mode 100644
index 00000000000..16099c9ba98
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/ServerAddressTest.php
@@ -0,0 +1,78 @@
+<?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_Core
+ * @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\Http\PhpEnvironment;
+
+class ServerAddressTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\HTTP\PhpEnvironment\ServerAddress
+     */
+    protected $_serverAddress;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\App\Request\Http
+     */
+    protected $_request;
+
+    protected function setUp()
+    {
+        $this->_request = $this->getMockBuilder('Magento\App\Request\Http')
+            ->disableOriginalConstructor()
+            ->setMethods(array('getServer'))
+            ->getMock();
+
+        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->_serverAddress = $objectManager->getObject('Magento\HTTP\PhpEnvironment\ServerAddress', array(
+            'httpRequest' => $this->_request
+        ));
+    }
+
+    /**
+     * @dataProvider getServerAddressProvider
+     */
+    public function testGetServerAddress($serverVar, $expected, $ipToLong)
+    {
+        $this->_request->expects($this->atLeastOnce())
+            ->method('getServer')
+            ->with('SERVER_ADDR')
+            ->will($this->returnValue($serverVar));
+        $this->assertEquals($expected, $this->_serverAddress->getServerAddress($ipToLong));
+    }
+
+    /**
+     * @return array
+     */
+    public function getServerAddressProvider()
+    {
+        return array(
+            array(null, false, false),
+            array('192.168.0.1', '192.168.0.1', false),
+            array('192.168.1.1', ip2long('192.168.1.1'), true)
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Config/SchemaLocatorTest.php
index fbf25ae7591..0ff470199d8 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Config/SchemaLocatorTest.php
@@ -38,7 +38,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_moduleReaderMock = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false
+            'Magento\Module\Dir\Reader', array(), array(), '', false
         );
 
         $this->_moduleReaderMock->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php
index e0c97211a15..1aceecc5c2f 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php
@@ -75,7 +75,7 @@ class ExportTest extends \PHPUnit_Framework_TestCase
             ->method('getFileExtension')
             ->will($this->returnValue($this->_exportFileExtension));
 
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $dir = $this->getMock('Magento\App\Dir', array(), array(), '', false);
         $adapterFactory = $this->getMock('Magento\Core\Model\Log\AdapterFactory', array(), array(), '', false);
         $entityFactory = $this->getMock(
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Config/SchemaLocatorTest.php
index e41d6a7b176..782d699d3ec 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Config/SchemaLocatorTest.php
@@ -38,7 +38,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_moduleReaderMock = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false
+            'Magento\Module\Dir\Reader', array(), array(), '', false
         );
 
         $this->_moduleReaderMock->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/AbstractTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/AbstractTest.php
index 7316c500948..166aee5eb89 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/AbstractTest.php
@@ -77,7 +77,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
             ->with('Magento\Core\Model\Registry')
             ->will($this->returnValue($coreRegisterMock));
 
-        \Magento\Core\Model\ObjectManager::setInstance($objectManagerMock);
+        \Magento\App\ObjectManager::setInstance($objectManagerMock);
 
         return $helper;
     }
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php
index 5ac6b8e72e7..9f935367a52 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php
@@ -57,7 +57,7 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
     /**
      * @var \Magento\Core\Helper\String|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_stringHelper;
+    protected $_string;
 
     /**
      * @var \Magento\ImportExport\Model\ImportFactory
@@ -65,7 +65,7 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
     protected $_importFactory;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
@@ -123,10 +123,10 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
             'dateModel' => $this->getMock('Magento\Core\Model\Date', array(), array(), '', false)
         );
         $this->_coreHelper = $objectManager->getObject('Magento\Core\Helper\Data', $data);
-        $this->_stringHelper = $this->getMock('Magento\Core\Helper\String', array('__construct'), array(), '', false);
+        $this->_string = new \Magento\Stdlib\String;
 
         $this->_importFactory = $this->getMock('Magento\ImportExport\Model\ImportFactory', array(), array(), '', false);
-        $this->_resource = $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false);
+        $this->_resource = $this->getMock('Magento\App\Resource', array(), array(), '', false);
         $this->_resourceHelper = $this->getMock(
             'Magento\ImportExport\Model\Resource\Helper', array(), array(), '', false
         );
@@ -149,12 +149,12 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
         $data = $this->_getModelDependencies();
         $data['customer_entity'] = $this->_getCustomerEntityMock();
         $data['address_entity']  = $this->_getAddressEntityMock();
-        
+
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
 
         $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite(
             $this->_coreHelper,
-            $this->_stringHelper,
+            $this->_string,
             $coreStoreConfig,
             $this->_importFactory,
             $this->_resourceHelper,
@@ -202,12 +202,12 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
         $data['customer_entity']   = $customerEntity;
         $data['address_entity']    = $addressEntity;
         $data['data_source_model'] = $dataSourceMock;
-        
+
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
-        
+
         $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite(
             $this->_coreHelper,
-            $this->_stringHelper,
+            $this->_string,
             $coreStoreConfig,
             $this->_importFactory,
             $this->_resourceHelper,
@@ -262,12 +262,12 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
         $data = $this->_getModelDependencies();
         $data['customer_entity'] = $customerEntity;
         $data['address_entity']  = $addressEntity;
-        
+
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
-        
+
         $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite(
             $this->_coreHelper,
-            $this->_stringHelper,
+            $this->_string,
             $coreStoreConfig,
             $this->_importFactory,
             $this->_resourceHelper,
@@ -433,12 +433,12 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
         $data = $this->_getModelDependencies();
         $data['customer_entity'] = $customerEntity;
         $data['address_entity']  = $addressEntity;
-        
+
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
-        
+
         $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite(
             $this->_coreHelper,
-            $this->_stringHelper,
+            $this->_string,
             $coreStoreConfig,
             $this->_importFactory,
             $this->_resourceHelper,
@@ -486,12 +486,12 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
         $data = $this->_getModelDependencies();
         $data['customer_entity'] = $customerEntity;
         $data['address_entity']  = $addressEntity;
-        
+
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
-        
+
         $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite(
             $this->_coreHelper,
-            $this->_stringHelper,
+            $this->_string,
             $coreStoreConfig,
             $this->_importFactory,
             $this->_resourceHelper,
@@ -649,12 +649,12 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
         $data = $this->_getModelDependencies();
         $data['customer_entity'] = $customerEntity;
         $data['address_entity']  = $addressEntity;
-        
+
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
-        
+
         $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite(
             $this->_coreHelper,
-            $this->_stringHelper,
+            $this->_string,
             $coreStoreConfig,
             $this->_importFactory,
             $this->_resourceHelper,
@@ -695,12 +695,12 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
         $data = $this->_getModelDependencies();
         $data['customer_entity'] = $customerEntity;
         $data['address_entity']  = $addressEntity;
-        
+
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
-        
+
         $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite(
             $this->_coreHelper,
-            $this->_stringHelper,
+            $this->_string,
             $coreStoreConfig,
             $this->_importFactory,
             $this->_resourceHelper,
@@ -743,12 +743,12 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
         $data = $this->_getModelDependencies();
         $data['customer_entity'] = $customerEntity;
         $data['address_entity']  = $addressEntity;
-        
+
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
-        
+
         $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite(
             $this->_coreHelper,
-            $this->_stringHelper,
+            $this->_string,
             $coreStoreConfig,
             $this->_importFactory,
             $this->_resourceHelper,
@@ -941,7 +941,7 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
         $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite(
             $this->_coreHelper,
-            $this->_stringHelper,
+            $this->_string,
             $coreStoreConfig,
             $this->_importFactory,
             $this->_resourceHelper,
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php
index 9e2d9b7db11..4534db5ea8a 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php
@@ -146,9 +146,9 @@ class AddressTest extends \PHPUnit_Framework_TestCase
     protected $_coreDataMock;
 
     /**
-     * @var \Magento\Core\Helper\String|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Stdlib\String
      */
-    protected $_coreStringMock;
+    protected $_stringLib;
 
     /**
      * @var \Magento\TestFramework\Helper\ObjectManager
@@ -162,9 +162,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase
     {
         $this->_objectManagerMock = new \Magento\TestFramework\Helper\ObjectManager($this);
         $this->_coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
-        $this->_coreStringMock = $this->getMock(
-            'Magento\Core\Helper\String', array('__construct'), array(), '', false
-        );
+        $this->_stringLib = new \Magento\Stdlib\String;
         $this->_model = $this->_getModelMock();
     }
 
@@ -425,7 +423,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase
         // mock to imitate data source model
         $dataSourceMock = $this->getMock(
             'Magento\ImportExport\Model\Resource\Import\Data',
-            array('getNextBunch'),
+            array('getNextBunch', '__wakeup'),
             array(),
             '',
             false
@@ -487,11 +485,11 @@ class AddressTest extends \PHPUnit_Framework_TestCase
 
         $modelMock = new \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address(
             $this->_coreDataMock,
-            $this->_coreStringMock,
+            $this->_stringLib,
             $coreStoreConfig,
             $this->getMock('Magento\ImportExport\Model\ImportFactory', array(), array(), '', false),
             $this->getMock('Magento\ImportExport\Model\Resource\Helper', array(), array(), '', false),
-            $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false),
+            $this->getMock('Magento\App\Resource', array(), array(), '', false),
             $this->getMock('Magento\Core\Model\App', array(), array(), '', false),
             $this->getMock('Magento\ImportExport\Model\Export\Factory', array(), array(), '', false),
             $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false),
@@ -503,6 +501,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase
             $this->getMock('Magento\Customer\Model\Resource\Address\Attribute\CollectionFactory',
                 array(), array(), '', false
             ),
+            new \Magento\Stdlib\DateTime,
             $this->_getModelDependencies()
         );
 
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php
index 4828ec7dd46..2799c09f9d2 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php
@@ -52,7 +52,7 @@ class EavAbstractTest extends \PHPUnit_Framework_TestCase
     /**
      * @var \Magento\Core\Helper\String|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_coreStringMock;
+    protected $_string;
 
     /**
      * @var \Magento\ImportExport\Model\ImportFactory
@@ -60,7 +60,7 @@ class EavAbstractTest extends \PHPUnit_Framework_TestCase
     protected $_importFactory;
 
     /**
-     * @var \Magento\Core\Model\Resource
+     * @var \Magento\App\Resource
      */
     protected $_resource;
 
@@ -87,11 +87,11 @@ class EavAbstractTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
-        $this->_coreStringMock = $this->getMock('Magento\Core\Helper\String', array('__construct'), array(), '', false);
+        $this->_string = new \Magento\Stdlib\String;
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
 
         $this->_importFactory = $this->getMock('Magento\ImportExport\Model\ImportFactory', array(), array(), '', false);
-        $this->_resource = $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false);
+        $this->_resource = $this->getMock('Magento\App\Resource', array(), array(), '', false);
         $this->_resourceHelper = $this->getMock(
             'Magento\ImportExport\Model\Resource\Helper', array(), array(), '', false
         );
@@ -102,20 +102,18 @@ class EavAbstractTest extends \PHPUnit_Framework_TestCase
             'Magento\Eav\Model\Config', array(), array(), '', false
         );
 
-        $this->_model = $this->getMockForAbstractClass('Magento\ImportExport\Model\Import\Entity\AbstractEav',
-            array(
-                $this->_coreDataMock,
-                $this->_coreStringMock,
-                $coreStoreConfig,
-                $this->_importFactory,
-                $this->_resourceHelper,
-                $this->_resource,
-                $this->_app,
-                $this->_collectionFactory,
-                $this->_eavConfig,
-                $this->_getModelDependencies()
-            )
-        );
+        $this->_model = $this->getMockForAbstractClass('Magento\ImportExport\Model\Import\Entity\AbstractEav', array(
+            $this->_coreDataMock,
+            $this->_string,
+            $coreStoreConfig,
+            $this->_importFactory,
+            $this->_resourceHelper,
+            $this->_resource,
+            $this->_app,
+            $this->_collectionFactory,
+            $this->_eavConfig,
+            $this->_getModelDependencies()
+        ));
     }
 
     protected function tearDown()
@@ -131,12 +129,16 @@ class EavAbstractTest extends \PHPUnit_Framework_TestCase
     protected function _getModelDependencies()
     {
         $localeMock = $this->getMock('Magento\Core\Model\Locale', array(), array(), '', false);
+        $string = new \Magento\Stdlib\String;
         $data = array(
             'data_source_model'            => 'not_used',
             'connection'                   => 'not_used',
             'json_helper'                  => 'not_used',
             'string_helper'                => new \Magento\Core\Helper\String(
-                $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false), $localeMock
+                $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false),
+                $localeMock,
+                $string,
+                new \Magento\Stdlib\String($string)
             ),
             'page_size'                    => 1,
             'max_data_size'                => 1,
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Product/OptionTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Product/OptionTest.php
index 06f0a60fff5..9d5b2c7b9b1 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Product/OptionTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Product/OptionTest.php
@@ -330,7 +330,7 @@ class OptionTest extends \PHPUnit_Framework_TestCase
 
         $this->_model = new \Magento\ImportExport\Model\Import\Entity\Product\Option(
             $this->getMock('Magento\ImportExport\Model\Resource\Import\Data', array(), array(), '', false),
-            $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false),
+            $this->getMock('Magento\App\Resource', array(), array(), '', false),
             $this->getMock('Magento\ImportExport\Model\Resource\Helper', array(), array(), '', false),
             $this->getMock('Magento\Core\Model\StoreManagerInterface', array(), array(), '', false),
             $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false),
@@ -340,6 +340,7 @@ class OptionTest extends \PHPUnit_Framework_TestCase
                 array(), array(), '', false),
             $this->_catalogDataMock,
             $coreStoreConfig,
+            new \Magento\Stdlib\DateTime,
             $this->_getModelDependencies($addExpectations, $deleteBehavior, $doubleOptions)
         );
     }
@@ -450,7 +451,7 @@ class OptionTest extends \PHPUnit_Framework_TestCase
         $fetchStrategy = $this->getMockForAbstractClass(
             'Magento\Data\Collection\Db\FetchStrategyInterface', array('fetchAll')
         );
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false);
 
         $optionCollection = $this->getMock(
@@ -530,7 +531,7 @@ class OptionTest extends \PHPUnit_Framework_TestCase
      */
     public function getNewOptionMock()
     {
-        return $this->getMock('Magento\Catalog\Model\Product\Option', null, array(), '', false);
+        return $this->getMock('Magento\Catalog\Model\Product\Option', array('__wakeup'), array(), '', false);
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php
index 9e5640ee551..a31e7874975 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php
@@ -73,17 +73,17 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase
     protected function _getModelDependencies()
     {
         $coreHelper = $this->getMock('Magento\Core\Helper\Data', array('__construct'), array(), '', false);
-        $stringHelper = $this->getMock('Magento\Core\Helper\String', array('__construct'), array(), '', false);
+        $string = new \Magento\Stdlib\String;
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
         $importFactory = $this->getMock('Magento\ImportExport\Model\ImportFactory', array(), array(), '', false);
         $resourceHelper = $this->getMock(
             'Magento\ImportExport\Model\Resource\Helper', array(), array(), '', false
         );
-        $resource = $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false);
+        $resource = $this->getMock('Magento\App\Resource', array(), array(), '', false);
 
         $data = array(
             'coreData'   => $coreHelper,
-            'coreString' => $stringHelper,
+            'coreString' => $string,
             'coreStoreConfig' => $coreStoreConfig,
             'importFactory' => $importFactory,
             'resourceHelper' => $resourceHelper,
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/CollectionByPagesIteratorTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/CollectionByPagesIteratorTest.php
index 46dc07792e3..f0a3fcdd13a 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/CollectionByPagesIteratorTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/CollectionByPagesIteratorTest.php
@@ -63,7 +63,7 @@ class CollectionByPagesIteratorTest extends \PHPUnit_Framework_TestCase
         $select = $this->getMock('Zend_Db_Select', array(), array(), '', false);
 
         $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
 
         /** @var $collectionMock \Magento\Data\Collection\Db|PHPUnit_Framework_MockObject_MockObject */
         $collectionMock = $this->getMock('Magento\Data\Collection\Db',
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/Import/CustomerComposite/DataTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/Import/CustomerComposite/DataTest.php
index 971b5cde0f4..48a61c240b6 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/Import/CustomerComposite/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/Import/CustomerComposite/DataTest.php
@@ -78,8 +78,8 @@ class DataTest extends \PHPUnit_Framework_TestCase
             ->method('query')
             ->will($this->returnValue($statementMock));
 
-        /** @var $resourceModelMock \Magento\Core\Model\Resource */
-        $resourceModelMock = $this->getMock('Magento\Core\Model\Resource',
+        /** @var $resourceModelMock \Magento\App\Resource */
+        $resourceModelMock = $this->getMock('Magento\App\Resource',
             array('getConnection', '_newConnection', 'getTableName'),
             array(), '', false
         );
diff --git a/dev/tests/unit/testsuite/Magento/Index/App/IndexerTest.php b/dev/tests/unit/testsuite/Magento/Index/App/IndexerTest.php
new file mode 100644
index 00000000000..f5ac7aaf87f
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Index/App/IndexerTest.php
@@ -0,0 +1,93 @@
+<?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_Index
+ * @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\Index\App;
+
+class IndexerTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Index\App\Indexer
+     */
+    protected $_entryPoint;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Index\Model\IndexerFactory
+     */
+    protected $_indexFactoryMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_filesystem;
+
+    protected function setUp()
+    {
+        $this->_filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_indexFactoryMock = $this->getMock('Magento\Index\Model\IndexerFactory',
+            array('create'), array(), '', false);
+        $this->_entryPoint = new \Magento\Index\App\Indexer(
+            'reportDir',
+            $this->_filesystem,
+            $this->_indexFactoryMock
+        );
+    }
+
+    /**
+     * @param bool $value
+     * @dataProvider executeDataProvider
+     */
+    public function testExecute($value)
+    {
+        $process = $this->getMock('Magento\Index\Model\Process',
+            array('getIndexer', 'reindexEverything'), array(), '', false);
+        $indexer = $this->getMock('Magento\Index\Model\Indexer',
+            array('getProcessesCollection'), array(), '', false);
+        $indexerInterface = $this->getMock('Magento\Index\Model\IndexerInterface');
+        $this->_indexFactoryMock->expects($this->once())->method('create')->will($this->returnValue($indexer));
+        $indexer->expects($this->once())->method('getProcessesCollection')->will($this->returnValue(array($process)));
+        $process->expects($this->any())->method('getIndexer')->will($this->returnValue($indexerInterface));
+
+        if ($value) {
+            $indexerInterface->expects($this->once())->method('isVisible')->will($this->returnValue(true));
+            $process->expects($this->once())->method('reindexEverything');
+        } else {
+            $indexerInterface->expects($this->once())->method('isVisible')->will($this->returnValue(false));
+            $process->expects($this->never())->method('reindexEverything');
+        }
+        $this->assertEquals('0', $this->_entryPoint->execute());
+    }
+
+    /**
+     * @return array
+     */
+    public function executeDataProvider()
+    {
+        return array(
+            array(true),
+            array(false)
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Index/Model/EntryPoint/ShellTest.php b/dev/tests/unit/testsuite/Magento/Index/App/ShellTest.php
similarity index 70%
rename from dev/tests/unit/testsuite/Magento/Index/Model/EntryPoint/ShellTest.php
rename to dev/tests/unit/testsuite/Magento/Index/App/ShellTest.php
index ad895b0a43b..d090e5bb2c8 100644
--- a/dev/tests/unit/testsuite/Magento/Index/Model/EntryPoint/ShellTest.php
+++ b/dev/tests/unit/testsuite/Magento/Index/App/ShellTest.php
@@ -24,43 +24,39 @@
  * @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\Index\Model\EntryPoint;
+namespace Magento\Index\App;
 
 class ShellTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Index\Model\EntryPoint\Shell
+     * @var \Magento\Index\App\Shell
      */
     protected $_entryPoint;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_objectManager;
+    protected $_shellFactory;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
     protected $_shellErrorHandler;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_primaryConfig;
-
     protected function setUp()
     {
-        $this->_primaryConfig = $this->getMock('Magento\Core\Model\Config\Primary', array(), array(), '', false);
-        $this->_objectManager = $this->getMock('Magento\ObjectManager');
+        $this->_shellFactory = $this->getMock('Magento\Index\Model\ShellFactory', array('create'), array(), '', false);
         $this->_shellErrorHandler = $this->getMock(
-            'Magento\Index\Model\EntryPoint\Shell\ErrorHandler',
+            'Magento\Index\App\Shell\ErrorHandler',
             array(),
             array(),
             '',
             false
         );
-        $this->_entryPoint = new \Magento\Index\Model\EntryPoint\Shell(
-            'indexer.php', $this->_shellErrorHandler, $this->_primaryConfig, $this->_objectManager
+        $this->_entryPoint = new \Magento\Index\App\Shell(
+            'indexer.php',
+            $this->_shellFactory,
+            $this->_shellErrorHandler
         );
     }
 
@@ -76,21 +72,17 @@ class ShellTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($shellHasErrors));
         $shell->expects($this->once())
             ->method('run');
-
         if ($shellHasErrors) {
             $this->_shellErrorHandler->expects($this->once())
                 ->method('terminate')
                 ->with(1);
         }
-        $this->_objectManager->expects($this->any())
+        $this->_shellFactory->expects($this->any())
             ->method('create')
-            ->will($this->returnValueMap(
-                array(
-                    array('Magento\Index\Model\Shell', array('entryPoint' => 'indexer.php'), $shell),
-                )
-            ));
+            ->will($this->returnValue($shell)
+            );
 
-        $this->_entryPoint->processRequest();
+        $this->_entryPoint->execute();
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Index/Model/EntryPoint/IndexerTest.php b/dev/tests/unit/testsuite/Magento/Index/Model/EntryPoint/IndexerTest.php
deleted file mode 100644
index 34d8f2df056..00000000000
--- a/dev/tests/unit/testsuite/Magento/Index/Model/EntryPoint/IndexerTest.php
+++ /dev/null
@@ -1,99 +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_Index
- * @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\Index\Model\EntryPoint;
-
-class IndexerTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Index\Model\EntryPoint\Indexer
-     */
-    protected $_entryPoint;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_objectManager;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_primaryConfig;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_filesystem;
-
-    /**
-     * @var string
-     */
-    protected $_reportDir;
-
-    protected function setUp()
-    {
-        $this->_reportDir = 'tmp' . DIRECTORY_SEPARATOR . 'reports';
-        $this->_primaryConfig = $this->getMock('Magento\Core\Model\Config\Primary', array(), array(), '', false);
-        $this->_objectManager = $this->getMock('Magento\ObjectManager');
-        $this->_filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
-        $this->_entryPoint = new \Magento\Index\Model\EntryPoint\Indexer(
-            $this->_reportDir, $this->_filesystem, $this->_primaryConfig, $this->_objectManager
-        );
-    }
-
-    public function testProcessRequest()
-    {
-        $process = $this->getMock('Magento\Index\Model\Process', array(), array(), '', false);
-        $processIndexer = $this->getMockForAbstractClass(
-            'Magento\Index\Model\Indexer\AbstractIndexer',
-            array(),
-            '',
-            false
-        );
-        $processIndexer->expects($this->any())->method('isVisible')->will($this->returnValue(true));
-        $process->expects($this->any())->method('getIndexer')->will($this->returnValue($processIndexer));
-        $process->expects($this->once())->method('reindexEverything')->will($this->returnSelf());
-
-        $indexer = $this->getMock('Magento\Index\Model\Indexer', array(), array(), '', false);
-        $indexer->expects($this->once())
-            ->method('getProcessesCollection')
-            ->will($this->returnValue(array($process)));
-
-        $this->_objectManager->expects($this->any())
-            ->method('create')
-            ->will($this->returnValueMap(
-                array(
-                    array('Magento\Index\Model\Indexer', array(), $indexer),
-                )
-            ));
-        // check that report directory is cleaned
-        $this->_filesystem->expects($this->once())
-            ->method('delete')
-            ->with($this->_reportDir, dirname($this->_reportDir));
-
-        $this->_entryPoint->processRequest();
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Index/Model/Indexer/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Index/Model/Indexer/Config/SchemaLocatorTest.php
index e4ccd2bc904..a04eb58db39 100644
--- a/dev/tests/unit/testsuite/Magento/Index/Model/Indexer/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Index/Model/Indexer/Config/SchemaLocatorTest.php
@@ -38,7 +38,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_modulesReaderMock = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false
+            'Magento\Module\Dir\Reader', array(), array(), '', false
         );
 
         $this->_modulesReaderMock->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/Install/Model/EntryPoint/ConsoleTest.php b/dev/tests/unit/testsuite/Magento/Install/App/ConsoleTest.php
similarity index 71%
rename from dev/tests/unit/testsuite/Magento/Install/Model/EntryPoint/ConsoleTest.php
rename to dev/tests/unit/testsuite/Magento/Install/App/ConsoleTest.php
index 6666deaa48f..38b152e6af5 100644
--- a/dev/tests/unit/testsuite/Magento/Install/Model/EntryPoint/ConsoleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Install/App/ConsoleTest.php
@@ -22,76 +22,83 @@
  * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Install\Model\EntryPoint;
+namespace Magento\Install\App;
 
 class ConsoleTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Install\Model\EntryPoint\Console
+     * @var \Magento\Install\App\Console
      */
     protected $_model;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\ObjectManager
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Install\Model\Installer\Console
      */
-    protected $_objectManagerMock;
+    protected $_installerMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Core\Model\Config\Primary
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\App\Dir\Verification
      */
-    protected $_configMock;
+    protected $_dirVerifierMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Install\Model\Installer\Console
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Install\App\Output
      */
-    protected $_installerMock;
+    protected $_outputMock;
+
+    /** \PHPUnit_Framework_MockObject_MockObject|\Magento\Install\Model\Installer\ConsoleFactory */
+    protected $_instFactoryMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\App\Dir\Verification
+     * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_dirVerifierMock;
+    protected $_appStateMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Install\Model\EntryPoint\Output
+     * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_outputMock;
+    protected $_configLoaderMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_objectManagerMock;
 
     protected function setUp()
     {
-        $this->_objectManagerMock = $this->getMock('Magento\ObjectManager');
-        $this->_configMock = $this->getMock('Magento\Core\Model\Config\Primary', array(), array(), '', false);
+        $this->_instFactoryMock = $this->getMock('\Magento\Install\Model\Installer\ConsoleFactory',
+            array('create'), array(), '', false);
         $this->_installerMock = $this->getMock('Magento\Install\Model\Installer\Console', array(), array(), '', false);
         $this->_dirVerifierMock = $this->getMock('Magento\App\Dir\Verification', array(), array(), '', false);
-        $this->_outputMock = $this->getMock('Magento\Install\Model\EntryPoint\Output', array(), array(), '', false);
-
-        $this->_objectManagerMock->expects($this->once())->method('create')
-            ->with('Magento\Install\Model\Installer\Console')
+        $this->_outputMock = $this->getMock('Magento\Install\App\Output', array(), array(), '', false);
+        $this->_appStateMock = $this->getMock('Magento\App\State', array(), array(), '', false);
+        $this->_configLoaderMock = $this->getMockBuilder('Magento\App\ObjectManager\ConfigLoader')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->_instFactoryMock->expects($this->any())->method('create')
             ->will($this->returnValue($this->_installerMock));
+
+        $this->_configLoaderMock->expects($this->once())->method('load')
+            ->with('install')->will($this->returnValue(array('di' => 'config')));
+
+        $this->_objectManagerMock = $this->getMock('Magento\ObjectManager');
+        $this->_objectManagerMock->expects($this->once())->method('configure')->with(array('di' => 'config'));
     }
 
     protected function _createModel($params = array())
     {
-        return new \Magento\Install\Model\EntryPoint\Console('', $params, $this->_configMock,
-            $this->_objectManagerMock, $this->_outputMock
+        return new \Magento\Install\App\Console($this->_instFactoryMock, $this->_outputMock,
+            $this->_appStateMock, $this->_configLoaderMock, $this->_objectManagerMock, $params
         );
     }
 
-    protected function tearDown()
-    {
-        unset($this->_model);
-        unset($this->_configMock);
-        unset($this->_objectManagerMock);
-        unset($this->_installerMock);
-        unset($this->_dirVerifierMock);
-    }
-
     /**
      * @param string $param
      * @param string $method
      * @param string $testValue
-     * @dataProvider processRequestShowsRequestedDataProvider
+     * @dataProvider executeShowsRequestedDataProvider
      */
-    public function testProcessRequestShowsRequestedData($param, $method, $testValue)
+    public function testExecuteShowsRequestedData($param, $method, $testValue)
     {
         $model = $this->_createModel(array($param => true));
         $this->_installerMock
@@ -99,10 +106,10 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
             ->method($method)
             ->will($this->returnValue($testValue));
         $this->_outputMock->expects($this->once())->method('export')->with($testValue);
-        $model->processRequest();
+        $model->execute();
     }
 
-    public function processRequestShowsRequestedDataProvider()
+    public function executeShowsRequestedDataProvider()
     {
         return array(
             array('show_locales', 'getAvailableLocales', 'locales'),
@@ -116,7 +123,7 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
     {
         $model = $this->_createModel(array());
         $this->_outputMock->expects($this->once())->method('success')->with($this->stringContains('successfully'));
-        $model->processRequest();
+        $model->execute();
     }
 
     public function testInstallReportsEncryptionKey()
@@ -124,7 +131,7 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
         $model = $this->_createModel(array());
         $this->_installerMock->expects($this->once())->method('install')->will($this->returnValue('enc_key'));
         $this->_outputMock->expects($this->once())->method('success')->with($this->stringContains('enc_key'));
-        $model->processRequest();
+        $model->execute();
     }
 
     public function testUninstallReportsSuccess()
@@ -132,7 +139,7 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
         $model = $this->_createModel(array('uninstall' => true));
         $this->_installerMock->expects($this->once())->method('uninstall')->will($this->returnValue(true));
         $this->_outputMock->expects($this->once())->method('success')->with($this->stringContains('Uninstalled'));
-        $model->processRequest();
+        $model->execute();
     }
 
     public function testUninstallReportsIgnoreIfApplicationIsNotInstalled()
@@ -140,22 +147,22 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
         $model = $this->_createModel(array('uninstall' => true));
         $this->_installerMock->expects($this->once())->method('uninstall')->will($this->returnValue(false));
         $this->_outputMock->expects($this->once())->method('success')->with($this->stringContains('non-installed'));
-        $model->processRequest();
+        $model->execute();
     }
 
-    public function testProcessRequestReportsErrors()
+    public function testExecuteReportsErrors()
     {
         $model = $this->_createModel(array('uninstall' => true));
         $this->_installerMock->expects($this->once())->method('hasErrors')->will($this->returnValue(true));
         $this->_installerMock->expects($this->once())->method('getErrors')->will($this->returnValue(array('error1')));
         $this->_outputMock->expects($this->once())->method('error')->with($this->stringContains('error1'));
-        $model->processRequest();
+        $model->execute();
     }
 
-    public function testProcessRequestLoadsExtraConfig()
+    public function testExecuteLoadsExtraConfig()
     {
         $model = $this->_createModel(array('config' => realpath(__DIR__ . '/_files/config.php')));
         $this->_installerMock->expects($this->once())->method('uninstall')->will($this->returnValue(true));
-        $model->processRequest();
+        $model->execute();
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Install/Model/EntryPoint/_files/config.php b/dev/tests/unit/testsuite/Magento/Install/App/_files/config.php
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/Install/Model/EntryPoint/_files/config.php
rename to dev/tests/unit/testsuite/Magento/Install/App/_files/config.php
diff --git a/dev/tests/unit/testsuite/Magento/Install/Model/EntryPoint/UpgradeTest.php b/dev/tests/unit/testsuite/Magento/Install/Model/EntryPoint/UpgradeTest.php
deleted file mode 100644
index 2affff579db..00000000000
--- a/dev/tests/unit/testsuite/Magento/Install/Model/EntryPoint/UpgradeTest.php
+++ /dev/null
@@ -1,103 +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.
- *
- * @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\Install\Model\EntryPoint;
-
-class UpgradeTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_indexer;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_config;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_objectManager;
-
-    protected function setUp()
-    {
-        $this->_config = $this->getMock('Magento\Core\Model\Config\Primary', array('getParam'), array(), '', false);
-
-        $dirVerification = $this->getMock('Magento\App\Dir\Verification', array(), array(), '', false);
-
-        $cacheFrontend = $this->getMockForAbstractClass('Magento\Cache\FrontendInterface');
-        $cacheFrontend->expects($this->once())->method('clean')->with('all', array());
-        $cacheFrontendPool = $this->getMock(
-            'Magento\Core\Model\Cache\Frontend\Pool', array('valid', 'current'), array(
-                $this->getMock('Magento\Core\Model\Cache\Frontend\Factory', array(), array(), '', false),
-            )
-        );
-        $cacheFrontendPool->expects($this->at(0))->method('valid')->will($this->returnValue(true));
-        $cacheFrontendPool->expects($this->once())->method('current')->will($this->returnValue($cacheFrontend));
-
-        $update = $this->getMock(
-            'Magento\App\Updater', array('updateScheme', 'updateData'), array(), '', false);
-        $update->expects($this->once())->method('updateScheme');
-        $update->expects($this->once())->method('updateData');
-
-        $this->_indexer = $this->getMock(
-            'Magento\Index\Model\Indexer', array('reindexAll', 'reindexRequired'), array(), '', false
-        );
-
-        $this->_objectManager = $this->getMock('Magento\ObjectManager');
-        $this->_objectManager->expects($this->any())->method('get')->will($this->returnValueMap(array(
-            array('Magento\Core\Model\Cache\Frontend\Pool', $cacheFrontendPool),
-            array('Magento\App\Updater', $update),
-            array('Magento\Core\Model\Config\Primary', $this->_config),
-            array('Magento\Index\Model\Indexer', $this->_indexer),
-            array('Magento\App\Dir\Verification', $dirVerification),
-        )));
-    }
-
-    /**
-     * @param string $reindexMode
-     * @param int $reindexAllCount
-     * @param int $reindexReqCount
-     * @dataProvider processRequestDataProvider
-     */
-    public function testProcessRequest($reindexMode, $reindexAllCount, $reindexReqCount)
-    {
-        $this->_indexer->expects($this->exactly($reindexAllCount))->method('reindexAll');
-        $this->_indexer->expects($this->exactly($reindexReqCount))->method('reindexRequired');
-        $this->_config->expects($this->once())
-            ->method('getParam')->with(\Magento\Install\Model\EntryPoint\Upgrade::REINDEX)
-            ->will($this->returnValue($reindexMode));
-        $upgrade = new \Magento\Install\Model\EntryPoint\Upgrade($this->_config, $this->_objectManager);
-        $upgrade->processRequest();
-    }
-
-    public function processRequestDataProvider()
-    {
-        return array(
-            'no reindex'       => array('', 0, 0),
-            'reindex all'      => array(\Magento\Install\Model\EntryPoint\Upgrade::REINDEX_ALL, 1, 0),
-            'reindex required' => array(\Magento\Install\Model\EntryPoint\Upgrade::REINDEX_INVALID, 0, 1),
-        );
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Install/Model/Installer/Db/Mysql4Test.php b/dev/tests/unit/testsuite/Magento/Install/Model/Installer/Db/Mysql4Test.php
index 3f965c0853b..6f5ebfd4709 100644
--- a/dev/tests/unit/testsuite/Magento/Install/Model/Installer/Db/Mysql4Test.php
+++ b/dev/tests/unit/testsuite/Magento/Install/Model/Installer/Db/Mysql4Test.php
@@ -51,7 +51,7 @@ class Mysql4Test extends \PHPUnit_Framework_TestCase
         $adapterMock->expects($this->once())->method('getConnection')->will($this->returnValue($connectionMock));
         $adapterFactory->expects($this->once())->method('create')->will($this->returnValue($adapterMock));
 
-        $localConfig = $this->getMockBuilder('\Magento\Core\Model\Config\Local')
+        $localConfig = $this->getMockBuilder('\Magento\App\Config')
             ->disableOriginalConstructor()
             ->getMock();
 
@@ -85,7 +85,7 @@ class Mysql4Test extends \PHPUnit_Framework_TestCase
             'Magento\Core\Model\Resource\Type\Db\Pdo\MysqlFactory', array('create'), array(), '', false
         );
         $localConfig =
-            $this->getMockBuilder('\Magento\Core\Model\Config\Local')->disableOriginalConstructor()->getMock();
+            $this->getMockBuilder('\Magento\App\Config')->disableOriginalConstructor()->getMock();
         $installer = new \Magento\Install\Model\Installer\Db\Mysql4(
             $adapterFactory, $localConfig, $dbExtensions
         );
diff --git a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php
new file mode 100644
index 00000000000..90d60d85135
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php
@@ -0,0 +1,354 @@
+<?php
+/**
+ * \Magento\Integration\Controller\Adminhtml
+ *
+ * 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\Integration\Controller\Adminhtml;
+
+use Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info;
+use Magento\Integration\Controller\Adminhtml\Integration;
+
+class IntegrationTest extends \PHPUnit_Framework_TestCase
+{
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockObjectManager;
+
+    /** @var \Magento\Integration\Controller\Adminhtml\Integration */
+    protected $_integrationContr;
+
+    /** @var \Magento\TestFramework\Helper\ObjectManager $objectManagerHelper */
+    protected $_objectManagerHelper;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockApp;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockLayoutFilter;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockConfig;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockEventManager;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockTranslateModel;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockBackendModSess;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockBackendCntCtxt;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockIntegrationSvc;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockRegistry;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockRequest;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockResponse;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    protected $_mockConfigScope;
+
+    /**
+     * Setup object manager and initialize mocks
+     */
+    protected function setUp()
+    {
+        /** @var \Magento\TestFramework\Helper\ObjectManager $objectManagerHelper */
+        $this->_objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->_setMageObjectManager();
+        // Initialize mocks which are used in several test cases
+        $this->_mockApp = $this->getMockBuilder('Magento\Core\Model\App')
+            ->setMethods(array('getConfig'))
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->_mockConfig = $this->getMockBuilder('Magento\Core\Model\Config')->disableOriginalConstructor()
+            ->getMock();
+        $this->_mockApp->expects($this->any())->method('getConfig')->will($this->returnValue($this->_mockConfig));
+        $this->_mockEventManager = $this->getMockBuilder('Magento\Event\ManagerInterface')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->_mockLayoutFilter = $this->getMockBuilder('Magento\Core\Model\Layout\Filter\Acl')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->_mockBackendModSess = $this->getMockBuilder('Magento\Backend\Model\Session')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->_mockTranslateModel = $this->getMockBuilder('Magento\Core\Model\Translate')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->_mockIntegrationSvc = $this->getMockBuilder('Magento\Integration\Service\IntegrationV1')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->_mockRequest = $this->getMockBuilder('Magento\App\Request\Http')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->_mockResponse = $this->getMockBuilder('Magento\App\Response\Http')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->_mockRegistry = $this->getMockBuilder('Magento\Core\Model\Registry')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->_mockConfigScope = $this->getMockBuilder('Magento\Config\ScopeInterface')
+            ->disableOriginalConstructor()
+            ->getMock();
+    }
+
+    public function testIndexAction()
+    {
+        $this->_verifyLoadAndRenderLayout();
+        // renderLayout
+        $this->_integrationContr = $this->_createIntegrationController();
+        $this->_integrationContr->indexAction();
+    }
+
+    public function testNewAction()
+    {
+        $this->_verifyLoadAndRenderLayout();
+        // verify the request is forwarded to 'edit' action
+        $this->_mockRequest->expects($this->any())->method('setActionName')->with('edit')
+            ->will($this->returnValue($this->_mockRequest));
+        $integrationContr = $this->_createIntegrationController();
+        $integrationContr->newAction();
+    }
+
+    public function testEditAction()
+    {
+        $this->_mockIntegrationSvc->expects($this->any())->method('get')->with(1)->will(
+            $this->returnValue($this->_getSampleIntegrationData()));
+        $this->_mockRequest->expects($this->any())->method('getParam')->will($this->returnValue('1'));
+        // put data in session, the magic function getFormData is called so, must match __call method name
+        $this->_mockBackendModSess->expects($this->any())
+            ->method('__call')->will(
+                $this->returnValue(array(
+                        Info::DATA_ID => 1,
+                        'name' => 'testIntegration'
+                    )));
+        $this->_verifyLoadAndRenderLayout();
+        $integrationContr = $this->_createIntegrationController();
+        $integrationContr->editAction();
+    }
+
+    public function testEditActionNonExistentIntegration()
+    {
+        $exceptionMessage = 'This integration no longer exists.';
+        // verify the error
+        $this->_mockBackendModSess->expects($this->once())
+            ->method('addError')
+            ->with($this->equalTo($exceptionMessage));
+        $this->_mockRequest->expects($this->any())->method('getParam')->will($this->returnValue('1'));
+        // put data in session, the magic function getFormData is called so, must match __call method name
+        $this->_mockBackendModSess->expects($this->any())
+            ->method('__call')->will($this->returnValue(array('name' => 'nonExistentInt')));
+        $this->_verifyLoadAndRenderLayout();
+        $integrationContr = $this->_createIntegrationController();
+        $integrationContr->editAction();
+    }
+
+    public function testEditActionNoDataAdd()
+    {
+        $exceptionMessage = 'Integration ID is not specified or is invalid.';
+        // verify the error
+        $this->_mockBackendModSess->expects($this->once())
+            ->method('addError')
+            ->with($this->equalTo($exceptionMessage));
+        $this->_verifyLoadAndRenderLayout();
+        $integrationContr = $this->_createIntegrationController();
+        $integrationContr->editAction();
+    }
+
+    public function testEditException()
+    {
+        $exceptionMessage = 'Integration ID is not specified or is invalid.';
+        // verify the error
+        $this->_mockBackendModSess->expects($this->once())
+            ->method('addError')
+            ->with($this->equalTo($exceptionMessage));
+        $this->_integrationContr = $this->_createIntegrationController();
+        $this->_integrationContr->editAction();
+    }
+
+    public function testSaveAction()
+    {
+        // Use real translate model
+        $this->_mockTranslateModel = null;
+        $this->_mockRequest->expects($this->any())
+            ->method('getPost')->will($this->returnValue(array(Integration::PARAM_INTEGRATION_ID => 1)));
+        $this->_mockRequest->expects($this->any())->method('getParam')->will($this->returnValue('1'));
+        $intData = $this->_getSampleIntegrationData();
+        $this->_mockIntegrationSvc->expects($this->any())->method('get')->with(1)->will($this->returnValue($intData));
+        $this->_mockIntegrationSvc->expects($this->any())->method('update')->with($this->anything())
+            ->will($this->returnValue($intData));
+        // verify success message
+        $this->_mockBackendModSess->expects($this->once())->method('addSuccess')
+            ->with(__('The integration \'%1\' has been saved.', $intData[Info::DATA_NAME]));
+        $integrationContr = $this->_createIntegrationController();
+        $integrationContr->saveAction();
+    }
+
+    public function testSaveActionException()
+    {
+        $this->_mockRequest->expects($this->any())->method('getParam')->will($this->returnValue('1'));
+
+        // Have integration service throw an exception to test exception path
+        $exceptionMessage = 'an exception happened';
+        $this->_mockIntegrationSvc->expects($this->any())
+            ->method('get')
+            ->with(1)
+            ->will($this->throwException(new \Magento\Core\Exception($exceptionMessage)));
+        // Verify error
+        $this->_mockBackendModSess->expects($this->once())->method('addError')
+            ->with($this->equalTo($exceptionMessage));
+        $integrationContr = $this->_createIntegrationController();
+        $integrationContr->saveAction();
+    }
+
+    public function testSaveActionNew()
+    {
+        $intData = $this->_getSampleIntegrationData();
+        //No id when New Integration is Post-ed
+        unset($intData[Info::DATA_ID]);
+        $this->_mockRequest->expects($this->any())->method('getPost')->will($this->returnValue($intData));
+        $intData[Info::DATA_ID] = 1;
+        $this->_mockIntegrationSvc->expects($this->any())->method('create')->with($this->anything())
+            ->will($this->returnValue($intData));
+        $this->_mockIntegrationSvc->expects($this->any())->method('get')->with(1)->will(
+            $this->returnValue(null));
+        // Use real translate model
+        $this->_mockTranslateModel = null;
+        // verify success message
+        $this->_mockBackendModSess->expects($this->once())->method('addSuccess')
+            ->with(__('The integration \'%1\' has been saved.', $intData[Info::DATA_NAME]));
+        $integrationContr = $this->_createIntegrationController();
+        $integrationContr->saveAction();
+    }
+
+    /**
+     * Makes sure that Mage has a mock object manager set.
+     *
+     */
+    protected function _setMageObjectManager()
+    {
+        $this->_mockObjectManager = $this->getMockBuilder('Magento\ObjectManager')
+            ->disableOriginalConstructor()
+            ->getMock();
+        \Magento\App\ObjectManager::setInstance($this->_mockObjectManager);
+    }
+
+    /**
+     * Creates the IntegrationController to test.
+     *
+     * @return \Magento\Integration\Controller\Adminhtml\Integration
+     */
+    protected function _createIntegrationController()
+    {
+        // Mock Layout passed into constructor
+        $layoutMock = $this->getMockBuilder('Magento\Core\Model\Layout')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $layoutMergeMock = $this->getMockBuilder('Magento\Core\Model\Layout\Merge')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $layoutMock->expects($this->any())->method('getUpdate')->will($this->returnValue($layoutMergeMock));
+        $testElement = new \Magento\Simplexml\Element('<test>test</test>');
+        $layoutMock->expects($this->any())->method('getNode')->will($this->returnValue($testElement));
+        // for _setActiveMenu
+        $blockMock = $this->getMockBuilder('Magento\Backend\Block\Menu')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $menuMock = $this->getMockBuilder('Magento\Backend\Model\Menu')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $menuMock->expects($this->any())->method('getParentItems')->will($this->returnValue(array()));
+        $blockMock->expects($this->any())->method('getMenuModel')->will($this->returnValue($menuMock));
+        $layoutMock->expects($this->any())->method('getMessagesBlock')->will($this->returnValue($blockMock));
+        $layoutMock->expects($this->any())->method('getBlock')->will($this->returnValue($blockMock));
+        $contextParameters = array(
+            'layout' => $layoutMock,
+            'objectManager' => $this->_mockObjectManager,
+            'session' => $this->_mockBackendModSess,
+            'translator' => $this->_mockTranslateModel,
+            'request' => $this->_mockRequest,
+            'response' => $this->_mockResponse,
+        );
+
+        $this->_mockBackendCntCtxt = $this->_objectManagerHelper
+            ->getObject(
+                'Magento\Backend\Controller\Context',
+                $contextParameters
+            );
+        $subControllerParams = array(
+            'context' => $this->_mockBackendCntCtxt,
+            'integrationService' => $this->_mockIntegrationSvc,
+            'registry' => $this->_mockRegistry,
+        );
+        /** Create IntegrationController to test */
+        $integrationContr = $this->_objectManagerHelper
+            ->getObject(
+                'Magento\Integration\Controller\Adminhtml\Integration',
+                $subControllerParams
+            );
+        return $integrationContr;
+    }
+
+    /**
+     * Common mock 'expect' pattern.
+     * Calls that need to be mocked out when
+     * \Magento\Backend\Controller\AbstractAction loadLayout() and renderLayout() are called.
+     */
+    protected function _verifyLoadAndRenderLayout()
+    {
+        $map = array(
+            array('Magento\Core\Model\Config', $this->_mockConfig),
+            array('Magento\Core\Model\Layout\Filter\Acl', $this->_mockLayoutFilter),
+            array('Magento\Backend\Model\Session', $this->_mockBackendModSess),
+            array('Magento\Core\Model\Translate', $this->_mockTranslateModel),
+            array('Magento\Config\ScopeInterface', $this->_mockConfigScope)
+        );
+        $this->_mockObjectManager->expects($this->any())
+            ->method('get')
+            ->will($this->returnValueMap($map));
+    }
+
+    /**
+     * Return sample Integration Data
+     *
+     * @return array
+     */
+    protected function _getSampleIntegrationData()
+    {
+        return array(
+            Info::DATA_NAME => 'nameTest',
+            Info::DATA_ID => '1',
+            Info::DATA_EMAIL => 'test@magento.com',
+            Info::DATA_AUTHENTICATION => 1,
+            Info::DATA_ENDPOINT => 'http://magento.ll/endpoint'
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Integration/Model/Integration/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Integration/Model/Integration/FactoryTest.php
new file mode 100644
index 00000000000..ada36294463
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Integration/Model/Integration/FactoryTest.php
@@ -0,0 +1,59 @@
+<?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\Integration\Model\Integration;
+
+use Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info;
+
+class FactoryTest extends \PHPUnit_Framework_TestCase
+{
+    public function testCreate()
+    {
+        /** @var \PHPUnit_Framework_MockObject_MockObject */
+        $mockObjectManager = $this->getMockBuilder('Magento\ObjectManager')
+            ->disableOriginalConstructor()
+            ->getMock();
+        \Magento\App\ObjectManager::setInstance($mockObjectManager);
+        $data = array(
+            Info::DATA_NAME => 'nameTest',
+            Info::DATA_ID => '1',
+            Info::DATA_EMAIL => 'test@magento.com',
+            Info::DATA_AUTHENTICATION => 1,
+            Info::DATA_ENDPOINT => 'http://magento.ll/endpoint'
+        );
+        $mockIntegration = $this->getMockBuilder('Magento\Integration\Model\Integration')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $mockIntegration->expects($this->any())
+            ->method('setData')
+            ->will($this->returnSelf());
+        $mockIntegration->expects($this->any())
+            ->method('getData')
+            ->will($this->returnValue($data));
+        $mockObjectManager->expects($this->any())->method('create')->will($this->returnValue($mockIntegration));
+        /* @var \Magento\Integration\Model\Integration\Factory */
+        $integrationFactory = new \Magento\Integration\Model\Integration\Factory($mockObjectManager);
+        $integration = $integrationFactory->create($data);
+        $this->assertEquals($data, $integration->getData(), 'The integration data is not set correctly');
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Integration/Model/Integration/Source/AuthenticationTest.php b/dev/tests/unit/testsuite/Magento/Integration/Model/Integration/Source/AuthenticationTest.php
new file mode 100644
index 00000000000..a676b7857ec
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Integration/Model/Integration/Source/AuthenticationTest.php
@@ -0,0 +1,40 @@
+<?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\Integration\Model\Integration\Source;
+
+class AuthenticationTest extends \PHPUnit_Framework_TestCase
+{
+    public function testToOptionArray()
+    {
+        /** @var \Magento\Integration\Model\Integration\Source\Authentication */
+        $authSource = new \Magento\Integration\Model\Integration\Source\Authentication();
+        /** @var array */
+        $expectedAuthArr = array(
+            \Magento\Integration\Model\Integration::AUTHENTICATION_OAUTH => __('OAuth'),
+            \Magento\Integration\Model\Integration::AUTHENTICATION_MANUAL => __('Manual'),
+        );
+        $authArr = $authSource->toOptionArray();
+        $this->assertEquals($expectedAuthArr, $authArr, "Authentication source arrays don't match");
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Router/Validator/DefaultTest.php b/dev/tests/unit/testsuite/Magento/Integration/Model/Integration/Source/StatusTest.php
similarity index 53%
rename from dev/tests/integration/testsuite/Magento/Backend/Controller/Router/Validator/DefaultTest.php
rename to dev/tests/unit/testsuite/Magento/Integration/Model/Integration/Source/StatusTest.php
index 2c9cb197168..aa5bb14bdd8 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Controller/Router/Validator/DefaultTest.php
+++ b/dev/tests/unit/testsuite/Magento/Integration/Model/Integration/Source/StatusTest.php
@@ -18,31 +18,29 @@
  * 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_Backend
- * @subpackage  integration_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\Integration\Model\Integration\Source;
 
-namespace Magento\Backend\Controller\Router\Validator;
-
-/**
- * @magentoAppArea adminhtml
- */
-class DefaultTest extends \PHPUnit_Framework_TestCase
+class StatusTest extends \PHPUnit_Framework_TestCase
 {
-    /**
-     * @magentoConfigFixture global/areas/adminhtml/frontName backend
-     * @magentoAppIsolation enabled
-     */
-    public function testConstructWithNotEmptyAreaFrontName()
+    public function testToOptionArray()
     {
-        $options = array(
-            'areaCode'       => \Magento\Core\Model\App\Area::AREA_ADMINHTML,
-            'baseController' => 'Magento\Backend\Controller\AbstractAction',
+        /** @var \Magento\Integration\Model\Integration\Source\Status */
+        $statusSource = new \Magento\Integration\Model\Integration\Source\Status();
+        /** @var array */
+        $expectedStatusArr = array(
+            array(
+                'value' => \Magento\Integration\Model\Integration::STATUS_INACTIVE,
+                'label' => __('Inactive')
+            ),
+            array(
+                'value' => \Magento\Integration\Model\Integration::STATUS_ACTIVE,
+                'label' => __('Active')
+            ),
         );
-        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Backend\Controller\Router\DefaultRouter', $options);
+        $statusArr = $statusSource->toOptionArray();
+        $this->assertEquals($expectedStatusArr, $statusArr, "Status source arrays don't match");
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Integration/Service/IntegrationV1Test.php b/dev/tests/unit/testsuite/Magento/Integration/Service/IntegrationV1Test.php
new file mode 100644
index 00000000000..17cc02476d7
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Integration/Service/IntegrationV1Test.php
@@ -0,0 +1,321 @@
+<?php
+/**
+ * Test for \Magento\Integration\Service\IntegrationV1
+ *
+ * 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\Integration\Service;
+
+class IntegrationV1Test extends \PHPUnit_Framework_TestCase
+{
+    const VALUE_INTEGRATION_ID = 1;
+    const VALUE_INTEGRATION_NAME = 'Integration Name';
+    const VALUE_INTEGRATION_ANOTHER_NAME = 'Another Integration Name';
+    const VALUE_INTEGRATION_EMAIL = 'test@magento.com';
+    const VALUE_INTEGRATION_ENDPOINT = 'http://magento.ll/endpoint';
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    private $_integrationFactory;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    private $_integrationMock;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject */
+    private $_emptyIntegrationMock;
+
+    /** @var \Magento\Integration\Service\IntegrationV1 */
+    private $_service;
+
+    /** @var array */
+    private $_integrationData;
+
+    protected function setUp()
+    {
+        $this->_integrationFactory = $this->getMockBuilder('Magento\Integration\Model\Integration\Factory')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->_integrationMock = $this->getMockBuilder('Magento\Integration\Model\Integration')
+            ->disableOriginalConstructor()
+            ->setMethods(
+                [
+                    'getData',
+                    'getId',
+                    'getName',
+                    'getEmail',
+                    'getAuthentication',
+                    'getEndpoint',
+                    'load',
+                    'loadByName',
+                    'save',
+                    '__wakeup'
+                ]
+            )
+            ->getMock();
+        $this->_integrationData = array(
+            'integration_id' => self::VALUE_INTEGRATION_ID,
+            'name' => self::VALUE_INTEGRATION_NAME,
+            'email' => self::VALUE_INTEGRATION_EMAIL,
+            'authentication' => 1,
+            'endpoint' => self::VALUE_INTEGRATION_ENDPOINT
+        );
+        $this->_integrationFactory->expects($this->any())
+            ->method('create')
+            ->will($this->returnValue($this->_integrationMock));
+        $this->_service = new \Magento\Integration\Service\IntegrationV1(
+            $this->_integrationFactory
+        );
+        $this->_emptyIntegrationMock = $this->getMockBuilder('Magento\Integration\Model\Integration')
+            ->disableOriginalConstructor()
+            ->setMethods(
+                [
+                    'getData',
+                    'getId',
+                    'getName',
+                    'getEmail',
+                    'getAuthentication',
+                    'getEndpoint',
+                    'load',
+                    'loadByName',
+                    'save',
+                    '__wakeup'
+                ]
+            )
+            ->getMock();
+        $this->_emptyIntegrationMock->expects($this->any())
+            ->method('getId')
+            ->will($this->returnValue(null));
+    }
+
+    public function testCreateSuccess()
+    {
+        $this->_integrationMock->expects($this->any())
+            ->method('getId')
+            ->will($this->returnValue(self::VALUE_INTEGRATION_ID));
+        $this->_integrationMock->expects($this->any())
+            ->method('getData')
+            ->will($this->returnValue($this->_integrationData));
+        $this->_integrationMock->expects($this->any())
+            ->method('load')
+            ->with(self::VALUE_INTEGRATION_NAME, 'name')
+            ->will($this->returnValue($this->_emptyIntegrationMock));
+        $this->_integrationMock->expects($this->any())
+            ->method('save')
+            ->will($this->returnSelf());
+        $this->_setValidIntegrationData();
+        $resultData = $this->_service->create($this->_integrationData);
+        $this->assertSame($this->_integrationData, $resultData);
+    }
+
+    /**
+     * @expectedException \Magento\Integration\Exception
+     * @expectedExceptionMessage Integration with name 'Integration Name' exists.
+     */
+    public function testCreateIntegrationAlreadyExistsException()
+    {
+        $this->_integrationMock->expects($this->any())
+            ->method('getId')
+            ->will($this->returnValue(self::VALUE_INTEGRATION_ID));
+        $this->_integrationMock->expects($this->any())
+            ->method('getData')
+            ->will($this->returnValue($this->_integrationData));
+        $this->_integrationMock->expects($this->any())
+            ->method('load')
+            ->with(self::VALUE_INTEGRATION_NAME, 'name')
+            ->will($this->returnValue($this->_integrationMock));
+        $this->_integrationMock->expects($this->never())
+            ->method('save')
+            ->will($this->returnSelf());
+        $this->_service->create($this->_integrationData);
+    }
+
+    public function testUpdateSuccess()
+    {
+        $this->_integrationMock->expects($this->any())
+            ->method('getId')
+            ->will($this->returnValue(self::VALUE_INTEGRATION_ID));
+        $this->_integrationMock->expects($this->any())
+            ->method('getData')
+            ->will($this->returnValue($this->_integrationData));
+        $this->_integrationMock->expects($this->at(0))
+            ->method('load')
+            ->with(self::VALUE_INTEGRATION_ID)
+            ->will($this->returnValue($this->_integrationMock));
+        $this->_integrationMock->expects($this->once())
+            ->method('save')
+            ->will($this->returnSelf());
+        $this->_setValidIntegrationData();
+        $integrationData = $this->_service->update($this->_integrationData);
+        $this->assertEquals($this->_integrationData, $integrationData);
+    }
+
+    public function testUpdateSuccessNameChanged()
+    {
+        $this->_integrationMock->expects($this->any())
+            ->method('getId')
+            ->will($this->returnValue(self::VALUE_INTEGRATION_ID));
+        $this->_integrationMock->expects($this->any())
+            ->method('load')
+            ->will($this->onConsecutiveCalls($this->_integrationMock, $this->_emptyIntegrationMock));
+        $this->_integrationMock->expects($this->once())
+            ->method('save')
+            ->will($this->returnSelf());
+        $this->_setValidIntegrationData();
+        $integrationData = array(
+            'integration_id' => self::VALUE_INTEGRATION_ID,
+            'name' => self::VALUE_INTEGRATION_ANOTHER_NAME,
+            'email' => self::VALUE_INTEGRATION_EMAIL,
+            'authentication' => 1,
+            'endpoint' => self::VALUE_INTEGRATION_ENDPOINT
+        );
+        $this->_integrationMock->expects($this->any())
+            ->method('getData')
+            ->will($this->returnValue($integrationData));
+
+        $updatedData = $this->_service->update($integrationData);
+        $this->assertEquals($integrationData, $updatedData);
+    }
+
+    /**
+     * @expectedException \Magento\Integration\Exception
+     * @expectedExceptionMessage Integration with name 'Another Integration Name' exists.
+     */
+    public function testUpdateException()
+    {
+        $this->_integrationMock->expects($this->any())
+            ->method('getId')
+            ->will($this->returnValue(self::VALUE_INTEGRATION_ID));
+        $this->_integrationMock->expects($this->any())
+            ->method('load')
+            ->will($this->onConsecutiveCalls($this->_integrationMock, $this->_getAnotherIntegrationMock()));
+        $this->_integrationMock->expects($this->never())
+            ->method('save')
+            ->will($this->returnSelf());
+        $this->_setValidIntegrationData();
+        $integrationData = array(
+            'integration_id' => self::VALUE_INTEGRATION_ID,
+            'name' => self::VALUE_INTEGRATION_ANOTHER_NAME,
+            'email' => self::VALUE_INTEGRATION_EMAIL,
+            'authentication' => 1,
+            'endpoint' => self::VALUE_INTEGRATION_ENDPOINT
+        );
+        $this->_service->update($integrationData);
+    }
+
+    public function testGet()
+    {
+        $this->_integrationMock->expects($this->any())
+            ->method('getId')
+            ->will($this->returnValue(self::VALUE_INTEGRATION_ID));
+        $this->_integrationMock->expects($this->any())
+            ->method('getData')
+            ->will($this->returnValue($this->_integrationData));
+        $this->_integrationMock->expects($this->once())
+            ->method('load')
+            ->will($this->returnSelf());
+        $this->_integrationMock->expects($this->never())
+            ->method('save');
+        $integrationData = $this->_service->get(self::VALUE_INTEGRATION_ID);
+        $this->assertEquals($this->_integrationData, $integrationData);
+    }
+
+    /**
+     * @expectedException \Magento\Integration\Exception
+     * @expectedExceptionMessage Integration with ID '1' doesn't exist.
+     */
+    public function testGetException()
+    {
+        $this->_integrationMock->expects($this->any())
+            ->method('getId')
+            ->will($this->returnValue(null));
+        $this->_integrationMock->expects($this->once())
+            ->method('load')
+            ->will($this->returnSelf());
+        $this->_integrationMock->expects($this->never())
+            ->method('save');
+        $this->_service->get(self::VALUE_INTEGRATION_ID);
+    }
+
+    /**
+     * Set valid integration data
+     */
+    private function _setValidIntegrationData()
+    {
+        $this->_integrationMock->expects($this->any())
+            ->method('getName')
+            ->will($this->returnValue(self::VALUE_INTEGRATION_NAME));
+        $this->_integrationMock->expects($this->any())
+            ->method('getEmail')
+            ->will($this->returnValue(self::VALUE_INTEGRATION_EMAIL));
+        $this->_integrationMock->expects($this->any())
+            ->method('getAuthentication')
+            ->will($this->returnValue('1'));
+        $this->_integrationMock->expects($this->any())
+            ->method('getEndpoint')
+            ->will($this->returnValue(self::VALUE_INTEGRATION_ENDPOINT));
+    }
+
+    /**
+     * Create mock integration
+     *
+     * @param string $name
+     * @param int $integrationId
+     * @return mixed
+     */
+    private function _getAnotherIntegrationMock(
+        $name = self::VALUE_INTEGRATION_NAME,
+        $integrationId = self::VALUE_INTEGRATION_ID
+    ) {
+        $integrationMock = $this->getMockBuilder('Magento\Integration\Model\Integration')
+            ->disableOriginalConstructor()
+            ->setMethods(
+                [
+                    'getData',
+                    'getId',
+                    'getName',
+                    'getEmail',
+                    'getAuthentication',
+                    'getEndpoint',
+                    'load',
+                    'loadByName',
+                    'save',
+                    '__wakeup'
+                ]
+            )
+            ->getMock();
+        $integrationMock->expects($this->any())
+            ->method('getId')
+            ->will($this->returnValue($integrationId));
+        $integrationMock->expects($this->any())
+            ->method('getName')
+            ->will($this->returnValue($name));
+        $integrationMock->expects($this->any())
+            ->method('getEmail')
+            ->will($this->returnValue(self::VALUE_INTEGRATION_EMAIL));
+        $integrationMock->expects($this->any())
+            ->method('getAuthentication')
+            ->will($this->returnValue('1'));
+        $integrationMock->expects($this->any())
+            ->method('getEndpoint')
+            ->will($this->returnValue(self::VALUE_INTEGRATION_ENDPOINT));
+        return $integrationMock;
+    }
+}
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Log/Model/EntryPoint/ShellTest.php b/dev/tests/unit/testsuite/Magento/Log/App/ShellTest.php
similarity index 64%
rename from dev/tests/unit/testsuite/Magento/Log/Model/EntryPoint/ShellTest.php
rename to dev/tests/unit/testsuite/Magento/Log/App/ShellTest.php
index 604b2c0c767..c4f152e3923 100644
--- a/dev/tests/unit/testsuite/Magento/Log/Model/EntryPoint/ShellTest.php
+++ b/dev/tests/unit/testsuite/Magento/Log/App/ShellTest.php
@@ -21,38 +21,35 @@
  * @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\Log\Model\EntryPoint;
+namespace Magento\Log\App;
 
 class ShellTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Log\Model\EntryPoint\Shell
+     * @var \Magento\Log\App\Shell
      */
     protected $_model;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_objectManagerMock;
+    protected $_shellFactoryMock;
 
     protected function setUp()
     {
-        $config = $this->getMock('Magento\Core\Model\Config\Primary', array(), array(), '', false);
-        $entryFileName = 'shell.php';
-        $this->_objectManagerMock = $this->getMock('Magento\ObjectManager');
-        $this->_model = new \Magento\Log\Model\EntryPoint\Shell($config, $entryFileName, $this->_objectManagerMock);
+        $this->_shellFactoryMock = $this->getMock('Magento\Log\Model\ShellFactory',
+            array('create'), array(), '', false);
+        $this->_model = new \Magento\Log\App\Shell('shell.php', $this->_shellFactoryMock);
     }
 
     public function testProcessRequest()
     {
-        $shellMock = $this->getMock('Magento\Log\Model\Shell', array(), array(), '', false);
-
-        $this->_objectManagerMock->expects($this->once())
+        $shellMock = $this->getMock('Magento\Log\App\Shell', array('run'), array(), '', false);
+        $this->_shellFactoryMock->expects($this->once())
             ->method('create')
-            ->with('Magento\Log\Model\Shell', array('entryPoint' => 'shell.php'))
+            ->with(array('entryPoint' => 'shell.php'))
             ->will($this->returnValue($shellMock));
-
         $shellMock->expects($this->once())->method('run');
-        $this->_model->processRequest();
+        $this->assertEquals('0', $this->_model->execute());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/LoggerTest.php b/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php
similarity index 60%
rename from dev/tests/unit/testsuite/Magento/Core/Model/LoggerTest.php
rename to dev/tests/unit/testsuite/Magento/Log/LoggerTest.php
index 26794efde6b..a75703c0fdf 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/LoggerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php
@@ -21,12 +21,12 @@
  * @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;
+namespace Magento\Log;
 
 class LoggerTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Logger|PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Logger|PHPUnit_Framework_MockObject_MockObject
      */
     protected $_model = null;
 
@@ -49,7 +49,7 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
             mkdir($logDir, 0777, true);
         }
 
-        $this->_model = new \Magento\Core\Model\Logger($dirs, $this->_filesystemMock);
+        $this->_model = new \Magento\Logger($dirs, $this->_filesystemMock);
         $this->_loggersProperty = new \ReflectionProperty($this->_model, '_loggers');
         $this->_loggersProperty->setAccessible(true);
     }
@@ -96,41 +96,14 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    public function testInitForStore()
-    {
-        $config = $this->getMock('Magento\Core\Model\Config', array('getNode'), array(), '', false);
-        $config->expects($this->atLeastOnce())
-            ->method('getNode')
-            ->with('global/log/core/writer_model')
-            ->will($this->returnValue('StdClass'));
-        $store = $this->getMock('Magento\Core\Model\Store', array(), array(), '', false);
-        $store->expects($this->at(0))->method('getConfig')->with('dev/log/active')->will($this->returnValue(false));
-        $store->expects($this->at(1))->method('getConfig')->with('dev/log/active')->will($this->returnValue(true));
-        $store->expects($this->at(2))->method('getConfig')->with('dev/log/file')->will($this->returnValue(''));
-        $store->expects($this->at(3))->method('getConfig')->with('dev/log/exception_file')->will(
-            $this->returnValue('')
-        );
-        $this->_model->initForStore($store, $config);
-        $this->assertFalse($this->_model->hasLog(\Magento\Core\Model\Logger::LOGGER_SYSTEM));
-        $this->assertFalse($this->_model->hasLog(\Magento\Core\Model\Logger::LOGGER_EXCEPTION));
-        $this->_model->initForStore($store, $config);
-        $this->assertTrue($this->_model->hasLog(\Magento\Core\Model\Logger::LOGGER_SYSTEM));
-        $this->assertTrue($this->_model->hasLog(\Magento\Core\Model\Logger::LOGGER_EXCEPTION));
-    }
-
     /**
      * @covers \Magento\Core\Model\Logger::hasLog
      */
-    public function testAddStoreLog()
+    public function testAddLogWithSpecificKey()
     {
         $this->_filesystemMock->expects($this->once())->method('checkAndCreateFolder');
-        $store = $this->getMock('Magento\Core\Model\Store', array(), array(), '', false);
-        $store->expects($this->at(0))->method('getConfig')->with('dev/log/active')->will($this->returnValue(false));
-        $store->expects($this->at(1))->method('getConfig')->with('dev/log/active')->will($this->returnValue(true));
         $key = uniqid();
-        $this->_model->addStoreLog($key, $store);
-        $this->assertFalse($this->_model->hasLog($key));
-        $this->_model->addStoreLog($key, $store);
+        $this->_model->addStreamLog($key);
         $this->assertTrue($this->_model->hasLog($key));
     }
 
@@ -149,7 +122,7 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
     public function testLogComplex()
     {
         $this->expectOutputRegex('/Array\s\(\s+\[0\] => 1\s\).+stdClass Object/s');
-        $this->_model->addStreamLog(\Magento\Core\Model\Logger::LOGGER_SYSTEM, 'php://output');
+        $this->_model->addStreamLog(\Magento\Logger::LOGGER_SYSTEM, 'php://output');
         $this->_model->log(array(1));
         $this->_model->log(new \StdClass);
     }
@@ -157,24 +130,24 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
     public function testLogDebug()
     {
         $message = uniqid();
-        /** @var $model \Magento\Core\Model\Logger|PHPUnit_Framework_MockObject_MockObject */
-        $model = $this->getMock('Magento\Core\Model\Logger', array('log'), array(), '', false);
+        /** @var $model \Magento\Logger|PHPUnit_Framework_MockObject_MockObject */
+        $model = $this->getMock('Magento\Logger', array('log'), array(), '', false);
         $model->expects($this->at(0))->method('log')
-            ->with($message, \Zend_Log::DEBUG, \Magento\Core\Model\Logger::LOGGER_SYSTEM);
+            ->with($message, \Zend_Log::DEBUG, \Magento\Logger::LOGGER_SYSTEM);
         $model->expects($this->at(1))->method('log')
-            ->with($message, \Zend_Log::DEBUG, \Magento\Core\Model\Logger::LOGGER_EXCEPTION);
+            ->with($message, \Zend_Log::DEBUG, \Magento\Logger::LOGGER_EXCEPTION);
         $model->logDebug($message);
-        $model->logDebug($message, \Magento\Core\Model\Logger::LOGGER_EXCEPTION);
+        $model->logDebug($message, \Magento\Logger::LOGGER_EXCEPTION);
     }
 
     public function testLogException()
     {
         $exception = new \Exception;
         $expected = "\n{$exception}";
-        /** @var $model \Magento\Core\Model\Logger|PHPUnit_Framework_MockObject_MockObject */
-        $model = $this->getMock('Magento\Core\Model\Logger', array('log'), array(), '', false);
+        /** @var $model \Magento\Logger|PHPUnit_Framework_MockObject_MockObject */
+        $model = $this->getMock('Magento\Logger', array('log'), array(), '', false);
         $model->expects($this->at(0))->method('log')
-            ->with($expected, \Zend_Log::ERR, \Magento\Core\Model\Logger::LOGGER_EXCEPTION);
+            ->with($expected, \Zend_Log::ERR, \Magento\Logger::LOGGER_EXCEPTION);
         $model->logException($exception);
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Math/DivisionTest.php b/dev/tests/unit/testsuite/Magento/Math/DivisionTest.php
new file mode 100644
index 00000000000..b184f6d957f
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Math/DivisionTest.php
@@ -0,0 +1,50 @@
+<?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\Math;
+
+class DivisionTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @dataProvider getExactDivisionDataProvider
+     */
+    public function testGetExactDivision($dividend, $divisor, $expected)
+    {
+        $mathDivision = new \Magento\Math\Division;
+        $remainder = $mathDivision->getExactDivision($dividend, $divisor);
+        $this->assertEquals($expected, $remainder);
+    }
+
+    /**
+     * @return array
+     */
+    public function getExactDivisionDataProvider()
+    {
+        return array(
+            array(17, 3 , 2),
+            array(7.7, 2 , 1.7),
+            array(17.8, 3.2 , 1.8),
+            array(11.7, 1.7 , 1.5),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Math/RandomTest.php b/dev/tests/unit/testsuite/Magento/Math/RandomTest.php
new file mode 100644
index 00000000000..6760d5d6adf
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Math/RandomTest.php
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Test \Magento\Math\Random
+ *
+ * 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\Math;
+
+class RandomTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @param int $length
+     * @param string $chars
+     *
+     * @dataProvider getRandomStringDataProvider
+     */
+    public function testGetRandomString($length, $chars = null)
+    {
+        $mathRandom = new \Magento\Math\Random;
+        $string = $mathRandom->getRandomString($length, $chars);
+
+        $this->assertEquals($length, strlen($string));
+        if ($chars !== null) {
+            $this->_assertContainsOnlyChars($string, $chars);
+        }
+    }
+
+    public function getRandomStringDataProvider()
+    {
+        return array(
+            array(0),
+            array(10),
+            array(10, \Magento\Math\Random::CHARS_LOWERS),
+            array(10, \Magento\Math\Random::CHARS_UPPERS),
+            array(10, \Magento\Math\Random::CHARS_DIGITS),
+            array(10, \Magento\Math\Random::CHARS_SPECIALS),
+            array(10, \Magento\Math\Random::CHARS_PASSWORD_LOWERS),
+            array(10, \Magento\Math\Random::CHARS_PASSWORD_UPPERS),
+            array(10, \Magento\Math\Random::CHARS_PASSWORD_DIGITS),
+            array(10, \Magento\Math\Random::CHARS_PASSWORD_SPECIALS),
+            array(20,
+                \Magento\Math\Random::CHARS_LOWERS
+                    . \Magento\Math\Random::CHARS_UPPERS
+                    . \Magento\Math\Random::CHARS_DIGITS
+            ),
+        );
+    }
+
+    public function testGetUniqueHash()
+    {
+        $mathRandom = new \Magento\Math\Random;
+        $hashOne = $mathRandom->getUniqueHash();
+        $hashTwo = $mathRandom->getUniqueHash();
+        $this->assertTrue(is_string($hashOne));
+        $this->assertTrue(is_string($hashTwo));
+        $this->assertNotEquals($hashOne, $hashTwo);
+    }
+
+    /**
+     * @param string $string
+     * @param string $chars
+     */
+    protected function _assertContainsOnlyChars($string, $chars)
+    {
+        if (preg_match('/[^' . $chars . ']+/', $string, $matches)) {
+            $this->fail(sprintf('Unexpected char "%s" found', $matches[0]));
+        }
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/Converter/DomTest.php b/dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/DomTest.php
old mode 100755
new mode 100644
similarity index 94%
rename from dev/tests/unit/testsuite/Magento/App/Module/Declaration/Converter/DomTest.php
rename to dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/DomTest.php
index 77b35b2d723..e0eb0a888ad
--- a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/Converter/DomTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/DomTest.php
@@ -21,18 +21,18 @@
  * @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\App\Module\Declaration\Converter;
+namespace Magento\Module\Declaration\Converter;
 
 class DomTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\App\Module\Declaration\Converter\Dom
+     * @var \Magento\Module\Declaration\Converter\Dom
      */
     protected $_converter;
 
     protected function setUp()
     {
-        $this->_converter = new \Magento\App\Module\Declaration\Converter\Dom();
+        $this->_converter = new \Magento\Module\Declaration\Converter\Dom();
     }
 
     public function testConvertWithValidDom()
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/Converter/_files/converted_valid_module.php b/dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/_files/converted_valid_module.php
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/App/Module/Declaration/Converter/_files/converted_valid_module.php
rename to dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/_files/converted_valid_module.php
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/Converter/_files/valid_module.xml b/dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/_files/valid_module.xml
old mode 100755
new mode 100644
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/App/Module/Declaration/Converter/_files/valid_module.xml
rename to dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/_files/valid_module.xml
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml b/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml
old mode 100755
new mode 100644
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml
rename to dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml b/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml
rename to dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml b/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml
old mode 100755
new mode 100644
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml
rename to dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml b/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml
old mode 100755
new mode 100644
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml
rename to dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml b/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml
rename to dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolverTest.php b/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolverTest.php
similarity index 93%
rename from dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolverTest.php
rename to dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolverTest.php
index 8e258ee12da..c8efc99b5a5 100644
--- a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/FileResolverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolverTest.php
@@ -21,12 +21,12 @@
  * @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\App\Module\Declaration;
+namespace Magento\Module\Declaration;
 
 class FileResolverTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\App\Module\Declaration\FileResolver
+     * @var \Magento\Module\Declaration\FileResolver
      */
     protected $_model;
 
@@ -47,7 +47,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
                     $baseDir . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR .'code',
                 ),
             )));
-        $this->_model = new \Magento\App\Module\Declaration\FileResolver($applicationDirs);
+        $this->_model = new \Magento\Module\Declaration\FileResolver($applicationDirs);
     }
 
     public function testGet()
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/Reader/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/Module/Declaration/Reader/FilesystemTest.php
similarity index 89%
rename from dev/tests/unit/testsuite/Magento/App/Module/Declaration/Reader/FilesystemTest.php
rename to dev/tests/unit/testsuite/Magento/Module/Declaration/Reader/FilesystemTest.php
index a0e57985a5a..02b4e711786 100644
--- a/dev/tests/unit/testsuite/Magento/App/Module/Declaration/Reader/FilesystemTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/Declaration/Reader/FilesystemTest.php
@@ -21,12 +21,12 @@
  * @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\App\Module\Declaration\Reader;
+namespace Magento\Module\Declaration\Reader;
 
 class FilesystemTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\App\Module\Declaration\Reader\Filesystem
+     * @var \Magento\Module\Declaration\Reader\Filesystem
      */
     protected $_model;
 
@@ -45,13 +45,13 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
                         $baseDir . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR .'code',
                 ),
             )));
-        $fileResolver = new \Magento\App\Module\Declaration\FileResolver($applicationDirs);
-        $converter = new \Magento\App\Module\Declaration\Converter\Dom();
+        $fileResolver = new \Magento\Module\Declaration\FileResolver($applicationDirs);
+        $converter = new \Magento\Module\Declaration\Converter\Dom();
         $schemaLocatorMock = $this->getMock(
-            'Magento\App\Module\Declaration\SchemaLocator', array(), array(), '', false
+            'Magento\Module\Declaration\SchemaLocator', array(), array(), '', false
         );
         $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface');
-        $this->_model = new \Magento\App\Module\Declaration\Reader\Filesystem(
+        $this->_model = new \Magento\Module\Declaration\Reader\Filesystem(
             $fileResolver, $converter, $schemaLocatorMock, $validationStateMock
         );
     }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Modules/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Module/Dir/ReaderTest.php
similarity index 53%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Config/Modules/ReaderTest.php
rename to dev/tests/unit/testsuite/Magento/Module/Dir/ReaderTest.php
index 7b2ab85e130..2b6991f422d 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Modules/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/Dir/ReaderTest.php
@@ -24,14 +24,14 @@
  */
 
 /**
- * Test class for \Magento\Core\Model\Config\Modules\File
+ * Test class for \Magento\Module\Dir\File
  */
-namespace Magento\Core\Model\Config\Modules;
+namespace Magento\Module\Dir;
 
 class ReaderTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_model;
 
@@ -59,53 +59,16 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
     {
         $this->_protFactoryMock = $this->getMock('Magento\Core\Model\Config\BaseFactory',
             array(), array(), '', false, false);
-        $this->_dirsMock = $this->getMock('Magento\App\Module\Dir', array(), array(), '', false, false);
+        $this->_dirsMock = $this->getMock('Magento\Module\Dir', array(), array(), '', false, false);
         $this->_baseConfigMock = $this->getMock('Magento\Core\Model\Config\Base', array(), array(), '', false, false);
-        $this->_moduleListMock = $this->getMock('Magento\App\ModuleListInterface');
+        $this->_moduleListMock = $this->getMock('Magento\Module\ModuleListInterface');
 
-        $this->_model = new \Magento\Core\Model\Config\Modules\Reader(
+        $this->_model = new \Magento\Module\Dir\Reader(
             $this->_dirsMock,
-            $this->_protFactoryMock,
             $this->_moduleListMock
         );
     }
 
-    public function testLoadModulesConfiguration()
-    {
-        $modulesConfig = array('mod1' => array());
-        $fileName = 'acl.xml';
-        $this->_protFactoryMock->expects($this->exactly(2))
-            ->method('create')
-            ->with($this->equalTo('<config/>'))
-            ->will($this->returnValue($this->_baseConfigMock));
-
-        $this->_moduleListMock->expects($this->once())
-            ->method('getModules')
-            ->will($this->returnValue($modulesConfig));
-
-        $result = $this->_model->loadModulesConfiguration($fileName, null, null, array());
-        $this->assertInstanceOf('Magento\Core\Model\Config\Base', $result);
-    }
-
-    public function testLoadModulesConfigurationMergeToObject()
-    {
-        $fileName = 'acl.xml';
-        $mergeToObject = $this->getMock('Magento\Core\Model\Config\Base', array(), array(), '', false, false);
-        $mergeModel = null;
-        $modulesConfig = array('mod1' => array());
-
-        $this->_moduleListMock->expects($this->once())
-            ->method('getModules')
-            ->will($this->returnValue($modulesConfig));
-
-        $this->_protFactoryMock->expects($this->once())
-            ->method('create')
-            ->with($this->equalTo('<config/>'))
-            ->will($this->returnValue($mergeToObject));
-
-        $this->_model->loadModulesConfiguration($fileName, $mergeToObject, $mergeModel);
-    }
-
     public function testGetModuleDir()
     {
         $this->_dirsMock->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/Dir/ReverseResolverTest.php b/dev/tests/unit/testsuite/Magento/Module/Dir/ReverseResolverTest.php
similarity index 86%
rename from dev/tests/unit/testsuite/Magento/App/Module/Dir/ReverseResolverTest.php
rename to dev/tests/unit/testsuite/Magento/Module/Dir/ReverseResolverTest.php
index f4e550ee4fd..fff7042cda7 100644
--- a/dev/tests/unit/testsuite/Magento/App/Module/Dir/ReverseResolverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/Dir/ReverseResolverTest.php
@@ -21,30 +21,30 @@
  * @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\App\Module\Dir;
+namespace Magento\Module\Dir;
 
 class ReverseResolverTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\App\Module\Dir\ReverseResolver
+     * @var \Magento\Module\Dir\ReverseResolver
      */
     protected $_model;
 
     /**
-     * @var \Magento\App\ModuleListInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Module\ModuleListInterface|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_moduleList;
 
     /**
-     * @var \Magento\App\Module\Dir|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Module\Dir|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_moduleDirs;
 
     protected function setUp()
     {
-        $this->_moduleList = $this->getMock('Magento\App\ModuleListInterface');
-        $this->_moduleDirs = $this->getMock('Magento\App\Module\Dir', array(), array(), '', false, false);
-        $this->_model = new \Magento\App\Module\Dir\ReverseResolver($this->_moduleList, $this->_moduleDirs);
+        $this->_moduleList = $this->getMock('Magento\Module\ModuleListInterface');
+        $this->_moduleDirs = $this->getMock('Magento\Module\Dir', array(), array(), '', false, false);
+        $this->_model = new \Magento\Module\Dir\ReverseResolver($this->_moduleList, $this->_moduleDirs);
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/DirTest.php b/dev/tests/unit/testsuite/Magento/Module/DirTest.php
similarity index 79%
rename from dev/tests/unit/testsuite/Magento/App/Module/DirTest.php
rename to dev/tests/unit/testsuite/Magento/Module/DirTest.php
index b2fc7368dc9..889f5631738 100644
--- a/dev/tests/unit/testsuite/Magento/App/Module/DirTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/DirTest.php
@@ -21,12 +21,12 @@
  * @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\App\Module;
+namespace Magento\Module;
 
 class DirTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\App\Module\Dir
+     * @var \Magento\Module\Dir
      */
     protected $_model;
 
@@ -35,6 +35,11 @@ class DirTest extends \PHPUnit_Framework_TestCase
      */
     protected $_applicationDirs;
 
+    /**
+     * @var \Magento\Stdlib\String|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_stringMock;
+
     protected function setUp()
     {
         $this->_applicationDirs = $this->getMock('Magento\App\Dir', array(), array(), '', false, false);
@@ -42,9 +47,12 @@ class DirTest extends \PHPUnit_Framework_TestCase
             ->expects($this->once())
             ->method('getDir')
             ->with(\Magento\App\Dir::MODULES)
-            ->will($this->returnValue('app' . DIRECTORY_SEPARATOR . 'code'))
-        ;
-        $this->_model = new \Magento\App\Module\Dir($this->_applicationDirs);
+            ->will($this->returnValue('app' . DIRECTORY_SEPARATOR . 'code'));
+
+        $this->_stringMock = $this->getMock('\Magento\Stdlib\String', array(), array(), '', false, false);
+        $this->_stringMock->expects($this->once())->method('upperCaseWords')
+            ->will($this->returnValue('Test' . DIRECTORY_SEPARATOR . 'Module'));
+        $this->_model = new \Magento\Module\Dir($this->_applicationDirs, $this->_stringMock);
     }
 
     public function testGetDirModuleRoot()
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/ResourceResolverTest.php b/dev/tests/unit/testsuite/Magento/Module/ResourceResolverTest.php
similarity index 84%
rename from dev/tests/unit/testsuite/Magento/App/Module/ResourceResolverTest.php
rename to dev/tests/unit/testsuite/Magento/Module/ResourceResolverTest.php
index 92b3566ea18..5cf4e7b62cb 100644
--- a/dev/tests/unit/testsuite/Magento/App/Module/ResourceResolverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/ResourceResolverTest.php
@@ -21,12 +21,12 @@
  * @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\App\Module;
+namespace Magento\Module;
 
 class ResourceResolverTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var  \Magento\App\Module\ResourceResolver
+     * @var  \Magento\Module\ResourceResolver
      */
     protected $_model;
 
@@ -37,9 +37,9 @@ class ResourceResolverTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_moduleReaderMock = $this->getMock('Magento\Core\Model\Config\Modules\Reader',
+        $this->_moduleReaderMock = $this->getMock('Magento\Module\Dir\Reader',
             array(), array(), '', false);
-        $this->_model = new \Magento\App\Module\ResourceResolver($this->_moduleReaderMock);
+        $this->_model = new \Magento\Module\ResourceResolver($this->_moduleReaderMock);
     }
 
     public function testGetResourceList()
@@ -51,15 +51,16 @@ class ResourceResolverTest extends \PHPUnit_Framework_TestCase
                 array(
                     'data',
                     $moduleName,
-                    __DIR__ . str_replace('/', DIRECTORY_SEPARATOR, '/ResourceResolver/_files/Module/data'),
+                    __DIR__ . str_replace('/', DIRECTORY_SEPARATOR, '/_files/Module/data'),
                 ),
                 array(
                     'sql',
                     $moduleName,
-                    __DIR__ . str_replace('/', DIRECTORY_SEPARATOR, '/ResourceResolver/_files/Module/sql'),
+                    __DIR__ . str_replace('/', DIRECTORY_SEPARATOR, '/_files/Module/sql'),
                 ),
             )));
 
+
         $expectedResult = array('module_first_setup', 'module_second_setup');
         $this->assertEquals($expectedResult, array_values($this->_model->getResourceList($moduleName)));
     }
diff --git a/dev/tests/unit/testsuite/Magento/App/UpdaterTest.php b/dev/tests/unit/testsuite/Magento/Module/UpdaterTest.php
similarity index 90%
rename from dev/tests/unit/testsuite/Magento/App/UpdaterTest.php
rename to dev/tests/unit/testsuite/Magento/Module/UpdaterTest.php
index f2b763fe7ae..c02d213931c 100644
--- a/dev/tests/unit/testsuite/Magento/App/UpdaterTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/UpdaterTest.php
@@ -21,7 +21,7 @@
  * @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\App;
+namespace Magento\Module;
 
 class UpdaterTest extends \PHPUnit_Framework_TestCase
 {
@@ -51,16 +51,16 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase
     protected $_resourceSetupMock;
 
     /**
-     * @var \Magento\App\Updater
+     * @var \Magento\Module\Updater
      */
     protected $_model;
 
     protected function setUp()
     {
-        $this->_factoryMock = $this->getMock('Magento\App\Updater\SetupFactory', array(), array(), '', false);
+        $this->_factoryMock = $this->getMock('Magento\Module\Updater\SetupFactory', array(), array(), '', false);
         $this->_appStateMock = $this->getMock('Magento\App\State', array(), array(), '', false);
-        $this->_moduleListMock = $this->getMock('Magento\App\ModuleListInterface');
-        $this->_resourceResolver = $this->getMock('Magento\App\Module\ResourceResolverInterface');
+        $this->_moduleListMock = $this->getMock('Magento\Module\ModuleListInterface');
+        $this->_resourceResolver = $this->getMock('Magento\Module\ResourceResolverInterface');
         $this->_resourceSetupMock = $this->getMock('Magento\Catalog\Model\Resource\Setup', array(), array(), '', false);
 
         $moduleList = array('Test_Module' => array());
@@ -79,7 +79,7 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase
             ->with('catalog_setup', 'Test_Module')
             ->will($this->returnValue($this->_resourceSetupMock));
 
-        $this->_model = new \Magento\App\Updater(
+        $this->_model = new \Magento\Module\Updater(
             $this->_factoryMock,
             $this->_appStateMock,
             $this->_moduleListMock,
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/ResourceResolver/_files/Module/data/module_second_setup/.gitignore b/dev/tests/unit/testsuite/Magento/Module/_files/Module/data/module_first_setup/.gitignore
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/App/Module/ResourceResolver/_files/Module/data/module_second_setup/.gitignore
rename to dev/tests/unit/testsuite/Magento/Module/_files/Module/data/module_first_setup/.gitignore
diff --git a/dev/tests/unit/testsuite/Magento/App/Module/ResourceResolver/_files/Module/sql/module_first_setup/.gitignore b/dev/tests/unit/testsuite/Magento/Module/_files/Module/data/module_second_setup/.gitignore
similarity index 100%
rename from dev/tests/unit/testsuite/Magento/App/Module/ResourceResolver/_files/Module/sql/module_first_setup/.gitignore
rename to dev/tests/unit/testsuite/Magento/Module/_files/Module/data/module_second_setup/.gitignore
diff --git a/dev/tests/unit/testsuite/Magento/Module/_files/Module/sql/module_first_setup/.gitignore b/dev/tests/unit/testsuite/Magento/Module/_files/Module/sql/module_first_setup/.gitignore
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/dev/tests/unit/testsuite/Magento/Newsletter/Model/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Newsletter/Model/TemplateTest.php
index af9ea36720b..249b8c3e624 100644
--- a/dev/tests/unit/testsuite/Magento/Newsletter/Model/TemplateTest.php
+++ b/dev/tests/unit/testsuite/Magento/Newsletter/Model/TemplateTest.php
@@ -76,10 +76,12 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
         $templateFactory = $this->getMock('Magento\Newsletter\Model\TemplateFactory');
         $data = array('template_text' => 'template text');
 
+        $filterManager = $this->getMock('\Magento\Filter\FilterManager', array(), array(), '', false);
+
         /** @var \Magento\Newsletter\Model\Template $model */
         $model = $this->getMock('Magento\Newsletter\Model\Template', array('_init'), array(
             $design, $context, $registry, $storeManager, $request, $filter, $storeConfig, $templateFactory,
-            $appEmulation, $data,
+            $appEmulation, $filterManager, $data,
         ));
 
         $result = $model->getProcessedTemplate();
diff --git a/dev/tests/unit/testsuite/Magento/Oauth/Helper/ServiceTest.php b/dev/tests/unit/testsuite/Magento/Oauth/Helper/ServiceTest.php
index 1070c201b3f..de6606c6827 100644
--- a/dev/tests/unit/testsuite/Magento/Oauth/Helper/ServiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Oauth/Helper/ServiceTest.php
@@ -27,9 +27,6 @@ namespace Magento\Oauth\Helper;
 
 class ServiceTest extends \PHPUnit_Framework_TestCase
 {
-    /** @var \Magento\Core\Helper\Data */
-    protected $_coreHelper;
-
     /** @var \Magento\Core\Helper\Context */
     protected $_coreContextMock;
 
@@ -47,15 +44,13 @@ class ServiceTest extends \PHPUnit_Framework_TestCase
         $this->_storeConfigMock = $this->getMockBuilder('Magento\Core\Model\Store\Config')
             ->disableOriginalConstructor()
             ->getMock();
-        $this->_encryptorMock = $this->getMockBuilder('Magento\Core\Model\Encryption')
+        $this->_encryptorMock = $this->getMockBuilder('Magento\Encryption\Encryptor')
             ->disableOriginalConstructor()
             ->getMock();
 
         $this->_coreHelper = new \Magento\Core\Helper\Data(
             $this->_coreContextMock,
             $this->getMockBuilder('Magento\Event\ManagerInterface')->disableOriginalConstructor()->getMock(),
-            $this->getMockBuilder('Magento\Core\Helper\Http')->disableOriginalConstructor()->getMock(),
-            $this->getMockBuilder('Magento\Core\Model\Config')->disableOriginalConstructor()->getMock(),
             $this->_storeConfigMock,
             $this->getMockBuilder('Magento\Core\Model\StoreManager')->disableOriginalConstructor()->getMock(),
             $this->getMockBuilder('Magento\Core\Model\Locale')->disableOriginalConstructor()->getMock(),
@@ -65,15 +60,14 @@ class ServiceTest extends \PHPUnit_Framework_TestCase
         );
 
         $this->_oauthHelper = new \Magento\Oauth\Helper\Service(
-            $this->_coreHelper,
             $this->_coreContextMock,
-            $this->_storeConfigMock
+            $this->_storeConfigMock,
+            new \Magento\Math\Random
         );
     }
 
     protected function tearDown()
     {
-        unset($this->_coreHelper);
         unset($this->_coreContextMock);
         unset($this->_storeConfigMock);
         unset($this->_oauthHelper);
diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/mapped_simple_di_config.php b/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/mapped_simple_di_config.php
index ad1ae3d1340..507a614fe48 100644
--- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/mapped_simple_di_config.php
+++ b/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/mapped_simple_di_config.php
@@ -23,7 +23,7 @@
  */
 return array(
     'preferences' => array(
-        'Magento\App\UpdaterInterface' => 'Magento\App\Updater',
+        'Magento\Module\UpdaterInterface' => 'Magento\Module\Updaterter',
         'Magento\Core\Model\AppInterface' => 'Magento\Core\Model\App\Proxy',
     ),
 
diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/simple_di_config.xml b/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/simple_di_config.xml
index e2e2fb34d8e..2275c5209e9 100644
--- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/simple_di_config.xml
+++ b/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/simple_di_config.xml
@@ -25,11 +25,11 @@
 -->
 <config>
     <!-- Comment within root node -->
-    <preference for="Magento\App\UpdaterInterface" type="Magento\App\Updater" />
+    <preference for="Magento\Module\UpdaterInterface" type="Magento\Module\Updaterter" />
     <preference for="Magento\Core\Model\AppInterface" type="Magento\Core\Model\App\Proxy" />
     <type name="Magento\App\State">
         <param name="mode">
-            <value type="argument">Magento\Core\Model\App::PARAM_MODE</value>
+            <value type="argument">Magento\App\State::PARAM_MODE</value>
         </param>
     </type>
     <type name="Magento\Core\Model\Config_Modules">
diff --git a/dev/tests/unit/testsuite/Magento/Outbound/Formatter/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Outbound/Formatter/FactoryTest.php
index 7bc7e0c4972..e240f5aab68 100644
--- a/dev/tests/unit/testsuite/Magento/Outbound/Formatter/FactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Outbound/Formatter/FactoryTest.php
@@ -30,7 +30,7 @@ namespace Magento\Outbound\Formatter;
 class FactoryTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject \Magento\Core\Model\ObjectManager
+     * @var \PHPUnit_Framework_MockObject_MockObject \Magento\App\ObjectManager
      */
     private $_mockObjectManager;
 
diff --git a/dev/tests/unit/testsuite/Magento/Page/Block/Link/CurrentTest.php b/dev/tests/unit/testsuite/Magento/Page/Block/Link/CurrentTest.php
index e76f251699b..8a6e52d5731 100644
--- a/dev/tests/unit/testsuite/Magento/Page/Block/Link/CurrentTest.php
+++ b/dev/tests/unit/testsuite/Magento/Page/Block/Link/CurrentTest.php
@@ -43,30 +43,26 @@ class CurrentTest extends \PHPUnit_Framework_TestCase
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_frontControllerMock;
+    protected $_coreHelperMock;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_coreHelperMock;
+    protected $_defaultPathMock;
 
     protected function setUp()
     {
         $this->_urlBuilderMock = $this->getMock('\Magento\UrlInterface');
         $this->_requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false);
-        $this->_frontControllerMock = $this->getMock('Magento\App\FrontController', array(), array(), '', false);
         $this->_coreHelperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
         $this->_contextMock = $this->getMock('Magento\Core\Block\Template\Context', array(), array(), '', false);
-
+        $this->_defaultPathMock = $this->getMock('\Magento\App\DefaultPathInterface');
         $this->_contextMock->expects($this->any())
             ->method('getUrlBuilder')
             ->will($this->returnValue($this->_urlBuilderMock));
         $this->_contextMock->expects($this->any())
             ->method('getRequest')
             ->will($this->returnValue($this->_requestMock));
-        $this->_contextMock->expects($this->any())
-            ->method('getFrontController')
-            ->will($this->returnValue($this->_frontControllerMock));
     }
 
     public function testGetUrl()
@@ -79,7 +75,11 @@ class CurrentTest extends \PHPUnit_Framework_TestCase
             ->with($path)
             ->will($this->returnValue($url));
 
-        $link = new \Magento\Page\Block\Link\Current($this->_coreHelperMock, $this->_contextMock);
+        $link = new \Magento\Page\Block\Link\Current(
+            $this->_coreHelperMock,
+            $this->_contextMock,
+            $this->_defaultPathMock
+        );
 
         $link->setPath($path);
         $this->assertEquals($url, $link->getHref());
@@ -88,7 +88,11 @@ class CurrentTest extends \PHPUnit_Framework_TestCase
 
     public function testIsCurrentIfIsset()
     {
-        $link = new \Magento\Page\Block\Link\Current($this->_coreHelperMock, $this->_contextMock);
+        $link = new \Magento\Page\Block\Link\Current(
+            $this->_coreHelperMock,
+            $this->_contextMock,
+            $this->_defaultPathMock
+        );
         $link->setCurrent(true);
         $this->assertTrue($link->IsCurrent());
     }
@@ -101,10 +105,9 @@ class CurrentTest extends \PHPUnit_Framework_TestCase
         $this->_requestMock->expects($this->once())->method('getModuleName')->will($this->returnValue('a'));
         $this->_requestMock->expects($this->once())->method('getControllerName')->will($this->returnValue('b'));
         $this->_requestMock->expects($this->once())->method('getActionName')->will($this->returnValue('d'));
-
-        $this->_frontControllerMock->expects($this->once())
-            ->method('getDefault')
-            ->will($this->returnValue(array('action' => 'd')));
+        $this->_defaultPathMock->expects($this->atLeastOnce())
+            ->method('getPart')
+            ->will($this->returnValue('d'));
 
         $this->_urlBuilderMock->expects($this->at(0))->method('getUrl')->with($path)->will($this->returnValue($url));
         $this->_urlBuilderMock->expects($this->at(1))
@@ -112,7 +115,11 @@ class CurrentTest extends \PHPUnit_Framework_TestCase
             ->with('a/b')
             ->will($this->returnValue($url));
 
-        $link = new \Magento\Page\Block\Link\Current($this->_coreHelperMock, $this->_contextMock);
+        $link = new \Magento\Page\Block\Link\Current(
+            $this->_coreHelperMock,
+            $this->_contextMock,
+            $this->_defaultPathMock
+        );
         $link->setPath($path);
         $this->assertTrue($link->isCurrent());
     }
@@ -122,7 +129,11 @@ class CurrentTest extends \PHPUnit_Framework_TestCase
         $this->_urlBuilderMock->expects($this->at(0))->method('getUrl')->will($this->returnValue('1'));
         $this->_urlBuilderMock->expects($this->at(1))->method('getUrl')->will($this->returnValue('2'));
 
-        $link = new \Magento\Page\Block\Link\Current($this->_coreHelperMock, $this->_contextMock);
+        $link = new \Magento\Page\Block\Link\Current(
+            $this->_coreHelperMock,
+            $this->_contextMock,
+            $this->_defaultPathMock
+        );
         $this->assertFalse($link->isCurrent());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Persistent/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Helper/DataTest.php
index 37934711f36..b2cca77e31c 100644
--- a/dev/tests/unit/testsuite/Magento/Persistent/Helper/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Persistent/Helper/DataTest.php
@@ -29,7 +29,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
     /**
      * @var  \Magento\Core\Model\Config|PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_configMock;
+    protected $_modulesReader;
 
     /**
      * @var  \Magento\Persistent\Helper\Data
@@ -38,16 +38,22 @@ class DataTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_configMock = $this->getMock('\Magento\Core\Model\Config', array(), array(), '', false);
+        $this->_modulesReader = $this->getMock(
+            '\Magento\Module\Dir\Reader',
+            array(),
+            array(),
+            '',
+            false
+        );
         $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
         $this->_helper = $objectManager->getObject('\Magento\Persistent\Helper\Data', array(
-            'config' => $this->_configMock,
+            'modulesReader' => $this->_modulesReader,
         ));
     }
 
     public function testGetPersistentConfigFilePath()
     {
-        $this->_configMock->expects($this->once())->method('getModuleDir')
+        $this->_modulesReader->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/Reports/Model/Resource/Report/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Reports/Model/Resource/Report/CollectionTest.php
index 3d04b4722fb..5f9ba498a78 100644
--- a/dev/tests/unit/testsuite/Magento/Reports/Model/Resource/Report/CollectionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Reports/Model/Resource/Report/CollectionTest.php
@@ -38,7 +38,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $this->_factoryMock = $this->getMock('Zend_DateFactory', array('create'), array(), '', false);
+        $this->_factoryMock = $this->getMock('\Magento\Reports\Model\DateFactory', array('create'), array(), '', false);
         $arguments = array(
             'dateFactory' => $this->_factoryMock,
         );
@@ -54,11 +54,10 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
         $startDateMock = $this->getMock('Zend_Date', array(), array(), '', false);
         $endDateMock = $this->getMock('Zend_Date', array(), array(), '', false);
         $map = array(
-            array(array('date' => $startDate), $startDateMock),
-            array(array('date' => $endDate), $endDateMock),
+            array($startDate, null, null, $startDateMock),
+            array($endDate, null, null, $endDateMock),
         );
         $this->_factoryMock->expects($this->exactly(2))->method('create')->will($this->returnValueMap($map));
-
         $startDateMock->expects($this->once())->method('compare')->with($endDateMock)->will($this->returnValue(true));
 
         $this->assertEquals(0, $this->_model->getSize());
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Totals/TaxTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Totals/TaxTest.php
index 11242f34ae8..42774d7bfa7 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Totals/TaxTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Totals/TaxTest.php
@@ -70,7 +70,7 @@ class TaxTest extends \PHPUnit_Framework_TestCase
             'taxItemFactory' => $taxItemFactory
         ));
 
-        $taxOrderFactory = $this->getMock('Magento\Tax\Model\Sales\Order\Tax\Factory',
+        $taxOrderFactory = $this->getMock('Magento\Tax\Model\Sales\Order\TaxFactory',
             array('create'), array(), '', false);
 
         return $objectManagerHelper->getConstructArguments(
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Config/ReaderTest.php
index 8c13e2a8e61..f84789ce44c 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/Config/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Config/ReaderTest.php
@@ -48,7 +48,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         $schema = $this->getMockBuilder('Magento\Sales\Model\Config\SchemaLocator')
             ->disableOriginalConstructor()
             ->getMock();
-        $validator = $this->getMockBuilder('Magento\Core\Model\Config\ValidationState')
+        $validator = $this->getMockBuilder('\Magento\Config\ValidationStateInterface')
             ->disableOriginalConstructor()
             ->getMock();
         $this->_reader = new \Magento\Sales\Model\Config\Reader($fileResolver, $converter, $schema, $validator);
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Config/SchemaLocatorTest.php
index 10f8f2b445e..4bec978daec 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Config/SchemaLocatorTest.php
@@ -44,7 +44,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
-        $this->_moduleReaderMock = $this->getMockBuilder('Magento\Core\Model\Config\Modules\Reader')
+        $this->_moduleReaderMock = $this->getMockBuilder('Magento\Module\Dir\Reader')
             ->disableOriginalConstructor()
             ->getMock();
         $this->_moduleReaderMock->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/AbstractTest.php
index f8d0acee480..3e484c06628 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/AbstractTest.php
@@ -44,7 +44,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         // Setup most constructor dependencies
         $paymentData = $this->getMock('Magento\Payment\Helper\Data', array(), array(), '', false);
         $coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
-        $coreString = $this->getMock('Magento\Core\Helper\String', array(), array(), '', false);
+        $string = $this->getMock('Magento\Stdlib\String', array(), array(), '', false);
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
         $translate = $this->getMock('Magento\Core\Model\Translate', array(), array(), '', false);
         $coreDir = $this->getMock('Magento\App\Dir', array(), array(), '', false);
@@ -108,7 +108,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         // Test model
         /** @var \Magento\Sales\Model\Order\Pdf\AbstractPdf|\PHPUnit_Framework_MockObject_MockObject $model */
         $model = $this->getMockForAbstractClass('Magento\Sales\Model\Order\Pdf\AbstractPdf',
-            array($paymentData, $coreData, $coreString, $coreStoreConfig, $translate, $coreDir, $shippingConfig,
+            array($paymentData, $coreData, $string, $coreStoreConfig, $translate, $coreDir, $shippingConfig,
                 $pdfConfig, $pdfTotalFactory, $pdfItemsFactory),
             '', true, false, true, array('drawLineBlocks')
         );
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/Config/ReaderTest.php
index 141874d0d6b..74e86f31462 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/Config/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/Config/ReaderTest.php
@@ -66,7 +66,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         $this->_converter = $this->getMock('Magento\Sales\Model\Order\Pdf\Config\Converter', array('convert'));
 
         $moduleReader = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array('getModuleDir'), array(), '', false
+            'Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false
         );
 
         $moduleReader->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/Config/SchemaLocatorTest.php
index 3e5d4fd321c..2ab59f291db 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/Config/SchemaLocatorTest.php
@@ -32,7 +32,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_moduleReader;
 
@@ -44,7 +44,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_moduleReader = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array('getModuleDir'), array(), '', false
+            'Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false
         );
         $this->_moduleReader
             ->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/InvoiceTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/InvoiceTest.php
index a9fe51ce9b8..0e363af9765 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/InvoiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/InvoiceTest.php
@@ -40,7 +40,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
     {
         $paymentDataMock = $this->getMock('Magento\Payment\Helper\Data', array(), array(), '', false);
         $coreHelperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
-        $coreHelperStringMock = $this->getMock('Magento\Core\Helper\String', array(), array(), '', false, false);
+        $stringMock = $this->getMock('Magento\Stdlib\String', array(), array(), '', false, false);
         $storeConfigMock = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false, false);
         $translateMock = $this->getMock('Magento\Core\Model\Translate', array(), array(), '', false, false);
         $coreDirMock = $this->getMock('Magento\App\Dir', array(), array(), '', false, false);
@@ -63,7 +63,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
         $this->_model = new \Magento\Sales\Model\Order\Pdf\Invoice(
             $paymentDataMock,
             $coreHelperMock,
-            $coreHelperStringMock,
+            $stringMock,
             $storeConfigMock,
             $translateMock,
             $coreDirMock,
diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Resource/Report/RuleTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Resource/Report/RuleTest.php
index fb2587a3c7c..2d0036f809c 100644
--- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Resource/Report/RuleTest.php
+++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Resource/Report/RuleTest.php
@@ -63,7 +63,7 @@ class RuleTest extends \PHPUnit_Framework_TestCase
             ->with($select)
             ->will($this->returnCallback(array($this, 'fetchAllCallback')));
 
-        $resourceMock = $this->getMock('Magento\Core\Model\Resource',
+        $resourceMock = $this->getMock('Magento\App\Resource',
             array('getConnection', 'getTableName'), array(), '', false
         );
         $resourceMock->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/Stdlib/ArrayUtilsTest.php b/dev/tests/unit/testsuite/Magento/Stdlib/ArrayUtilsTest.php
new file mode 100644
index 00000000000..c5b7bf2e0e9
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Stdlib/ArrayUtilsTest.php
@@ -0,0 +1,68 @@
+<?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\Stdlib;
+
+/**
+ * Magento\Stdlib\ArrayUtilsTest test case
+ */
+class ArrayUtilsTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Stdlib\ArrayUtils
+     */
+    protected $_arrayUtils;
+
+    protected function setUp()
+    {
+        $this->_arrayUtils = new ArrayUtils();
+    }
+
+    /**
+     * @covers \Magento\Stdlib\ArrayUtils::ksortMultibyte
+     * @dataProvider ksortMultibyteDataProvider
+     */
+    public function testKsortMultibyte($input, $locale)
+    {
+        $this->_arrayUtils->ksortMultibyte($input, $locale);
+
+        $iterator = 0;
+        foreach ($input as $value) {
+            $iterator++;
+            $this->assertEquals($iterator, $value);
+
+        }
+    }
+
+    /**
+     * Data provider for ksortMultibyteDataProvider
+     * @todo implement provider with values which different depends on locale
+     */
+    public function ksortMultibyteDataProvider()
+    {
+        return array(
+            array(array('б' => 2, 'в' => 3, 'а' => 1), 'ru_RU'),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/DateTest.php b/dev/tests/unit/testsuite/Magento/Stdlib/DateTimeTest.php
similarity index 63%
rename from dev/tests/unit/testsuite/Magento/DateTest.php
rename to dev/tests/unit/testsuite/Magento/Stdlib/DateTimeTest.php
index 6fe3a12e08f..01ec2f63a3d 100644
--- a/dev/tests/unit/testsuite/Magento/DateTest.php
+++ b/dev/tests/unit/testsuite/Magento/Stdlib/DateTimeTest.php
@@ -26,27 +26,38 @@
  */
 
 /**
- * \Magento\Date test case
+ * \Magento\Stdlib\DateTime test case
  */
-namespace Magento;
+namespace Magento\Stdlib;
 
-class DateTest extends \PHPUnit_Framework_TestCase
+class DateTimeTest extends \PHPUnit_Framework_TestCase
 {
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
+    protected function setUp()
+    {
+        $this->_dateTime = new \Magento\Stdlib\DateTime;
+    }
+
     public function testToTimestamp()
     {
         $date = new \Zend_Date();
-        $this->assertEquals($date->getTimestamp(), \Magento\Date::toTimestamp($date));
+        $dateTime = new \Magento\Stdlib\DateTime;
+        $this->assertEquals($date->getTimestamp(), $dateTime->toTimestamp($date));
 
-        $this->assertEquals(time(), \Magento\Date::toTimestamp(true));
+        $this->assertEquals(time(), $dateTime->toTimestamp(true));
 
         $date = '2012-07-19 16:52';
-        $this->assertEquals(strtotime($date), \Magento\Date::toTimestamp($date));
+        $this->assertEquals(strtotime($date), $dateTime->toTimestamp($date));
     }
 
     public function testNow()
     {
-        $this->assertEquals(date(\Magento\Date::DATE_PHP_FORMAT), \Magento\Date::now(true));
-        $this->assertEquals(date(\Magento\Date::DATETIME_PHP_FORMAT), \Magento\Date::now(false));
+        $this->assertEquals(date(\Magento\Stdlib\DateTime::DATE_PHP_FORMAT), $this->_dateTime->now(true));
+        $this->assertEquals(date(\Magento\Stdlib\DateTime::DATETIME_PHP_FORMAT), $this->_dateTime->now(false));
     }
 
     /**
@@ -57,7 +68,8 @@ class DateTest extends \PHPUnit_Framework_TestCase
      */
     public function testFormatDate($date, $includeTime, $expectedFormat, $expectedResult = null)
     {
-        $actual = \Magento\Date::formatDate($date, $includeTime);
+        $dateTime = new \Magento\Stdlib\DateTime;
+        $actual = $dateTime->formatDate($date, $includeTime);
         if ($expectedFormat != '') {
             $expectedResult = date($expectedFormat);
         } else {
@@ -87,4 +99,31 @@ class DateTest extends \PHPUnit_Framework_TestCase
             'Zend Date including Time' => array($date, true, date('Y-m-d H:i:s', $date->getTimestamp())),
         );
     }
+
+    /**
+     * @param string $date
+     * @param bool $expected
+     *
+     * @dataProvider isEmptyDateDataProvider
+     */
+    public function testIsEmptyDate($date, $expected)
+    {
+        $actual = $this->_dateTime->isEmptyDate($date);
+        $this->assertEquals($actual, $expected);
+    }
+
+    /**
+     * @return array
+     */
+    public function isEmptyDateDataProvider()
+    {
+        return array(
+            array('', true),
+            array(' ', true),
+            array('0000-00-00', true),
+            array('0000-00-00 00:00:00', true),
+            array('2000-10-10', false),
+            array('2000-10-10 10:10:10', false),
+        );
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Stdlib/StringTest.php b/dev/tests/unit/testsuite/Magento/Stdlib/StringTest.php
new file mode 100644
index 00000000000..72ccbd682bb
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Stdlib/StringTest.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\Stdlib;
+
+/**
+ * Magento\Stdlib\StringTest test case
+ */
+class StringTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $_string;
+
+    protected function setUp()
+    {
+        $this->_string = new String();
+    }
+
+    /**
+     * @covers \Magento\Stdlib\String::__construct
+     * @covers \Magento\Stdlib\String::split
+     */
+    public function testStrSplit()
+    {
+        $this->assertEquals(array(), $this->_string->split(''));
+        $this->assertEquals(array('1', '2', '3', '4'), $this->_string->split('1234', 1));
+        $this->assertEquals(array('1', '2', ' ', '3', '4'), $this->_string->split('12 34', 1, false, true));
+        $this->assertEquals(array(
+                '12345', '123', '12345', '6789'
+            ), $this->_string->split('12345  123    123456789', 5, true, true));
+    }
+
+    /**
+     * @covers \Magento\Stdlib\String::__construct
+     * @covers \Magento\Stdlib\String::splitInjection
+     */
+    public function testSplitInjection()
+    {
+        $string = '1234567890';
+        $this->assertEquals('1234 5678 90', $this->_string->splitInjection($string, 4));
+    }
+
+    /**
+     * @covers \Magento\Stdlib\String::cleanString
+     */
+    public function testCleanString()
+    {
+        $string = '12345';
+        $this->assertEquals($string, $this->_string->cleanString($string));
+    }
+
+    /**
+     * @covers \Magento\Stdlib\String::strpos
+     */
+    public function testStrpos()
+    {
+        $this->assertEquals(1, $this->_string->strpos('123', 2));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/CompositeScannerTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/CompositeScannerTest.php
index c5c62e6446d..8c0573ec793 100644
--- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/CompositeScannerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/CompositeScannerTest.php
@@ -54,21 +54,23 @@ class CompositeScannerTest extends \PHPUnit_Framework_TestCase
         $scannerPhp = $this->getMock('Magento\Tools\Di\Code\Scanner\ScannerInterface');
         $scannerXml = $this->getMock('Magento\Tools\Di\Code\Scanner\ScannerInterface');
 
+        $scannerPhpExpected = array('Model_OneProxy', 'Model_TwoFactory');
+        $scannerXmlExpected = array('Model_OneProxy', 'Model_ThreeFactory');
         $scannerPhp->expects($this->once())
             ->method('collectEntities')
             ->with($phpFiles)
-            ->will($this->returnValue(array('Model_OneProxy', 'Model_TwoFactory')));
+            ->will($this->returnValue($scannerPhpExpected));
 
         $scannerXml->expects($this->once())
             ->method('collectEntities')
             ->with($configFiles)
-            ->will($this->returnValue(array('Model_OneProxy', 'Model_ThreeFactory')));
+            ->will($this->returnValue($scannerXmlExpected));
 
         $this->_model->addChild($scannerPhp, 'php');
         $this->_model->addChild($scannerXml, 'config');
 
         $actual = $this->_model->collectEntities($files);
-        $expected = array('Model_OneProxy', 'Model_TwoFactory', 'Model_ThreeFactory');
+        $expected = array($scannerPhpExpected, $scannerXmlExpected);
 
         $this->assertEquals($expected, array_values($actual));
     }
diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/PhpScannerTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/PhpScannerTest.php
index b51912f2549..a4444c50efe 100644
--- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/PhpScannerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/PhpScannerTest.php
@@ -21,8 +21,9 @@
  * @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\Test\Tools\Di\Code\Scanner;
+require_once __DIR__  . '/../../_files/app/code/Magento/SomeModule/Helper/Test.php';
+require_once __DIR__ .  '/../../_files/app/code/Magento/SomeModule/ElementFactory.php';
 
 class PhpScannerTest extends \PHPUnit_Framework_TestCase
 {
@@ -41,27 +42,41 @@ class PhpScannerTest extends \PHPUnit_Framework_TestCase
      */
     protected $_testFiles = array();
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_logMock;
+
     protected function setUp()
     {
-        $this->_model = new \Magento\Tools\Di\Code\Scanner\PhpScanner();
+        $this->_model = new \Magento\Tools\Di\Code\Scanner\PhpScanner(
+            $this->_logMock = $this->getMock('\Magento\Tools\Di\Compiler\Log\Log', array(), array(), '', false)
+        );
         $this->_testDir = str_replace('\\', '/', realpath(__DIR__ . '/../../') . '/_files');
         $this->_testFiles = array(
-            $this->_testDir . '/app/code/Magento/SomeModule/Helper/Test.php',
-            $this->_testDir . '/app/code/Magento/SomeModule/Model/Test.php',
-            $this->_testDir . '/app/bootstrap.php',
+            $this->_testDir . '/app/code/Magento/SomeModule/Helper/Test.php'
         );
     }
 
     public function testCollectEntities()
     {
-        $actual = $this->_model->collectEntities($this->_testFiles);
-        $expected = array(
-            'Magento\SomeModule\ElementFactory',
-            'Magento\SomeModule\BlockFactory',
-            'Magento\SomeModule\ModelFactory',
-            'Magento\SomeModule\Model\BlockFactory',
-            'Magento\Bootstrap\ModelFactory',
-        );
-        $this->assertEquals($expected, $actual);
+        $this->_logMock
+            ->expects($this->at(0))
+            ->method('add')
+            ->with(
+                4,
+                'Magento\SomeModule\Module\Factory',
+                'Invalid Factory for nonexistent class Magento\SomeModule\Module in file ' . $this->_testFiles[0]
+            );
+        $this->_logMock
+            ->expects($this->at(1))
+            ->method('add')
+            ->with(
+                4,
+                'Magento\SomeModule\Element\Factory',
+                'Invalid Factory declaration for class Magento\SomeModule\Element in file ' . $this->_testFiles[0]
+            );
+
+        $this->assertEquals(array(), $this->_model->collectEntities($this->_testFiles));
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/XmlScannerTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/XmlScannerTest.php
index 919604d12c8..f95e43866ee 100644
--- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/XmlScannerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/XmlScannerTest.php
@@ -36,6 +36,11 @@ class XmlScannerTest extends \PHPUnit_Framework_TestCase
      */
     protected $_testDir;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_logMock;
+
     /**
      * @var array
      */
@@ -43,27 +48,27 @@ class XmlScannerTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_model = new \Magento\Tools\Di\Code\Scanner\XmlScanner();
+        $this->_model = new \Magento\Tools\Di\Code\Scanner\XmlScanner(
+            $this->_logMock = $this->getMock('\Magento\Tools\Di\Compiler\Log\Log', array(), array(), '', false)
+        );
         $this->_testDir = str_replace('\\', '/', realpath(__DIR__ . '/../../') . '/_files');
         $this->_testFiles =  array(
             $this->_testDir . '/app/code/Magento/SomeModule/etc/adminhtml/system.xml',
             $this->_testDir . '/app/code/Magento/SomeModule/etc/di.xml',
-            $this->_testDir . '/app/code/Magento/SomeModule/view/frontend/default.xml',
-            $this->_testDir . '/app/etc/di/config.xml'
-
+            $this->_testDir . '/app/code/Magento/SomeModule/view/frontend/default.xml'
         );
     }
 
     public function testCollectEntities()
     {
+        $className = 'Magento\Core\Model\Config\Invalidator\Proxy';
+        $this->_logMock->expects($this->at(0))->method('add')->with(4, $className,
+            'Invalid proxy class for ' . substr($className, 0, -5));
+        $this->_logMock->expects($this->at(1))->method('add')->with(4, '\Magento\SomeModule\Model\Element\Proxy',
+            'Invalid proxy class for ' . substr('\Magento\SomeModule\Model\Element\Proxy', 0, -5));
         $actual = $this->_model->collectEntities($this->_testFiles);
         $expected = array(
-            'Magento\Backend\Block\System\Config\Form\Fieldset\Modules\DisableOutput\Proxy',
-            'Magento\Core\Model\App\Proxy',
-            'Magento\Core\Model\Cache\Proxy',
-            'Magento\Backend\Block\Menu\Proxy',
-            'Magento\Core\Model\StoreManager\Proxy',
-            'Magento\Core\Model\Layout\Factory',
+            'Magento\Core\Model\App\Proxy'
         );
         $this->assertEquals($expected, $actual);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DefaultClass.php b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Element.php
similarity index 91%
rename from dev/tests/unit/testsuite/Magento/Core/Model/DefaultClass.php
rename to dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Element.php
index a017a770921..006f225bd9c 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DefaultClass.php
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Element.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * DefaultClass model test class
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -23,9 +21,10 @@
  * @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;
 
+namespace Magento\SomeModule;
 
-class DefaultClass
+class Element
 {
-}
+
+}
\ No newline at end of file
diff --git a/app/code/Magento/Core/Model/EncryptionFactory.php b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/ElementFactory.php
similarity index 63%
rename from app/code/Magento/Core/Model/EncryptionFactory.php
rename to dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/ElementFactory.php
index fb58d683290..8c4adf57236 100644
--- a/app/code/Magento/Core/Model/EncryptionFactory.php
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/ElementFactory.php
@@ -18,19 +18,17 @@
  * 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_Core
  * @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;
-
-class EncryptionFactory
+namespace Magento\SomeModule;
+require_once __DIR__  . '/Element.php';
+class ElementFactory
 {
     /**
-     * @var \Magento\ObjectManager|null
+     * @var \Magento\ObjectManager
      */
-    protected $_objectManager = null;
+    protected $_objectManager;
 
     /**
      * @param \Magento\ObjectManager $objectManager
@@ -42,16 +40,12 @@ class EncryptionFactory
 
     /**
      * @param string $className
-     * @param array $arguments
-     * @return \Magento\Core\Model\EncryptionInterface
-     * @throws \InvalidArgumentException
+     * @param array $data
+     * @return mixed
      */
-    public function create($className, array $arguments = array())
+    public function create($className, array $data = array())
     {
-        $encryption = $this->_objectManager->create($className, $arguments);
-        if (!$encryption instanceof \Magento\Core\Model\EncryptionInterface) {
-            throw new \InvalidArgumentException("'{$className}' don't implement \Magento\Core\Model\EncryptionInterface");
-        }
-        return $encryption;
+        $instance = $this->_objectManager->create($className, $data);
+        return $instance;
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Helper/Test.php b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Helper/Test.php
index eddf1302719..8b294309e19 100644
--- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Helper/Test.php
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Helper/Test.php
@@ -34,22 +34,31 @@ class Test
     protected $_factory;
 
     /**
-     * @var \Magento\SomeModule\Element\Proxy\Factory
+     * @var \Magento\SomeModule\Element\Factory
      */
-    protected $_proxy;
+    protected $_elementFactory;
 
-    public function __construct(\Magento\SomeModule\ElementFactory $factory, \Magento\SomeModule\Element\Proxy $proxy)
-    {
+    /**
+     * @var \Magento\SomeModule\ElementFactory
+     */
+    protected $_newElementFactory;
+
+    public function __construct(
+        \Magento\SomeModule\Module\Factory $factory,
+        \Magento\SomeModule\Element\Factory $elementFactory,
+        \Magento\SomeModule\ElementFactory $rightElementFactory
+    ) {
         $this->_factory = $factory;
-        $this->_proxy = $proxy;
+        $this->_elementFactory = $elementFactory;
+        $this->_newElementFactory = $rightElementFactory;
     }
 
     /**
-     * @param ModelFactory $factory
+     * @param \Magento\SomeModule\ElementFactory $factory
      * @param array $data
      */
-    public function testHelper(ModelFactory $factory, array $data = array())
+    public function testHelper(\Magento\SomeModule\ElementFactory $factory, array $data = array())
     {
-        $factory->create('Magento\SomeModule\BlockFactory', array('data' => $data));
+        $factory->create('\Magento\SomeModule\ElementFactory', array('data' => $data));
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/etc/di.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/etc/di.xml
index a2efb4c4080..9721915a0a2 100644
--- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/etc/di.xml
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/etc/di.xml
@@ -25,9 +25,14 @@
 -->
 <config>
     <preference for="Magento\Core\Model\AppInterface" type="Magento\Core\Model\App\Proxy" />
-    <!--<preference for="Magento\Core\Model\Config\InvalidatorInterface" type="Magento\Core\Model\Config\Invalidator\Proxy" />-->
-    <preference for="Magento\Core\Model\CacheInterface" type="Magento\Core\Model\Cache\Proxy" />
+    <preference for="Magento\Core\Model\Config\InvalidatorInterface" type="Magento\Core\Model\Config\Invalidator\Proxy" />
+    <preference for="Magento\App\CacheInterface" type="Magento\Core\Model\Cache\Proxy" />
     <virtualType name="custom_cache_instance" type="Magento\Core\Model\Cache">
         <plugin name="tag" type="Magento\Core\Model\Cache\TagPlugin" />
     </virtualType>
+    <type name="Magento\SomeModule\Model\Test">
+        <param name="proxy">
+            <instance type="\Magento\SomeModule\Model\Element\Proxy" />
+        </param>
+    </type>
 </config>
diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php
index 565cebd7ed4..36bae277bcc 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php
@@ -61,7 +61,7 @@ class CssTest extends \PHPUnit_Framework_TestCase
         $constructArguments = $objectManagerHelper->getConstructArguments(
             'Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab\Css',
             array(
-                'formFactory'      => $this->getMock('Magento\Data\Form\Factory', array(), array(), '', false),
+                'formFactory'      => $this->getMock('Magento\Data\FormFactory', array(), array(), '', false),
                 'objectManager'   => $this->_objectManager,
                 'dirs'            => new \Magento\App\Dir(__DIR__),
                 'uploaderService' => $this->getMock(
diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/JsTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/JsTest.php
index 7267972f60c..36cc3f092bd 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/JsTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/JsTest.php
@@ -47,7 +47,7 @@ class JsTest extends \PHPUnit_Framework_TestCase
         $constructArguments = $objectManagerHelper->getConstructArguments(
             'Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab\Js',
             array(
-                 'formFactory' => $this->getMock('Magento\Data\Form\Factory', array(), array(), '', false),
+                 'formFactory' => $this->getMock('Magento\Data\FormFactory', array(), array(), '', false),
                  'objectManager' => $this->getMock('Magento\ObjectManager', array(), array(), '', false),
                  'urlBuilder'    => $this->_urlBuilder
             )
diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/TabAbstractTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/TabAbstractTest.php
index c90d3f41576..26bd23fb78c 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/TabAbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/TabAbstractTest.php
@@ -39,7 +39,7 @@ class TabAbstractTest extends \PHPUnit_Framework_TestCase
         $this->_model = $this->getMockForAbstractClass(
             'Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\AbstractTab',
             array(
-                $this->getMock('Magento\Data\Form\Factory', array(), array(), '', false),
+                $this->getMock('Magento\Data\FormFactory', array(), array(), '', false),
                 $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false),
                 $this->getMock('Magento\Backend\Block\Template\Context', array(), array(), '', false),
                 $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false),
diff --git a/dev/tests/unit/testsuite/Magento/User/Model/Acl/Loader/RoleTest.php b/dev/tests/unit/testsuite/Magento/User/Model/Acl/Loader/RoleTest.php
index 820434dedc7..d880f0771c2 100644
--- a/dev/tests/unit/testsuite/Magento/User/Model/Acl/Loader/RoleTest.php
+++ b/dev/tests/unit/testsuite/Magento/User/Model/Acl/Loader/RoleTest.php
@@ -56,7 +56,7 @@ class RoleTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_resourceMock = $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false, false);
+        $this->_resourceMock = $this->getMock('Magento\App\Resource', array(), array(), '', false, false);
         $this->_groupFactoryMock = $this->getMock('Magento\User\Model\Acl\Role\GroupFactory',
             array('create'), array(), '', false
         );
diff --git a/dev/tests/unit/testsuite/Magento/User/Model/Acl/Loader/RuleTest.php b/dev/tests/unit/testsuite/Magento/User/Model/Acl/Loader/RuleTest.php
index 042d4336612..686423505db 100644
--- a/dev/tests/unit/testsuite/Magento/User/Model/Acl/Loader/RuleTest.php
+++ b/dev/tests/unit/testsuite/Magento/User/Model/Acl/Loader/RuleTest.php
@@ -46,7 +46,7 @@ class RuleTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_resourceMock = $this->getMock('Magento\Core\Model\Resource', array(), array(), '', false, false);
+        $this->_resourceMock = $this->getMock('Magento\App\Resource', array(), array(), '', false, false);
         $this->_rootResourceMock = new \Magento\Core\Model\Acl\RootResource('Magento_Adminhtml::all');
         $this->_model = new \Magento\User\Model\Acl\Loader\Rule(
             $this->_rootResourceMock,
diff --git a/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Decorator/ModuleDependencyTest.php b/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Decorator/ModuleDependencyTest.php
index 342eb3f6de3..1fbf1fd9306 100644
--- a/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Decorator/ModuleDependencyTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Decorator/ModuleDependencyTest.php
@@ -56,7 +56,7 @@ class ModuleDependencyTest extends \PHPUnit_Framework_TestCase
         );
 
         $this->_fileSource = $this->getMockForAbstractClass('Magento\View\Layout\File\SourceInterface');
-        $this->_moduleListMock = $this->getMock('Magento\App\ModuleListInterface');
+        $this->_moduleListMock = $this->getMock('Magento\Module\ModuleListInterface');
         $this->_moduleListMock->expects($this->any())->method('getModules')->will($this->returnValue($modulesConfig));
         $this->_model = new \Magento\View\Layout\File\Source\Decorator\ModuleDependency(
             $this->_fileSource, $this->_moduleListMock
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/Edit/Tab/ResourceTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/Edit/Tab/ResourceTest.php
index d9f21469992..d9a5df7ff5a 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/Edit/Tab/ResourceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/Edit/Tab/ResourceTest.php
@@ -41,7 +41,7 @@ class ResourceTest extends \PHPUnit_Framework_TestCase
     {
         $this->_ruleResource = $this->getMockBuilder('Magento\Webapi\Model\Resource\Acl\Rule')
             ->disableOriginalConstructor()
-            ->setMethods(array('getResourceIdsByRole'))
+            ->setMethods(array('getResourceIdsByRole', '__wakeup'))
             ->getMock();
 
         $rootResource = new \Magento\Core\Model\Acl\RootResource('Magento_Webapi');
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/EditTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/EditTest.php
index 62a84a0f20d..975d2519397 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/EditTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/EditTest.php
@@ -40,7 +40,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Core\Helper\Data
      */
-    protected $_coreData;
+    protected $_escaper;
 
     /**
      * @var \Magento\Webapi\Block\Adminhtml\Role\Edit
@@ -50,6 +50,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_urlBuilder = $this->getMockBuilder('Magento\Backend\Model\Url')
+            ->setMethods(array('getUrl'))
             ->disableOriginalConstructor()
             ->getMock();
 
@@ -62,26 +63,31 @@ class EditTest extends \PHPUnit_Framework_TestCase
             ->with('role_id')
             ->will($this->returnValue(1));
 
-        $this->_coreData = $this->getMockBuilder('Magento\Core\Helper\Data')
+        $this->_escaper = $this->getMockBuilder('Magento\Escaper')
             ->disableOriginalConstructor()
             ->setMethods(array('escapeHtml'))
             ->getMock();
 
-        $helperFactory = $this->getMockBuilder('Magento\Core\Model\Factory\Helper')
+        $context = $this->getMockBuilder('Magento\Backend\Block\Template\Context')
             ->disableOriginalConstructor()
-            ->setMethods(array('get'))
+            ->setMethods(array('getEscaper', 'getUrlBuilder', 'getRequest'))
             ->getMock();
 
-        $helperFactory->expects($this->any())
-            ->method('get')
-            ->with($this->equalTo('Magento\Core\Helper\Data'))
-            ->will($this->returnValue($this->_coreData));
+        $context->expects($this->any())
+            ->method('getEscaper')
+            ->will($this->returnValue($this->_escaper));
+
+        $context->expects($this->any())
+            ->method('getUrlBuilder')
+            ->will($this->returnValue($this->_urlBuilder));
+
+        $context->expects($this->any())
+            ->method('getRequest')
+            ->will($this->returnValue($this->_request));
 
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
         $this->_block = $helper->getObject('Magento\Webapi\Block\Adminhtml\Role\Edit', array(
-            'urlBuilder' => $this->_urlBuilder,
-            'request' => $this->_request,
-            'helperFactory' => $helperFactory,
+            'context' => $context
         ));
     }
 
@@ -123,7 +129,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
 
         $apiRole->setId(1)->setRoleName('Test Role');
 
-        $this->_coreData->expects($this->once())
+        $this->_escaper->expects($this->once())
             ->method('escapeHtml')
             ->with($apiRole->getRoleName())
             ->will($this->returnArgument(0));
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/User/EditTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/User/EditTest.php
index f5c0981c179..189829aebe6 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/User/EditTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/User/EditTest.php
@@ -33,9 +33,9 @@ class EditTest extends \PHPUnit_Framework_TestCase
     protected $_request;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Core\Helper\Data
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Escaper
      */
-    protected $_coreData;
+    protected $_escaper;
 
     /**
      * @var \Magento\Webapi\Block\Adminhtml\User\Edit
@@ -53,29 +53,36 @@ class EditTest extends \PHPUnit_Framework_TestCase
             ->with('user_id')
             ->will($this->returnValue(1));
 
-        $this->_coreData = $this->getMockBuilder('Magento\Core\Helper\Data')
+        $this->_escaper = $this->getMockBuilder('Magento\Escaper')
             ->disableOriginalConstructor()
             ->setMethods(array('escapeHtml'))
             ->getMock();
 
-        $helperFactory = $this->getMockBuilder('Magento\Core\Model\Factory\Helper')
+        $urlBuilder = $this->getMockBuilder('Magento\Backend\Model\Url')
+            ->setMethods(array('getUrl'))
             ->disableOriginalConstructor()
-            ->setMethods(array('get'))
             ->getMock();
 
-        $helperFactory->expects($this->any())
-            ->method('get')
-            ->with($this->equalTo('Magento\Core\Helper\Data'))
-            ->will($this->returnValue($this->_coreData));
-
-        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $this->_block = $helper->getObject('Magento\Webapi\Block\Adminhtml\User\Edit', array(
-            // TODO: Remove injecting of 'urlBuilder' after MAGENTOTWO-5038 complete
-            'urlBuilder' => $this->getMockBuilder('Magento\Backend\Model\Url')
-                ->disableOriginalConstructor()
-                ->getMock(),
-            'request' => $this->_request,
-            'helperFactory' => $helperFactory,
+        $context = $this->getMockBuilder('Magento\Backend\Block\Template\Context')
+            ->disableOriginalConstructor()
+            ->setMethods(array('getEscaper', 'getUrlBuilder', 'getRequest'))
+            ->getMock();
+
+        $context->expects($this->any())
+            ->method('getEscaper')
+            ->will($this->returnValue($this->_escaper));
+
+        $context->expects($this->any())
+            ->method('getUrlBuilder')
+            ->will($this->returnValue($urlBuilder));
+
+        $context->expects($this->any())
+            ->method('getRequest')
+            ->will($this->returnValue($this->_request));
+
+        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->_block = $objectManager->getObject('Magento\Webapi\Block\Adminhtml\User\Edit', array(
+            'context' => $context
         ));
     }
 
@@ -103,7 +110,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
 
         $apiUser->setId(1)->setApiKey('test-api');
 
-        $this->_coreData->expects($this->once())
+        $this->_escaper->expects($this->once())
             ->method('escapeHtml')
             ->with($apiUser->getApiKey())
             ->will($this->returnArgument(0));
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php
index d4dcea41061..22e7442c63d 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php
@@ -36,7 +36,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase
     /** @var \Magento\Core\Model\App */
     protected $_appMock;
 
-    /** @var \Magento\Core\Model\Logger */
+    /** @var \Magento\Logger */
     protected $_loggerMock;
 
     protected function setUp()
@@ -50,7 +50,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $this->_loggerMock = $this->getMockBuilder('Magento\Core\Model\Logger')
+        $this->_loggerMock = $this->getMockBuilder('Magento\Logger')
             ->disableOriginalConstructor()
             ->getMock();
 
@@ -218,7 +218,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase
         return array(
             'Magento\Service\ResourceNotFoundException' => array(
                 new \Magento\Service\ResourceNotFoundException('Resource not found', 2345, null,
-                    array('datail1' => 'value1'), 'resource10'),
+                    array('datail1' => 'value1'), 'resourceNotFound', 'resource10'),
                 \Magento\Webapi\Exception::HTTP_NOT_FOUND,
                 'Resource not found',
                 2345,
@@ -226,7 +226,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase
             ),
             'Magento_Service_ResourceNotFoundException (Empty message)' => array(
                 new \Magento\Service\ResourceNotFoundException('', 2345, null,
-                    array('datail1' => 'value1'), 'resource10'),
+                    array('datail1' => 'value1'), 'resourceNotFound', 'resource10'),
                 \Magento\Webapi\Exception::HTTP_NOT_FOUND,
                 "Resource with ID 'resource10' not found.",
                 2345,
@@ -238,6 +238,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase
                     345,
                     null,
                     array(),
+                    'authorization',
                     3,
                     4
                 ),
@@ -247,7 +248,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase
                 array('user_id' => 3, 'resource_id' => 4)
             ),
             'Magento\Service\AuthorizationException (Empty message)' => array(
-                new \Magento\Service\AuthorizationException('', 345, null, array(), 3, 4),
+                new \Magento\Service\AuthorizationException('', 345, null, array(), 'authorization', 3, 4),
                 \Magento\Webapi\Exception::HTTP_UNAUTHORIZED,
                 "User with ID '3' is not authorized to access resource with ID '4'.",
                 345,
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php
index 4e528b33df7..53c28f37b9e 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php
@@ -126,9 +126,6 @@ class RestTest extends \PHPUnit_Framework_TestCase
         $this->_responseMock->expects($this->any())->method('prepareResponse')->will($this->returnValue(array()));
         $this->_requestMock->expects($this->any())->method('getRequestData')->will($this->returnValue(array()));
 
-        /** Assert that response sendResponse method will be executed once. */
-        $this->_responseMock->expects($this->once())->method('sendResponse');
-
         parent::setUp();
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/Resource/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/Resource/Config/SchemaLocatorTest.php
index d3821412539..7409022424d 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/Resource/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/Resource/Config/SchemaLocatorTest.php
@@ -38,7 +38,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_moduleReaderMock = $this->getMock(
-            'Magento\Core\Model\Config\Modules\Reader', array(), array(), '', false
+            'Magento\Module\Dir\Reader', array(), array(), '', false
         );
         $this->_moduleReaderMock->expects($this->once())
             ->method('getModuleDir')->with('etc', 'Magento_Webapi')->will($this->returnValue('schema_dir'));
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/RoleTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/RoleTest.php
index de08d16b286..8a2f99a9f2a 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/RoleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/RoleTest.php
@@ -53,7 +53,7 @@ class RoleTest extends \PHPUnit_Framework_TestCase
 
         $this->_roleService = $this->getMockBuilder('Magento\Webapi\Model\Resource\Acl\Role')
             ->disableOriginalConstructor()
-            ->setMethods(array('getIdFieldName', 'getReadConnection'))
+            ->setMethods(array('getIdFieldName', 'getReadConnection', '__wakeup'))
             ->getMock();
 
         $this->_roleService->expects($this->any())
@@ -78,7 +78,7 @@ class RoleTest extends \PHPUnit_Framework_TestCase
     {
         return $this->_helper->getObject('Magento\Webapi\Model\Acl\Role', array(
             'eventDispatcher' => $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false),
-            'cacheManager' => $this->getMock('Magento\Core\Model\CacheInterface', array(), array(), '', false),
+            'cacheManager' => $this->getMock('Magento\App\CacheInterface', array(), array(), '', false),
             'resource' => $roleService,
             'resourceCollection' => $serviceCollection
         ));
@@ -103,7 +103,7 @@ class RoleTest extends \PHPUnit_Framework_TestCase
         $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
         $fetchStrategy = $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface');
         $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
 
         /** @var \PHPUnit_Framework_MockObject_MockObject $collection */
         $collection = $this->getMock(
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/RuleTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/RuleTest.php
index 65d48c9752e..3553d4dcb84 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/RuleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/RuleTest.php
@@ -53,7 +53,7 @@ class RuleTest extends \PHPUnit_Framework_TestCase
 
         $this->_ruleResource = $this->getMockBuilder('Magento\Webapi\Model\Resource\Acl\Rule')
             ->disableOriginalConstructor()
-            ->setMethods(array('saveResources', 'getIdFieldName', 'getReadConnection'))
+            ->setMethods(array('saveResources', 'getIdFieldName', 'getReadConnection', '__wakeup'))
             ->getMock();
 
         $this->_ruleResource->expects($this->any())
@@ -78,7 +78,7 @@ class RuleTest extends \PHPUnit_Framework_TestCase
     {
         return $this->_helper->getObject('Magento\Webapi\Model\Acl\Rule', array(
             'eventDispatcher' => $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false),
-            'cacheManager' => $this->getMock('Magento\Core\Model\CacheInterface', array(), array(), '', false),
+            'cacheManager' => $this->getMock('Magento\App\CacheInterface', array(), array(), '', false),
             'resource' => $ruleResource,
             'resourceCollection' => $resourceCollection
         ));
@@ -118,7 +118,7 @@ class RuleTest extends \PHPUnit_Framework_TestCase
         $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
         $fetchStrategy = $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface');
         $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
 
         /** @var \PHPUnit_Framework_MockObject_MockObject $collection */
         $collection = $this->getMock(
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/User/RoleUpdaterTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/User/RoleUpdaterTest.php
index 2b92ddd0155..39e93a96f10 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/User/RoleUpdaterTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/User/RoleUpdaterTest.php
@@ -42,7 +42,7 @@ class RoleUpdaterTest extends \PHPUnit_Framework_TestCase
         )));
 
         $userModel = $this->getMockBuilder('Magento\Webapi\Model\Acl\User')
-            ->setMethods(array('getRoleId', 'load'))
+            ->setMethods(array('getRoleId', 'load', '__wakeup'))
             ->disableOriginalConstructor()
             ->getMock();
         $userModel->expects($this->once())->method('load')
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/UserTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/UserTest.php
index 30c183b6cf0..3ceb8777111 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/UserTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Acl/UserTest.php
@@ -53,7 +53,7 @@ class UserTest extends \PHPUnit_Framework_TestCase
 
         $this->_userService = $this->getMockBuilder('Magento\Webapi\Model\Resource\Acl\User')
             ->disableOriginalConstructor()
-            ->setMethods(array('getIdFieldName', 'getRoleUsers', 'load', 'getReadConnection'))
+            ->setMethods(array('getIdFieldName', 'getRoleUsers', 'load', 'getReadConnection', '__wakeup'))
             ->getMock();
 
         $this->_userService->expects($this->any())
@@ -78,7 +78,7 @@ class UserTest extends \PHPUnit_Framework_TestCase
     {
         return $this->_helper->getObject('Magento\Webapi\Model\Acl\User', array(
             'eventDispatcher' => $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false),
-            'cacheManager' => $this->getMock('Magento\Core\Model\CacheInterface', array(), array(), '', false),
+            'cacheManager' => $this->getMock('Magento\App\CacheInterface', array(), array(), '', false),
             'resource' => $userService,
             'resourceCollection' => $serviceCollection
         ));
@@ -149,7 +149,7 @@ class UserTest extends \PHPUnit_Framework_TestCase
         $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
         $fetchStrategy = $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface');
         $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
 
         /** @var \PHPUnit_Framework_MockObject_MockObject $collection */
         $collection = $this->getMock(
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Authorization/Loader/RoleTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Authorization/Loader/RoleTest.php
index 2602270e3d2..7a9f10ce4c0 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Authorization/Loader/RoleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Authorization/Loader/RoleTest.php
@@ -55,7 +55,7 @@ class RoleTest extends \PHPUnit_Framework_TestCase
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
 
         $this->_resourceModelMock = $this->getMock('Magento\Webapi\Model\Resource\Acl\Role',
-            array('getRolesIds'), array(), '', false);
+            array('getRolesIds', '__wakeup'), array(), '', false);
 
         $this->_roleFactory = $this->getMock('Magento\Webapi\Model\Authorization\Role\Factory',
             array('createRole'), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Authorization/Loader/RuleTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Authorization/Loader/RuleTest.php
index 5f9a1787cb7..f2a238264d4 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Authorization/Loader/RuleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Authorization/Loader/RuleTest.php
@@ -50,7 +50,7 @@ class RuleTest extends \PHPUnit_Framework_TestCase
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
 
         $this->_ruleResource = $this->getMock('Magento\Webapi\Model\Resource\Acl\Rule',
-            array('getRuleList'), array(), '', false);
+            array('getRuleList', '__wakeup'), array(), '', false);
 
         $this->_acl = $this->getMock('Magento\Acl', array('has', 'hasRole', 'allow'), array(), '', false);
 
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/ConverterTest.php
new file mode 100644
index 00000000000..ffbd0dbd299
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/ConverterTest.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\Webapi\Model\Config;
+
+class ConverterTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Webapi\Model\Config\Converter
+     */
+    protected $_model;
+
+    public function setUp()
+    {
+        $this->_model = new \Magento\Webapi\Model\Config\Converter();
+    }
+
+    public function testConvert()
+    {
+        $inputData = new \DOMDocument();
+        $inputData->load(__DIR__ . '/_files/webapi.xml');
+        $expectedResult = require __DIR__ . '/_files/webapi.php';
+        $this->assertEquals($expectedResult, $this->_model->convert($inputData));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/_files/webapi.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/_files/webapi.php
new file mode 100644
index 00000000000..ab528f2622e
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/_files/webapi.php
@@ -0,0 +1,65 @@
+<?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)
+ */
+return array(
+    '\Magento\TestModule1\Service\AllSoapAndRestV1Interface' => array(
+        'class' => '\Magento\TestModule1\Service\AllSoapAndRestV1Interface',
+        'baseUrl' => '/V1/testmodule1',
+        'methods' => array(
+            'item' => array(
+                'httpMethod' => 'GET',
+                'method' => 'item',
+                'route' => '/:id',
+                'isSecure' => false
+            )
+        )
+    ),
+    '\Magento\TestModule1\Service\AllSoapAndRestV2Interface' => array(
+        'class' => '\Magento\TestModule1\Service\AllSoapAndRestV2Interface',
+        'baseUrl' => '/V2/testmodule1',
+        'methods' => array(
+            'item' => array(
+                'httpMethod' => 'GET',
+                'method' => 'item',
+                'route' => '/:id',
+                'isSecure' => false
+            ),
+            'create' => array(
+                'httpMethod' => 'POST',
+                'method' => 'create',
+                'route' => '',
+                'isSecure' => false
+            ),
+            'delete' => array(
+                'httpMethod' => 'DELETE',
+                'method' => 'delete',
+                'route' => '/:id',
+                'isSecure' => true
+            ),
+        )
+    ),
+    '\Magento\TestModule1\Service\AllSoapAndRestV3Interface' => array(
+        'class' => '\Magento\TestModule1\Service\AllSoapAndRestV3Interface',
+        'methods' => array()
+    ),
+);
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/_files/webapi.xml b/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/_files/webapi.xml
new file mode 100644
index 00000000000..2ab43187f04
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/_files/webapi.xml
@@ -0,0 +1,38 @@
+<?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>
+    <service class="\Magento\TestModule1\Service\AllSoapAndRestV1Interface" baseUrl="/V1/testmodule1">
+        <rest-route httpMethod="GET" method="item">/:id</rest-route>
+    </service>
+
+    <service class="\Magento\TestModule1\Service\AllSoapAndRestV2Interface" baseUrl="/V2/testmodule1">
+        <rest-route httpMethod="GET" method="item">/:id</rest-route>
+        <rest-route httpMethod="POST" method="create"></rest-route>
+        <rest-route httpMethod="DELETE" method="delete" isSecure="true">/:id</rest-route>
+    </service>
+
+    <service class="\Magento\TestModule1\Service\AllSoapAndRestV3Interface"/>
+</config>
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/AbstractTest.php
index 6ae97da246c..cf5cceef84e 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/AbstractTest.php
@@ -38,7 +38,7 @@ abstract class AbstractTest extends \PHPUnit_Framework_TestCase
     protected $_objectManager;
 
     /**
-     * @var \Magento\Core\Model\Resource|PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Resource|PHPUnit_Framework_MockObject_MockObject
      */
     protected $_resource;
 
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/RoleTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/RoleTest.php
index 9603364f9d8..c39b323879c 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/RoleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/RoleTest.php
@@ -35,7 +35,7 @@ class RoleTest extends \Magento\Webapi\Model\Resource\Acl\AbstractTest
      */
     protected function _createModel($selectMock = null)
     {
-        $this->_resource = $this->getMockBuilder('Magento\Core\Model\Resource')
+        $this->_resource = $this->getMockBuilder('Magento\App\Resource')
             ->disableOriginalConstructor()
             ->setMethods(array('getConnection', 'getTableName'))
             ->getMock();
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/RuleTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/RuleTest.php
index 1fa8dc66e4b..dc5c59d30c8 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/RuleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/RuleTest.php
@@ -35,7 +35,7 @@ class RuleTest extends \Magento\Webapi\Model\Resource\Acl\AbstractTest
      */
     protected function _createModel($selectMock = null)
     {
-        $this->_resource = $this->getMockBuilder('Magento\Core\Model\Resource')
+        $this->_resource = $this->getMockBuilder('Magento\App\Resource')
             ->disableOriginalConstructor()
             ->setMethods(array('getConnection', 'getTableName'))
             ->getMock();
@@ -150,7 +150,7 @@ class RuleTest extends \Magento\Webapi\Model\Resource\Acl\AbstractTest
         // Init rule resource.
         $ruleResource = $this->getMockBuilder('Magento\Webapi\Model\Resource\Acl\Rule')
             ->disableOriginalConstructor()
-            ->setMethods(array('saveResources', 'getIdFieldName', 'getReadConnection', 'getResources'))
+            ->setMethods(array('saveResources', 'getIdFieldName', 'getReadConnection', 'getResources', '__wakeup'))
             ->getMock();
 
         $ruleResource->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/UserTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/UserTest.php
index 9abc8ede140..cb385823df3 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/UserTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Resource/Acl/UserTest.php
@@ -35,7 +35,7 @@ class UserTest extends \Magento\Webapi\Model\Resource\Acl\AbstractTest
      */
     protected function _createModel($selectMock = null)
     {
-        $this->_resource = $this->getMockBuilder('Magento\Core\Model\Resource')
+        $this->_resource = $this->getMockBuilder('Magento\App\Resource')
             ->disableOriginalConstructor()
             ->setMethods(array('getConnection', 'getTableName'))
             ->getMock();
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php
index deb72f4b145..fcdac66585c 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php
@@ -35,22 +35,26 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     /** @var \Magento\Webapi\Model\Soap\Config */
     protected $_soapConfig;
 
+    /** @var \Magento\Webapi\Model\Config|\PHPUnit_Framework_MockObject_MockObject */
+    protected $_configMock;
+
     /**
      * Set up helper.
      */
     protected function setUp()
     {
-        $objectManagerMock = $this->getMockBuilder('Magento\Core\Model\ObjectManager')
+        $objectManagerMock = $this->getMockBuilder('Magento\App\ObjectManager')
             ->disableOriginalConstructor()
             ->getMock();
         $fileSystemMock = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
         $dirMock = $this->getMockBuilder('Magento\App\Dir')->disableOriginalConstructor()->getMock();
-        $configMock = $this->getMockBuilder('Magento\Webapi\Model\Config')->disableOriginalConstructor()->getMock();
+        $this->_configMock = $this->getMockBuilder('Magento\Webapi\Model\Config')
+            ->disableOriginalConstructor()->getMock();
         $this->_soapConfig = new \Magento\Webapi\Model\Soap\Config(
             $objectManagerMock,
             $fileSystemMock,
             $dirMock,
-            $configMock
+            $this->_configMock
         );
         parent::setUp();
     }
@@ -86,4 +90,97 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             array('Magento\Catalog\Service\ProductV2Interface', true, array('CatalogProduct', 'V2'))
         );
     }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     * @dataProvider dataProviderForTestGetServiceNamePartsInvalidName
+     */
+    public function testGetServiceNamePartsInvalidName($interfaceClassName)
+    {
+        $this->_soapConfig->getServiceNameParts($interfaceClassName);
+    }
+
+    public function dataProviderForTestGetServiceNamePartsInvalidName()
+    {
+        return array(
+            array('BarV1Interface'), // Missed vendor, module, 'Service'
+            array('Service\\V1Interface'), // Missed vendor and module
+            array('Magento\\Foo\\Service\\BarVxInterface'), // Version number should be a number
+            array('Magento\\Foo\\Service\\BarInterface'), // Version missed
+            array('Magento\\Foo\\Service\\BarV1'), // 'Interface' missed
+            array('Foo\\Service\\BarV1Interface'), // Module missed
+            array('Foo\\BarV1Interface'), // Module and 'Service' missed
+        );
+    }
+
+    public function testGetRequestedSoapServices()
+    {
+        $servicesConfig = array(
+            'Magento\Module\Service\FooV1Interface' => array(
+                'class' => 'Magento\Module\Service\FooV1Interface',
+                'baseUrl' => '/V1/foo',
+                'methods' => array(
+                    'someMethod' => array(
+                        'httpMethod' => 'GET',
+                        'method' => 'someMethod',
+                        'route' => '',
+                        'isSecure' => false
+                    )
+                )
+            ),
+            'Magento\Module\Service\BarV1Interface' => array(
+                'class' => 'Magento\Module\Service\BarV1Interface',
+                'baseUrl' => '/V1/bar',
+                'methods' => array(
+                    'someMethod' => array(
+                        'httpMethod' => 'GET',
+                        'method' => 'someMethod',
+                        'route' => '',
+                        'isSecure' => false
+                    )
+                )
+            )
+        );
+
+        $expectedResult = array(
+            array(
+                'methods' => array(
+                    'someMethod' => array(
+                        'method' => 'someMethod',
+                        'inputRequired' => '',
+                        'isSecure' => ''
+                    )
+                ),
+                'class' => 'Magento\Module\Service\FooV1Interface'
+            )
+        );
+
+        $this->_configMock->expects($this->once())->method('getServices')->will($this->returnValue($servicesConfig));
+        $result = $this->_soapConfig->getRequestedSoapServices(array('moduleFooV1', 'moduleBarV2', 'moduleBazV1'));
+        $this->assertEquals($expectedResult, $result);
+    }
+}
+
+namespace Magento\Module\Service;
+
+interface FooV1Interface
+{
+    public function someMethod();
+}
+
+interface BarV1Interface
+{
+    public function someMethod();
+}
+
+interface FooBarV1Interface
+{
+    public function someMethod();
+}
+
+namespace Magento\Module\Service\Foo;
+
+interface BarV1Interface
+{
+    public function someMethod();
 }
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/FaultTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/FaultTest.php
index 7a4ee844a76..efc478e3751 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/FaultTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/FaultTest.php
@@ -27,9 +27,14 @@ namespace Magento\Webapi\Model\Soap;
 
 class FaultTest extends \PHPUnit_Framework_TestCase
 {
+    const WSDL_URL = 'http://host.com/?wsdl&services=customerV1';
+
     /** @var \Magento\Core\Model\App */
     protected $_appMock;
 
+    /** @var \Magento\Webapi\Model\Soap\Server */
+    protected $_soapServerMock;
+
     /** @var \Magento\Webapi\Model\Soap\Fault */
     protected $_soapFault;
 
@@ -51,7 +56,15 @@ class FaultTest extends \PHPUnit_Framework_TestCase
             \Magento\Webapi\Exception::HTTP_INTERNAL_ERROR,
             $details
         );
-        $this->_soapFault = new \Magento\Webapi\Model\Soap\Fault($this->_appMock, $webapiException);
+        $this->_soapServerMock = $this->getMockBuilder('Magento\Webapi\Model\Soap\Server')->disableOriginalConstructor()
+            ->getMock();
+        $this->_soapServerMock->expects($this->any())->method('generateUri')->will($this->returnValue(self::WSDL_URL));
+
+        $this->_soapFault = new \Magento\Webapi\Model\Soap\Fault(
+            $this->_appMock,
+            $this->_soapServerMock,
+            $webapiException
+        );
         parent::setUp();
     }
 
@@ -65,9 +78,10 @@ class FaultTest extends \PHPUnit_Framework_TestCase
     public function testToXmlDeveloperModeOff()
     {
         $this->_appMock->expects($this->any())->method('isDeveloperMode')->will($this->returnValue(false));
+        $wsdlUrl = urlencode(self::WSDL_URL);
         $expectedResult = <<<XML
 <?xml version="1.0" encoding="utf-8" ?>
-<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="http://magento.com">
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="{$wsdlUrl}">
     <env:Body>
         <env:Fault>
             <env:Code>
@@ -77,22 +91,23 @@ class FaultTest extends \PHPUnit_Framework_TestCase
                 <env:Text xml:lang="en">Soap fault reason.</env:Text>
             </env:Reason>
             <env:Detail>
-                <m:ErrorDetails>
+                <m:DefaultFault>
                     <m:Parameters>
                         <m:param1>value1</m:param1>
                         <m:param2>2</m:param2>
                     </m:Parameters>
                     <m:Code>111</m:Code>
-                </m:ErrorDetails>
+                </m:DefaultFault>
             </env:Detail>
         </env:Fault>
     </env:Body>
 </env:Envelope>
 XML;
+
         $actualXml = $this->_soapFault->toXml();
-        $this->assertXmlStringEqualsXmlString(
-            $expectedResult,
-            $actualXml,
+        $this->assertEquals(
+            $this->_sanitizeXML($expectedResult),
+            $this->_sanitizeXML($actualXml),
             'Wrong SOAP fault message with default parameters.'
         );
     }
@@ -121,7 +136,12 @@ XML;
             $faultCode,
             $additionalParameters
         );
-        $this->assertXmlStringEqualsXmlString($expectedResult, $actualResult, $assertMessage);
+        $wsdlUrl = urlencode(self::WSDL_URL);
+        $this->assertEquals(
+            $this->_sanitizeXML(str_replace('{wsdl_url}', $wsdlUrl, $expectedResult)),
+            $this->_sanitizeXML($actualResult),
+            $assertMessage
+        );
     }
 
     /**
@@ -186,12 +206,14 @@ XML;
         );
         $soapFault = new \Magento\Webapi\Model\Soap\Fault(
             $this->_appMock,
+            $this->_soapServerMock,
             $webapiException
         );
         $actualXml = $soapFault->toXml();
+        $wsdlUrl = urlencode(self::WSDL_URL);
         $expectedXml = <<<FAULT_XML
 <?xml version="1.0" encoding="utf-8" ?>
-<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="http://magento.com">
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="{$wsdlUrl}">
     <env:Body>
         <env:Fault>
             <env:Code>
@@ -201,18 +223,38 @@ XML;
                 <env:Text xml:lang="en">{$message}</env:Text>
             </env:Reason>
             <env:Detail>
-                <m:ErrorDetails>
+                <m:DefaultFault>
                     <m:Parameters>
                         <m:param1>value1</m:param1>
                         <m:param2>2</m:param2>
                     </m:Parameters>
                     <m:Code>{$code}</m:Code>
-                </m:ErrorDetails>
+                </m:DefaultFault>
             </env:Detail>
         </env:Fault>
     </env:Body>
 </env:Envelope>
 FAULT_XML;
-        $this->assertXmlStringEqualsXmlString($expectedXml, $actualXml, "Soap fault is invalid.");
+
+        $this->assertEquals(
+            $this->_sanitizeXML($expectedXml),
+            $this->_sanitizeXML($actualXml),
+            "Soap fault is invalid."
+        );
+    }
+
+    /**
+     * Convert XML to string.
+     *
+     * @param string $xmlString
+     * @return string
+     */
+    protected function _sanitizeXML($xmlString)
+    {
+        $dom = new \DOMDocument(1.0);
+        $dom->preserveWhiteSpace = false;
+        $dom->formatOutput = false; // Only useful for "pretty" output with saveXML()
+        $dom->loadXML($xmlString); // Must be done AFTER preserveWhiteSpace and formatOutput are set
+        return $dom->saveXML();
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/_files/soap_fault/soap_fault_expected_xmls.php b/dev/tests/unit/testsuite/Magento/Webapi/_files/soap_fault/soap_fault_expected_xmls.php
index c98bb002f38..a751db82cd6 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/_files/soap_fault/soap_fault_expected_xmls.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/_files/soap_fault/soap_fault_expected_xmls.php
@@ -26,7 +26,7 @@
 return array(
     'expectedResultArrayDataDetails' =>
     '<?xml version="1.0" encoding="utf-8" ?>
-    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="http://magento.com">
+    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="{wsdl_url}">
         <env:Body>
             <env:Fault>
                 <env:Code>
@@ -36,10 +36,10 @@ return array(
                     <env:Text xml:lang="en">Fault reason</env:Text>
                 </env:Reason>
                 <env:Detail>
-                    <m:ErrorDetails>
+                    <m:DefaultFault>
                         <m:key1>value1</m:key1>
                         <m:key2>value2</m:key2>
-                    </m:ErrorDetails>
+                    </m:DefaultFault>
                 </env:Detail>
             </env:Fault>
         </env:Body>
@@ -88,7 +88,7 @@ return array(
     </env:Envelope>',
     'expectedResultComplexDataDetails' =>
     '<?xml version = "1.0" encoding = "utf-8" ?>
-    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="http://magento.com">
+    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="{wsdl_url}">
         <env:Body>
             <env:Fault>
                 <env:Code>
@@ -98,11 +98,11 @@ return array(
                     <env:Text xml:lang="en">Fault reason</env:Text>
                 </env:Reason>
                 <env:Detail>
-                    <m:ErrorDetails>
+                    <m:DefaultFault>
                         <m:key>
                             <m:sub_key>value</m:sub_key>
                         </m:key>
-                    </m:ErrorDetails>
+                    </m:DefaultFault>
                 </env:Detail>
             </env:Fault>
         </env:Body>
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/FormTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/FormTest.php
index 5e14c3aa189..58835ea62e9 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/FormTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/FormTest.php
@@ -52,7 +52,7 @@ class FormTest extends \Magento\Test\Block\Adminhtml
         parent::setUp();
         $this->_registry = new \Magento\Core\Model\Registry();
         $this->_coreData = $this->_makeMock('Magento\Core\Helper\Data');
-        $this->_formFactoryMock = $this->getMock('Magento\Data\Form\Factory', array('create'),
+        $this->_formFactoryMock = $this->getMock('Magento\Data\FormFactory', array('create'),
             array(), '', false, false);
 
         $this->_dataFormMock = $this->_makeMock('Magento\Data\Form');
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/Edit/FormTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/Edit/FormTest.php
index 80746bc834b..31b3dea7b7b 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/Edit/FormTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/Edit/FormTest.php
@@ -61,7 +61,7 @@ class FormTest extends \Magento\Test\Block\Adminhtml
 
     public function testPrepareColumns()
     {
-        $this->_formFactoryMock = $this->getMock('Magento\Data\Form\Factory', array('create'),
+        $this->_formFactoryMock = $this->getMock('Magento\Data\FormFactory', array('create'),
             array(), '', false, false);
         $this->_registry = new \Magento\Core\Model\Registry();
         $this->_coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php
index d4b772630f3..dfc83f0f477 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php
@@ -308,7 +308,7 @@ class RegistrationTest extends \PHPUnit_Framework_TestCase
         $this->_mockObjectManager = $this->getMockBuilder('Magento\ObjectManager')
             ->disableOriginalConstructor()
             ->getMock();
-        \Magento\Core\Model\ObjectManager::setInstance($this->_mockObjectManager);
+        \Magento\App\ObjectManager::setInstance($this->_mockObjectManager);
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php
index 4c350d71590..7330729fef1 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php
@@ -534,7 +534,7 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
         $this->_mockObjectManager = $this->getMockBuilder('Magento\ObjectManager')
             ->disableOriginalConstructor()
             ->getMock();
-        \Magento\Core\Model\ObjectManager::setInstance($this->_mockObjectManager);
+        \Magento\App\ObjectManager::setInstance($this->_mockObjectManager);
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/EndpointTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/EndpointTest.php
index 249cd8927be..c2aa0c9a9cf 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/EndpointTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/EndpointTest.php
@@ -75,13 +75,15 @@ class EndpointTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($mockWebhookUser));
 
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
 
         // we have to use a mock because ancestor code utilizes deprecated static methods
         $this->_endpoint = $this->getMockBuilder('Magento\Webhook\Model\Endpoint')
             ->setConstructorArgs(array(
                 $this->_mockContext,
                 $coreRegistry,
-                $this->_mockUserFactory
+                $this->_mockUserFactory,
+                $dateTime
             ))
             ->setMethods(array('_init'))
             ->getMock();
@@ -131,6 +133,7 @@ class EndpointTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($mockEventManager));
 
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', array('formatDate'), array(), '', true);
 
         // we have to use a mock because ancestor code utilizes deprecated static methods
         $this->_endpoint = $this->getMockBuilder('Magento\Webhook\Model\Endpoint')
@@ -138,6 +141,7 @@ class EndpointTest extends \PHPUnit_Framework_TestCase
                 $this->_mockContext,
                 $coreRegistry,
                 $this->_mockUserFactory,
+                $dateTime
             ))
             ->setMethods(
                 array('_init', '_getResource', 'hasAuthenticationType', 'setAuthenticationType', 'setUpdatedAt',
@@ -164,7 +168,7 @@ class EndpointTest extends \PHPUnit_Framework_TestCase
 
         if ($hasDataChanges) {
             $someFormattedTime = '2013-07-10 12:35:28';
-            $this->_mockResourceEndpnt->expects($this->once())
+            $dateTime->expects($this->once())
                 ->method('formatDate')
                 ->withAnyParameters() // impossible to predict what time() will be
                 ->will($this->returnValue($someFormattedTime));
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/EventTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/EventTest.php
index 5d6eb4b7535..cf17c8df596 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/EventTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/EventTest.php
@@ -44,6 +44,11 @@ class EventTest extends \PHPUnit_Framework_TestCase
      */
     protected $_event;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Stdlib\DateTime
+     */
+    protected $_dateTime;
+
     protected function setUp()
     {
         $this->_mockContext = $this->getMockBuilder('Magento\Core\Model\Context')
@@ -59,9 +64,10 @@ class EventTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($mockEventManager));
 
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
+        $this->_dateTime = $this->getMock('Magento\Stdlib\DateTime', array('formatDate'), array(), '', true);
 
         $this->_event = $this->getMockBuilder('Magento\Webhook\Model\Event')
-            ->setConstructorArgs(array($this->_mockContext, $coreRegistry))
+            ->setConstructorArgs(array($this->_mockContext, $coreRegistry, $this->_dateTime))
             ->setMethods(
                 array('_init', 'isDeleted', 'isObjectNew', 'getId', '_hasModelChanged', '_getResource')
             )
@@ -77,15 +83,15 @@ class EventTest extends \PHPUnit_Framework_TestCase
             ->withAnyParameters()
             ->will($this->returnValue(true));
 
-        $mockResource = $this->getMockBuilder('Magento\Webhook\Model\Resource\Event')
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $mockResource->expects($this->any())
+        $this->_dateTime->expects($this->atLeastOnce())
             ->method('formatDate')
             ->with($this->equalTo(true))
             ->will($this->returnValue(self::SOME_FORMATTED_TIME));
 
+        $mockResource = $this->getMockBuilder('Magento\Webhook\Model\Resource\Event')
+            ->disableOriginalConstructor()
+            ->getMock();
+
         // needed for 'save' method
         $mockResource->expects($this->once())
             ->method('addCommitCallback')
@@ -134,14 +140,15 @@ class EventTest extends \PHPUnit_Framework_TestCase
             ->withAnyParameters()
             ->will($this->returnValue(true));
 
-        $mockResource = $this->getMockBuilder('Magento\Webhook\Model\Resource\Event')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $mockResource->expects($this->any())
+        $this->_dateTime->expects($this->atLeastOnce())
             ->method('formatDate')
             ->with($this->equalTo(true))
             ->will($this->returnValue(self::SOME_FORMATTED_TIME));
 
+        $mockResource = $this->getMockBuilder('Magento\Webhook\Model\Resource\Event')
+            ->disableOriginalConstructor()
+            ->getMock();
+
         // needed for 'save' method
         $mockResource->expects($this->once())
             ->method('addCommitCallback')
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/JobTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/JobTest.php
index f169685cf82..17556974299 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/JobTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/JobTest.php
@@ -63,13 +63,15 @@ class JobTest extends \PHPUnit_Framework_TestCase
             ->getMock();
 
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
 
         $this->_job = $this->getMockBuilder('Magento\Webhook\Model\Job')
             ->setConstructorArgs(array(
                 $this->_mockEventFactory,
                 $this->_mockSubscrFactory,
                 $this->_mockContext,
-                $coreRegistry
+                $coreRegistry,
+                $dateTime
             ))
             ->setMethods(array('_init', 'save'))
             ->getMock();
@@ -101,12 +103,15 @@ class JobTest extends \PHPUnit_Framework_TestCase
 
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
 
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
+
         $this->_job = $this->getMockBuilder('Magento\Webhook\Model\Job')
             ->setConstructorArgs(array(
                 $this->_mockEventFactory,
                 $this->_mockSubscrFactory,
                 $this->_mockContext,
                 $coreRegistry,
+                $dateTime,
                 null,
                 null,
                 $data
@@ -136,12 +141,15 @@ class JobTest extends \PHPUnit_Framework_TestCase
 
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
 
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
+
         $this->_job = $this->getMockBuilder('Magento\Webhook\Model\Job')
             ->setConstructorArgs(array(
                 $this->_mockEventFactory,
                 $this->_mockSubscrFactory,
                 $this->_mockContext,
                 $coreRegistry,
+                $dateTime,
                 null,
                 null,
                 $data
@@ -173,12 +181,15 @@ class JobTest extends \PHPUnit_Framework_TestCase
 
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
 
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
+
         $this->_job = $this->getMockBuilder('Magento\Webhook\Model\Job')
             ->setConstructorArgs(array(
                 $this->_mockEventFactory,
                 $this->_mockSubscrFactory,
                 $this->_mockContext,
                 $coreRegistry,
+                $dateTime,
                 null,
                 null,
                 $data
@@ -209,12 +220,15 @@ class JobTest extends \PHPUnit_Framework_TestCase
 
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
 
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
+
         $this->_job = $this->getMockBuilder('Magento\Webhook\Model\Job')
             ->setConstructorArgs(array(
                 $this->_mockEventFactory,
                 $this->_mockSubscrFactory,
                 $this->_mockContext,
                 $coreRegistry,
+                $dateTime,
                 null,
                 null,
                 $data
@@ -245,12 +259,15 @@ class JobTest extends \PHPUnit_Framework_TestCase
 
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
 
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
+
         $this->_job = $this->getMockBuilder('Magento\Webhook\Model\Job')
             ->setConstructorArgs(array(
                 $this->_mockEventFactory,
                 $this->_mockSubscrFactory,
                 $this->_mockContext,
                 $coreRegistry,
+                $dateTime,
                 null,
                 null,
                 $data
@@ -308,12 +325,15 @@ class JobTest extends \PHPUnit_Framework_TestCase
     {
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
 
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
+
         $this->_job = $this->getMockBuilder('Magento\Webhook\Model\Job')
             ->setConstructorArgs(array(
                 $this->_mockEventFactory,
                 $this->_mockSubscrFactory,
                 $this->_mockContext,
-                $coreRegistry
+                $coreRegistry,
+                $dateTime
             ))
             ->setMethods(array('_init', 'save', 'getRetryCount', 'setUpdatedAt', 'setStatus'))
             ->getMock();
@@ -342,12 +362,15 @@ class JobTest extends \PHPUnit_Framework_TestCase
     {
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
 
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
+
         $this->_job = $this->getMockBuilder('Magento\Webhook\Model\Job')
             ->setConstructorArgs(array(
                 $this->_mockEventFactory,
                 $this->_mockSubscrFactory,
                 $this->_mockContext,
-                $coreRegistry
+                $coreRegistry,
+                $dateTime,
             ))
             ->setMethods(array('_init', 'save', 'getRetryCount', 'setStatus'))
             ->getMock();
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/ObserverTest.php
index d4d38bc5c57..b68955413fd 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/ObserverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/ObserverTest.php
@@ -45,7 +45,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
     {
         $this->_webapiEventHandler = $this->_getBasicMock('Magento\Webhook\Model\Webapi\EventHandler');
         $this->_subscriptionSet = $this->_getBasicMock('Magento\Webhook\Model\Resource\Subscription\Collection');
-        $this->_logger = $this->_getBasicMock('Magento\Core\Model\Logger');
+        $this->_logger = $this->_getBasicMock('Magento\Logger');
 
         $this->_observer = new \Magento\Webhook\Model\Observer(
             $this->_webapiEventHandler,
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/EndpointTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/EndpointTest.php
index 3cb8c7fc2c3..c28c2c2d3a2 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/EndpointTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/EndpointTest.php
@@ -69,7 +69,7 @@ class EndpointTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue(1));
 
         // Resources mock
-        $this->_resourceMock = $this->_makeMock('Magento\Core\Model\Resource');
+        $this->_resourceMock = $this->_makeMock('Magento\App\Resource');
         // Resources stubs
         $stubReturnMap = array(
             array('core_read', $this->_adapterMock),
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Event/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Event/CollectionTest.php
index 128a7b9d3e5..4072a08393f 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Event/CollectionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Event/CollectionTest.php
@@ -39,6 +39,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
             ->getMock();
         /** @var \Magento\Core\Model\EntityFactory $entityFactory */
         $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false);
+        $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
 
         $mockDBAdapter = $this->getMockBuilder('Magento\DB\Adapter\Pdo\Mysql')
             ->disableOriginalConstructor()
@@ -50,10 +51,10 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
         $mockResourceEvent->expects($this->any())
             ->method('getReadConnection')
             ->will($this->returnValue($mockDBAdapter));
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
 
         $collection = new \Magento\Webhook\Model\Resource\Event\Collection(
-            $eventManager, $logger, $mockFetchStrategy, $entityFactory, $mockResourceEvent
+            $eventManager, $logger, $mockFetchStrategy, $entityFactory, $dateTime, $mockResourceEvent
         );
         $this->assertInstanceOf('Magento\Webhook\Model\Resource\Event\Collection', $collection);
         $this->assertEquals('Magento\Webhook\Model\Resource\Event', $collection->getResourceModelName());
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/EventTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/EventTest.php
index 90e1bf69338..25eb322042b 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/EventTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/EventTest.php
@@ -34,7 +34,7 @@ class EventTest extends \PHPUnit_Framework_TestCase
         $tableName = 'webhook_event_table';
         $idFieldName = 'event_id';
 
-        $resourceMock = $this->getMockBuilder('Magento\Core\Model\Resource')
+        $resourceMock = $this->getMockBuilder('Magento\App\Resource')
             ->disableOriginalConstructor()
             ->getMock();
         $resourceMock->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Job/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Job/CollectionTest.php
index ec79757386f..b927e29df75 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Job/CollectionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Job/CollectionTest.php
@@ -39,9 +39,10 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
             ->getMock();
         /** @var \Magento\Core\Model\EntityFactory $entityFactory */
         $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false);
+        $dateTime = new \Magento\Stdlib\DateTime;
         $mockDBAdapter = $this->getMockBuilder('Magento\DB\Adapter\Pdo\Mysql')
             ->disableOriginalConstructor()
-            ->setMethods(array('_connect', '_quote'))
+            ->setMethods(array('_connect', '_quote', 'formatDate'))
             ->getMockForAbstractClass();
         $mockResourceEvent = $this->getMockBuilder('Magento\Webhook\Model\Resource\Job')
             ->disableOriginalConstructor()
@@ -49,10 +50,10 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
         $mockResourceEvent->expects($this->once())
             ->method('getReadConnection')
             ->will($this->returnValue($mockDBAdapter));
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
 
         $collection = new \Magento\Webhook\Model\Resource\Job\Collection(
-            $eventManager, $logger, $mockFetchStrategy, $entityFactory, $mockResourceEvent
+            $eventManager, $logger, $mockFetchStrategy, $entityFactory, $dateTime, $mockResourceEvent
         );
         $this->assertInstanceOf('Magento\Webhook\Model\Resource\Job\Collection', $collection);
         $this->assertEquals('Magento\Webhook\Model\Resource\Job', $collection->getResourceModelName());
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/JobTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/JobTest.php
index 7093f6b0b6f..532478df641 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/JobTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/JobTest.php
@@ -33,7 +33,7 @@ class JobTest extends \PHPUnit_Framework_TestCase
     {
         $tableName = 'webhook_dispatch_job_table';
         $idFieldName = 'dispatch_job_id';
-        $resourceMock = $this->getMockBuilder('Magento\Core\Model\Resource')
+        $resourceMock = $this->getMockBuilder('Magento\App\Resource')
             ->disableOriginalConstructor()
             ->getMock();
         $resourceMock->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Subscription/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Subscription/CollectionTest.php
index 52cec64b34f..665476dd034 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Subscription/CollectionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Subscription/CollectionTest.php
@@ -60,13 +60,13 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     private $_eventManager;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     private $_loggerMock;
 
     protected function setUp()
     {
-        $this->_loggerMock = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $this->_loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false);
         $this->_selectMock = $this->_makeMock('Zend_Db_Select');
         $this->_selectMock->expects($this->any())
             ->method('from')
@@ -310,7 +310,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
         $mockObjectManager = $this->getMockBuilder('Magento\ObjectManager')
             ->disableOriginalConstructor()
             ->getMock();
-        \Magento\Core\Model\ObjectManager::setInstance($mockObjectManager);
+        \Magento\App\ObjectManager::setInstance($mockObjectManager);
 
         return $mockObjectManager;
     }
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/CollectionTest.php
index 733201eec4b..5d516d00c1e 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/CollectionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/Subscription/Grid/CollectionTest.php
@@ -54,7 +54,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($connectionMock));
         /** @var \Magento\Core\Model\EntityFactory $entityFactory */
         $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Core\Model\Logger', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         new \Magento\Webhook\Model\Resource\Subscription\Grid\Collection(
             $configMock, $endpointResMock, $eventManager, $logger, $fetchStrategyMock, $entityFactory, $resourceMock);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/SubscriptionTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/SubscriptionTest.php
index 1ea3d9090b8..664791975a7 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/SubscriptionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/Resource/SubscriptionTest.php
@@ -33,18 +33,6 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
     const HOOK_TABLE_NAME = 'webhook_subscription_hook_table';
     const SUBSCRIPTION_ID = '1';
 
-    /**
-     * Contents of dummy config element
-     */
-    const TOPICS_XML =
-                '<test>
-                    <a>
-                        <label>label</label>
-                    </a>
-                    <c>
-                        <label>label</label>
-                    </c>
-                </test>';
     /** @var  \PHPUnit_Framework_MockObject_MockObject */
     private $_selectMock;
 
@@ -67,7 +55,7 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_selectMock = $this->_makeMock('Magento\DB\Select');
-        $this->_resourceMock = $this->_makeMock('Magento\Core\Model\Resource');
+        $this->_resourceMock = $this->_makeMock('Magento\App\Resource');
         $this->_adapterMock = $this->_makeMock('Magento\DB\Adapter\Pdo\Mysql');
         $this->_adapterMock->expects($this->any())
             ->method('select')
@@ -75,8 +63,18 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($this->_selectMock));
 
         // Config mock
-        $configMethods = array('getNode', 'setNode', 'getXpath', 'reinit');
-        $this->_configMock = $this->getMock('Magento\Core\Model\ConfigInterface', $configMethods, array(), '', false);
+        $this->_configMock = $this->getMock('Magento\Webhook\Model\Config', array(), array(), '', false);
+        $configArray = array(
+            'a' => array(
+                'label' => 'label'
+            ),
+            'c' => array(
+                'label' => 'label'
+            )
+        );
+        $this->_configMock->expects($this->once())
+            ->method('getWebhooks')
+            ->will($this->returnValue($configArray));
     }
 
     /**
@@ -137,11 +135,6 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
             ->method('getData')
             ->with('topics')
             ->will($this->returnValue($newTopics));
-        $configElement = new \Magento\Core\Model\Config\Element(self::TOPICS_XML);
-        $this->_configMock->expects($this->once())
-            ->method('getNode')
-            ->will($this->returnValue($configElement));
-
         // Adapter stubs
         $this->_adapterMock->expects($this->once())
             ->method('delete')
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/Source/Pkg.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/Source/Pkg.php
index 79e249170c3..382bf2d79f2 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/Source/Pkg.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/Source/Pkg.php
@@ -37,20 +37,22 @@ class Pkg extends \PHPUnit_Framework_TestCase
     /** @var \PHPUnit_Framework_MockObject_MockObject */
     protected $_mockConfig;
     
-    /** @var \Magento\Core\Model\Config\Element */
+    /** @var array() */
     protected $_modelConfigElement;
     
     protected function setUp()
     {
         $label = self::CONFIG_LABEL;
         $status = self::CONFIG_STATUS;
-        $this->_modelConfigElement = new \Magento\Core\Model\Config\Element(
-            "<types><type><status>{$status}</status><label>{$label}</label></type></types>"
+        $this->_modelConfigElement = array(
+            'type' => array(
+                'status' => $status,
+                'label' => $label
+            )
         );
-        $this->_mockConfig = $this->getMockBuilder('Magento\Core\Model\Config')
-            ->disableOriginalConstructor()->getMock();
+        $this->_mockConfig = $this->getMock('Magento\Webhook\Model\Config', array(), array(), '', false);
         $this->_mockConfig->expects($this->any())
-            ->method('getNode')
+            ->method('getWebhooks')
             ->will($this->returnValue($this->_modelConfigElement));
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/Subscription/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/Subscription/ConfigTest.php
index 43b21ecbd0e..bb335fd42a5 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/Subscription/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/Subscription/ConfigTest.php
@@ -29,46 +29,6 @@ namespace Magento\Webhook\Model\Subscription;
 
 class ConfigTest extends \PHPUnit_Framework_TestCase
 {
-
-    /**
-     * String constants representing XML strings to be used in stub config element.
-     *
-     * Single-quotes are used because phpcs does not handle heredocs well.
-     */
-    const SETTING_NAME_XML =
-                    '<xml>
-                        <setting_name>
-                            <name>Extension Name</name>
-                        </setting_name>
-                    </xml>';
-
-    const NAME_MISSING_XML =
-                '<xml>
-                    <name_missing>
-                        <!-- Missing name on purpose -->
-                    </name_missing>
-                </xml>';
-
-    const EXISTING_SUBSCRIPTION =
-                '<xml>
-                    <setting_name_on_existing_subscription>
-                        <name>Extension Name</name>
-                        <topics>
-                            <topic_one>
-                                <subcall/>
-                            </topic_one>
-                        </topics>
-                    </setting_name_on_existing_subscription>
-                </xml>';
-
-    const AUTHENTICATION_TYPE =
-        '<xml>
-            <setting_authentication_type>
-                <name>Extension Name</name>
-                <authentication_type>HMAC</authentication_type>
-            </setting_authentication_type>
-        </xml>';
-
     /** @var \Magento\Webhook\Model\Subscription\Config that is also our unit under test */
     protected $_config;
 
@@ -92,11 +52,8 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         $this->_mockSubscription = $this->_createMockSubscription();
     }
 
-
-
     public function testSettingNameNewSubscription()
     {
-        $configNode = $this->_createStubConfigElement(self::SETTING_NAME_XML);
 
         // Set expectations
         $this->_mockSubscription->expects($this->atLeastOnce())
@@ -105,7 +62,12 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             ->method('setName')
             ->with($this->equalTo('Extension Name'));
 
-        $this->_stubMock($configNode);
+        $settingNameXml =
+            array(
+                'setting_name' =>
+                array('name' => 'Extension Name')
+            );
+        $this->_stubMock($settingNameXml);
 
         // Run test
         $this->_config->updateSubscriptionCollection();
@@ -113,8 +75,6 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
 
     public function testNameMissing()
     {
-        $configNode = $this->_createStubConfigElement(self::NAME_MISSING_XML);
-
         // Set expectations
         $this->_mockSubscription->expects($this->never())
             ->method('save');
@@ -125,7 +85,8 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             __("Invalid config data for subscription '%1'.", 'name_missing'),
         );
 
-        $this->_stubMock($configNode, null, $expectedErrors);
+        $nameMissingXml = array('name_missing' => array());
+        $this->_stubMock($nameMissingXml, null, $expectedErrors);
 
         // Run test
         $this->_config->updateSubscriptionCollection();
@@ -140,7 +101,6 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         $existingSubscription->expects($this->once())
             ->method('setName');
 
-        $configNode = $this->_createStubConfigElement(self::EXISTING_SUBSCRIPTION);
 
         // Set expectations
         $this->_mockSubscription->expects($this->never())
@@ -154,7 +114,16 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             )
         );
 
-        $this->_stubMock($configNode, $subxCollection);
+        $existingArray = array(
+            'setting_name_on_existing_subscription' =>
+            array(
+                'name' => 'Extension Name',
+                'topics' => array(
+                    'topic_one' => array('subcall')
+                )
+            )
+        );
+        $this->_stubMock($existingArray, $subxCollection);
 
         // Run test
         $this->_config->updateSubscriptionCollection();
@@ -162,7 +131,6 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
 
     public function testSettingAuthenticationType()
     {
-        $configNode = $this->_createStubConfigElement(self::AUTHENTICATION_TYPE);
 
         // Set expectations
         $this->_mockSubscription->expects($this->atLeastOnce())
@@ -174,7 +142,12 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             ->method('setAuthenticationType')
             ->with($this->equalTo('HMAC'));
 
-        $this->_stubMock($configNode);
+        $authentificationType = array(
+            'setting_authentication_type' =>
+                array('name' => 'Extension Name',
+                    'authentication_type' => 'HMAC')
+            );
+        $this->_stubMock($authentificationType);
 
         // Run test
         $this->_config->updateSubscriptionCollection();
@@ -205,17 +178,6 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         return $mock;
     }
 
-    /**
-     * Creates stub config element given a fragment of valid xml string
-     *
-     * @param string $xmlString
-     * @return \Magento\Core\Model\Config\Element
-     */
-    protected function _createStubConfigElement($xmlString)
-    {
-        return new \Magento\Core\Model\Config\Element($xmlString);
-    }
-
     /**
      * Initializes a set of mocks and stubs
      *
@@ -231,7 +193,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $this->_mockMageConfig = $this->getMockBuilder('Magento\Core\Model\Config')
+        $this->_mockMageConfig = $this->getMockBuilder('\Magento\Webhook\Model\Config')
             ->disableOriginalConstructor()
             ->getMock();
 
@@ -239,7 +201,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $this->_mockLogger = $this->getMockBuilder('Magento\Core\Model\Logger')
+        $this->_mockLogger = $this->getMockBuilder('Magento\Logger')
             ->disableOriginalConstructor()
             ->getMock();
 
@@ -255,10 +217,8 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
                 ->with($this->equalTo(new \Magento\Webhook\Exception(implode("\n", $expectedErrors))));
         }
 
-        // Stub getNode
         $this->_mockMageConfig->expects($this->any())
-            ->method('getNode')
-            ->with($this->equalTo(\Magento\Webhook\Model\Subscription\Config::XML_PATH_SUBSCRIPTIONS))
+            ->method('getSubscriptions')
             ->will($this->returnValue($configNode));
 
         // Get or set subscription collection mock
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/SubscriptionTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/SubscriptionTest.php
index 15457f0dc6a..565ed6c92bb 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/SubscriptionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/SubscriptionTest.php
@@ -49,7 +49,7 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
     {
         $this->_mockEndpoint = $this->getMockBuilder('Magento\Webhook\Model\Endpoint')
             ->setMethods(array('_init', 'save', 'setEndpointId', 'getId', 'getUser', '_getResource', 'delete',
-                'load', 'hasDataChanges'))
+                'load', 'hasDataChanges', '__wakeup'))
             ->disableOriginalConstructor()
             ->getMock();
 
@@ -75,10 +75,11 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($mockEventDispatcher));
 
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
+        $dateTime = new \Magento\Stdlib\DateTime;
 
         $this->_subscription = $this->getMockBuilder('Magento\Webhook\Model\Subscription')
             ->setMethods(array('_init', '_hasModelChanged', '_getResource'))
-            ->setConstructorArgs(array($this->_mockEndpoint, $this->_mockContext, $coreRegistry))
+            ->setConstructorArgs(array($this->_mockEndpoint, $this->_mockContext, $coreRegistry, $dateTime))
             ->getMock();
 
         $subscriptionResource = $this->getMockBuilder('Magento\Webhook\Model\Resource\Subscription')
@@ -111,9 +112,12 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
 
     public function testFindRestrictedTopicsWithNoUser()
     {
+        $dateTime = new \Magento\Stdlib\DateTime;
         // The only way to override a pre-existing implementation is to create a new object
         $this->_mockEndpoint = $this->getMockBuilder('Magento\Webhook\Model\Endpoint')
-            ->setMethods(array('_init', 'save', 'setEndpointId', 'getId', 'getUser', '_getResource', 'delete'))
+            ->setMethods(array(
+                '__wakeup', '_init', 'save', 'setEndpointId', 'getId', 'getUser', '_getResource', 'delete'
+            ))
             ->disableOriginalConstructor()
             ->getMock();
 
@@ -125,7 +129,7 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
 
         $this->_subscription = $this->getMockBuilder('Magento\Webhook\Model\Subscription')
             ->setMethods(array('_init', '_hasModelChanged', '_getResource'))
-            ->setConstructorArgs(array($this->_mockEndpoint, $this->_mockContext, $coreRegistry))
+            ->setConstructorArgs(array($this->_mockEndpoint, $this->_mockContext, $coreRegistry, $dateTime))
             ->getMock();
 
         $this->_subscription->setTopics(array('restricted', 'allowed'));
@@ -138,6 +142,7 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
     public function testAfterDelete()
     {
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
+        $dateTime = new \Magento\Stdlib\DateTime;
 
         // it's useful to mock out more methods for the purposes of testing this one method
         $this->_subscription = $this->getMockBuilder('Magento\Webhook\Model\Subscription')
@@ -146,7 +151,7 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
                     'setRegistrationMechanism', 'getEndpointId', 'setEndpointId', 'setUpdatedAt',
                     'hasDataChanges', '_init', '_hasModelChanged', '_getResource')
             )
-            ->setConstructorArgs(array($this->_mockEndpoint, $this->_mockContext, $coreRegistry))
+            ->setConstructorArgs(array($this->_mockEndpoint, $this->_mockContext, $coreRegistry, $dateTime))
             ->getMock();
 
         $mockResource = $this->getMockBuilder('Magento\Webhook\Model\Resource\Subscription')
@@ -176,6 +181,7 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
     public function testBeforeSave($hasRegiMechanism, $hasEndpointChanges, $hasEndpointId, $hasDataChanges)
     {
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
+        $dateTime = $this->getMock('\Magento\Stdlib\DateTime', array('formatDate'));
 
         // it's useful to mock out more methods for the purposes of testing this one method
         $this->_subscription = $this->getMockBuilder('Magento\Webhook\Model\Subscription')
@@ -183,7 +189,7 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
                 array('hasStatus', 'setStatus', 'hasRegistrationMechanism', 'setRegistrationMechanism', 'getEndpointId',
                       'setEndpointId', 'setUpdatedAt', 'hasDataChanges', '_init', '_hasModelChanged', '_getResource')
             )
-            ->setConstructorArgs(array($this->_mockEndpoint, $this->_mockContext, $coreRegistry))
+            ->setConstructorArgs(array($this->_mockEndpoint, $this->_mockContext, $coreRegistry, $dateTime))
             ->getMock();
 
         $mockResource = $this->getMockBuilder('Magento\Webhook\Model\Resource\Subscription')
@@ -209,7 +215,7 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
 
         $this->_expectEndpointOrId($hasEndpointChanges, $hasEndpointId);
 
-        $this->_expectSubscriptionHasDataChanges($hasDataChanges, $mockResource);
+        $this->_expectSubscriptionHasDataChanges($hasDataChanges, $dateTime);
 
         $this->assertEquals($this->_subscription, $this->_subscription->save());
     }
@@ -293,16 +299,16 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
      * Mock out the subscription depending on whether or not it will have data changes
      *
      * @param $hasDataChanges
-     * @param $mockResource
+     * @param $dateTime
      */
-    protected function _expectSubscriptionHasDataChanges($hasDataChanges, $mockResource)
+    protected function _expectSubscriptionHasDataChanges($hasDataChanges, $dateTime)
     {
         $this->_subscription->expects($this->once())
             ->method('hasDataChanges')
             ->will($this->returnValue($hasDataChanges));
         if ($hasDataChanges) {
             $someFormattedTime = '2013-07-10 12:35:28';
-            $mockResource->expects($this->once())
+            $dateTime->expects($this->once())
                 ->method('formatDate')
                 ->withAnyParameters()
                 ->will($this->returnValue($someFormattedTime));
@@ -310,7 +316,7 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase
                 ->method('setUpdatedAt')
                 ->with($this->equalTo($someFormattedTime));
         } else {
-            $mockResource->expects($this->never())
+            $dateTime->expects($this->never())
                 ->method('formatDate');
             $this->_subscription->expects($this->never())
                 ->method('setUpdatedAt');
diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Model/Webapi/User/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Model/Webapi/User/FactoryTest.php
index 6580c811df9..b7e91da96ff 100644
--- a/dev/tests/unit/testsuite/Magento/Webhook/Model/Webapi/User/FactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webhook/Model/Webapi/User/FactoryTest.php
@@ -148,13 +148,18 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
+        $mockMathRandom = $this->getMockBuilder('Magento\Math\Random')
+            ->disableOriginalConstructor()
+            ->getMock();
+
         $this->_userFactory = new \Magento\Webhook\Model\Webapi\User\Factory(
             $mockRuleFactory,
             $mockUserFactory,
+
             $mockRoleFactory,
             $this->_mockAuthConfig,
             $mockAclCache,
-            $this->_mockCoreHelper
+            $mockMathRandom
         );
     }
 
@@ -174,15 +179,6 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
             'company'   => $company,
         );
 
-        $uniq = 'unique string';
-
-        $this->_mockCoreHelper = $this->getMockBuilder('Magento\Core\Helper\Data')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $this->_mockCoreHelper->expects($this->once())
-            ->method('uniqHash')
-            ->will($this->returnValue($uniq));
-
         // Mock Role
         $this->_mockRole = $this->getMockBuilder('Magento\Webapi\Model\Acl\Role')
             ->setMethods(array('load', 'save', 'getId', 'setRoleName', 'delete'))
diff --git a/dev/tests/unit/testsuite/Magento/Widget/Model/Widget/InstanceTest.php b/dev/tests/unit/testsuite/Magento/Widget/Model/Widget/InstanceTest.php
index d24b23a7bde..df7bb69fefe 100644
--- a/dev/tests/unit/testsuite/Magento/Widget/Model/Widget/InstanceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Widget/Model/Widget/InstanceTest.php
@@ -37,8 +37,8 @@ class InstanceTest extends \PHPUnit_Framework_TestCase
      */
     protected $_viewFileSystemMock;
 
-    /** @var  \Magento\Core\Model\Config|PHPUnit_Framework_MockObject_MockObject */
-    protected $_coreConfigMock;
+    /** @var  \Magento\Widget\Model\NamespaceResolver |PHPUnit_Framework_MockObject_MockObject */
+    protected $_namespaceResolver;
 
     /**
      * @var \Magento\Widget\Model\Widget\Instance
@@ -58,40 +58,30 @@ class InstanceTest extends \PHPUnit_Framework_TestCase
         $this->_widgetModelMock = $this->getMockBuilder('Magento\Widget\Model\Widget')
             ->disableOriginalConstructor()
             ->getMock();
-        $contextMock = $this->getMockBuilder('Magento\Core\Model\Context')
-            ->disableOriginalConstructor()
-            ->getMock();
         $this->_viewFileSystemMock = $this->getMockBuilder('Magento\Core\Model\View\FileSystem')
             ->disableOriginalConstructor()
             ->getMock();
-        $this->_coreConfigMock = $this->getMockBuilder('Magento\Core\Model\Config')
+        $this->_namespaceResolver = $this->getMockBuilder('\Magento\Widget\Model\NamespaceResolver')
             ->disableOriginalConstructor()
             ->getMock();
         $this->_cacheTypesListMock = $this->getMock('Magento\Core\Model\Cache\TypeListInterface');
         $this->_readerMock = $this->getMockBuilder('Magento\Widget\Model\Config\Reader')
             ->disableOriginalConstructor()
             ->getMock();
-        $registryMock = $this->getMockBuilder('Magento\Core\Model\Registry')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $coreData = $this->getMockBuilder('Magento\Core\Helper\Data')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $widgetData = $this->getMockBuilder('Magento\Widget\Helper\Data')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $productType = $this->getMockBuilder('Magento\Catalog\Model\Product\Type')
-            ->disableOriginalConstructor()
-            ->getMock();
+
+        $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $args = $objectManagerHelper->getConstructArguments('Magento\Widget\Model\Widget\Instance', array(
+            'viewFileSystem' => $this->_viewFileSystemMock,
+            'cacheTypeList' => $this->_cacheTypesListMock,
+            'reader' => $this->_readerMock,
+            'widgetModel' => $this->_widgetModelMock,
+            'namespaceResolver' => $this->_namespaceResolver
+        ));
         /** @var \Magento\Widget\Model\Widget\Instance _model */
         $this->_model = $this->getMock(
             'Magento\Widget\Model\Widget\Instance',
             array('_construct'),
-            array(
-                $widgetData, $coreData, $contextMock, $registryMock, $this->_viewFileSystemMock,
-                $this->_cacheTypesListMock, $productType, $this->_readerMock, $this->_widgetModelMock,
-                $this->_coreConfigMock
-            ),
+            $args,
             '',
             true
         );
@@ -115,7 +105,7 @@ class InstanceTest extends \PHPUnit_Framework_TestCase
                     ),
                     'type' => 'label',
                     'helper_block' => array(
-                        'type' => 'Magento\Adminhtml\Block\Cms\Page\Widget\Chooser',
+                        'type' => 'Magento\Cms\Block\Adminhtml\Page\Widget\Chooser',
                         'data' => array(
                             'button' => array(
                                 'open' => 'Select Page...',
diff --git a/dev/tests/unit/testsuite/Magento/Widget/Model/WidgetTest.php b/dev/tests/unit/testsuite/Magento/Widget/Model/WidgetTest.php
index e2168780c6d..ac960796d46 100644
--- a/dev/tests/unit/testsuite/Magento/Widget/Model/WidgetTest.php
+++ b/dev/tests/unit/testsuite/Magento/Widget/Model/WidgetTest.php
@@ -40,16 +40,11 @@ class WidgetTest extends \PHPUnit_Framework_TestCase
         $this->_storage = $this->getMockBuilder('Magento\Widget\Model\Config\Data')
             ->disableOriginalConstructor()
             ->getMock();
-        $viewUrl = $this->getMockBuilder('Magento\Core\Model\View\Url')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $viewFileSystem = $this->getMockBuilder('Magento\Core\Model\View\FileSystem')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $coreData = $this->getMockBuilder('Magento\Core\Helper\Data')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $this->_model = new \Magento\Widget\Model\Widget($coreData, $this->_storage, $viewUrl, $viewFileSystem);
+        $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $objectManagerHelper->getObject('Magento\Widget\Model\Widget', array('dataStorage' => $this->_storage));
+        $this->_model = $objectManagerHelper->getObject('Magento\Widget\Model\Widget', array(
+            'dataStorage' => $this->_storage)
+        );
     }
 
     public function testGetWidgets()
@@ -103,4 +98,12 @@ class WidgetTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals($widgetOne, $this->_model->getWidgetByClassType('type1'));
         $this->assertNull($this->_model->getWidgetByClassType('type2'));
     }
+
+    public function testGetWidgetDeclarationTypeWithBackslashes()
+    {
+        $this->assertContains(
+            'Magento\\\\Widget\\\\Backslashed\\\\ClassName',
+            $this->_model->getWidgetDeclaration('Magento\Widget\Backslashed\ClassName')
+        );
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Widget/Model/_files/mappedConfigArray1.php b/dev/tests/unit/testsuite/Magento/Widget/Model/_files/mappedConfigArray1.php
index 52bccacd044..d7c68953816 100644
--- a/dev/tests/unit/testsuite/Magento/Widget/Model/_files/mappedConfigArray1.php
+++ b/dev/tests/unit/testsuite/Magento/Widget/Model/_files/mappedConfigArray1.php
@@ -37,7 +37,7 @@ return array(
             ),
             'type' => 'label',
             'helper_block' => array(
-                'type' => 'Magento\Adminhtml\Block\Cms\Page\Widget\Chooser',
+                'type' => 'Magento\Cms\Block\Adminhtml\Page\Widget\Chooser',
                 'data' => array(
                     'button' => array(
                         'open' => 'Select Page...',
diff --git a/dev/tests/unit/testsuite/Magento/_files/errors/report.php b/dev/tests/unit/testsuite/Magento/_files/errors/report.php
new file mode 100644
index 00000000000..eff6fbdcbf7
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/_files/errors/report.php
@@ -0,0 +1,26 @@
+<?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)
+ */
+
+/** @var $reportData array */
+PHPUnit_Framework_Assert::assertNotEmpty($reportData);
diff --git a/dev/tools/Magento/Tools/Di/Code/Scanner/CompositeScanner.php b/dev/tools/Magento/Tools/Di/Code/Scanner/CompositeScanner.php
index cf26f08522e..18e5adf9996 100644
--- a/dev/tools/Magento/Tools/Di/Code/Scanner/CompositeScanner.php
+++ b/dev/tools/Magento/Tools/Di/Code/Scanner/CompositeScanner.php
@@ -52,9 +52,8 @@ class CompositeScanner implements ScannerInterface
     {
         $output = array();
         foreach ($this->_children as $type => $scanner) {
-            $output = array_merge($output, $scanner->collectEntities($files[$type]));
+            $output[$type] = array_unique($scanner->collectEntities($files[$type]));
         }
-        $output = array_unique($output);
         return $output;
     }
 }
diff --git a/dev/tools/Magento/Tools/Di/Code/Scanner/FileScanner.php b/dev/tools/Magento/Tools/Di/Code/Scanner/FileScanner.php
deleted file mode 100644
index 276f9ba6abd..00000000000
--- a/dev/tools/Magento/Tools/Di/Code/Scanner/FileScanner.php
+++ /dev/null
@@ -1,79 +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.
- *
- * @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\Tools\Di\Code\Scanner;
-
-class FileScanner implements ScannerInterface
-{
-    /**
-     * Regular expression pattern
-     *
-     * @var string
-     */
-    protected $_pattern;
-
-    /**
-     * Get array of class names
-     *
-     * @param array $files
-     * @return array
-     */
-    public function collectEntities(array $files)
-    {
-        $output = array();
-        foreach ($files as $file) {
-            $content = file_get_contents($file);
-            $content = $this->_prepareContent($content);
-            $matches = array();
-            if (preg_match_all($this->_pattern, $content, $matches)) {
-                $output = array_merge($output, $matches[1]);
-            }
-        }
-        $output = array_unique($output);
-        $output = $this->_filterEntities($output);
-        return $output;
-    }
-
-    /**
-     * Prepare file content
-     *
-     * @param string $content
-     * @return string
-     */
-    protected function _prepareContent($content)
-    {
-        return $content;
-    }
-
-    /**
-     * Filter found entities if needed
-     *
-     * @param array $output
-     * @return array
-     */
-    protected function _filterEntities(array $output)
-    {
-        return $output;
-    }
-}
diff --git a/dev/tools/Magento/Tools/Di/Code/Scanner/PhpScanner.php b/dev/tools/Magento/Tools/Di/Code/Scanner/PhpScanner.php
index ec6bc166fda..195458dc70a 100644
--- a/dev/tools/Magento/Tools/Di/Code/Scanner/PhpScanner.php
+++ b/dev/tools/Magento/Tools/Di/Code/Scanner/PhpScanner.php
@@ -24,44 +24,150 @@
 
 namespace Magento\Tools\Di\Code\Scanner;
 
-class PhpScanner extends FileScanner
+use \Magento\Tools\Di\Compiler\Log\Log;
+
+class PhpScanner implements ScannerInterface
 {
     /**
-     * Regular expression pattern
-     *
-     * Searches for factories specified in php files
+     * @var Log $log
+     */
+    protected $_log;
+
+    /**
+     * @param Log $log
+     */
+    public function __construct(Log $log)
+    {
+        $this->_log = $log;
+    }
+
+    /**
+     * Fetch factories from class constructor
      *
-     * @var string
+     * @param $file string
+     * @param $reflectionClass mixed
+     * @return array
      */
-    protected $_pattern =
-        '/[ \\b\n\'"\(\\\\]{1}([A-Z]{1}[a-zA-Z0-9]*(\\\\|_)[A-Z]{1}[a-zA-Z0-9\\\\_]*(Factory))[ \\b\n\'"]{1}/';
+    protected function _fetchFactories($file, $reflectionClass)
+    {
+        $absentFactories = array();
+        if ($reflectionClass->hasMethod('__construct')) {
+            $constructor = $reflectionClass->getMethod('__construct');
+            $parameters = $constructor->getParameters();
+            /** @var $parameter \ReflectionParameter */
+            foreach ($parameters as $parameter) {
+                preg_match('/\[\s\<\w+?>\s([\w\\\\]+)/s', $parameter->__toString(), $matches);
+                if (isset($matches[1]) && substr($matches[1], -7) == 'Factory') {
+                    $factoryClassName = $matches[1];
+                    if (class_exists($factoryClassName)) {
+                        continue;
+                    }
+                    $entityName = rtrim(substr($factoryClassName, 0, -7), '\\');
+                    if (!class_exists($entityName)) {
+                        $this->_log->add(
+                            Log::CONFIGURATION_ERROR,
+                            $factoryClassName,
+                            'Invalid Factory for nonexistent class ' . $entityName . ' in file ' . $file
+                        );
+                        continue;
+                    }
+
+                    if (substr($factoryClassName, -8) == '\\Factory') {
+                        $this->_log->add(
+                            Log::CONFIGURATION_ERROR,
+                            $factoryClassName,
+                            'Invalid Factory declaration for class ' . $entityName . ' in file ' . $file
+                        );
+                        continue;
+                    }
+                    $absentFactories[] = $factoryClassName;
+                }
+            }
+        }
+        return $absentFactories;
+    }
 
     /**
-     * Prepare file content
+     * Get array of class names
      *
-     * @param string $content
+     * @param array $files
+     * @return array
+     */
+    public function collectEntities(array $files)
+    {
+        $output = array();
+        foreach ($files as $file) {
+            $classes = $this->_getDeclaredClasses($file);
+            foreach ($classes as $className) {
+                $reflectionClass = new \ReflectionClass($className);
+                $absentFactories = $this->_fetchFactories($file, $reflectionClass);
+                if (!empty($absentFactories)) {
+                    $output = array_merge($output, $absentFactories);
+                }
+            }
+        }
+        return array_unique($output);
+    }
+
+    /**
+     * @param $tokenIterator int
+     * @param $count int
+     * @param $tokens array
      * @return string
      */
-    protected function _prepareContent($content)
+    protected function _fetchNamespace($tokenIterator, $count, $tokens)
     {
-        $output  = '';
-        $commentTokens = array(T_COMMENT);
+        $namespace = '';
+        for ($tokenOffset = $tokenIterator + 1; $tokenOffset < $count; ++$tokenOffset) {
+            if ($tokens[$tokenOffset][0] === T_STRING) {
+                $namespace .= "\\" . $tokens[$tokenOffset][1];
+            } elseif ($tokens[$tokenOffset] === '{' || $tokens[$tokenOffset] === ';') {
+                break;
+            }
+        }
+        return $namespace;
+    }
 
-        if (defined('T_DOC_COMMENT')) {
-            $commentTokens[] = T_DOC_COMMENT;
+    /**
+     * @param $namespace string
+     * @param $tokenIterator int
+     * @param $count int
+     * @param $tokens array
+     * @return array
+     */
+    protected function _fetchClasses($namespace, $tokenIterator, $count, $tokens)
+    {
+        $classes = array();
+        for ($tokenOffset = $tokenIterator + 1; $tokenOffset < $count; ++$tokenOffset) {
+            if ($tokens[$tokenOffset] === '{') {
+                $classes[]= $namespace . "\\" . $tokens[$tokenIterator + 2][1];
+            }
         }
+        return $classes;
+    }
 
-        $tokens = token_get_all($content);
+    /**
+     * Get classes declared in the file
+     *
+     * @param string $file
+     * @return array
+     */
+    protected function _getDeclaredClasses($file)
+    {
+        $classes = array ();
+        $namespace = "";
+        $tokens = token_get_all(file_get_contents($file));
+        $count = count($tokens);
 
-        foreach ($tokens as $token) {
-            if (is_array($token)) {
-                if (in_array($token[0], $commentTokens)) {
-                    continue;
-                }
-                $token = $token[1];
+        for ($tokenIterator = 0; $tokenIterator < $count; $tokenIterator ++) {
+            if ($tokens[$tokenIterator][0] === T_NAMESPACE) {
+                $namespace .= $this->_fetchNamespace($tokenIterator, $count, $tokens);
+            }
+
+            if ($tokens[$tokenIterator][0] === T_CLASS) {
+                $classes = array_merge($classes, $this->_fetchClasses($namespace, $tokenIterator, $count, $tokens));
             }
-            $output .= $token;
         }
-        return $output;
+        return array_unique($classes);
     }
 }
diff --git a/dev/tools/Magento/Tools/Di/Code/Scanner/XmlScanner.php b/dev/tools/Magento/Tools/Di/Code/Scanner/XmlScanner.php
index cc61ab365df..c099ba7484a 100644
--- a/dev/tools/Magento/Tools/Di/Code/Scanner/XmlScanner.php
+++ b/dev/tools/Magento/Tools/Di/Code/Scanner/XmlScanner.php
@@ -24,35 +24,47 @@
 
 namespace Magento\Tools\Di\Code\Scanner;
 
-class XmlScanner extends FileScanner
+class XmlScanner implements ScannerInterface
 {
     /**
-     * Regular expression pattern
-     *
-     * @var string
+     * @var \Magento\Tools\Di\Compiler\Log\Log $log
      */
-    protected $_pattern =
-        '/[\n\'"<>]{1}([A-Z]{1}[a-zA-Z0-9]*[_\\\\][A-Z]{1}[a-zA-Z0-9_\\\\]*(Proxy|Factory))[\n\'"<>]{1}/';
+    protected $_log;
 
     /**
-     * Prepare xml file content
-     *
-     * @param string $content
-     * @return string
+     * @param \Magento\Tools\Di\Compiler\Log\Log $log
      */
-    protected function _prepareContent($content)
+    public function __construct(\Magento\Tools\Di\Compiler\Log\Log $log)
     {
-        $dom = new \DOMDocument();
-        $dom->loadXML($content);
+        $this->_log = $log;
+    }
 
-        $xpath = new \DOMXPath($dom);
-        /** @var $comment \DOMComment */
-        foreach ($xpath->query('//comment()') as $comment) {
-            $comment->parentNode->removeChild($comment);
+    /**
+     * Get array of class names
+     *
+     * @param array $files
+     * @return array
+     */
+    public function collectEntities(array $files)
+    {
+        $output = array();
+        foreach ($files as $file) {
+            $dom = new \DOMDocument();
+            $dom->load($file);
+            $xpath = new \DOMXPath($dom);
+            $xpath->registerNamespace("php", "http://php.net/xpath");
+            $xpath->registerPhpFunctions('preg_match');
+            $regex = '/(.*)Proxy/';
+            $query = "/config/preference[ php:functionString('preg_match', '$regex', @type) > 0] | "
+                . "/config/type/param/instance[ php:functionString('preg_match', '$regex', @type) > 0] | "
+                . "/config/virtualType[ php:functionString('preg_match', '$regex', @type) > 0]";
+            /** @var \DOMNode $node */
+            foreach ($xpath->query($query) as $node) {
+                $output[] = $node->attributes->getNamedItem('type')->nodeValue;
+            }
         }
-        $output = $dom->saveXML();
-
-        return $output;
+        $output = array_unique($output);
+        return $this->_filterEntities($output);
     }
 
     /**
@@ -65,10 +77,17 @@ class XmlScanner extends FileScanner
     {
         $filteredEntities = array();
         foreach ($output as $className) {
-            $entityName = rtrim(preg_replace('/(Proxy|Factory)$/', '', $className), '\\');
-            // Skip aliases that are declared in Di configuration
-            if (class_exists($entityName)) {
-                array_push($filteredEntities, $className);
+            $entityName = substr($className, -6) === '\Proxy' ? substr($className, 0, -6) : $className;
+            if (false === class_exists($className)) {
+                if (class_exists($entityName)) {
+                    array_push($filteredEntities, $className);
+                } else {
+                    $this->_log->add(
+                        \Magento\Tools\Di\Compiler\Log\Log::CONFIGURATION_ERROR,
+                        $className,
+                        'Invalid proxy class for ' . substr($className, 0, -5)
+                    );
+                }
             }
         }
         return $filteredEntities;
diff --git a/dev/tools/Magento/Tools/Di/Compiler/Directory.php b/dev/tools/Magento/Tools/Di/Compiler/Directory.php
index a2cc22d1767..d97d3485c2f 100644
--- a/dev/tools/Magento/Tools/Di/Compiler/Directory.php
+++ b/dev/tools/Magento/Tools/Di/Compiler/Directory.php
@@ -77,6 +77,7 @@ class Directory
      */
     public function compile($path)
     {
+        $validator = new \Magento\Code\Validator\ConstructorIntegrity();
         $rdi = new \RecursiveDirectoryIterator(realpath($path));
         $recursiveIterator = new \RecursiveIteratorIterator($rdi, 1);
         /** @var $item \SplFileInfo */
@@ -90,9 +91,12 @@ class Directory
                         require_once $item->getRealPath();
                     }
                     try {
+                        $validator->validate($className);
                         $signatureReader = new \Magento\Code\Reader\ClassReader();
                         $this->_definitions[$className] = $signatureReader->getConstructor($className);
                         $this->_relations[$className] = $signatureReader->getParents($className);
+                    } catch (\Magento\Code\ValidationException $exception) {
+                        $this->_log->add(Log::COMPILATION_ERROR, $className, $exception->getMessage());
                     } catch (\ReflectionException $e) {
                         $this->_log->add(Log::COMPILATION_ERROR, $className, $e->getMessage());
                     }
diff --git a/dev/tools/Magento/Tools/Di/Compiler/Log/Log.php b/dev/tools/Magento/Tools/Di/Compiler/Log/Log.php
index ad0ea8903c4..84fc600e07c 100644
--- a/dev/tools/Magento/Tools/Di/Compiler/Log/Log.php
+++ b/dev/tools/Magento/Tools/Di/Compiler/Log/Log.php
@@ -29,38 +29,50 @@ class Log
     const GENERATION_ERROR = 1;
     const GENERATION_SUCCESS = 2;
     const COMPILATION_ERROR = 3;
+    const CONFIGURATION_ERROR = 4;
 
     /**
-     * Log writer
+     * Success log writer
      *
      * @var Writer\WriterInterface
      */
-    protected $_writer;
+    protected $_successWriter;
 
     /**
-     * List of log entries
+     * Error log writer
+     *
+     * @var Writer\WriterInterface
+     */
+    protected $_errorWriter;
+
+    /**
+     * List of success log entries
      *
      * @var array
      */
-    protected $_entries = array();
+    protected $_successEntries = array();
 
     /**
-     * Allowed log types
+     * List of error entries
      *
      * @var array
      */
-    protected $_allowedTypes;
+    protected $_errorEntries = array();
 
     /**
-     * @param Writer\WriterInterface $writer
-     * @param array $allowedTypes
+     * @param Writer\WriterInterface $successWriter
+     * @param Writer\WriterInterface $errorWriter
      */
-    public function __construct(Writer\WriterInterface $writer, $allowedTypes = array())
+    public function __construct(Writer\WriterInterface $successWriter, Writer\WriterInterface $errorWriter)
     {
-        $this->_writer = $writer;
-        $this->_allowedTypes = empty($allowedTypes)
-            ? array(self::GENERATION_ERROR, self::COMPILATION_ERROR, self::GENERATION_SUCCESS)
-            : $allowedTypes;
+        $this->_successWriter = $successWriter;
+        $this->_errorWriter = $errorWriter;
+        $this->_successEntries[self::GENERATION_SUCCESS] = array();
+        $this->_errorEntries = array(
+            self::CONFIGURATION_ERROR => array(),
+            self::GENERATION_ERROR    => array(),
+            self::COMPILATION_ERROR   => array(),
+        );
     }
 
     /**
@@ -72,8 +84,10 @@ class Log
      */
     public function add($type, $key, $message = '')
     {
-        if (in_array($type, $this->_allowedTypes)) {
-            $this->_entries[$type][$key][] = $message;
+        if (array_key_exists($type, $this->_successEntries)) {
+            $this->_successEntries[$type][$key][] = $message;
+        } else {
+            $this->_errorEntries[$type][$key][] = $message;
         }
     }
 
@@ -82,6 +96,22 @@ class Log
      */
     public function report()
     {
-        $this->_writer->write($this->_entries);
+        $this->_successWriter->write($this->_successEntries);
+        $this->_errorWriter->write($this->_errorEntries);
+    }
+
+    /**
+     * Check whether error exists
+     *
+     * @return bool
+     */
+    public function hasError()
+    {
+        foreach ($this->_errorEntries as $data) {
+            if (count($data)) {
+                return true;
+            }
+        }
+        return false;
     }
 }
diff --git a/dev/tools/Magento/Tools/Di/Compiler/Log/Writer/Console.php b/dev/tools/Magento/Tools/Di/Compiler/Log/Writer/Console.php
index 5a87701e4e7..3e3afc06830 100644
--- a/dev/tools/Magento/Tools/Di/Compiler/Log/Writer/Console.php
+++ b/dev/tools/Magento/Tools/Di/Compiler/Log/Writer/Console.php
@@ -33,7 +33,8 @@ class Console implements WriterInterface
     protected $_messages = array(
         Log::GENERATION_SUCCESS => 'Generated classes:',
         Log::GENERATION_ERROR => 'Errors during class generation:',
-        Log::COMPILATION_ERROR => 'Errors during compilation:'
+        Log::COMPILATION_ERROR => 'Errors during compilation:',
+        Log::CONFIGURATION_ERROR => 'Errors during configuration scanning:'
     );
 
     /**
@@ -44,10 +45,13 @@ class Console implements WriterInterface
     public function write(array $data)
     {
         foreach ($data as $type => $classes) {
+            if (!count($classes)) {
+                continue;
+            }
             echo $this->_messages[$type] . "\n";
             foreach ($classes as $className => $messages) {
-                echo "\t" . $className . "\n";
                 if (count($messages)) {
+                    echo "\t" . $className . "\n";
                     foreach ($messages as $message) {
                         if ($message) {
                             echo "\t\t - " . $message . "\n";
diff --git a/dev/tools/Magento/Tools/Di/compiler.php b/dev/tools/Magento/Tools/Di/compiler.php
index a22a198deb1..10b90276ada 100644
--- a/dev/tools/Magento/Tools/Di/compiler.php
+++ b/dev/tools/Magento/Tools/Di/compiler.php
@@ -34,17 +34,13 @@ use Magento\Tools\Di\Compiler\Log\Log,
 
 $filePatterns = array(
     'php' => '/.*\.php$/',
-    'etc' => '/\/app\/etc\/[a-z0-9\.]*\.xml$/',
     'di' => '/\/etc\/([a-zA-Z_]*\/di|di)\.xml$/',
-    'view' => '/\/view\/[a-z0-9A-Z\/\.]*\.xml$/',
-    'design' => '/\/app\/design\/[a-z0-9A-Z\/\._]*\.xml$/',
 );
 $codeScanDir = realpath($rootDir . '/app');
 try {
     $opt = new Zend_Console_Getopt(array(
         'serializer=w' => 'serializer function that should be used (serialize|binary) default = serialize',
         'verbose|v' => 'output report after tool run',
-        'log|l=s' => 'log level (all|error) default = all',
         'extra-classes-file=s' => 'path to file with extra proxies and factories to generate',
         'generation=s' => 'absolute path to generated classes, <magento_root>/var/generation by default',
         'di=s' => 'absolute path to DI definitions directory, <magento_root>/var/di by default'
@@ -65,11 +61,13 @@ try {
         $generationDir,
     );
 
-    $writer = $opt->getOption('v') ? new Writer\Console() : new Writer\Quiet();
-    $allowedLogTypes = $opt->getOption('log') == 'error' ?
-        array(Log::COMPILATION_ERROR, Log::GENERATION_ERROR)
-        : array();
-    $log = new Log($writer, $allowedLogTypes);
+    /** @var Writer\WriterInterface $logWriter Writer model for success messages */
+    $logWriter   = $opt->getOption('v') ? new Writer\Console() : new Writer\Quiet();
+
+    /** @var Writer\WriterInterface $logWriter Writer model for error messages */
+    $errorWriter = new Writer\Console();
+
+    $log = new Log($logWriter, $errorWriter);
     $serializer = ($opt->getOption('serializer') == 'binary') ? new Serializer\Igbinary() : new Serializer\Standard();
 
     // 1 Code generation
@@ -80,21 +78,47 @@ try {
     $entities = array();
 
     $scanner = new Scanner\CompositeScanner();
-    $scanner->addChild(new Scanner\PhpScanner(), 'php');
-    $scanner->addChild(new Scanner\XmlScanner(), 'etc');
-    $scanner->addChild(new Scanner\XmlScanner(), 'di');
-    $scanner->addChild(new Scanner\XmlScanner(), 'view');
-    $scanner->addChild(new Scanner\XmlScanner(), 'design');
+    $scanner->addChild(new Scanner\PhpScanner($log), 'php');
+    $scanner->addChild(new Scanner\XmlScanner($log), 'di');
     $scanner->addChild(new Scanner\ArrayScanner(), 'additional');
     $entities = $scanner->collectEntities($files);
 
     $interceptorScanner = new Scanner\XmlInterceptorScanner();
-    $entities = array_merge($entities, $interceptorScanner->collectEntities($files['di']));
+    $entities['di'] = array_merge($entities['di'], $interceptorScanner->collectEntities($files['di']));
 
-    // 1.2 Generation
+    // 1.2 Generation of Factory and Additional Classes
     $generatorIo = new \Magento\Code\Generator\Io(null, null, $generationDir);
     $generator = new \Magento\Code\Generator(null, null, $generatorIo);
-    foreach ($entities as $entityName) {
+    foreach (array('php', 'additional') as $type) {
+        foreach ($entities[$type] as $entityName) {
+            switch ($generator->generateClass($entityName)) {
+                case \Magento\Code\Generator::GENERATION_SUCCESS:
+                    $log->add(Log::GENERATION_SUCCESS, $entityName);
+                    break;
+
+                case \Magento\Code\Generator::GENERATION_ERROR:
+                    $log->add(Log::GENERATION_ERROR, $entityName);
+                    break;
+
+                case \Magento\Code\Generator::GENERATION_SKIP:
+                default:
+                    //no log
+                    break;
+            }
+        }
+    }
+
+    // 2. Compilation
+    // 2.1 Code scan
+    $directoryCompiler = new Directory($log);
+    foreach ($compilationDirs as $path) {
+        if (is_readable($path)) {
+            $directoryCompiler->compile($path);
+        }
+    }
+
+    // 2.1.1 Generation of Proxy and Interceptor Classes
+    foreach ($entities['di'] as $entityName) {
         switch ($generator->generateClass($entityName)) {
             case \Magento\Code\Generator::GENERATION_SUCCESS:
                 $log->add(Log::GENERATION_SUCCESS, $entityName);
@@ -111,14 +135,9 @@ try {
         }
     }
 
-    // 2. Compilation
-    // 2.1 Code scan
-    $directoryCompiler = new Directory($log);
-    foreach ($compilationDirs as $path) {
-        if (is_readable($path)) {
-            $directoryCompiler->compile($path);
-        }
-    }
+    //2.1.2 Compile definitions for Proxy/Interceptor classes
+    $directoryCompiler->compile($generationDir);
+
     list($definitions, $relations) = $directoryCompiler->getResult();
 
     // 2.2 Compression
@@ -132,14 +151,17 @@ try {
     file_put_contents($compiledFile, $output);
     file_put_contents($relationsFile, $serializer->serialize($relations));
 
-
     // 3. Plugin Definition Compilation
     $pluginScanner = new Scanner\CompositeScanner();
     $pluginScanner->addChild(new Scanner\PluginScanner(), 'di');
     $pluginDefinitions = array();
-    foreach ($pluginScanner->collectEntities($files) as $entity) {
-        $pluginDefinitions[$entity] = get_class_methods($entity);
+    $pluginList = $pluginScanner->collectEntities($files);
+    foreach ($pluginList as $type => $entityList) {
+        foreach ($entityList as $entity) {
+            $pluginDefinitions[$entity] = get_class_methods($entity);
+        }
     }
+
     $output = $serializer->serialize($pluginDefinitions);
 
     if (!file_exists(dirname($pluginDefFile))) {
@@ -147,8 +169,14 @@ try {
     }
 
     file_put_contents($pluginDefFile, $output);
+
     //Reporter
     $log->report();
+
+    if ($log->hasError()) {
+        exit(1);
+    }
+
 } catch (Zend_Console_Getopt_Exception $e) {
     echo $e->getUsageMessage();
     echo 'Please, use quotes(") for wrapping strings.' . "\n";
diff --git a/dev/tools/Magento/Tools/I18n/Code/ServiceLocator.php b/dev/tools/Magento/Tools/I18n/Code/ServiceLocator.php
index 9142b979048..1fe658cbebe 100644
--- a/dev/tools/Magento/Tools/I18n/Code/ServiceLocator.php
+++ b/dev/tools/Magento/Tools/I18n/Code/ServiceLocator.php
@@ -115,7 +115,7 @@ class ServiceLocator
     private static function _getFactory()
     {
         if (null === self::$_factory) {
-            self::$_factory = new Factory();
+            self::$_factory = new \Magento\Tools\I18n\Code\Factory();
         }
         return self::$_factory;
     }
diff --git a/dev/tools/Magento/Tools/Migration/themes_view.php b/dev/tools/Magento/Tools/Migration/themes_view.php
index b94559199d4..3f9ee7c779f 100644
--- a/dev/tools/Magento/Tools/Migration/themes_view.php
+++ b/dev/tools/Magento/Tools/Migration/themes_view.php
@@ -26,13 +26,11 @@
 require_once __DIR__ . '/../../../../../app/bootstrap.php';
 $rootDir = realpath(__DIR__ . '/../../../../..');
 try {
-    $config = new \Magento\Core\Model\Config\Primary($rootDir, array());
-    $entryPoint = new \Magento\Core\Model\EntryPoint\Cron($config);
+    $entryPoint = new \Magento\App\EntryPoint\EntryPoint($rootDir, array());
 
-    $objectManager = new \Magento\Core\Model\ObjectManager($config);
+    $objectManager = new \Magento\App\ObjectManager($config);
     /** @var $configModel \Magento\Core\Model\Config */
     $configModel = $objectManager->get('Magento\Core\Model\Config');
-    $configModel->removeCache();
     $configModel->reinit();
     $config = array();
 
@@ -51,7 +49,7 @@ try {
 /**
  * Replace {{skin url=""}} with {{view url=""}} for given table field
  *
- * @param \Magento\Core\Model\Config\Primary $objectManager
+ * @param \Magento\ObjectManager $objectManager
  * @param string $table
  * @param string $col
  */
diff --git a/dev/tools/Magento/Tools/View/generator.php b/dev/tools/Magento/Tools/View/generator.php
index 0e826808e3e..438ca4c0177 100644
--- a/dev/tools/Magento/Tools/View/generator.php
+++ b/dev/tools/Magento/Tools/View/generator.php
@@ -30,6 +30,9 @@
 require __DIR__ . '/../../../../../app/bootstrap.php';
 \Magento\Autoload\IncludePath::addIncludePath(__DIR__.'/../../../');
 
+/**
+ * Command line usage help
+ */
 define('SYNOPSIS', <<<USAGE
 Usage: php -f generator.php -- [--source <dir>] [--destination <dir>] [--dry-run]
        php -f generator.php -- --help
@@ -64,9 +67,9 @@ try {
     $filesystem = new \Magento\Filesystem(new \Magento\Filesystem\Adapter\Local);
     $dirs = new \Magento\App\Dir($config->getSourceDir());
     $objectManager = new \Magento\ObjectManager\ObjectManager();
-
-    $themes = new \Magento\Core\Model\Theme\Collection($filesystem, $objectManager, $dirs);
-    $themes->setItemObjectClass(' \Magento\Tools\View\Generator\ThemeLight');
+    $entityFactory = new Magento\Core\Model\EntityFactory($objectManager);
+    $themes = new \Magento\Core\Model\Theme\Collection($filesystem, $dirs, $entityFactory);
+    $themes->setItemObjectClass('\Magento\Tools\View\Generator\ThemeLight');
     $themes->addDefaultPattern('*');
 
     $fallbackFactory = new \Magento\View\Design\Fallback\Factory($dirs);
diff --git a/downloader/app/Magento/Downloader/Controller.php b/downloader/app/Magento/Downloader/Controller.php
index c1819344efb..b7db3018a37 100755
--- a/downloader/app/Magento/Downloader/Controller.php
+++ b/downloader/app/Magento/Downloader/Controller.php
@@ -512,11 +512,11 @@ final class Controller
                     }
                     include_once self::$_instance->getBootstrapPath();
 
-                    \Magento\Core\Model\ObjectManager::getInstance()
+                    \Magento\App\ObjectManager::getInstance()
                         ->get('Magento\App\State')
                         ->setIsDownloader();
                 }
-                \Magento\Core\Model\ObjectManager::getInstance()->get('Magento\Core\Model\App');
+                \Magento\App\ObjectManager::getInstance()->get('Magento\Core\Model\App');
                 if (self::isInstalled()) {
                     \Mage::getSingleton('Magento\Backend\Model\Url')->turnOffSecretKey();
                 }
@@ -943,9 +943,9 @@ final class Controller
                 // reinit config and apply all updates
                 \Mage::app()->getConfig()->reinit();
 
-                /** @var $updater \Magento\App\UpdaterInterface*/
-                $updater = \Magento\Core\Model\ObjectManager::getInstance()
-                    ->get('Magento\App\UpdaterInterface');
+                /** @var $updater \Magento\Module\UpdaterInterface*/
+                $updater = \Magento\App\ObjectManager::getInstance()
+                    ->get('Magento\Module\UpdaterInterface');
                 $updater->updateScheme();
                 $updater->updateData();
                 $message .= 'Cache cleaned successfully';
@@ -1032,7 +1032,7 @@ final class Controller
                 ->setName($archiveName)
                 ->setBackupsDir(\Mage::getBaseDir('var') . DS . 'backups');
 
-            \Magento\Core\Model\ObjectManager::getInstance()
+            \Magento\App\ObjectManager::getInstance()
                 ->get('Magento\Core\Model\Registry')
                 ->register('backup_manager', $backupManager);
 
diff --git a/downloader/lib/Magento/Backup/Snapshot.php b/downloader/lib/Magento/Backup/Snapshot.php
index c971c2ae51c..0e2e9bc66ca 100755
--- a/downloader/lib/Magento/Backup/Snapshot.php
+++ b/downloader/lib/Magento/Backup/Snapshot.php
@@ -45,7 +45,7 @@ class Snapshot extends \Magento\Backup\Filesystem
     /**
      * Dirs instance
      *
-     * @var \Magento\Core\Model\Dir
+     * @var \Magento\App\Dir
      */
     protected $_dirs;
 
@@ -55,11 +55,11 @@ class Snapshot extends \Magento\Backup\Filesystem
     protected $_backupFactory;
 
     /**
-     * @param \Magento\Core\Model\Dir $dirs
-     * @param \Magento\Backup\Factory $backupFactory
+     * @param \Magento\App\Dir $dirs
+     * @param Factory $backupFactory
      */
     public function __construct(
-        \Magento\Core\Model\Dir $dirs,
+        \Magento\App\Dir $dirs,
         \Magento\Backup\Factory $backupFactory
     ) {
         $this->_dirs = $dirs;
diff --git a/index.php b/index.php
index 421ab28afee..0bedba34c92 100644
--- a/index.php
+++ b/index.php
@@ -8,7 +8,7 @@
  * $params['MAGE_RUN_CODE'] = 'website2';
  * $params['MAGE_RUN_TYPE'] = 'website';
  * ...
- * $entryPoint = new \Magento\Core\Model\EntryPoint\Http(new \Magento\Core\Model\Config\Primary(BP, $params));
+ * $entryPoint = new \Magento\App\EntryPoint\EntryPoint(BP, $params);
  * --------------------------------------------
  *
  * Magento
@@ -35,6 +35,7 @@
 require __DIR__ . '/app/bootstrap.php';
 
 \Magento\Profiler::start('magento');
-$entryPoint = new \Magento\Core\Model\EntryPoint\Http(new \Magento\Core\Model\Config\Primary(BP, $_SERVER));
-$entryPoint->processRequest();
+$entryPoint = new \Magento\App\EntryPoint\EntryPoint(BP, $_SERVER);
+$result = $entryPoint->run('Magento\App\Http');
 \Magento\Profiler::stop('magento');
+return $result;
\ No newline at end of file
diff --git a/lib/Magento/Acl/Resource/Provider.php b/lib/Magento/Acl/Resource/Provider.php
index f3a17df8766..a563542c366 100644
--- a/lib/Magento/Acl/Resource/Provider.php
+++ b/lib/Magento/Acl/Resource/Provider.php
@@ -31,28 +31,28 @@ class Provider implements \Magento\Acl\Resource\ProviderInterface
     protected $_configReader;
 
     /**
-     * @var \Magento\Config\ScopeInterface
+     * @var \Magento\Acl\Resource\TreeBuilder
      */
-    protected $_scope;
+    protected $_resourceTreeBuilder;
 
     /**
-     * @var \Magento\Acl\Resource\TreeBuilder
+     * @var \Magento\App\State
      */
-    protected $_resourceTreeBuilder;
+    protected $_appState;
 
     /**
      * @param \Magento\Config\ReaderInterface $configReader
-     * @param \Magento\Config\ScopeInterface $scope
      * @param \Magento\Acl\Resource\TreeBuilder $resourceTreeBuilder
+     * @param \Magento\App\State $appState
      */
     public function __construct(
         \Magento\Config\ReaderInterface $configReader,
-        \Magento\Config\ScopeInterface $scope,
-        \Magento\Acl\Resource\TreeBuilder $resourceTreeBuilder
+        \Magento\Acl\Resource\TreeBuilder $resourceTreeBuilder,
+        \Magento\App\State $appState
     ) {
         $this->_configReader = $configReader;
-        $this->_scope = $scope;
         $this->_resourceTreeBuilder = $resourceTreeBuilder;
+        $this->_appState = $appState;
     }
 
     /**
@@ -60,7 +60,7 @@ class Provider implements \Magento\Acl\Resource\ProviderInterface
      */
     public function getAclResources()
     {
-        $aclResourceConfig = $this->_configReader->read($this->_scope->getCurrentScope());
+        $aclResourceConfig = $this->_configReader->read($this->_appState->getAreaCode());
         if (!empty($aclResourceConfig['config']['acl']['resources'])) {
             return $this->_resourceTreeBuilder->build($aclResourceConfig['config']['acl']['resources']);
         }
diff --git a/lib/Magento/App/Area/FrontNameResolverFactory.php b/lib/Magento/App/Area/FrontNameResolverFactory.php
index 8c81099b540..b0b1e68400a 100644
--- a/lib/Magento/App/Area/FrontNameResolverFactory.php
+++ b/lib/Magento/App/Area/FrontNameResolverFactory.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Application area front name resolver factory
+ *
  * Magento
  *
  * NOTICE OF LICENSE
diff --git a/lib/Magento/App/Area/FrontNameResolverInterface.php b/lib/Magento/App/Area/FrontNameResolverInterface.php
index 9c311b441ce..1e5538dea5c 100644
--- a/lib/Magento/App/Area/FrontNameResolverInterface.php
+++ b/lib/Magento/App/Area/FrontNameResolverInterface.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Application area front name resolver
+ *
  * Magento
  *
  * NOTICE OF LICENSE
diff --git a/lib/Magento/App/AreaList.php b/lib/Magento/App/AreaList.php
index 091c226ca2f..28eed05e1b5 100644
--- a/lib/Magento/App/AreaList.php
+++ b/lib/Magento/App/AreaList.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Application area list
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -47,7 +49,7 @@ class AreaList
      * @param array $areas
      * @param string $default
      */
-    public function __construct(\Magento\App\Area\FrontNameResolverFactory $resolverFactory, array $areas, $default)
+    public function __construct(Area\FrontNameResolverFactory $resolverFactory, array $areas, $default)
     {
         $this->_resolverFactory = $resolverFactory;
         $this->_areas = $areas;
@@ -94,4 +96,15 @@ class AreaList
     {
         return array_keys($this->_areas);
     }
+
+    /**
+     * Retrieve default area router id
+     *
+     * @param string $areaCode
+     * @return string
+     */
+    public function getDefaultRouter($areaCode)
+    {
+        return isset($this->_areas[$areaCode]['router']) ? $this->_areas[$areaCode]['router'] : null;
+    }
 }
\ No newline at end of file
diff --git a/app/code/Magento/Core/Model/CacheInterface.php b/lib/Magento/App/CacheInterface.php
similarity index 95%
rename from app/code/Magento/Core/Model/CacheInterface.php
rename to lib/Magento/App/CacheInterface.php
index ef7750479e5..018476ad8e6 100644
--- a/app/code/Magento/Core/Model/CacheInterface.php
+++ b/lib/Magento/App/CacheInterface.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * System cache model interface
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -18,16 +20,10 @@
  * 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_Core
  * @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)
  */
-
-/**
- * System cache model interface
- */
-namespace Magento\Core\Model;
+namespace Magento\App;
 
 interface CacheInterface
 {
diff --git a/app/code/Magento/Core/Model/Config/Local.php b/lib/Magento/App/Config.php
similarity index 67%
rename from app/code/Magento/Core/Model/Config/Local.php
rename to lib/Magento/App/Config.php
index 9790f028419..43ab07fdd98 100644
--- a/app/code/Magento/Core/Model/Config/Local.php
+++ b/lib/Magento/App/Config.php
@@ -23,9 +23,9 @@
  * @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\Config;
+namespace Magento\App;
 
-class Local
+class Config
 {
     /**
      * Config data
@@ -35,36 +35,41 @@ class Local
     protected $_data;
 
     /**
-     * DI configuration
+     * Configuration loader
      *
-     * @var array
+     * @var \Magento\App\Config\Loader
      */
-    protected $_configuration = array();
+    protected $_loader;
 
     /**
-     * @var \Magento\Core\Model\Config\Loader\Local
+     * Application options
+     *
+     * @var array
      */
-    protected $_loader;
+    protected $_parameters;
 
     /**
-     * @param \Magento\Core\Model\Config\Loader\Local $loader
+     * @param array $parameters
+     * @param Config\Loader $loader
      */
-    public function __construct(\Magento\Core\Model\Config\Loader\Local $loader)
+    public function __construct(array $parameters, Config\Loader $loader)
     {
         $this->_loader = $loader;
-        $this->_data = $loader->load();
+        $this->_parameters = $parameters;
+        $this->_data = array_replace_recursive($this->_parseParams($loader->load()), $parameters);
     }
 
     /**
+     * @param array $input
      * @return array
      */
-    public function getParams()
+    protected function _parseParams(array $input)
     {
-        $stack = $this->_data;
+        $stack = $input;
         unset($stack['resource']);
         unset($stack['connection']);
         $separator = '.';
-        $parameters = array();
+        $output = array();
 
         while ($stack) {
             list($key, $value) = each($stack);
@@ -80,9 +85,11 @@ class Local
                 $stack = $build + $stack;
                 continue;
             }
-            $parameters[$key] = $value;
+            $output[$key] = $value;
         }
-        return $parameters;
+        $output['connection'] = isset($input['connection']) ? $input['connection'] : array();
+        $output['resource'] = isset($input['resource']) ? $input['resource'] : array();
+        return $output;
     }
 
     /**
@@ -109,13 +116,18 @@ class Local
     }
 
     /**
-     * Retrieve resources
+     * Retrieve key
      *
-     * @return array
+     * @param string $key
+     * @param mixed $defaultValue
+     * @return array|null
      */
-    public function getResources()
+    public function get($key = null, $defaultValue = null)
     {
-        return isset($this->_data['resource']) ? $this->_data['resource'] : array();
+        if ($key === null) {
+            return $this->_data;
+        }
+        return isset($this->_data[$key]) ? $this->_data[$key] : $defaultValue;
     }
 
     /**
@@ -123,6 +135,6 @@ class Local
      */
     public function reload()
     {
-        $this->_data = $this->_loader->load();
+        $this->_data = array_replace_recursive($this->_parseParams($this->_loader->load()), $this->_parameters);
     }
 }
diff --git a/app/code/Magento/Core/Model/Config/FileResolver/Primary.php b/lib/Magento/App/Config/FileResolver/Primary.php
similarity index 97%
rename from app/code/Magento/Core/Model/Config/FileResolver/Primary.php
rename to lib/Magento/App/Config/FileResolver/Primary.php
index b84b42fb2ed..37c7a6ca471 100644
--- a/app/code/Magento/Core/Model/Config/FileResolver/Primary.php
+++ b/lib/Magento/App/Config/FileResolver/Primary.php
@@ -23,7 +23,7 @@
  * @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\Config\FileResolver;
+namespace Magento\App\Config\FileResolver;
 
 /***
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
diff --git a/app/code/Magento/Core/Model/Config/Loader/Local.php b/lib/Magento/App/Config/Loader.php
similarity index 82%
rename from app/code/Magento/Core/Model/Config/Loader/Local.php
rename to lib/Magento/App/Config/Loader.php
index 5adf806c3b0..f0e830c767b 100644
--- a/app/code/Magento/Core/Model/Config/Loader/Local.php
+++ b/lib/Magento/App/Config/Loader.php
@@ -23,10 +23,17 @@
  * @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\Config\Loader;
+namespace Magento\App\Config;
 
-class Local
+use \Magento\App\Dir;
+
+class Loader
 {
+    /**
+     * Local configuration file
+     */
+    const PARAM_CUSTOM_FILE = 'custom.options.file';
+
     /**
      * Local configuration file
      */
@@ -46,13 +53,6 @@ class Local
      */
     protected $_customFile;
 
-    /**
-     * Custom configuration string
-     *
-     * @var string
-     */
-    protected $_customConfig;
-
     /**
      * Configuration identifier attributes
      *
@@ -61,15 +61,13 @@ class Local
     protected $_idAttributes = array('/config/resource' => 'name', '/config/connection' => 'name');
 
     /**
-     * @param string $configDirectory
-     * @param string $customConfig
+     * @param Dir $dirs
      * @param string $customFile
      */
-    public function __construct($configDirectory, $customConfig = null, $customFile = null)
+    public function __construct(Dir $dirs, $customFile = null)
     {
-        $this->_dir = $configDirectory;
+        $this->_dir = $dirs->getDir(Dir::CONFIG);
         $this->_customFile = $customFile;
-        $this->_customConfig = $customConfig;
     }
 
     /**
@@ -93,10 +91,6 @@ class Local
             }
         }
 
-        // 3. extra local configuration string
-        if ($this->_customConfig) {
-            $localConfig->merge($this->_customConfig);
-        }
         $converter = new \Magento\Config\Converter\Dom\Flat($this->_idAttributes);
 
         $result = $converter->convert($localConfig->getDom());
diff --git a/app/code/Magento/Core/Model/Config/ValidationState.php b/lib/Magento/App/Config/ValidationState.php
similarity index 97%
rename from app/code/Magento/Core/Model/Config/ValidationState.php
rename to lib/Magento/App/Config/ValidationState.php
index ecd1e612ef0..38f3e02751b 100644
--- a/app/code/Magento/Core/Model/Config/ValidationState.php
+++ b/lib/Magento/App/Config/ValidationState.php
@@ -23,7 +23,7 @@
  * @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\Config;
+namespace Magento\App\Config;
 
 class ValidationState implements \Magento\Config\ValidationStateInterface
 {
diff --git a/lib/Magento/App/Cron.php b/lib/Magento/App/Cron.php
new file mode 100644
index 00000000000..e4f10f8484a
--- /dev/null
+++ b/lib/Magento/App/Cron.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Cron application
+ *
+ * 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\App;
+
+use \Magento\Config\ScopeInterface,
+    \Magento\App\ObjectManager\ConfigLoader,
+    \Magento\Event\ManagerInterface;
+
+class Cron implements \Magento\AppInterface
+{
+    /**
+     * @var \Magento\Event\ManagerInterface
+     */
+    protected $_eventManager;
+
+    /**
+     * @var State
+     */
+    protected $_state;
+
+    /**
+     * @param ManagerInterface $eventManager
+     * @param State $state
+     */
+    public function __construct(
+        ManagerInterface $eventManager,
+        State $state
+    ) {
+        $this->_eventManager = $eventManager;
+        $this->_state = $state;
+    }
+
+    /**
+     * Execute application
+     *
+     * @return int
+     */
+    public function execute()
+    {
+        $this->_state->setAreaCode('crontab');
+        $this->_eventManager->dispatch('default');
+        return 0;
+    }
+}
diff --git a/lib/Magento/App/DefaultPath/DefaultPath.php b/lib/Magento/App/DefaultPath/DefaultPath.php
new file mode 100644
index 00000000000..32b39d308b2
--- /dev/null
+++ b/lib/Magento/App/DefaultPath/DefaultPath.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Application default url
+ *
+ * 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\App\DefaultPath;
+
+class DefaultPath implements \Magento\App\DefaultPathInterface
+{
+    /**
+     * Default path parts
+     *
+     * @var array
+     */
+    protected $_parts;
+
+    /**
+     * @param array $parts
+     */
+    public function __construct(array $parts)
+    {
+        $this->_parts = $parts;
+    }
+
+    /**
+     * Retrieve path part by key
+     *
+     * @param string $code
+     * @return string
+     */
+    public function getPart($code)
+    {
+        return isset($this->_parts[$code]) ? $this->_parts[$code] : null;
+    }
+}
\ No newline at end of file
diff --git a/lib/Magento/App/DefaultPathInterface.php b/lib/Magento/App/DefaultPathInterface.php
new file mode 100644
index 00000000000..75799887758
--- /dev/null
+++ b/lib/Magento/App/DefaultPathInterface.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Abstract application router
+ *
+ * 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\App;
+
+interface DefaultPathInterface
+{
+    /**
+     * @param string $code
+     * @return string
+     */
+    public function getPart($code);
+}
\ No newline at end of file
diff --git a/lib/Magento/App/Dir.php b/lib/Magento/App/Dir.php
index 5ac0e745a96..f9ad9d74171 100644
--- a/lib/Magento/App/Dir.php
+++ b/lib/Magento/App/Dir.php
@@ -30,6 +30,16 @@ namespace Magento\App;
 
 class Dir
 {
+    /**
+     * Custom application dirs
+     */
+    const PARAM_APP_DIRS = 'app_dirs';
+
+    /**
+     * Custom application uris
+     */
+    const PARAM_APP_URIS = 'app_uris';
+
     /**
      * Code base root
      */
diff --git a/lib/Magento/App/EntryPoint/EntryPoint.php b/lib/Magento/App/EntryPoint/EntryPoint.php
new file mode 100644
index 00000000000..163829840ee
--- /dev/null
+++ b/lib/Magento/App/EntryPoint/EntryPoint.php
@@ -0,0 +1,104 @@
+<?php
+/**
+ * Application entry point, used to bootstrap and run application
+ *
+ * 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\App\EntryPoint;
+
+use Magento\App\State,
+    Magento\App\EntryPointInterface,
+    Magento\ObjectManager;
+use Magento\Webapi\Exception;
+
+class EntryPoint implements EntryPointInterface
+{
+    /**
+     * @var string
+     */
+    protected $_rootDir;
+
+    /**
+     * @var array
+     */
+    protected $_parameters;
+
+    /**
+     * Application object manager
+     *
+     * @var ObjectManager
+     */
+    protected $_locator;
+
+    /**
+     * @param string $rootDir
+     * @param array $parameters
+     * @param ObjectManager $objectManager
+     * @SuppressWarnings(PHPMD.ExitExpression)
+     */
+    public function __construct(
+        $rootDir,
+        array $parameters = array(),
+        ObjectManager $objectManager = null
+    ) {
+        $this->_rootDir = $rootDir;
+        $this->_parameters = $parameters;
+        $this->_locator = $objectManager;
+    }
+
+    /**
+     * Run application
+     *
+     * @param string $applicationName
+     * @param array $arguments
+     * @return int
+     */
+    public function run($applicationName, array $arguments = array())
+    {
+        try {
+            if (!$this->_locator) {
+                $locatorFactory = new \Magento\App\ObjectManagerFactory();
+                $this->_locator = $locatorFactory->create($this->_rootDir, $this->_parameters);
+            }
+            return $this->_locator->create($applicationName, $arguments)->execute();
+        } catch (\Exception $exception) {
+            if (isset($this->_parameters[state::PARAM_MODE])
+                && $this->_parameters[State::PARAM_MODE] == State::MODE_DEVELOPER
+            ) {
+                print $exception->getMessage() . "\n\n";
+                print $exception->getTraceAsString();
+            } else {
+                $message = "Error happened during application run.\n";
+                try {
+                    if (!$this->_locator) {
+                        throw new \DomainException();
+                    }
+                    $this->_locator->get('Magento\Core\Model\Logger')->logException($exception);
+                } catch (\Exception $e) {
+                    $message .= "Could not write error message to log. Please use developer mode to see the message.\n";
+                }
+                print $message;
+            }
+            return 1;
+        }
+    }
+}
diff --git a/lib/Magento/App/EntryPointInterface.php b/lib/Magento/App/EntryPointInterface.php
new file mode 100644
index 00000000000..002127e8206
--- /dev/null
+++ b/lib/Magento/App/EntryPointInterface.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Application entry point. Bootstraps and runs application
+ *
+ * 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\App;
+
+interface EntryPointInterface
+{
+    /**
+     * @param string $applicationName
+     * @param array $arguments
+     */
+    public function run($applicationName, array $arguments = array());
+}
diff --git a/lib/Magento/App/Error/Handler.php b/lib/Magento/App/Error/Handler.php
new file mode 100644
index 00000000000..b59e9000010
--- /dev/null
+++ b/lib/Magento/App/Error/Handler.php
@@ -0,0 +1,102 @@
+<?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)
+ */
+
+/**
+ * Default Error Handler
+ */
+namespace Magento\App\Error;
+
+class Handler extends \Magento\Error\Handler
+{
+    /**
+     * @var \Magento\Logger
+     */
+    protected $_logger;
+
+    /**
+     * @var \Magento\App\Dir
+     */
+    protected $_dir;
+
+    /**
+     * @var \Magento\App\State
+     */
+    protected $_appState;
+
+    /**
+     * @param \Magento\Logger $logger
+     * @param \Magento\App\Dir $dir
+     * @param \Magento\App\State $appState
+     */
+    public function __construct(
+        \Magento\Logger $logger,
+        \Magento\App\Dir $dir,
+        \Magento\App\State $appState
+    ) {
+        $this->_logger = $logger;
+        $this->_dir = $dir;
+        $this->_appState = $appState;
+    }
+
+    /**
+     * Process exception
+     *
+     * @param \Exception $exception
+     * @param array $params
+     */
+    public function processException(\Exception $exception, array $params = array())
+    {
+        if ($this->_appState->getMode() == \Magento\App\State::MODE_DEVELOPER) {
+            parent::processException($exception, $params);
+        } else {
+            $reportData = array($exception->getMessage(), $exception->getTraceAsString()) + $params;
+            // retrieve server data
+            if (isset($_SERVER)) {
+                if (isset($_SERVER['REQUEST_URI'])) {
+                    $reportData['url'] = $_SERVER['REQUEST_URI'];
+                }
+                if (isset($_SERVER['SCRIPT_NAME'])) {
+                    $reportData['script_name'] = $_SERVER['SCRIPT_NAME'];
+                }
+            }
+            require_once($this->_dir->getDir(\Magento\App\Dir::PUB) . DS . 'errors' . DS . 'report.php');
+        }
+    }
+
+    /**
+     * Show error as exception or log it
+     *
+     * @throws \Exception
+     */
+    protected function _processError($errorMessage)
+    {
+        if ($this->_appState->getMode() == \Magento\App\State::MODE_DEVELOPER) {
+            parent::_processError($errorMessage);
+        } else {
+            $exception = new \Exception($errorMessage);
+            $errorMessage .= $exception->getTraceAsString();
+            $this->_logger->log($errorMessage, \Zend_Log::ERR);
+        }
+    }
+}
diff --git a/lib/Magento/App/FrontController.php b/lib/Magento/App/FrontController.php
index 52e0d7760db..bd2847d5f23 100644
--- a/lib/Magento/App/FrontController.php
+++ b/lib/Magento/App/FrontController.php
@@ -33,7 +33,7 @@ class FrontController implements FrontControllerInterface
     protected $_defaults = array();
 
     /**
-     * @var \Magento\App\RouterList
+     * @var \Magento\App\RouterInterface[]
      */
     protected $_routerList;
 
@@ -47,67 +47,26 @@ class FrontController implements FrontControllerInterface
      */
     protected $_response;
 
-    /**
-     * @var \Magento\Event\ManagerInterface
-     */
-    protected $_eventManager;
-
     /**
      * @var ActionInterface
      */
     protected $_action;
 
     /**
-     * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\App\ResponseInterface $response
      * @param RouterList $routerList
      * @param array $data
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function __construct(
-        \Magento\Event\ManagerInterface $eventManager,
         \Magento\App\ResponseInterface $response,
         RouterList $routerList,
         array $data = array()
     ) {
-        $this->_eventManager = $eventManager;
         $this->_routerList = $routerList;
         $this->_response = $response;
     }
 
-    /**
-     * Set Default Value
-     *
-     * @param string $key
-     * @param mixed $value
-     * @return $this
-     */
-    public function setDefault($key, $value = null)
-    {
-        if (is_array($key)) {
-            $this->_defaults = $key;
-        } else {
-            $this->_defaults[$key] = $value;
-        }
-        return $this;
-    }
-
-    /**
-     * Retrieve default value
-     *
-     * @param string $key
-     * @return mixed
-     */
-    public function getDefault($key=null)
-    {
-        if (is_null($key)) {
-            return $this->_defaults;
-        } elseif (isset($this->_defaults[$key])) {
-            return $this->_defaults[$key];
-        }
-        return false;
-    }
-
     /**
      * Retrieve request object
      *
@@ -148,6 +107,7 @@ class FrontController implements FrontControllerInterface
 
     /**
      * @param RequestInterface $request
+     * @return ResponseInterface
      * @throws \LogicException
      */
     public function dispatch(RequestInterface $request)
@@ -156,11 +116,7 @@ class FrontController implements FrontControllerInterface
         \Magento\Profiler::start('routers_match');
         $routingCycleCounter = 0;
         while (!$request->isDispatched() && $routingCycleCounter++ < 100) {
-            /** @var $router \Magento\App\Router\AbstractRouter */
-            foreach ($this->_routerList->getRouters() as $router) {
-                $router->setFront($this);
-
-                /** @var $controllerInstance \Magento\App\ActionInterface */
+            foreach ($this->_routerList as $router) {
                 $controllerInstance = $router->match($this->getRequest());
                 if ($controllerInstance) {
                     $controllerInstance->dispatch($request->getActionName());
@@ -172,12 +128,6 @@ class FrontController implements FrontControllerInterface
         if ($routingCycleCounter > 100) {
             throw new \LogicException('Front controller reached 100 router match iterations');
         }
-        // This event gives possibility to launch something before sending output (allow cookie setting)
-        $this->_eventManager->dispatch('controller_front_send_response_before', array('front' => $this));
-        \Magento\Profiler::start('send_response');
-        $this->_eventManager->dispatch('http_response_send_before', array('response' => $this));
-        $this->getResponse()->sendResponse();
-        \Magento\Profiler::stop('send_response');
-        $this->_eventManager->dispatch('controller_front_send_response_after', array('front' => $this));
+        return $this->getResponse();
     }
 }
diff --git a/lib/Magento/App/FrontControllerInterface.php b/lib/Magento/App/FrontControllerInterface.php
index fe382c2a00f..6af31082f36 100644
--- a/lib/Magento/App/FrontControllerInterface.php
+++ b/lib/Magento/App/FrontControllerInterface.php
@@ -31,6 +31,7 @@ interface FrontControllerInterface
      * Dispatch application action
      *
      * @param RequestInterface $request
+     * @return ResponseInterface
      */
     public function dispatch(RequestInterface $request);
 }
diff --git a/lib/Magento/App/Http.php b/lib/Magento/App/Http.php
new file mode 100644
index 00000000000..14c3ec801ae
--- /dev/null
+++ b/lib/Magento/App/Http.php
@@ -0,0 +1,151 @@
+<?php
+/**
+ * Http application
+ *
+ * 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\App;
+
+use \Magento\Config\Scope,
+    \Magento\App\ObjectManager\ConfigLoader,
+    \Magento\Event;
+
+class Http implements \Magento\AppInterface
+{
+    /**
+     * @var \Magento\ObjectManager
+     */
+    protected $_objectManager;
+
+    /**
+     * @var \Magento\Event\Manager
+     */
+    protected $_eventManager;
+
+    /**
+     * @var AreaList
+     */
+    protected $_areaList;
+
+    /**
+     * @var RequestInterface
+     */
+    protected $_request;
+
+    /**
+     * @var \Magento\Config\Scope
+     */
+    protected $_configScope;
+
+    /**
+     * @var ConfigLoader
+     */
+    protected $_configLoader;
+
+    /**
+     * @var State
+     */
+    protected $_state;
+
+    /**
+     * @var Dir
+     */
+    protected $_dir;
+
+    /**
+     * @param \Magento\ObjectManager $objectManager
+     * @param Event\Manager $eventManager
+     * @param AreaList $areaList
+     * @param RequestInterface $request
+     * @param Scope $configScope
+     * @param ConfigLoader $configLoader
+     * @param State $state
+     * @param Dir $dir
+     */
+    public function __construct(
+        \Magento\ObjectManager $objectManager,
+        Event\Manager $eventManager,
+        AreaList $areaList,
+        RequestInterface $request,
+        Scope $configScope,
+        ConfigLoader $configLoader,
+        State $state,
+        Dir $dir
+    ) {
+        $this->_objectManager = $objectManager;
+        $this->_eventManager = $eventManager;
+        $this->_areaList = $areaList;
+        $this->_request = $request;
+        $this->_configScope = $configScope;
+        $this->_configLoader = $configLoader;
+        $this->_state = $state;
+        $this->_dir = $dir;
+    }
+
+    /**
+     * Execute application
+     */
+    public function execute()
+    {
+        try {
+            $areaCode = $this->_areaList->getCodeByFrontName($this->_request->getFrontName());
+            $this->_state->setAreaCode($areaCode);
+            $this->_objectManager->configure($this->_configLoader->load($areaCode));
+            $response = $this->_objectManager->get('Magento\App\FrontControllerInterface')->dispatch($this->_request);
+            // This event gives possibility to launch something before sending output (allow cookie setting)
+            $eventParams = array('request' => $this->_request, 'response' => $response);
+            $this->_eventManager->dispatch('controller_front_send_response_before', $eventParams);
+            \Magento\Profiler::start('send_response');
+            $response->sendResponse();
+            \Magento\Profiler::stop('send_response');
+            $this->_eventManager->dispatch('controller_front_send_response_after', $eventParams);
+            return 0;
+        } catch(\Exception $exception) {
+            echo $exception->getMessage() . "\n";
+            try {
+                if ($this->_state->getMode() == State::MODE_DEVELOPER) {
+                    header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
+                    print '<pre>';
+                    print $exception->getMessage() . "\n\n";
+                    print $exception->getTraceAsString();
+                    print '</pre>';
+                } else {
+                    $reportData = array($exception->getMessage(), $exception->getTraceAsString());
+                    // retrieve server data
+                    if (isset($_SERVER)) {
+                        if (isset($_SERVER['REQUEST_URI'])) {
+                            $reportData['url'] = $_SERVER['REQUEST_URI'];
+                        }
+                        if (isset($_SERVER['SCRIPT_NAME'])) {
+                            $reportData['script_name'] = $_SERVER['SCRIPT_NAME'];
+                        }
+                    }
+                    require_once ($this->_dir->getDir(Dir::PUB) . DS . 'errors' . DS . 'report.php');
+                }
+            } catch (\Exception $exception) {
+                header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
+                print "Unknown error happened.";
+            }
+            return -1;
+        }
+    }
+}
diff --git a/lib/Magento/App/ObjectManager.php b/lib/Magento/App/ObjectManager.php
new file mode 100644
index 00000000000..29e623ba424
--- /dev/null
+++ b/lib/Magento/App/ObjectManager.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Magento application object manager. Configures and application application
+ *
+ * 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\App;
+use Magento\ObjectManager\Factory;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class ObjectManager extends \Magento\ObjectManager\ObjectManager
+{
+    /**
+     * @var \Magento\App\ObjectManager
+     */
+    protected static $_instance;
+
+    /**
+     * @var \Magento\ObjectManager\Relations
+     */
+    protected $_compiledRelations;
+
+    /**
+     * Retrieve object manager
+     *
+     * TODO: Temporary solution for serialization, should be removed when Serialization problem is resolved
+     *
+     * @deprecated
+     * @return \Magento\ObjectManager
+     * @throws \RuntimeException
+     */
+    public static function getInstance()
+    {
+        if (!self::$_instance instanceof \Magento\ObjectManager) {
+            throw new \RuntimeException('ObjectManager isn\'t initialized');
+        }
+        return self::$_instance;
+    }
+
+    /**
+     * Set object manager instance
+     *
+     * @param \Magento\ObjectManager $objectManager
+     * @throws \LogicException
+     */
+    public static function setInstance(\Magento\ObjectManager $objectManager)
+    {
+        self::$_instance = $objectManager;
+    }
+
+    /**
+     * @param Factory $factory
+     * @param \Magento\ObjectManager\Config $config
+     * @param array $sharedInstances
+     */
+    public function __construct(
+        Factory $factory = null, \Magento\ObjectManager\Config $config = null, array $sharedInstances = array()
+    ) {
+        parent::__construct($factory, $config, $sharedInstances);
+        self::$_instance = $this;
+    }
+}
diff --git a/app/code/Magento/Core/Model/ObjectManager/ConfigCache.php b/lib/Magento/App/ObjectManager/ConfigCache.php
similarity index 96%
rename from app/code/Magento/Core/Model/ObjectManager/ConfigCache.php
rename to lib/Magento/App/ObjectManager/ConfigCache.php
index a657c6da5ab..c04219569f3 100644
--- a/app/code/Magento/Core/Model/ObjectManager/ConfigCache.php
+++ b/lib/Magento/App/ObjectManager/ConfigCache.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Object manager configuration cache
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -22,7 +24,7 @@
  * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Core\Model\ObjectManager;
+namespace Magento\App\ObjectManager;
 
 class ConfigCache implements \Magento\ObjectManager\ConfigCache
 {
diff --git a/app/code/Magento/Core/Model/ObjectManager/ConfigLoader.php b/lib/Magento/App/ObjectManager/ConfigLoader.php
similarity index 97%
rename from app/code/Magento/Core/Model/ObjectManager/ConfigLoader.php
rename to lib/Magento/App/ObjectManager/ConfigLoader.php
index 117f6799ca3..cb5c2444260 100644
--- a/app/code/Magento/Core/Model/ObjectManager/ConfigLoader.php
+++ b/lib/Magento/App/ObjectManager/ConfigLoader.php
@@ -23,7 +23,7 @@
  * @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\ObjectManager;
+namespace Magento\App\ObjectManager;
 
 class ConfigLoader
 {
diff --git a/app/code/Magento/Core/Model/ObjectManager/ConfigLoader/Primary.php b/lib/Magento/App/ObjectManager/ConfigLoader/Primary.php
similarity index 87%
rename from app/code/Magento/Core/Model/ObjectManager/ConfigLoader/Primary.php
rename to lib/Magento/App/ObjectManager/ConfigLoader/Primary.php
index d8d4bb71f00..253b364fd38 100644
--- a/app/code/Magento/Core/Model/ObjectManager/ConfigLoader/Primary.php
+++ b/lib/Magento/App/ObjectManager/ConfigLoader/Primary.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Primary configuration loader for application object manager
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,7 +23,7 @@
  * @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\ObjectManager\ConfigLoader;
+namespace Magento\App\ObjectManager\ConfigLoader;
 
 class Primary
 {
@@ -55,10 +57,10 @@ class Primary
     public function load()
     {
         $reader = new \Magento\ObjectManager\Config\Reader\Dom(
-            new \Magento\Core\Model\Config\FileResolver\Primary($this->_dirs),
+            new \Magento\App\Config\FileResolver\Primary($this->_dirs),
             new \Magento\ObjectManager\Config\Mapper\Dom(),
             new \Magento\ObjectManager\Config\SchemaLocator(),
-            new \Magento\Core\Model\Config\ValidationState($this->_appMode)
+            new \Magento\App\Config\ValidationState($this->_appMode)
         );
 
         return $reader->read('primary');
diff --git a/lib/Magento/App/ObjectManagerFactory.php b/lib/Magento/App/ObjectManagerFactory.php
new file mode 100644
index 00000000000..8ac370c8441
--- /dev/null
+++ b/lib/Magento/App/ObjectManagerFactory.php
@@ -0,0 +1,173 @@
+<?php
+/**
+ * Initialize application object manager.
+ *
+ * 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\App;
+
+use Magento\App\Dir,
+    Magento\App\Config,
+    Magento\ObjectManager\Factory\Factory,
+    Magento\Profiler;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * Class ObjectManagerFactory
+ * @package Magento\App
+ */
+class ObjectManagerFactory
+{
+    /**
+     * Locator class name
+     *
+     * @var string
+     */
+    protected $_locatorClassName = '\Magento\ObjectManager\ObjectManager';
+
+    /**
+     * Config class name
+     *
+     * @var string
+     */
+    protected $_configClassName = '\Magento\ObjectManager\Config\Config';
+
+    /**
+     * Create object manager
+     *
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+     * @SuppressWarnings(PHPMD.NPathComplexity)
+     *
+     * @param string $rootDir
+     * @param array $arguments
+     * @return \Magento\ObjectManager\ObjectManager
+     * @throws \Magento\BootstrapException
+     */
+    public function create($rootDir, array $arguments)
+    {
+        $directories = new Dir(
+            $rootDir,
+            isset($arguments[Dir::PARAM_APP_URIS]) ? $arguments[Dir::PARAM_APP_URIS] : array(),
+            isset($arguments[Dir::PARAM_APP_DIRS]) ? $arguments[Dir::PARAM_APP_DIRS] : array()
+        );
+
+        \Magento\Autoload\IncludePath::addIncludePath(array($directories->getDir(Dir::GENERATION)));
+
+        $options = new Config(
+            $arguments,
+            new Config\Loader(
+                $directories,
+                isset($arguments[Config\Loader::PARAM_CUSTOM_FILE])
+                    ? $arguments[Config\Loader::PARAM_CUSTOM_FILE]
+                    : null
+            )
+        );
+
+        $definitionFactory = new \Magento\ObjectManager\DefinitionFactory(
+            $directories->getDir(DIR::DI),
+            $directories->getDir(DIR::GENERATION),
+            $options->get('definition.format', 'serialized')
+        );
+
+        $definitions = $definitionFactory->createClassDefinition($options->get('definitions'));
+        $relations = $definitionFactory->createRelations();
+        $configClass = $this->_configClassName;
+        /** @var \Magento\ObjectManager\Config\Config $diConfig */
+        $diConfig = new $configClass($relations, $definitions);
+        $appMode = $options->get(State::PARAM_MODE, State::MODE_DEFAULT);
+
+        $configData = $this->_loadPrimaryConfig($directories, $appMode);
+
+        if ($configData) {
+            $diConfig->extend($configData);
+        }
+
+        $factory = new Factory($diConfig, null, $definitions, $options->get());
+
+        $className = $this->_locatorClassName;
+        /** @var \Magento\ObjectManager $locator */
+        $locator = new $className($factory, $diConfig, array(
+            'Magento\App\Config' => $options,
+            'Magento\App\Dir' => $directories
+        ));
+
+        \Magento\App\ObjectManager::setInstance($locator); 
+
+        /** @var \Magento\App\Dir\Verification $verification */
+        $verification = $locator->get('Magento\App\Dir\Verification');
+        $verification->createAndVerifyDirectories();
+
+        $diConfig->setCache($locator->get('Magento\App\ObjectManager\ConfigCache'));
+        $locator->configure(
+            $locator->get('Magento\App\ObjectManager\ConfigLoader')->load('global')
+        );
+        $locator->get('Magento\Config\ScopeInterface')->setCurrentScope('global');
+        $locator->get('Magento\App\Resource')->setCache($locator->get('Magento\App\CacheInterface'));
+
+        $relations = $definitionFactory->createRelations();
+
+        $interceptionConfig = $locator->create('Magento\Interception\Config\Config', array(
+            'relations' => $relations,
+            'omConfig' => $diConfig,
+            'classDefinitions' => $definitions instanceof \Magento\ObjectManager\Definition\Compiled
+                ? $definitions
+                : null,
+        ));
+
+        $pluginList = $locator->create('Magento\Interception\PluginList\PluginList', array(
+            'relations' => $relations,
+            'definitions' => $definitionFactory->createPluginDefinition(),
+            'omConfig' => $diConfig,
+            'classDefinitions' => $definitions instanceof \Magento\ObjectManager\Definition\Compiled
+                ? $definitions
+                : null,
+        ));
+        $factory = $locator->create('Magento\Interception\FactoryDecorator', array(
+            'factory' => $factory,
+            'config' => $interceptionConfig,
+            'pluginList' => $pluginList
+        ));
+        $locator->setFactory($factory);
+        return $locator;
+    }
+
+    /**
+     * Load primary config data
+     *
+     * @param Dir $directories
+     * @param string $appMode
+     * @return array
+     * @throws \Magento\BootstrapException
+     */
+    protected function _loadPrimaryConfig(Dir $directories, $appMode)
+    {
+        $configData = null;
+        $primaryLoader = new \Magento\App\ObjectManager\ConfigLoader\Primary($directories, $appMode);
+        try {
+            $configData = $primaryLoader->load();
+        } catch (\Exception $e) {
+            throw new \Magento\BootstrapException($e->getMessage());
+        }
+        return $configData;
+    }
+}
\ No newline at end of file
diff --git a/lib/Magento/App/Request/Http.php b/lib/Magento/App/Request/Http.php
index 218f6fdcc2f..819b1bc4b21 100644
--- a/lib/Magento/App/Request/Http.php
+++ b/lib/Magento/App/Request/Http.php
@@ -67,9 +67,9 @@ class Http extends \Zend_Controller_Request_Http implements \Magento\App\Request
     protected $_beforeForwardInfo = array();
 
     /**
-     * @var \Magento\App\RouterListInterface
+     * @var \Magento\App\Route\ConfigInterface
      */
-    protected $_routerList;
+    protected $_routeConfig;
 
     /**
      * @var PathInfoProcessorInterface
@@ -77,18 +77,18 @@ class Http extends \Zend_Controller_Request_Http implements \Magento\App\Request
     private $_pathInfoProcessor;
 
     /**
-     * @param \Magento\App\RouterListInterface $routerList
+     * @param \Magento\App\Route\ConfigInterface $routeConfig
      * @param string $uri
      * @param array $directFrontNames
      * @param PathInfoProcessorInterface $pathInfoProcessor
      */
     public function __construct(
-        \Magento\App\RouterListInterface $routerList,
+        \Magento\App\Route\ConfigInterface $routeConfig,
         $uri = null,
         $directFrontNames = array(),
         \Magento\App\Request\PathInfoProcessorInterface $pathInfoProcessor = null
     ) {
-        $this->_routerList = $routerList;
+        $this->_routeConfig = $routeConfig;
         $this->_directFrontNames = $directFrontNames;
         parent::__construct($uri);
         $this->_pathInfoProcessor = $pathInfoProcessor;
@@ -226,11 +226,7 @@ class Http extends \Zend_Controller_Request_Http implements \Magento\App\Request
     public function setRouteName($route)
     {
         $this->_route = $route;
-        $router = $this->_routerList->getRouterByRoute($route);
-        if (!$router) {
-            return $this;
-        }
-        $module = $router->getFrontNameByRoute($route);
+        $module = $this->_routeConfig->getRouteFrontName($route);
         if ($module) {
             $this->setModuleName($module);
         }
@@ -384,8 +380,7 @@ class Http extends \Zend_Controller_Request_Http implements \Magento\App\Request
         if ($this->_requestedRouteName === null) {
             if ($this->_rewritedPathInfo !== null && isset($this->_rewritedPathInfo[0])) {
                 $frontName = $this->_rewritedPathInfo[0];
-                $router = $this->_routerList->getRouterByFrontName($frontName);
-                $this->_requestedRouteName = $router->getRouteByFrontName($frontName);
+                $this->_requestedRouteName = $this->_routeConfig->getRouteByFrontName($frontName);
             } else {
                 // no rewritten path found, use default route name
                 return $this->getRouteName();
diff --git a/app/code/Magento/Core/Model/Resource.php b/lib/Magento/App/Resource.php
similarity index 71%
rename from app/code/Magento/Core/Model/Resource.php
rename to lib/Magento/App/Resource.php
index 00484ecb40d..03744607985 100644
--- a/app/code/Magento/Core/Model/Resource.php
+++ b/lib/Magento/App/Resource.php
@@ -23,16 +23,16 @@
  * @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;
+namespace Magento\App;
 
 class Resource
 {
-    const AUTO_UPDATE_CACHE_KEY  = 'DB_AUTOUPDATE';
     const AUTO_UPDATE_ONCE       = 0;
     const AUTO_UPDATE_NEVER      = -1;
     const AUTO_UPDATE_ALWAYS     = 1;
 
     const PARAM_TABLE_PREFIX = 'db.table_prefix';
+    const DEFAULT_READ_RESOURCE  = 'core_read';
 
     /**
      * Instances of actual connections
@@ -51,21 +51,21 @@ class Resource
     /**
      * Resource config
      *
-     * @var \Magento\Core\Model\Config\ResourceInterface
+     * @var \Magento\App\Resource\ConfigInterface
      */
-    protected $_resourceConfig;
+    protected $_config;
 
     /**
      * Resource connection adapter factory
      *
-     * @var \Magento\Core\Model\Resource\ConnectionFactory
+     * @var \Magento\App\Resource\ConnectionFactory
      */
     protected $_connectionFactory;
 
     /**
      * Application cache
      *
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $_cache;
 
@@ -75,27 +75,19 @@ class Resource
     protected $_tablePrefix;
 
     /**
-     * @var \Magento\Core\Model\AppInterface
-     */
-    protected $_app;
-
-    /**
-     * @param \Magento\Core\Model\CacheInterface $cache
-     * @param \Magento\Core\Model\AppInterface $app
-     * @param \Magento\Core\Model\Config\ResourceInterface $resourceConfig
-     * @param \Magento\Core\Model\Resource\ConnectionFactory $adapterFactory
+     * @param \Magento\App\CacheInterface $cache
+     * @param \Magento\App\Resource\ConfigInterface $resourceConfig
+     * @param \Magento\App\Resource\ConnectionFactory $adapterFactory
      * @param string $tablePrefix
      */
     public function __construct(
-        \Magento\Core\Model\CacheInterface $cache,
-        \Magento\Core\Model\AppInterface $app,
-        \Magento\Core\Model\Config\ResourceInterface $resourceConfig,
-        \Magento\Core\Model\Resource\ConnectionFactory $adapterFactory,
+        \Magento\App\CacheInterface $cache,
+        Resource\ConfigInterface $resourceConfig,
+        Resource\ConnectionFactory $adapterFactory,
         $tablePrefix = ''
     ) {
         $this->_cache = $cache;
-        $this->_app = $app;
-        $this->_resourceConfig = $resourceConfig;
+        $this->_config = $resourceConfig;
         $this->_connectionFactory = $adapterFactory;
         $this->_tablePrefix = $tablePrefix;
     }
@@ -103,21 +95,22 @@ class Resource
     /**
      * Set cache instance
      *
-     * @param \Magento\Core\Model\CacheInterface $cache
+     * @param \Magento\App\CacheInterface $cache
      */
-    public function setCache(\Magento\Core\Model\CacheInterface $cache)
+    public function setCache(\Magento\App\CacheInterface $cache)
     {
         $this->_cache = $cache;
     }
 
     /**
-     * Retrieve connection adapter class name by connection type
+     * Set table prefix
+     * Added for console installation
      *
-     * @param \Magento\Core\Model\Config\ResourceInterface $resourceConfig
+     * @param string $tablePrefix
      */
-    public function setConfig(\Magento\Core\Model\Config\ResourceInterface $resourceConfig)
+    public function setTablePrefix($tablePrefix)
     {
-        $this->_resourceConfig = $resourceConfig;
+        $this->_tablePrefix = $tablePrefix;
     }
 
     /**
@@ -128,7 +121,7 @@ class Resource
      */
     public function getConnection($resourceName)
     {
-        $connectionName = $this->_resourceConfig->getConnectionName($resourceName);
+        $connectionName = $this->_config->getConnectionName($resourceName);
         if (isset($this->_connections[$connectionName])) {
             return $this->_connections[$connectionName];
         }
@@ -143,16 +136,6 @@ class Resource
         return $connection;
     }
 
-    /**
-     * Retrieve default connection name by required connection name
-     *
-     * @param string $requiredConnectionName
-     * @return string
-     */
-    protected function _getDefaultResourceName($requiredConnectionName)
-    {
-    }
-
     /**
      * Get resource table name, validated by db adapter
      *
@@ -181,8 +164,7 @@ class Resource
         if ($tableSuffix) {
             $tableName .= '_' . $tableSuffix;
         }
-        return $this->getConnection('core_read')
-            ->getTableName($tableName);
+        return $this->getConnection(self::DEFAULT_READ_RESOURCE)->getTableName($tableName);
     }
 
     /**
@@ -190,7 +172,7 @@ class Resource
      *
      * @param string $tableName
      * @param string $mappedName
-     * @return \Magento\Core\Model\Resource
+     * @return \Magento\App\Resource
      */
     public function setMappedTableName($tableName, $mappedName)
     {
@@ -213,20 +195,6 @@ class Resource
         }
     }
 
-    public function checkDbConnection()
-    {
-    }
-
-    public function getAutoUpdate()
-    {
-        return self::AUTO_UPDATE_ALWAYS;
-    }
-
-    public function setAutoUpdate($value)
-    {
-        return $this;
-    }
-
     /**
      * Retrieve 32bit UNIQUE HASH for a Table index
      *
@@ -237,7 +205,7 @@ class Resource
      */
     public function getIdxName($tableName, $fields, $indexType = \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX)
     {
-        return $this->getConnection('core_read')
+        return $this->getConnection(self::DEFAULT_READ_RESOURCE)
             ->getIndexName($this->getTableName($tableName), $fields, $indexType);
     }
 
@@ -252,7 +220,7 @@ class Resource
      */
     public function getFkName($priTableName, $priColumnName, $refTableName, $refColumnName)
     {
-        return $this->getConnection('core_read')
+        return $this->getConnection(self::DEFAULT_READ_RESOURCE)
             ->getForeignKeyName($this->getTableName($priTableName), $priColumnName,
                 $this->getTableName($refTableName), $refColumnName);
     }
diff --git a/app/code/Magento/Core/Model/Config/Resource.php b/lib/Magento/App/Resource/Config.php
similarity index 74%
rename from app/code/Magento/Core/Model/Config/Resource.php
rename to lib/Magento/App/Resource/Config.php
index e6fbae397cd..291f5156f33 100644
--- a/app/code/Magento/Core/Model/Config/Resource.php
+++ b/lib/Magento/App/Resource/Config.php
@@ -23,13 +23,14 @@
  * @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\Config;
+namespace Magento\App\Resource;
 
-class Resource extends \Magento\Config\Data\Scoped
-    implements \Magento\Core\Model\Config\ResourceInterface
+class Config extends \Magento\Config\Data\Scoped
+    implements \Magento\App\Resource\ConfigInterface
 {
     const DEFAULT_SETUP_CONNECTION = 'default';
 
+    const PARAM_INITIAL_RESOURCES = 'resource';
     /**
      * List of connection names per resource
      *
@@ -38,18 +39,27 @@ class Resource extends \Magento\Config\Data\Scoped
     protected $_connectionNames = array();
 
     /**
-     * @param \Magento\Core\Model\Resource\Config\Reader $reader
+     * @param Config\Reader $reader
      * @param \Magento\Config\ScopeInterface $configScope
      * @param \Magento\Config\CacheInterface $cache
      * @param string $cacheId
+     * @param array $initialResources
+     * @throws \InvalidArgumentException
      */
     public function __construct(
-        \Magento\Core\Model\Resource\Config\Reader $reader,
+        Config\Reader $reader,
         \Magento\Config\ScopeInterface $configScope,
         \Magento\Config\CacheInterface $cache,
-        $cacheId = 'resourcesCache'
+        $cacheId = 'resourcesCache',
+        $initialResources = array()
     ) {
         parent::__construct($reader, $configScope, $cache, $cacheId);
+        foreach ($initialResources as $resourceName => $resourceData) {
+            if (!isset($resourceData['connection'])) {
+                throw new \InvalidArgumentException('Invalid initial resource configuration');
+            }
+            $this->_connectionNames[$resourceName] = $resourceData['connection'];
+        }
     }
 
     /**
@@ -71,6 +81,9 @@ class Resource extends \Magento\Config\Data\Scoped
                     $connectionName = $resourcesConfig[$pointerResourceName]['connection'];
                     $this->_connectionNames[$resourceName] = $connectionName;
                     break;
+                } elseif (isset($this->_connectionNames[$pointerResourceName])) {
+                    $this->_connectionNames[$resourceName] = $this->_connectionNames[$pointerResourceName];
+                    break;
                 } elseif (isset($resourcesConfig[$pointerResourceName]['extends'])) {
                     $pointerResourceName = $resourcesConfig[$pointerResourceName]['extends'];
                 } else {
diff --git a/app/code/Magento/Core/Model/Resource/Config/Converter.php b/lib/Magento/App/Resource/Config/Converter.php
similarity index 97%
rename from app/code/Magento/Core/Model/Resource/Config/Converter.php
rename to lib/Magento/App/Resource/Config/Converter.php
index 53022f623ef..9c00a49c357 100644
--- a/app/code/Magento/Core/Model/Resource/Config/Converter.php
+++ b/lib/Magento/App/Resource/Config/Converter.php
@@ -23,7 +23,7 @@
  * @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\Resource\Config;
+namespace Magento\App\Resource\Config;
 
 class Converter implements \Magento\Config\ConverterInterface
 {
diff --git a/app/code/Magento/Core/Model/Resource/Config/Reader.php b/lib/Magento/App/Resource/Config/Reader.php
similarity index 66%
rename from app/code/Magento/Core/Model/Resource/Config/Reader.php
rename to lib/Magento/App/Resource/Config/Reader.php
index 62814cbf3ff..04386d522b0 100644
--- a/app/code/Magento/Core/Model/Resource/Config/Reader.php
+++ b/lib/Magento/App/Resource/Config/Reader.php
@@ -23,7 +23,7 @@
  * @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\Resource\Config;
+namespace Magento\App\Resource\Config;
 
 class Reader extends \Magento\Config\Reader\Filesystem
 {
@@ -36,44 +36,31 @@ class Reader extends \Magento\Config\Reader\Filesystem
         '/config/resource' => 'name'
     );
 
-    /**
-     * @var \Magento\Core\Model\Config\Local
-     */
-    protected $_configLocal;
-
     /**
      * @param \Magento\Config\FileResolverInterface $fileResolver
-     * @param \Magento\Core\Model\Resource\Config\Converter $converter
-     * @param \Magento\Core\Model\Resource\Config\SchemaLocator $schemaLocator
+     * @param \Magento\App\Resource\Config\Converter $converter
+     * @param \Magento\App\Resource\Config\SchemaLocator $schemaLocator
      * @param \Magento\Config\ValidationStateInterface $validationState
-     * @param \Magento\Core\Model\Config\Local $configLocal
      * @param string $fileName
      */
     public function __construct(
         \Magento\Config\FileResolverInterface $fileResolver,
-        \Magento\Core\Model\Resource\Config\Converter $converter,
-        \Magento\Core\Model\Resource\Config\SchemaLocator $schemaLocator,
+        \Magento\App\Resource\Config\Converter $converter,
+        \Magento\App\Resource\Config\SchemaLocator $schemaLocator,
         \Magento\Config\ValidationStateInterface $validationState,
-        \Magento\Core\Model\Config\Local $configLocal,
         $fileName = 'resources.xml'
     ) {
-        $this->_configLocal = $configLocal;
         parent::__construct($fileResolver, $converter, $schemaLocator, $validationState, $fileName);
     }
 
     /**
-     * Load configuration scope
+     * Read resource configuration
      *
-     * @param string|null $scope
+     * @param string $scope
      * @return array
-     * @SuppressWarnings(PHPMD.NPathComplexity)
-     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      */
     public function read($scope = null)
     {
-        $data = parent::read();
-        $data = array_replace($data, $this->_configLocal->getResources());
-
-        return $data;
+        return ($scope !== 'primary') ? parent::read($scope) : array();
     }
 }
diff --git a/lib/Magento/App/Resource/Config/SchemaLocator.php b/lib/Magento/App/Resource/Config/SchemaLocator.php
new file mode 100644
index 00000000000..57db1e85676
--- /dev/null
+++ b/lib/Magento/App/Resource/Config/SchemaLocator.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Resource configuration schema locator
+ *
+ * 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\App\Resource\Config;
+
+class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
+{
+    /**
+     * Get path to per file validation schema
+     *
+     * @return string|null
+     */
+    public function getPerFileSchema()
+    {
+        return realpath(__DIR__ . '/../../etc/resources.xsd');
+    }
+
+    /**
+     * Get path to merged config schema
+     *
+     * @return string|null
+     */
+    public function getSchema()
+    {
+        return $this->getPerFileSchema();
+    }
+}
diff --git a/app/code/Magento/Core/Model/Config/ResourceInterface.php b/lib/Magento/App/Resource/ConfigInterface.php
similarity index 94%
rename from app/code/Magento/Core/Model/Config/ResourceInterface.php
rename to lib/Magento/App/Resource/ConfigInterface.php
index 0e084b210ed..ba22433576c 100644
--- a/app/code/Magento/Core/Model/Config/ResourceInterface.php
+++ b/lib/Magento/App/Resource/ConfigInterface.php
@@ -23,9 +23,9 @@
  * @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\Config;
+namespace Magento\App\Resource;
 
-interface ResourceInterface
+interface ConfigInterface
 {
     /**
      * Retrieve resource connection instance name
diff --git a/app/code/Magento/Core/Model/Resource/ConnectionAdapterInterface.php b/lib/Magento/App/Resource/ConnectionAdapterInterface.php
similarity index 96%
rename from app/code/Magento/Core/Model/Resource/ConnectionAdapterInterface.php
rename to lib/Magento/App/Resource/ConnectionAdapterInterface.php
index 2c92e10f549..bf62f0b534f 100644
--- a/app/code/Magento/Core/Model/Resource/ConnectionAdapterInterface.php
+++ b/lib/Magento/App/Resource/ConnectionAdapterInterface.php
@@ -23,7 +23,7 @@
  * @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\Resource;
+namespace Magento\App\Resource;
 
 interface ConnectionAdapterInterface
 {
diff --git a/app/code/Magento/Core/Model/Resource/ConnectionFactory.php b/lib/Magento/App/Resource/ConnectionFactory.php
similarity index 88%
rename from app/code/Magento/Core/Model/Resource/ConnectionFactory.php
rename to lib/Magento/App/Resource/ConnectionFactory.php
index 030f371a4e4..bb6f89960af 100644
--- a/app/code/Magento/Core/Model/Resource/ConnectionFactory.php
+++ b/lib/Magento/App/Resource/ConnectionFactory.php
@@ -23,7 +23,7 @@
  * @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\Resource;
+namespace Magento\App\Resource;
 
 class ConnectionFactory
 {
@@ -33,15 +33,15 @@ class ConnectionFactory
     protected $_objectManager;
 
     /**
-     * @var \Magento\Core\Model\Config\Local
+     * @var \Magento\App\Config
      */
     protected $_localConfig;
 
     /**
      * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Core\Model\Config\Local $localConfig
+     * @param \Magento\App\Config $localConfig
      */
-    public function __construct(\Magento\ObjectManager $objectManager, \Magento\Core\Model\Config\Local $localConfig)
+    public function __construct(\Magento\ObjectManager $objectManager, \Magento\App\Config $localConfig)
     {
         $this->_objectManager = $objectManager;
         $this->_localConfig = $localConfig;
@@ -67,7 +67,7 @@ class ConnectionFactory
 
         $adapterInstance = $this->_objectManager->create($connectionConfig['adapter'], $connectionConfig);
 
-        if (!($adapterInstance instanceof \Magento\Core\Model\Resource\ConnectionAdapterInterface)) {
+        if (!($adapterInstance instanceof ConnectionAdapterInterface)) {
             throw new \InvalidArgumentException('Trying to create wrong connection adapter');
         }
 
diff --git a/lib/Magento/App/Route/Config.php b/lib/Magento/App/Route/Config.php
new file mode 100644
index 00000000000..7dfe9a41a19
--- /dev/null
+++ b/lib/Magento/App/Route/Config.php
@@ -0,0 +1,154 @@
+<?php
+/**
+ * Routes configuration model
+ *
+ * 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\App\Route;
+
+class Config implements \Magento\App\Route\ConfigInterface
+{
+    /**
+     * @var \Magento\App\Route\Config\Reader
+     */
+    protected $_reader;
+
+    /**
+     * @var \Magento\Cache\FrontendInterface
+     */
+    protected $_cache;
+
+    /**
+     * @var string
+     */
+    protected $_cacheId;
+
+    /**
+     * @var \Magento\Config\ScopeInterface
+     */
+    protected $_configScope;
+
+    /**
+     * @var \Magento\App\AreaList
+     */
+    protected $_areaList;
+
+    /**
+     * @var array
+     */
+    protected $_routes;
+
+    /**
+     * @param Config\Reader $reader
+     * @param \Magento\Config\CacheInterface $cache
+     * @param \Magento\Config\ScopeInterface $configScope
+     * @param \Magento\App\AreaList $areaList
+     * @param string $cacheId
+     */
+    public function __construct(
+        Config\Reader $reader,
+        \Magento\Config\CacheInterface $cache,
+        \Magento\Config\ScopeInterface $configScope,
+        \Magento\App\AreaList $areaList,
+        $cacheId = 'RoutesConfig'
+    ) {
+        $this->_reader = $reader;
+        $this->_cache = $cache;
+        $this->_cacheId = $cacheId;
+        $this->_configScope = $configScope;
+        $this->_areaList = $areaList;
+    }
+
+    /**
+     * Fetch routes from configs by area code and router id
+     *
+     * @param string $scope
+     * @return array
+     */
+    protected function _getRoutes($scope = null)
+    {
+        $scope = $scope ?: $this->_configScope->getCurrentScope();
+        if (isset($this->_routes[$scope])) {
+            return $this->_routes[$scope];
+        }
+        $cacheId = $scope . '::'  . $this->_cacheId;
+        $cachedRoutes = unserialize($this->_cache->load($cacheId));
+        if (is_array($cachedRoutes)) {
+            $this->_routes[$scope] = $cachedRoutes;
+            return $cachedRoutes;
+        }
+
+        $routers = $this->_reader->read($scope);
+        $routes = $routers[$this->_areaList->getDefaultRouter($scope)]['routes'];
+        $this->_cache->save(serialize($routes), $cacheId);
+        $this->_routes[$scope] = $routes;
+        return $routes;
+    }
+
+    /**
+     * Retrieve route front name
+     *
+     * @param string $routeId
+     * @param null $scope
+     * @return string
+     */
+    public function getRouteFrontName($routeId, $scope = null)
+    {
+        $routes = $this->_getRoutes($scope);
+        return isset($routes[$routeId]) ? $routes[$routeId]['frontName'] : $routeId;
+    }
+
+    /**
+     * @param string $frontName
+     * @param string $scope
+     * @return bool|int|string
+     */
+    public function getRouteByFrontName($frontName, $scope = null)
+    {
+        foreach ($this->_getRoutes($scope) as $routeId => $routeData) {
+            if ($routeData['frontName'] == $frontName) {
+                return $routeId;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * @param string $frontName
+     * @param string $scope
+     * @return array
+     */
+    public function getModulesByFrontName($frontName, $scope = null)
+    {
+        $routes = $this->_getRoutes($scope);
+        $modules = array();
+        foreach ($routes as $routeData) {
+            if ($routeData['frontName'] == $frontName && isset($routeData['modules'])) {
+                $modules = $routeData['modules'];
+                break;
+            }
+        }
+
+        return array_unique($modules);
+    }
+}
diff --git a/app/code/Magento/Core/Model/Route/Config/Converter.php b/lib/Magento/App/Route/Config/Converter.php
similarity index 98%
rename from app/code/Magento/Core/Model/Route/Config/Converter.php
rename to lib/Magento/App/Route/Config/Converter.php
index 7f4db35908b..89caa8523d0 100644
--- a/app/code/Magento/Core/Model/Route/Config/Converter.php
+++ b/lib/Magento/App/Route/Config/Converter.php
@@ -23,7 +23,7 @@
  * @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\Route\Config;
+namespace Magento\App\Route\Config;
 
 class Converter implements \Magento\Config\ConverterInterface
 {
diff --git a/app/code/Magento/Core/Model/Route/Config/Reader.php b/lib/Magento/App/Route/Config/Reader.php
similarity index 84%
rename from app/code/Magento/Core/Model/Route/Config/Reader.php
rename to lib/Magento/App/Route/Config/Reader.php
index dca9ad5df93..17825479389 100644
--- a/app/code/Magento/Core/Model/Route/Config/Reader.php
+++ b/lib/Magento/App/Route/Config/Reader.php
@@ -23,7 +23,7 @@
  * @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\Route\Config;
+namespace Magento\App\Route\Config;
 
 class Reader extends \Magento\Config\Reader\Filesystem
 {
@@ -40,15 +40,15 @@ class Reader extends \Magento\Config\Reader\Filesystem
 
     /**
      * @param \Magento\Config\FileResolverInterface $fileResolver
-     * @param \Magento\Core\Model\Route\Config\Converter $converter
-     * @param \Magento\Core\Model\Route\Config\SchemaLocator $schemaLocator
+     * @param \Magento\App\Route\Config\Converter $converter
+     * @param \Magento\App\Route\Config\SchemaLocator $schemaLocator
      * @param \Magento\Config\ValidationStateInterface $validationState
      * @param string $fileName
      */
     public function __construct(
         \Magento\Config\FileResolverInterface $fileResolver,
-        \Magento\Core\Model\Route\Config\Converter $converter,
-        \Magento\Core\Model\Route\Config\SchemaLocator $schemaLocator,
+        \Magento\App\Route\Config\Converter $converter,
+        \Magento\App\Route\Config\SchemaLocator $schemaLocator,
         \Magento\Config\ValidationStateInterface $validationState,
         $fileName = 'routes.xml'
     ) {
diff --git a/lib/Magento/App/Route/Config/SchemaLocator.php b/lib/Magento/App/Route/Config/SchemaLocator.php
new file mode 100644
index 00000000000..f0e62036c2b
--- /dev/null
+++ b/lib/Magento/App/Route/Config/SchemaLocator.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Routes configuration schema locator
+ *
+ * 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\App\Route\Config;
+
+class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
+{
+    /**
+     * Get path to merged config schema
+     *
+     * @return string
+     */
+    public function getSchema()
+    {
+        return realpath(__DIR__ . '/../../etc/routes_merged.xsd');
+    }
+
+    /**
+     * Get path to pre file validation schema
+     *
+     * @return string
+     */
+    public function getPerFileSchema()
+    {
+        return realpath(__DIR__ . '/../../etc/routes.xsd');
+    }
+}
diff --git a/app/code/Magento/Core/Model/Config/Resource/Primary.php b/lib/Magento/App/Route/ConfigInterface.php
similarity index 58%
rename from app/code/Magento/Core/Model/Config/Resource/Primary.php
rename to lib/Magento/App/Route/ConfigInterface.php
index 8b95a9b97e7..2c7e7805227 100644
--- a/app/code/Magento/Core/Model/Config/Resource/Primary.php
+++ b/lib/Magento/App/Route/ConfigInterface.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Primary resource configuration. Only uses
+ * Routes configuration interface
  *
  * Magento
  *
@@ -23,28 +23,34 @@
  * @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\Config\Resource;
+namespace Magento\App\Route;
 
-class Primary implements \Magento\Core\Model\Config\ResourceInterface
+interface ConfigInterface
 {
-    protected $_resourceList;
-
-    public function __construct(\Magento\Core\Model\Config\Local $configLocal)
-    {
-        $this->_resourceList = $configLocal->getResources();
-    }
-
+    /**
+     * Retrieve route front name
+     *
+     * @param string $routeId
+     * @param string $scope
+     * @return string
+     */
+    public function getRouteFrontName($routeId, $scope = null);
 
     /**
-     * Retrieve connection config
+     * Get route id by route front name
      *
-     * @param string $resourceName
+     * @param string $frontName
+     * @param string $scope
      * @return string
      */
-    public function getConnectionName($resourceName)
-    {
-        return isset($this->_resourceList[$resourceName]['connection'])
-            ? $this->_resourceList[$resourceName]['connection']
-            : \Magento\Core\Model\Config\Resource::DEFAULT_SETUP_CONNECTION;
-    }
+    public function getRouteByFrontName($frontName, $scope = null);
+
+    /**
+     * Retrieve list of moudles by route front name
+     *
+     * @param string $frontName
+     * @param string $scope
+     * @return array
+     */
+    public function getModulesByFrontName($frontName, $scope = null);
 }
diff --git a/lib/Magento/App/Router/AbstractRouter.php b/lib/Magento/App/Router/AbstractRouter.php
index 12f509a38ae..157d96f0d34 100644
--- a/lib/Magento/App/Router/AbstractRouter.php
+++ b/lib/Magento/App/Router/AbstractRouter.php
@@ -25,11 +25,9 @@
  */
 namespace Magento\App\Router;
 
-use \Magento\App\FrontControllerInterface,
-    \Magento\App\ActionFactory,
-    \Magento\App\RequestInterface;
+use \Magento\App\ActionFactory;
 
-abstract class AbstractRouter
+abstract class AbstractRouter implements \Magento\App\RouterInterface
 {
     /**
      * @var \Magento\App\FrontController
@@ -39,65 +37,13 @@ abstract class AbstractRouter
     /**
      * @var \Magento\App\ActionFactory
      */
-    protected $_controllerFactory;
+    protected $_actionFactory;
 
     /**
-     * @param \Magento\App\ActionFactory $controllerFactory
+     * @param \Magento\App\ActionFactory $actionFactory
      */
-    public function __construct(ActionFactory $controllerFactory)
+    public function __construct(ActionFactory $actionFactory)
     {
-        $this->_controllerFactory = $controllerFactory;
+        $this->_actionFactory = $actionFactory;
     }
-
-    /**
-     * Assign front controller instance
-     *
-     * @param $front FrontControllerInterface
-     * @return AbstractRouter
-     */
-    public function setFront(FrontControllerInterface $front)
-    {
-        $this->_front = $front;
-        return $this;
-    }
-
-    /**
-     * Retrieve front controller instance
-     *
-     * @return FrontControllerInterface
-     */
-    public function getFront()
-    {
-        return $this->_front;
-    }
-
-    /**
-     * Retrieve front name by route
-     *
-     * @param string $routeId
-     * @return string
-     */
-    public function getFrontNameByRoute($routeId)
-    {
-        return $routeId;
-    }
-
-    /**
-     * Retrieve route by module front name
-     *
-     * @param string $frontName
-     * @return string
-     */
-    public function getRouteByFrontName($frontName)
-    {
-        return $frontName;
-    }
-
-    /**
-     * Match controller by request
-     *
-     * @param RequestInterface $request
-     * @return \Magento\App\Action\AbstractAction
-     */
-    abstract public function match(RequestInterface $request);
 }
diff --git a/lib/Magento/App/Router/DefaultRouter.php b/lib/Magento/App/Router/DefaultRouter.php
index cedd6b063d9..56d8016cd5b 100644
--- a/lib/Magento/App/Router/DefaultRouter.php
+++ b/lib/Magento/App/Router/DefaultRouter.php
@@ -36,14 +36,14 @@ class DefaultRouter extends AbstractRouter
     protected $_noRouteHandlerList;
 
     /**
-     * @param ActionFactory $controllerFactory
+     * @param ActionFactory $actionFactory
      * @param \Magento\App\Router\NoRouteHandlerList $noRouteHandlerList
      */
     public function __construct(
-        ActionFactory $controllerFactory,
+        ActionFactory $actionFactory,
         \Magento\App\Router\NoRouteHandlerList $noRouteHandlerList
     ) {
-        parent::__construct($controllerFactory);
+        parent::__construct($actionFactory);
         $this->_noRouteHandlerList = $noRouteHandlerList;
     }
 
@@ -61,7 +61,7 @@ class DefaultRouter extends AbstractRouter
             }
         }
 
-        return $this->_controllerFactory->createController('Magento\App\Action\Forward',
+        return $this->_actionFactory->createController('Magento\App\Action\Forward',
             array('request' => $request)
         );
     }
diff --git a/lib/Magento/Appl/Router/NoRouteHandlerInterface.php b/lib/Magento/App/Router/NoRouteHandlerInterface.php
similarity index 97%
rename from lib/Magento/Appl/Router/NoRouteHandlerInterface.php
rename to lib/Magento/App/Router/NoRouteHandlerInterface.php
index acc2f68b5d7..b3225b192f4 100644
--- a/lib/Magento/Appl/Router/NoRouteHandlerInterface.php
+++ b/lib/Magento/App/Router/NoRouteHandlerInterface.php
@@ -23,7 +23,7 @@
  * @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\Appl\Router;
+namespace Magento\App\Router;
 
 interface NoRouteHandlerInterface
 {
diff --git a/app/code/Magento/Core/Model/Config/LoaderInterface.php b/lib/Magento/App/RouterInterface.php
similarity index 78%
rename from app/code/Magento/Core/Model/Config/LoaderInterface.php
rename to lib/Magento/App/RouterInterface.php
index 740220349d7..e68df36b1c9 100644
--- a/app/code/Magento/Core/Model/Config/LoaderInterface.php
+++ b/lib/Magento/App/RouterInterface.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Application config loader interface
+ * Router. Matches action from request
  *
  * Magento
  *
@@ -23,14 +23,15 @@
  * @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\Config;
+namespace Magento\App;
 
-interface LoaderInterface
+interface RouterInterface
 {
     /**
-     * Populate configuration object
+     * Match application action by request
      *
-     * @param \Magento\Core\Model\Config\Base $config
+     * @param RequestInterface $request
+     * @return ActionInterface
      */
-    public function load(\Magento\Core\Model\Config\Base $config);
-}
+    public function match(RequestInterface $request);
+} 
\ No newline at end of file
diff --git a/lib/Magento/App/RouterList.php b/lib/Magento/App/RouterList.php
index 90781da07b5..dc0c8d4a562 100644
--- a/lib/Magento/App/RouterList.php
+++ b/lib/Magento/App/RouterList.php
@@ -26,8 +26,6 @@
  */
 namespace Magento\App;
 
-use \Magento\App\RouterListInterface;
-
 class RouterList implements RouterListInterface
 {
     /**
@@ -42,13 +40,6 @@ class RouterList implements RouterListInterface
      */
     protected $_routerList;
 
-    /**
-     * List of active routers objects
-     *
-     * @var array
-     */
-    protected $_activeRouters = array();
-
     /**
      * @param \Magento\ObjectManager $objectManager
      * @param array $routerList
@@ -57,138 +48,101 @@ class RouterList implements RouterListInterface
     {
         $this->_objectManager = $objectManager;
         $this->_routerList = $routerList;
+        $this->_routerList = array_filter($routerList, function ($item) {
+            return (!isset($item['disable']) || !$item['disable']) && $item['instance'];
+        });
+        uasort($this->_routerList, array($this, '_compareRoutersSortOrder'));
     }
 
     /**
-     * Get list of active routers
-     * sorted by sortOrder
+     * Retrieve router instance by id
      *
-     * @return array
+     * @param string $routerId
+     * @return RouterInterface
      */
-    public function getRouters()
+    protected function _getRouterInstance($routerId)
     {
-        if (empty($this->_activeRouters)) {
-            $this->_loadRouters();
+        if (!isset($this->_routerList[$routerId]['object'])) {
+            $this->_routerList[$routerId]['object'] = $this->_objectManager->create(
+                $this->_routerList[$routerId]['instance']
+            );
         }
-
-        return $this->_activeRouters;
+        return $this->_routerList[$routerId]['object'];
     }
 
     /**
-     * Load active routers
-     *
-     * @return array
+     * (PHP 5 &gt;= 5.0.0)<br/>
+     * Return the current element
+     * @link http://php.net/manual/en/iterator.current.php
+     * @return RouterInterface
      */
-    protected function _loadRouters()
+    public function current()
     {
-        foreach ($this->_getSortedRouterList() as $routerCode => $routerData) {
-            if ((!isset($routerData['disable']) || !$routerData['disable']) && $routerData['instance']) {
-                $this->_activeRouters[$routerCode] = $this->_objectManager->create($routerData['instance']);
-            }
-        }
-
-        return $this->_activeRouters;
+        return $this->_getRouterInstance(key($this->_routerList));
     }
 
     /**
-     * Sort routerList by sortOrder
-     *
-     * @return array
+     * (PHP 5 &gt;= 5.0.0)<br/>
+     * Move forward to next element
+     * @link http://php.net/manual/en/iterator.next.php
+     * @return void Any returned value is ignored.
      */
-    protected function _getSortedRouterList()
+    public function next()
     {
-        uasort($this->_routerList, array($this, '_compareRoutersSortOrder'));
-        return $this->_routerList;
+        next($this->_routerList);
     }
 
     /**
-     * Compare routers sortOrder
-     *
-     * @param array $routerData1
-     * @param array $routerData2
-     * @return int
+     * (PHP 5 &gt;= 5.0.0)<br/>
+     * Return the key of the current element
+     * @link http://php.net/manual/en/iterator.key.php
+     * @return mixed scalar on success, or null on failure.
      */
-    protected function _compareRoutersSortOrder($routerData1, $routerData2)
+    public function key()
     {
-        if ((int)$routerData1['sortOrder'] == (int)$routerData2['sortOrder']) {
-            return 0;
-        }
-
-        if ((int)$routerData1['sortOrder'] < (int)$routerData2['sortOrder']) {
-            return -1;
-        } else {
-            return 1;
-        }
+        key($this->_routerList);
     }
 
     /**
-     * Get router by route
-     *
-     * @param string $routeId
-     * @return \Magento\App\Router\AbstractRouter
+     * (PHP 5 &gt;= 5.0.0)<br/>
+     * Checks if current position is valid
+     * @link http://php.net/manual/en/iterator.valid.php
+     * @return boolean The return value will be casted to boolean and then evaluated.
+     * Returns true on success or false on failure.
      */
-    public function getRouterByRoute($routeId)
+    public function valid()
     {
-        $activeRouters = $this->getRouters();
-        // empty route supplied - return base url
-        if (empty($routeId)) {
-            return $activeRouters['standard'];
-        }
-
-        if (isset($activeRouters['admin'])) {
-            $router = $activeRouters['admin'];
-            if ($router->getFrontNameByRoute($routeId)) {
-                return $router;
-            }
-        }
-
-        if (isset($activeRouters['standard'])) {
-            $router = $activeRouters['standard'];
-            if ($router->getFrontNameByRoute($routeId)) {
-                return $router;
-            }
-        }
-
-        if (isset($activeRouters[$routeId])) {
-            $router = $activeRouters[$routeId];
-            if ($router->getFrontNameByRoute($routeId)) {
-                return $router;
-            }
-        }
+        return !!current($this->_routerList);
+    }
 
-        $router = $activeRouters['default'];;
-        return $router;
+    /**
+     * (PHP 5 &gt;= 5.0.0)<br/>
+     * Rewind the Iterator to the first element
+     * @link http://php.net/manual/en/iterator.rewind.php
+     * @return void Any returned value is ignored.
+     */
+    public function rewind()
+    {
+        reset($this->_routerList);
     }
 
     /**
-     * Get router by frontName
+     * Compare routers sortOrder
      *
-     * @param string $frontName
-     * @return \Magento\App\Router\AbstractRouter
+     * @param array $routerDataFirst
+     * @param array $routerDataSecond
+     * @return int
      */
-    public function getRouterByFrontName($frontName)
+    protected function _compareRoutersSortOrder($routerDataFirst, $routerDataSecond)
     {
-        $activeRouters = $this->getRouters();
-        // empty route supplied - return base url
-        if (empty($frontName)) {
-            return $activeRouters['standard'];
-        }
-
-        if (isset($activeRouters['admin'])) {
-            $router = $activeRouters['admin'];
-            if ($router->getRouteByFrontname($frontName)) {
-                return $router;
-            }
+        if ((int)$routerDataFirst['sortOrder'] == (int)$routerDataSecond['sortOrder']) {
+            return 0;
         }
 
-        if (isset($activeRouters['standard'])) {
-            $router = $activeRouters['standard'];
-            if ($router->getRouteByFrontname($frontName)) {
-                return $router;
-            }
+        if ((int)$routerDataFirst['sortOrder'] < (int)$routerDataSecond['sortOrder']) {
+            return -1;
+        } else {
+            return 1;
         }
-
-        $router = $activeRouters['default'];;
-        return $router;
     }
 }
diff --git a/lib/Magento/App/RouterListInterface.php b/lib/Magento/App/RouterListInterface.php
index 0222bf8f932..3f59fd4ee4f 100644
--- a/lib/Magento/App/RouterListInterface.php
+++ b/lib/Magento/App/RouterListInterface.php
@@ -25,29 +25,6 @@
  */
 namespace Magento\App;
 
-interface RouterListInterface
+interface RouterListInterface extends \Iterator
 {
-    /**
-     * Get list of active routers
-     * sorted by sortOrder
-     *
-     * @return array
-     */
-    public function getRouters();
-
-    /**
-     * Get router by route
-     *
-     * @param string $routeId
-     * @return \Magento\App\Router\AbstractRouter
-     */
-    public function getRouterByRoute($routeId);
-
-    /**
-     * Get router by frontName
-     *
-     * @param string $frontName
-     * @return \Magento\App\Router\AbstractRouter
-     */
-    public function getRouterByFrontName($frontName);
 }
\ No newline at end of file
diff --git a/lib/Magento/App/State.php b/lib/Magento/App/State.php
index 7825ab03b0e..311ee875349 100644
--- a/lib/Magento/App/State.php
+++ b/lib/Magento/App/State.php
@@ -23,13 +23,15 @@
  * @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\App;
 
-use Zend\Soap\Exception\InvalidArgumentException;
-
 class State
 {
+    /**
+     * Application run code
+     */
+    const PARAM_MODE = 'MAGE_MODE';
+
     /**
      * Application mode
      *
@@ -58,6 +60,20 @@ class State
      */
     protected $_installDate;
 
+    /**
+     * Config scope model
+     *
+     * @var \Magento\Config\ScopeInterface
+     */
+    protected $_configScope;
+
+    /**
+     * Area code
+     *
+     * @var string
+     */
+    protected $_areaCode;
+
     /**#@+
      * Application modes
      */
@@ -69,13 +85,15 @@ class State
     const PARAM_INSTALL_DATE   = 'install.date';
 
     /**
+     * @param \Magento\Config\ScopeInterface $configScope
      * @param string $installDate
      * @param string $mode
      * @throws \LogicException
      */
-    public function __construct($installDate, $mode = self::MODE_DEFAULT)
+    public function __construct(\Magento\Config\ScopeInterface $configScope, $installDate, $mode = self::MODE_DEFAULT)
     {
         $this->_installDate = strtotime((string)$installDate);
+        $this->_configScope = $configScope;
         switch ($mode) {
             case self::MODE_DEVELOPER:
             case self::MODE_PRODUCTION:
@@ -147,4 +165,55 @@ class State
     {
         $this->_installDate = $date;
     }
+
+    /**
+     * Set area code
+     *
+     * @param string $code
+     * @throws \Magento\Exception
+     */
+    public function setAreaCode($code)
+    {
+        if (isset($this->_areaCode)) {
+            throw new \Magento\Exception('Area code is already set');
+        }
+        $this->_configScope->setCurrentScope($code);
+        $this->_areaCode = $code;
+    }
+
+    /**
+     * Get area code
+     *
+     * @return string
+     * @throws \Magento\Exception
+     */
+    public function getAreaCode()
+    {
+        if (!isset($this->_areaCode)) {
+            throw new \Magento\Exception('Area code is not set');
+        }
+        return $this->_areaCode;
+    }
+
+    /**
+     * Emulate callback inside some area code
+     *
+     * @param string $areaCode
+     * @param callable $callback
+     * @return mixed
+     * @throws \Exception
+     */
+    public function emulateAreaCode($areaCode, $callback)
+    {
+        $currentArea = $this->_areaCode;
+        $this->_areaCode = $areaCode;
+        try {
+            $result = call_user_func($callback);
+        } catch (\Exception $e) {
+            $this->_areaCode = $currentArea;
+            throw $e;
+        }
+        $this->_areaCode = $currentArea;
+        return $result;
+    }
 }
diff --git a/app/code/Magento/Core/etc/resources.xsd b/lib/Magento/App/etc/resources.xsd
similarity index 100%
rename from app/code/Magento/Core/etc/resources.xsd
rename to lib/Magento/App/etc/resources.xsd
diff --git a/app/code/Magento/Core/etc/routes.xsd b/lib/Magento/App/etc/routes.xsd
similarity index 100%
rename from app/code/Magento/Core/etc/routes.xsd
rename to lib/Magento/App/etc/routes.xsd
diff --git a/app/code/Magento/Core/etc/routes_merged.xsd b/lib/Magento/App/etc/routes_merged.xsd
similarity index 100%
rename from app/code/Magento/Core/etc/routes_merged.xsd
rename to lib/Magento/App/etc/routes_merged.xsd
diff --git a/lib/Magento/AppInterface.php b/lib/Magento/AppInterface.php
new file mode 100644
index 00000000000..99d740f0b34
--- /dev/null
+++ b/lib/Magento/AppInterface.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Application. Performs user requested actions.
+ *
+ * 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;
+
+interface AppInterface
+{
+    /**
+     * @return int
+     */
+    public function execute();
+} 
\ No newline at end of file
diff --git a/lib/Magento/Code/Generator.php b/lib/Magento/Code/Generator.php
index 8ad43dbd43e..5335734ea67 100644
--- a/lib/Magento/Code/Generator.php
+++ b/lib/Magento/Code/Generator.php
@@ -154,6 +154,8 @@ class Generator
                     throw new \InvalidArgumentException('Unknown generation entity.');
                     break;
             }
+        } else {
+            $this->_generator->init($sourceClassName, $resultClassName);
         }
 
         return $this->_generator;
diff --git a/lib/Magento/Code/Generator/ClassGenerator.php b/lib/Magento/Code/Generator/Autoloader.php
similarity index 58%
rename from lib/Magento/Code/Generator/ClassGenerator.php
rename to lib/Magento/Code/Generator/Autoloader.php
index 3243fd29564..7314f337f39 100644
--- a/lib/Magento/Code/Generator/ClassGenerator.php
+++ b/lib/Magento/Code/Generator/Autoloader.php
@@ -18,15 +18,13 @@
  * 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_Code
  * @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\Code\Generator;
 
-class ClassGenerator
+class Autoloader
 {
     /**
      * @var \Magento\Code\Generator
@@ -36,31 +34,21 @@ class ClassGenerator
     /**
      * @param \Magento\Code\Generator $generator
      */
-    public function __construct(\Magento\Code\Generator $generator = null)
+    public function __construct(\Magento\Code\Generator $generator)
     {
-        $this->_generator = $generator ?: new \Magento\Code\Generator();
+        $this->_generator = $generator;
     }
 
     /**
-     * Generate all not existing entity classes in constructor
+     * Load specified class name and generate it if necessary
      *
      * @param string $className
      */
-    public function generateForConstructor($className)
+    public function load($className)
     {
         if (!class_exists($className)) {
-            $this->_generator->generateClass($className);
-        }
-        $reflectionClass = new \ReflectionClass($className);
-        if ($reflectionClass->hasMethod('__construct')) {
-            $constructor = $reflectionClass->getMethod('__construct');
-            $parameters = $constructor->getParameters();
-            /** @var $parameter \ReflectionParameter */
-            foreach ($parameters as $parameter) {
-                preg_match('/\[\s\<\w+?>\s([\w\\\\]+)/s', $parameter->__toString(), $matches);
-                if (isset($matches[1])) {
-                    $this->_generator->generateClass($matches[1]);
-                }
+            if (\Magento\Code\Generator::GENERATION_SUCCESS === $this->_generator->generateClass($className)) {
+                \Magento\Autoload\IncludePath::load($className);
             }
         }
     }
diff --git a/lib/Magento/Code/Generator/DefinitionDecorator.php b/lib/Magento/Code/Generator/DefinitionDecorator.php
deleted file mode 100644
index 0ec371a4de9..00000000000
--- a/lib/Magento/Code/Generator/DefinitionDecorator.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-/**
- * Object manager definition decorator. Generates all proxies and factories declared
- * in class constructor signatures before reading it's definition
- *
- * 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\Code\Generator;
-
-class DefinitionDecorator implements \Magento\ObjectManager\Definition
-{
-    /**
-     * Processed classes list
-     *
-     * @var array
-     */
-    protected $_processedClasses = array();
-
-    /**
-     * Class generator
-     *
-     * @var \Magento\Code\Generator\ClassGenerator
-     */
-    protected $_generator;
-
-    /**
-     * Decorated objectManager definition
-     *
-     * @var \Magento\ObjectManager\Definition
-     */
-    protected $_decoratedDefinition;
-
-    /**
-     * @param \Magento\ObjectManager\Definition $definition
-     * @param \Magento\Code\Generator\ClassGenerator $generator
-     */
-    public function __construct(
-        \Magento\ObjectManager\Definition $definition, \Magento\Code\Generator\ClassGenerator $generator = null
-    ) {
-        $this->_decoratedDefinition = $definition;
-        $this->_generator = $generator ?: new \Magento\Code\Generator\ClassGenerator();
-    }
-
-    /**
-     * Get list of method parameters
-     *
-     * Retrieve an ordered list of constructor parameters.
-     * Each value is an array with following entries:
-     *
-     * array(
-     *     0, // string: Parameter name
-     *     1, // string|null: Parameter type
-     *     2, // bool: whether this param is required
-     *     3, // mixed: default value
-     * );
-     *
-     * @param string $className
-     * @return array|null
-     */
-    public function getParameters($className)
-    {
-        if (!array_key_exists($className, $this->_processedClasses)) {
-            $this->_generator->generateForConstructor($className);
-            $this->_processedClasses[$className] = 1;
-        }
-        return $this->_decoratedDefinition->getParameters($className);
-    }
-
-    /**
-     * Retrieve list of all classes covered with definitions
-     *
-     * @return array
-     */
-    public function getClasses()
-    {
-        return $this->_decoratedDefinition->getClasses();
-    }
-}
diff --git a/lib/Magento/Code/Generator/EntityAbstract.php b/lib/Magento/Code/Generator/EntityAbstract.php
index 3f71db6b934..b5c1dd3d2be 100644
--- a/lib/Magento/Code/Generator/EntityAbstract.php
+++ b/lib/Magento/Code/Generator/EntityAbstract.php
@@ -370,4 +370,16 @@ abstract class EntityAbstract
 
         return $parameterInfo;
     }
+
+    /**
+     * Reinit generator
+     *
+     * @param string $sourceClassName
+     * @param string $resultClassName
+     */
+    public function init($sourceClassName, $resultClassName)
+    {
+        $this->_sourceClassName = $sourceClassName;
+        $this->_resultClassName = $resultClassName;
+    }
 }
diff --git a/lib/Magento/Code/Generator/Factory.php b/lib/Magento/Code/Generator/Factory.php
index 8df985d9be8..d8a13b616b3 100644
--- a/lib/Magento/Code/Generator/Factory.php
+++ b/lib/Magento/Code/Generator/Factory.php
@@ -126,4 +126,25 @@ class Factory extends \Magento\Code\Generator\EntityAbstract
 
         return array($construct, $create);
     }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function _validateData()
+    {
+        $result = parent::_validateData();
+
+        if ($result) {
+            $sourceClassName = $this->_getSourceClassName();
+            $resultClassName = $this->_getResultClassName();
+
+            if ($resultClassName !== $sourceClassName . 'Factory') {
+                $this->_addError('Invalid Factory class name ['
+                    . $resultClassName . ']. Use ' . $sourceClassName . 'Factory'
+                );
+                $result = false;
+            }
+        }
+        return $result;
+    }
 }
diff --git a/lib/Magento/Code/Generator/Interceptor.php b/lib/Magento/Code/Generator/Interceptor.php
index cd95da270e7..8889cd28254 100644
--- a/lib/Magento/Code/Generator/Interceptor.php
+++ b/lib/Magento/Code/Generator/Interceptor.php
@@ -223,7 +223,7 @@ class Interceptor extends \Magento\Code\Generator\EntityAbstract
             'docblock' => array(
                 'shortDescription' => 'Retrieve ObjectManager from the global scope',
             ),
-            'body' => '$this->_objectManager = \Magento\Core\Model\ObjectManager::getInstance();'
+            'body' => '$this->_objectManager = \Magento\App\ObjectManager::getInstance();'
                 . "\n\$this->_pluginList = \$this->_objectManager->get('Magento\Interception\PluginList');",
         );
 
@@ -312,4 +312,25 @@ class Interceptor extends \Magento\Code\Generator\EntityAbstract
         }
         return parent::_generateCode();
     }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function _validateData()
+    {
+        $result = parent::_validateData();
+
+        if ($result) {
+            $sourceClassName = $this->_getSourceClassName();
+            $resultClassName = $this->_getResultClassName();
+
+            if ($resultClassName !== $sourceClassName . '\\Interceptor') {
+                $this->_addError('Invalid Interceptor class name ['
+                    . $resultClassName . ']. Use ' . $sourceClassName . '\\Interceptor'
+                );
+                $result = false;
+            }
+        }
+        return $result;
+    }
 }
diff --git a/lib/Magento/Code/Generator/Proxy.php b/lib/Magento/Code/Generator/Proxy.php
index a9bdbe0f9bb..7ebd7e49d5c 100644
--- a/lib/Magento/Code/Generator/Proxy.php
+++ b/lib/Magento/Code/Generator/Proxy.php
@@ -110,7 +110,7 @@ class Proxy extends \Magento\Code\Generator\EntityAbstract
         );
         $methods[] = array(
             'name'     => '__wakeup',
-            'body'     => '$this->_objectManager = \Magento\Core\Model\ObjectManager::getInstance();',
+            'body'     => '$this->_objectManager = \Magento\App\ObjectManager::getInstance();',
             'docblock' => array(
                 'shortDescription' => 'Retrieve ObjectManager from global scope',
             ),
@@ -250,4 +250,24 @@ class Proxy extends \Magento\Code\Generator\EntityAbstract
         }
         return 'return $this->_getSubject()->' . $methodCall . ';';
     }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function _validateData()
+    {
+        $result = parent::_validateData();
+        if ($result) {
+            $sourceClassName = $this->_getSourceClassName();
+            $resultClassName = $this->_getResultClassName();
+
+            if ($resultClassName !== $sourceClassName . '\\Proxy') {
+                $this->_addError('Invalid Proxy class name ['
+                    . $resultClassName . ']. Use ' . $sourceClassName . '\\Proxy'
+                );
+                $result = false;
+            }
+        }
+        return $result;
+    }
 }
diff --git a/lib/Magento/Code/Reader/ClassReader.php b/lib/Magento/Code/Reader/ClassReader.php
index 22a3d32bf2c..f69599a9b1b 100644
--- a/lib/Magento/Code/Reader/ClassReader.php
+++ b/lib/Magento/Code/Reader/ClassReader.php
@@ -51,8 +51,7 @@ class ClassReader
                             null
                     );
                 } catch (\ReflectionException $e) {
-                    $message = $e->getMessage() . "\n";
-                    $message .= 'Are you sure that you didn\'t use virtual type in constructor signature?';
+                    $message = $e->getMessage();
                     throw new \ReflectionException($message, 0, $e);
                 }
             }
diff --git a/lib/Magento/Code/ValidationException.php b/lib/Magento/Code/ValidationException.php
new file mode 100644
index 00000000000..8d484ebf966
--- /dev/null
+++ b/lib/Magento/Code/ValidationException.php
@@ -0,0 +1,30 @@
+<?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\Code;
+
+class ValidationException extends  \Exception
+{
+
+} 
diff --git a/lib/Magento/Code/Validator/ConstructorIntegrity.php b/lib/Magento/Code/Validator/ConstructorIntegrity.php
new file mode 100644
index 00000000000..4fb80e59f24
--- /dev/null
+++ b/lib/Magento/Code/Validator/ConstructorIntegrity.php
@@ -0,0 +1,209 @@
+<?php
+/**
+ * Class constructor validator. Validates call of parent construct
+ *
+ * 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\Code\Validator;
+
+class ConstructorIntegrity
+{
+    /**
+     * Validate class
+     *
+     * @param $className
+     * @return bool
+     * @throws \Magento\Code\ValidationException
+     */
+    public function validate($className)
+    {
+        $class = new \ReflectionClass($className);
+        $parent = $class->getParentClass();
+
+        /** Check whether parent class exists and has __construct method */
+        if (!$parent || !$parent->hasMethod('__construct')) {
+            return true;
+        }
+
+        /** Check whether class has __construct */
+        $classArguments = $this->_getConstructorArguments($class);
+        if (null === $classArguments) {
+            return true;
+        }
+
+        /** Check whether class has parent::__construct call */
+        $callArguments = $this->_getParentCall($class, $classArguments);
+        if (null === $callArguments) {
+            return true;
+        }
+
+        /** Get parent class __construct arguments */
+        $parentArguments = $this->_getConstructorArguments($parent, true);
+
+        foreach ($parentArguments as $index => $requiredArgument) {
+            if (isset($callArguments[$index])) {
+                $actualArgument = $callArguments[$index];
+            } else {
+                if ($requiredArgument['isOptional']) {
+                    continue;
+                }
+
+                throw new \Magento\Code\ValidationException('Missed required argument ' . $requiredArgument['name']
+                    . ' in parent::__construct call. File: ' . $class->getFileName()
+                );
+            }
+
+            if (false == $this->_isCompatibleType($requiredArgument['type'], $actualArgument['type'])) {
+                throw new \Magento\Code\ValidationException('Incompatible argument type: Required type: '
+                    . $requiredArgument['type'] . '. Actual type: ' . $actualArgument['type']
+                    . '; File: ' . $class->getFileName()
+                );
+            }
+        }
+
+        /**
+         * Try to detect unused arguments
+         * Check whether count of passed parameters less or equal that count of count parent class arguments
+         */
+        if (count($callArguments) > count($parentArguments)) {
+            $extraParameters = array_slice($callArguments, count($parentArguments));
+            $names = array();
+            foreach ($extraParameters as $param) {
+                $names[] = '$' . $param['name'];
+            }
+
+            throw new \Magento\Code\ValidationException(
+                'Extra parameters passed to parent construct: '
+                . implode(', ', $names)
+                . '. File: ' . $class->getFileName()
+            );
+        }
+        return true;
+    }
+
+    /**
+     * Check argument type compatibility
+     *
+     * @param string $requiredType
+     * @param string $actualType
+     * @return bool
+     */
+    protected function _isCompatibleType($requiredType, $actualType)
+    {
+        /** Types are compatible if type names are equal */
+        if ($requiredType === $actualType) {
+            return true;
+        }
+
+        /** Types are 'semi-compatible' if one of them are undefined */
+        if ($requiredType === null || $actualType === null) {
+            return true;
+        }
+
+        /**
+         * Special case for scalar arguments
+         * Array type is compatible with array or null type. Both of these types are checked above
+         */
+        if ($requiredType === 'array' || $actualType === 'array') {
+            return false;
+        }
+
+        return is_subclass_of($actualType, $requiredType);
+    }
+
+    /**
+     * Get arguments of parent __construct call
+     *
+     * @param \ReflectionClass $class
+     * @param array $classArguments
+     * @return array|null
+     */
+    protected function _getParentCall(\ReflectionClass $class, array $classArguments)
+    {
+        $trimFunction = function (&$value) {
+            $value = trim($value, PHP_EOL . ' $');
+        };
+
+        $method = $class->getMethod('__construct');
+        $start = $method->getStartLine();
+        $end = $method->getEndLine();
+        $length = $end - $start;
+
+        $source = file($class->getFileName());
+        $content = implode('', array_slice($source, $start, $length));
+        $pattern = '/parent::__construct\(([a-zA-Z0-9_$, \n]*)\);/';
+
+        if (!preg_match($pattern, $content, $matches)) {
+            return null;
+        }
+
+        $arguments = $matches[1];
+        if (!trim($arguments)) {
+            return null;
+        }
+
+        $arguments = explode(',', $arguments);
+        array_walk($arguments, $trimFunction);
+
+        $output = array();
+        foreach ($arguments as $argumentPosition => $argumentName) {
+            $type = isset($classArguments[$argumentName]) ? $classArguments[$argumentName]['type'] : null;
+            $output[$argumentPosition] = array(
+                'name' => $argumentName,
+                'position' => $argumentPosition,
+                'type' => $type,
+            );
+        }
+        return $output;
+    }
+
+    /**
+     * Get class constructor
+     *
+     * @param \ReflectionClass $class
+     * @param bool $groupByPosition
+     * @return array|null
+     */
+    protected function _getConstructorArguments(\ReflectionClass $class, $groupByPosition = false)
+    {
+        if (false == $class->hasMethod('__construct')) {
+            return null;
+        }
+
+        $output = array();
+        foreach ($class->getConstructor()->getParameters() as $parameter) {
+            $name = $parameter->getName();
+            $position = $parameter->getPosition();
+            $parameterClass = $parameter->getClass();
+            $type = $parameterClass ? $parameterClass->getName() : ($parameter->isArray() ? 'array' : null);
+            $index = $groupByPosition ? $position : $name;
+            $output[$index] = array(
+                'name' => $name,
+                'position' => $position,
+                'type' => $type,
+                'isOptional' => $parameter->isOptional()
+            );
+        }
+        return $output;
+    }
+} 
diff --git a/lib/Magento/Config/Data/Scoped.php b/lib/Magento/Config/Data/Scoped.php
index ad7e427f174..97782ea9dbb 100644
--- a/lib/Magento/Config/Data/Scoped.php
+++ b/lib/Magento/Config/Data/Scoped.php
@@ -110,12 +110,13 @@ class Scoped extends \Magento\Config\Data
             }
             foreach ($this->_scopePriorityScheme as $scopeCode) {
                 if (false == isset($this->_loadedScopes[$scopeCode])) {
-                    $data = $this->_cache->load($scopeCode . '::' . $this->_cacheId);
-                    if (false === $data) {
-                        $data = $this->_reader->read($scopeCode);
-                        $this->_cache->save(serialize($data), $scopeCode . '::' . $this->_cacheId);
-                    } else {
+                    if ($scopeCode !== 'primary' && $data = $this->_cache->load($scopeCode . '::' . $this->_cacheId)) {
                         $data = unserialize($data);
+                    } else {
+                        $data = $this->_reader->read($scopeCode);
+                        if ($scopeCode !== 'primary') {
+                            $this->_cache->save(serialize($data), $scopeCode . '::' . $this->_cacheId);
+                        }
                     }
                     $this->merge($data);
                     $this->_loadedScopes[$scopeCode] = true;
diff --git a/lib/Magento/Config/Scope.php b/lib/Magento/Config/Scope.php
index 7ccff434ce2..c1c9447013b 100644
--- a/lib/Magento/Config/Scope.php
+++ b/lib/Magento/Config/Scope.php
@@ -50,7 +50,7 @@ class Scope implements \Magento\Config\ScopeInterface
      * @param \Magento\App\AreaList $areaList
      * @param string $defaultScope
      */
-    public function __construct(\Magento\App\AreaList $areaList, $defaultScope = 'global')
+    public function __construct(\Magento\App\AreaList $areaList, $defaultScope = 'primary')
     {
         $this->_defaultScope = $this->_currentScope = $defaultScope;
         $this->_areaList = $areaList;
diff --git a/lib/Magento/Convert/ConvertArray.php b/lib/Magento/Convert/ConvertArray.php
new file mode 100644
index 00000000000..097bcae91f5
--- /dev/null
+++ b/lib/Magento/Convert/ConvertArray.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\Convert;
+
+/**
+ * Convert the array data to SimpleXMLElement object
+ */
+class ConvertArray
+{
+    /**
+     * Transform an assoc array to \SimpleXMLElement object
+     * Array has some limitations. Appropriate exceptions will be thrown
+     *
+     * @param array $array
+     * @param string $rootName
+     * @return \SimpleXMLElement
+     * @throws \Magento\Exception
+     */
+    public function assocToXml(array $array, $rootName = '_')
+    {
+        if (empty($rootName) || is_numeric($rootName)) {
+            throw new \Magento\Exception('Root element must not be empty or numeric');
+        }
+
+        $xmlStr = <<<XML
+<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<$rootName></$rootName>
+XML;
+        $xml = new \SimpleXMLElement($xmlStr);
+        foreach (array_keys($array) as $key) {
+            if (is_numeric($key)) {
+                throw new \Magento\Exception('Array root keys must not be numeric.');
+            }
+        }
+        return self::_assocToXml($array, $rootName, $xml);
+    }
+
+    /**
+     * Function, that actually recursively transforms array to xml
+     *
+     * @param array $array
+     * @param string $rootName
+     * @param \SimpleXMLElement $xml
+     * @return \SimpleXMLElement
+     * @throws \Magento\Exception
+     */
+    private function _assocToXml(array $array, $rootName, \SimpleXMLElement &$xml)
+    {
+        $hasNumericKey = false;
+        $hasStringKey  = false;
+        foreach ($array as $key => $value) {
+            if (!is_array($value)) {
+                if (is_string($key)) {
+                    if ($key === $rootName) {
+                        throw new \Magento\Exception(
+                            'Associative key must not be the same as its parent associative key.'
+                        );
+                    }
+                    $hasStringKey = true;
+                    $xml->$key = $value;
+                } elseif (is_int($key)) {
+                    $hasNumericKey = true;
+                    $xml->{$rootName}[$key] = $value;
+                }
+            } else {
+                self::_assocToXml($value, $key, $xml->$key);
+            }
+        }
+        if ($hasNumericKey && $hasStringKey) {
+            throw new \Magento\Exception('Associative and numeric keys must not be mixed at one level.');
+        }
+        return $xml;
+    }
+}
diff --git a/lib/Magento/Convert/ConvertException.php b/lib/Magento/Convert/ConvertException.php
index 23cb644e4c1..521c7528f0a 100644
--- a/lib/Magento/Convert/ConvertException.php
+++ b/lib/Magento/Convert/ConvertException.php
@@ -24,16 +24,11 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Convert;
 
 /**
  * Convert exception
- *
- * @category   Magento
- * @package    Magento_Convert
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Convert;
-
 class ConvertException extends \Magento\Exception
 {
     const NOTICE = 'NOTICE';
diff --git a/lib/Magento/Convert/Excel.php b/lib/Magento/Convert/Excel.php
index aaff97b93f0..b4121b2c370 100644
--- a/lib/Magento/Convert/Excel.php
+++ b/lib/Magento/Convert/Excel.php
@@ -24,12 +24,11 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Convert;
+
 /**
  * Convert the data to XML Excel
  */
-
-namespace Magento\Convert;
-
 class Excel
 {
     /**
diff --git a/lib/Magento/Convert/Xml.php b/lib/Magento/Convert/Xml.php
new file mode 100644
index 00000000000..d8dc893bff2
--- /dev/null
+++ b/lib/Magento/Convert/Xml.php
@@ -0,0 +1,61 @@
+<?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\Convert;
+
+/**
+ * Convert xml data (SimpleXMLElement object) to array
+ */
+class Xml
+{
+    /**
+     * Transform \SimpleXMLElement to associative array
+     * \SimpleXMLElement must be conform structure, generated by assocToXml()
+     *
+     * @param \SimpleXMLElement $xml
+     * @return array
+     */
+    public function xmlToAssoc(\SimpleXMLElement $xml)
+    {
+        $array = array();
+        foreach ($xml as $key => $value) {
+            if (isset($value->$key)) {
+                $i = 0;
+                foreach ($value->$key as $v) {
+                    $array[$key][$i++] = (string)$v;
+                }
+            } else {
+                // try to transform it into string value, trimming spaces between elements
+                $array[$key] = trim((string)$value);
+                if (empty($array[$key]) && !empty($value)) {
+                    $array[$key] = $this->xmlToAssoc($value);
+                } else {
+                    // untrim strings values
+                    $array[$key] = (string)$value;
+                }
+            }
+        }
+        return $array;
+    }
+}
diff --git a/lib/Magento/DB/Adapter/Pdo/Mysql.php b/lib/Magento/DB/Adapter/Pdo/Mysql.php
index e37d7b40398..ddb5666d2ae 100644
--- a/lib/Magento/DB/Adapter/Pdo/Mysql.php
+++ b/lib/Magento/DB/Adapter/Pdo/Mysql.php
@@ -224,15 +224,31 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements \Magento\DB\Adapter\Ad
      */
     protected $_dirs;
 
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
+    /**
+     * @var \Magento\Stdlib\DateTime
+     */
+    protected $dateTime;
+
     /**
      * @param \Magento\App\Dir $dirs
+     * @param \Magento\Stdlib\String $string
+     * @param \Magento\Stdlib\DateTime $dateTime
      * @param array $config
      */
     public function __construct(
         \Magento\App\Dir $dirs,
+        \Magento\Stdlib\String $string,
+        \Magento\Stdlib\DateTime $dateTime,
         array $config = array()
     ) {
         $this->_dirs = $dirs;
+        $this->string = $string;
+        $this->dateTime = $dateTime;
         parent::__construct($config);
     }
 
@@ -345,7 +361,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements \Magento\DB\Adapter\Ad
         }
 
         if (!isset($this->_config['host'])) {
-            throw new \Zend_Db_Adapter_Exception('No host configured to connect to' . mageDebugBacktrace(true));
+            throw new \Zend_Db_Adapter_Exception('No host configured to connect');
         }
 
         if (strpos($this->_config['host'], '/') !== false) {
@@ -1666,7 +1682,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements \Magento\DB\Adapter\Ad
             $options['precision'] = $columnData['PRECISION'];
         }
 
-        $comment = uc_words($columnData['COLUMN_NAME'], ' ');
+        $comment = $this->string->upperCaseWords($columnData['COLUMN_NAME'], '_', ' ');
 
         $result = array(
             'name'      => $columnData['COLUMN_NAME'],
@@ -1690,7 +1706,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements \Magento\DB\Adapter\Ad
     {
         $describe = $this->describeTable($tableName);
         $table = $this->newTable($newTableName)
-            ->setComment(uc_words($newTableName, ' '));
+            ->setComment($this->string->upperCaseWords($newTableName, '_', ' '));
 
         foreach ($describe as $columnData) {
             $columnInfo = $this->getColumnCreateByDescribe($columnData);
@@ -2605,7 +2621,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements \Magento\DB\Adapter\Ad
      */
     public function formatDate($date, $includeTime = true)
     {
-        $date = \Magento\Date::formatDate($date, $includeTime);
+        $date = $this->dateTime->formatDate($date, $includeTime);
 
         if ($date === null) {
             return new \Zend_Db_Expr('NULL');
diff --git a/lib/Magento/Data/Collection/Db.php b/lib/Magento/Data/Collection/Db.php
index ff412df3824..39a65dca0b1 100644
--- a/lib/Magento/Data/Collection/Db.php
+++ b/lib/Magento/Data/Collection/Db.php
@@ -92,7 +92,7 @@ class Db extends \Magento\Data\Collection
     protected $_isOrdersRendered = false;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $_logger;
 
@@ -102,13 +102,13 @@ class Db extends \Magento\Data\Collection
     private $_fetchStrategy;
 
     /**
-     * @param \Magento\Core\Model\Logger $logger
+     * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param null $conn
      */
     public function __construct(
-        \Magento\Core\Model\Logger $logger,
+        \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Core\Model\EntityFactory $entityFactory,
         $conn = null
diff --git a/lib/Magento/Data/Form.php b/lib/Magento/Data/Form.php
index 14a79742a72..e52eaefa9fc 100644
--- a/lib/Magento/Data/Form.php
+++ b/lib/Magento/Data/Form.php
@@ -24,20 +24,9 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-/**
- * Data form
- *
- * @category   Magento
- * @package    Magento_Data
- * @author      Magento Core Team <core@magentocommerce.com>
- *
- * @method \Magento\Data\Form setParent($block)
- * @method \Magento\Backend\Block\Widget\Form getParent()
- * @method \Magento\Backend\Block\Widget\Form setUseContainer($flag)
- */
 namespace Magento\Data;
 
-use \Magento\Core\Model\Session\AbstractSession;
+use \Magento\Core\Model\Session;
 
 class Form extends \Magento\Data\Form\AbstractForm
 {
@@ -67,15 +56,18 @@ class Form extends \Magento\Data\Form\AbstractForm
     static protected $_defaultFieldsetElementRenderer;
 
     /**
-     * @param \Magento\Data\Form\Element\Factory $factoryElement
-     * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
+     * @param Session $session
+     * @param Form\Element\Factory $factoryElement
+     * @param Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
+        Session $session,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
+        $this->_session = $session;
         parent::__construct($factoryElement, $factoryCollection, $attributes);
         $this->_allElements = $this->_factoryCollection->create(array('container' => $this));
     }
@@ -83,10 +75,10 @@ class Form extends \Magento\Data\Form\AbstractForm
     /**
      * Set session instance
      *
-     * @param \Magento\Core\Model\Session\AbstractSession $session
+     * @param \Magento\Core\Model\Session $session
      * @return \Magento\Data\Form
      */
-    public function setSession(AbstractSession $session)
+    public function setSession(Session $session)
     {
         $this->_session = $session;
         return $this;
@@ -100,9 +92,6 @@ class Form extends \Magento\Data\Form\AbstractForm
      */
     protected function _getSession()
     {
-        if (null == $this->_session) {
-            throw new \Magento\Exception('Session is not set');
-        }
         return $this->_session;
     }
 
@@ -148,10 +137,11 @@ class Form extends \Magento\Data\Form\AbstractForm
     /**
      * Add form element
      *
-     * @param   \Magento\Data\Form\Element\AbstractElement $element
-     * @return  \Magento\Data\Form
+     * @param \Magento\Data\Form\Element\AbstractElement $element
+     * @param bool $after
+     * @return \Magento\Data\Form
      */
-    public function addElement(\Magento\Data\Form\Element\AbstractElement $element, $after=false)
+    public function addElement(\Magento\Data\Form\Element\AbstractElement $element, $after = false)
     {
         $this->checkElementId($element->getId());
         parent::addElement($element, $after);
@@ -170,6 +160,10 @@ class Form extends \Magento\Data\Form\AbstractForm
         return isset($this->_elementsIndex[$elementId]);
     }
 
+    /**
+     * @param \Magento\Data\Form\Element\AbstractElement $element
+     * @return $this
+     */
     public function addElementToCollection($element)
     {
         $this->_elementsIndex[$element->getId()] = $element;
@@ -177,14 +171,22 @@ class Form extends \Magento\Data\Form\AbstractForm
         return $this;
     }
 
+    /**
+     * @param string $elementId
+     * @return bool
+     * @throws \Exception
+     */
     public function checkElementId($elementId)
     {
         if ($this->_elementIdExists($elementId)) {
-            throw new \Exception('Element with id "'.$elementId.'" already exists');
+            throw new \InvalidArgumentException('Element with id "' . $elementId . '" already exists');
         }
         return true;
     }
 
+    /**
+     * @return $this
+     */
     public function getForm()
     {
         return $this;
@@ -204,6 +206,10 @@ class Form extends \Magento\Data\Form\AbstractForm
         return null;
     }
 
+    /**
+     * @param array $values
+     * @return $this
+     */
     public function setValues($values)
     {
         foreach ($this->_allElements as $element) {
@@ -216,13 +222,18 @@ class Form extends \Magento\Data\Form\AbstractForm
         return $this;
     }
 
+    /**
+     * @param array $values
+     * @return $this
+     */
     public function addValues($values)
     {
         if (!is_array($values)) {
             return $this;
         }
-        foreach ($values as $elementId=>$value) {
-            if ($element = $this->getElement($elementId)) {
+        foreach ($values as $elementId => $value) {
+            $element = $this->getElement($elementId);
+            if ($element) {
                 $element->setValue($value);
             }
         }
@@ -246,6 +257,11 @@ class Form extends \Magento\Data\Form\AbstractForm
         return $this;
     }
 
+    /**
+     * @param string $name
+     * @param string $suffix
+     * @return string
+     */
     public function addSuffixToName($name, $suffix)
     {
         if (!$name) {
@@ -253,15 +269,19 @@ class Form extends \Magento\Data\Form\AbstractForm
         }
         $vars = explode('[', $name);
         $newName = $suffix;
-        foreach ($vars as $index=>$value) {
-            $newName.= '['.$value;
-            if ($index==0) {
-                $newName.= ']';
+        foreach ($vars as $index => $value) {
+            $newName .= '[' . $value;
+            if ($index == 0) {
+                $newName .= ']';
             }
         }
         return $newName;
     }
 
+    /**
+     * @param string $elementId
+     * @return $this|Form\AbstractForm
+     */
     public function removeField($elementId)
     {
         if ($this->_elementIdExists($elementId)) {
@@ -270,25 +290,36 @@ class Form extends \Magento\Data\Form\AbstractForm
         return $this;
     }
 
+    /**
+     * @param string $prefix
+     * @return $this
+     */
     public function setFieldContainerIdPrefix($prefix)
     {
         $this->setData('field_container_id_prefix', $prefix);
         return $this;
     }
 
+    /**
+     * @return string
+     */
     public function getFieldContainerIdPrefix()
     {
         return $this->getData('field_container_id_prefix');
     }
 
+    /**
+     * @return string
+     */
     public function toHtml()
     {
         \Magento\Profiler::start('form/toHtml');
         $html = '';
-        if ($useContainer = $this->getUseContainer()) {
-            $html .= '<form '.$this->serialize($this->getHtmlAttributes()).'>';
+        $useContainer = $this->getUseContainer();
+        if ($useContainer) {
+            $html .= '<form ' . $this->serialize($this->getHtmlAttributes()) . '>';
             $html .= '<div>';
-            if (strtolower($this->getData('method')) == 'post') {
+            if (strtolower($this->getData('method')) == 'post' && null !== $this->_getSession()) {
                 $html .= '<input name="form_key" type="hidden" value="'
                     . $this->_getSession()->getFormKey()
                     . '" />';
diff --git a/lib/Magento/Data/Form/Element/AbstractElement.php b/lib/Magento/Data/Form/Element/AbstractElement.php
index 51b4ca27f20..9928b00c929 100644
--- a/lib/Magento/Data/Form/Element/AbstractElement.php
+++ b/lib/Magento/Data/Form/Element/AbstractElement.php
@@ -51,23 +51,23 @@ abstract class AbstractElement extends \Magento\Data\Form\AbstractForm
     protected $_advanced = false;
 
     /**
-     * @var \Magento\Core\Helper\Data
+     * @var \Magento\Escaper
      */
-    protected $_coreData;
+    protected $_escaper;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        $this->_coreData = $coreData;
+        $this->_escaper = $escaper;
         parent::__construct($factoryElement, $factoryCollection, $attributes);
         $this->_renderer = \Magento\Data\Form::getElementRenderer();
     }
@@ -76,9 +76,10 @@ abstract class AbstractElement extends \Magento\Data\Form\AbstractForm
      * Add form element
      *
      * @param   \Magento\Data\Form\Element\AbstractElement $element
+     * @param bool $after
      * @return  \Magento\Data\Form
      */
-    public function addElement(\Magento\Data\Form\Element\AbstractElement $element, $after=false)
+    public function addElement(\Magento\Data\Form\Element\AbstractElement $element, $after = false)
     {
         if ($this->getForm()) {
             $this->getForm()->checkElementId($element->getId());
@@ -236,13 +237,13 @@ abstract class AbstractElement extends \Magento\Data\Form\AbstractForm
     {
         $html = '';
         if ($this->getBeforeElementHtml()) {
-            $html .= '<label class="addbefore" for="' . $this->getHtmlId() . '">' . $this->getBeforeElementHtml() . '</label>';            
+            $html .= '<label class="addbefore" for="' . $this->getHtmlId() . '">' . $this->getBeforeElementHtml() . '</label>';
         }
         $html .= '<input id="' . $this->getHtmlId() . '" name="' . $this->getName() . '" '
             . $this->_getUiId()
             . ' value="' . $this->getEscapedValue() . '" ' . $this->serialize($this->getHtmlAttributes()) . '/>';
         if ($this->getAfterElementHtml()) {
-            $html.= '<label class="addafter" for="' . $this->getHtmlId() . '">' . $this->getAfterElementHtml() . '</label>';            
+            $html.= '<label class="addafter" for="' . $this->getHtmlId() . '">' . $this->getAfterElementHtml() . '</label>';
         }
         return $html;
     }
@@ -353,14 +354,14 @@ abstract class AbstractElement extends \Magento\Data\Form\AbstractForm
             return $this;
         }
         if (!is_array($values)) {
-            $values = $this->_coreData->escapeHtml(trim($values));
+            $values = $this->_escaper->escapeHtml(trim($values));
             $values = array($values => $values);
         }
         $elementValues = $this->getValues();
         if (!empty($elementValues)) {
             foreach ($values as $key => $value) {
                 if ((isset($elementValues[$key]) && $overwrite) || !isset($elementValues[$key])) {
-                    $elementValues[$key] = $this->_coreData->escapeHtml($value);
+                    $elementValues[$key] = $this->_escaper->escapeHtml($value);
                 }
             }
             $values = $elementValues;
diff --git a/lib/Magento/Data/Form/Element/Button.php b/lib/Magento/Data/Form/Element/Button.php
index 97c05f862b4..9d897738e99 100644
--- a/lib/Magento/Data/Form/Element/Button.php
+++ b/lib/Magento/Data/Form/Element/Button.php
@@ -43,18 +43,18 @@ class Button extends \Magento\Data\Form\Element\AbstractElement
     protected $_htmlAttributes = array('data-mage-init');
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('button');
         $this->setExtType('textfield');
     }
diff --git a/lib/Magento/Data/Form/Element/Checkbox.php b/lib/Magento/Data/Form/Element/Checkbox.php
index 6499ee47b70..7baccef9fe2 100644
--- a/lib/Magento/Data/Form/Element/Checkbox.php
+++ b/lib/Magento/Data/Form/Element/Checkbox.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Checkbox extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('checkbox');
         $this->setExtType('checkbox');
     }
diff --git a/lib/Magento/Data/Form/Element/Checkboxes.php b/lib/Magento/Data/Form/Element/Checkboxes.php
index 39b72a2d703..40db9931241 100644
--- a/lib/Magento/Data/Form/Element/Checkboxes.php
+++ b/lib/Magento/Data/Form/Element/Checkboxes.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Checkboxes extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('checkbox');
         $this->setExtType('checkboxes');
     }
diff --git a/lib/Magento/Data/Form/Element/Column.php b/lib/Magento/Data/Form/Element/Column.php
index 419b7de5b96..c15cb351448 100644
--- a/lib/Magento/Data/Form/Element/Column.php
+++ b/lib/Magento/Data/Form/Element/Column.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Column extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('column');
     }
 }
diff --git a/lib/Magento/Data/Form/Element/Date.php b/lib/Magento/Data/Form/Element/Date.php
index 8d036682d50..39a634b2f63 100644
--- a/lib/Magento/Data/Form/Element/Date.php
+++ b/lib/Magento/Data/Form/Element/Date.php
@@ -41,18 +41,18 @@ class Date extends \Magento\Data\Form\Element\AbstractElement
     protected $_value;
 
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('text');
         $this->setExtType('textfield');
         if (isset($attributes['value'])) {
@@ -103,7 +103,7 @@ class Date extends \Magento\Data\Form\Element\AbstractElement
         }
         // last check, if input format was set
         if (null === $format) {
-            $format = \Magento\Date::DATETIME_INTERNAL_FORMAT;
+            $format = \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT;
             if ($this->getInputFormat()) {
                 $format = $this->getInputFormat();
             }
diff --git a/lib/Magento/Data/Form/Element/Editor.php b/lib/Magento/Data/Form/Element/Editor.php
index e44f2804c39..18cd3e03408 100644
--- a/lib/Magento/Data/Form/Element/Editor.php
+++ b/lib/Magento/Data/Form/Element/Editor.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Editor extends \Magento\Data\Form\Element\Textarea
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
 
         if($this->isEnabled()) {
             $this->setType('wysiwyg');
diff --git a/lib/Magento/Data/Form/Element/Fieldset.php b/lib/Magento/Data/Form/Element/Fieldset.php
index 2ad98eb5f5a..ef8716e16eb 100644
--- a/lib/Magento/Data/Form/Element/Fieldset.php
+++ b/lib/Magento/Data/Form/Element/Fieldset.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Fieldset extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->_renderer = \Magento\Data\Form::getFieldsetRenderer();
         $this->setType('fieldset');
         if (isset($attributes['advancedSection'])) {
diff --git a/lib/Magento/Data/Form/Element/File.php b/lib/Magento/Data/Form/Element/File.php
index a3154e84f83..1df53fc0c0a 100644
--- a/lib/Magento/Data/Form/Element/File.php
+++ b/lib/Magento/Data/Form/Element/File.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class File extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('file');
         $this->setExtType('file');
     }
diff --git a/lib/Magento/Data/Form/Element/Gallery.php b/lib/Magento/Data/Form/Element/Gallery.php
index 21a8a714814..f1b1195ff58 100644
--- a/lib/Magento/Data/Form/Element/Gallery.php
+++ b/lib/Magento/Data/Form/Element/Gallery.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Gallery extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('file');
     }
 
diff --git a/lib/Magento/Data/Form/Element/Hidden.php b/lib/Magento/Data/Form/Element/Hidden.php
index c751819bd71..038b6b940c7 100644
--- a/lib/Magento/Data/Form/Element/Hidden.php
+++ b/lib/Magento/Data/Form/Element/Hidden.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Hidden extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('hidden');
         $this->setExtType('hiddenfield');
     }
diff --git a/lib/Magento/Data/Form/Element/Image.php b/lib/Magento/Data/Form/Element/Image.php
index c45dfb96267..15b99a7c1b4 100644
--- a/lib/Magento/Data/Form/Element/Image.php
+++ b/lib/Magento/Data/Form/Element/Image.php
@@ -40,21 +40,21 @@ class Image extends \Magento\Data\Form\Element\AbstractElement
      */
     protected $_urlBuilder;
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param \Magento\UrlInterface $urlBuilder
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         \Magento\UrlInterface $urlBuilder,
         $attributes = array()
     ) {
         $this->_urlBuilder = $urlBuilder;
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('file');
     }
 
diff --git a/lib/Magento/Data/Form/Element/Imagefile.php b/lib/Magento/Data/Form/Element/Imagefile.php
index 2790df980ef..9515bc92308 100644
--- a/lib/Magento/Data/Form/Element/Imagefile.php
+++ b/lib/Magento/Data/Form/Element/Imagefile.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Imagefile extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('file');
         $this->setExtType('imagefile');
         $this->setAutosubmit(false);
diff --git a/lib/Magento/Data/Form/Element/Label.php b/lib/Magento/Data/Form/Element/Label.php
index 17cf5ec0761..20b54b6d63b 100644
--- a/lib/Magento/Data/Form/Element/Label.php
+++ b/lib/Magento/Data/Form/Element/Label.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Label extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('label');
     }
 
diff --git a/lib/Magento/Data/Form/Element/Link.php b/lib/Magento/Data/Form/Element/Link.php
index 16041edf216..86c6d16883b 100644
--- a/lib/Magento/Data/Form/Element/Link.php
+++ b/lib/Magento/Data/Form/Element/Link.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Link extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('link');
     }
 
diff --git a/lib/Magento/Data/Form/Element/Multiline.php b/lib/Magento/Data/Form/Element/Multiline.php
index e2fb5c783a8..ec9da9dd58d 100644
--- a/lib/Magento/Data/Form/Element/Multiline.php
+++ b/lib/Magento/Data/Form/Element/Multiline.php
@@ -34,18 +34,18 @@ namespace Magento\Data\Form\Element;
 class Multiline extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('text');
         $this->setLineCount(2);
     }
diff --git a/lib/Magento/Data/Form/Element/Multiselect.php b/lib/Magento/Data/Form/Element/Multiselect.php
index 4a26742dc54..7b7ee7904ac 100644
--- a/lib/Magento/Data/Form/Element/Multiselect.php
+++ b/lib/Magento/Data/Form/Element/Multiselect.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Multiselect extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('select');
         $this->setExtType('multiple');
         $this->setSize(10);
diff --git a/lib/Magento/Data/Form/Element/Note.php b/lib/Magento/Data/Form/Element/Note.php
index ee05217fa10..9aacb94eb3f 100644
--- a/lib/Magento/Data/Form/Element/Note.php
+++ b/lib/Magento/Data/Form/Element/Note.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Note extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('note');
     }
 
diff --git a/lib/Magento/Data/Form/Element/Password.php b/lib/Magento/Data/Form/Element/Password.php
index 81fe50d6aed..a12fd0b1cf8 100644
--- a/lib/Magento/Data/Form/Element/Password.php
+++ b/lib/Magento/Data/Form/Element/Password.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Password extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('password');
         $this->setExtType('textfield');
     }
diff --git a/lib/Magento/Data/Form/Element/Radio.php b/lib/Magento/Data/Form/Element/Radio.php
index 2d18f3cd259..9a5a2c86aa4 100644
--- a/lib/Magento/Data/Form/Element/Radio.php
+++ b/lib/Magento/Data/Form/Element/Radio.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Radio extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('radio');
         $this->setExtType('radio');
     }
diff --git a/lib/Magento/Data/Form/Element/Radios.php b/lib/Magento/Data/Form/Element/Radios.php
index e0cdfa71a9c..95d3e0a5a27 100644
--- a/lib/Magento/Data/Form/Element/Radios.php
+++ b/lib/Magento/Data/Form/Element/Radios.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Radios extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('radios');
     }
 
diff --git a/lib/Magento/Data/Form/Element/Reset.php b/lib/Magento/Data/Form/Element/Reset.php
index e78283af098..7eeada145ea 100644
--- a/lib/Magento/Data/Form/Element/Reset.php
+++ b/lib/Magento/Data/Form/Element/Reset.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Reset extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('text');
         $this->setExtType('textfield');
     }
diff --git a/lib/Magento/Data/Form/Element/Select.php b/lib/Magento/Data/Form/Element/Select.php
index 1d1869c0953..1e40cb45248 100644
--- a/lib/Magento/Data/Form/Element/Select.php
+++ b/lib/Magento/Data/Form/Element/Select.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Select extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('select');
         $this->setExtType('combobox');
         $this->_prepareOptions();
diff --git a/lib/Magento/Data/Form/Element/Submit.php b/lib/Magento/Data/Form/Element/Submit.php
index d966c02e3a6..ca1ccec4418 100644
--- a/lib/Magento/Data/Form/Element/Submit.php
+++ b/lib/Magento/Data/Form/Element/Submit.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Submit extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setExtType('submit');
         $this->setType('submit');
     }
diff --git a/lib/Magento/Data/Form/Element/Text.php b/lib/Magento/Data/Form/Element/Text.php
index bd5c083d24e..d80d7568e92 100644
--- a/lib/Magento/Data/Form/Element/Text.php
+++ b/lib/Magento/Data/Form/Element/Text.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Text extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('text');
         $this->setExtType('textfield');
     }
diff --git a/lib/Magento/Data/Form/Element/Textarea.php b/lib/Magento/Data/Form/Element/Textarea.php
index 2dc79d8b1b1..4720b01f7c4 100644
--- a/lib/Magento/Data/Form/Element/Textarea.php
+++ b/lib/Magento/Data/Form/Element/Textarea.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Textarea extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('textarea');
         $this->setExtType('textarea');
         $this->setRows(2);
diff --git a/lib/Magento/Data/Form/Element/Time.php b/lib/Magento/Data/Form/Element/Time.php
index 57f6814bd69..77e3fdfc8e2 100644
--- a/lib/Magento/Data/Form/Element/Time.php
+++ b/lib/Magento/Data/Form/Element/Time.php
@@ -36,18 +36,18 @@ namespace Magento\Data\Form\Element;
 class Time extends \Magento\Data\Form\Element\AbstractElement
 {
     /**
-     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\Escaper $escaper
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
      * @param array $attributes
      */
     public function __construct(
-        \Magento\Core\Helper\Data $coreData,
+        \Magento\Escaper $escaper,
         \Magento\Data\Form\Element\Factory $factoryElement,
         \Magento\Data\Form\Element\CollectionFactory $factoryCollection,
         $attributes = array()
     ) {
-        parent::__construct($coreData, $factoryElement, $factoryCollection, $attributes);
+        parent::__construct($escaper, $factoryElement, $factoryCollection, $attributes);
         $this->setType('time');
     }
 
diff --git a/lib/Magento/Data/Form/Filter/Date.php b/lib/Magento/Data/Form/Filter/Date.php
index 1dd64c7003b..8a34aaf4d1a 100644
--- a/lib/Magento/Data/Form/Filter/Date.php
+++ b/lib/Magento/Data/Form/Filter/Date.php
@@ -59,7 +59,7 @@ class Date implements \Magento\Data\Form\Filter\FilterInterface
     public function __construct($format = null, $locale = null)
     {
         if (is_null($format)) {
-            $format = \Magento\Date::DATE_INTERNAL_FORMAT;
+            $format = \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT;
         }
         $this->_dateFormat  = $format;
         $this->_locale      = $locale;
@@ -78,7 +78,7 @@ class Date implements \Magento\Data\Form\Filter\FilterInterface
             'locale'        => $this->_locale
         ));
         $filterInternal = new \Zend_Filter_NormalizedToLocalized(array(
-            'date_format'   => \Magento\Date::DATE_INTERNAL_FORMAT,
+            'date_format'   => \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT,
             'locale'        => $this->_locale
         ));
 
@@ -96,7 +96,7 @@ class Date implements \Magento\Data\Form\Filter\FilterInterface
     public function outputFilter($value)
     {
         $filterInput = new \Zend_Filter_LocalizedToNormalized(array(
-            'date_format'   => \Magento\Date::DATE_INTERNAL_FORMAT,
+            'date_format'   => \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT,
             'locale'        => $this->_locale
         ));
         $filterInternal = new \Zend_Filter_NormalizedToLocalized(array(
diff --git a/lib/Magento/Data/Form/Factory.php b/lib/Magento/Data/FormFactory.php
similarity index 83%
rename from lib/Magento/Data/Form/Factory.php
rename to lib/Magento/Data/FormFactory.php
index 0e283cbfd90..628a14c9013 100644
--- a/lib/Magento/Data/Form/Factory.php
+++ b/lib/Magento/Data/FormFactory.php
@@ -23,12 +23,12 @@
  * @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\Data\Form;
+namespace Magento\Data;
 
 /**
  * Form factory class
  */
-class Factory
+class FormFactory
 {
     /**
      * Object Manager instance
@@ -44,27 +44,17 @@ class Factory
      */
     protected $_instanceName;
 
-    /**
-     * Session instance
-     *
-     * @var \Magento\Core\Model\Session\AbstractSession
-     */
-    protected $_session;
-
     /**
      * Factory construct
      *
      * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Core\Model\Session\AbstractSession $session
      * @param string $instanceName
      */
     public function __construct(
         \Magento\ObjectManager $objectManager,
-        \Magento\Core\Model\Session\AbstractSession $session,
         $instanceName = 'Magento\Data\Form'
     ) {
         $this->_objectManager = $objectManager;
-        $this->_session = $session;
         $this->_instanceName = $instanceName;
     }
 
@@ -80,9 +70,8 @@ class Factory
         /** @var $form \Magento\Data\Form */
         $form = $this->_objectManager->create($this->_instanceName, $data);
         if (!$form instanceof \Magento\Data\Form) {
-            throw new \Magento\Exception($this->_instanceName . ' doesn\'t extends \Magento\Data\Form');
+            throw new \Magento\Exception($this->_instanceName . ' doesn\'t extend \Magento\Data\Form');
         }
-        $form->setSession($this->_session);
         return $form;
     }
 }
diff --git a/lib/Magento/Debug.php b/lib/Magento/Debug.php
index 14052488d21..6c12d4570cb 100644
--- a/lib/Magento/Debug.php
+++ b/lib/Magento/Debug.php
@@ -36,6 +36,7 @@ namespace Magento;
 class Debug
 {
     public static $argLength = 16;
+
     /**
      * Magento Root path
      *
@@ -61,11 +62,11 @@ class Debug
     }
 
     /**
-     * Prints or return a backtrace
+     * Prints or returns a backtrace
      *
      * @param bool $return      return or print
      * @param bool $html        output in HTML format
-     * @param bool $withArgs    add short argumets of methods
+     * @param bool $withArgs    add short arguments of methods
      * @return string|bool
      */
     public static function backtrace($return = false, $html = true, $withArgs = true)
@@ -80,7 +81,7 @@ class Debug
      * @param array $trace      trace array
      * @param bool $return      return or print
      * @param bool $html        output in HTML format
-     * @param bool $withArgs    add short argumets of methods
+     * @param bool $withArgs    add short arguments of methods
      * @return string|bool
      */
     public static function trace(array $trace, $return = false, $html = true, $withArgs = true)
@@ -96,7 +97,7 @@ class Debug
                 continue;
             }
 
-            // prepare method argments
+            // prepare method arguments
             $args = array();
             if (isset($data['args']) && $withArgs) {
                 foreach ($data['args'] as $arg) {
@@ -160,6 +161,7 @@ class Debug
      * Format argument in called method
      *
      * @param mixed $arg
+     * @return string
      */
     protected static function _formatCalledArgument($arg)
     {
diff --git a/lib/Magento/Crypt.php b/lib/Magento/Encryption/Crypt.php
old mode 100755
new mode 100644
similarity index 98%
rename from lib/Magento/Crypt.php
rename to lib/Magento/Encryption/Crypt.php
index 687e753c4b3..50b6fe9b996
--- a/lib/Magento/Crypt.php
+++ b/lib/Magento/Encryption/Crypt.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Crypt
+ * @package     Magento_Encryption
  * @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)
  */
@@ -27,7 +27,7 @@
 /**
  * Class encapsulates cryptographic algorithm
  */
-namespace Magento;
+namespace Magento\Encryption;
 
 class Crypt
 {
diff --git a/lib/Magento/Encryption/CryptFactory.php b/lib/Magento/Encryption/CryptFactory.php
new file mode 100644
index 00000000000..ae5b87d0190
--- /dev/null
+++ b/lib/Magento/Encryption/CryptFactory.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Crypt object factory.
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright Copyright (c) 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\Encryption;
+
+/**
+ * Crypt factory
+ */
+class CryptFactory
+{
+    /**
+     * Object manager
+     *
+     * @var \Magento\ObjectManager
+     */
+    private $_objectManager;
+
+    /**
+     * @param \Magento\ObjectManager $objectManager
+     */
+    public function __construct(\Magento\ObjectManager $objectManager)
+    {
+        $this->_objectManager = $objectManager;
+    }
+
+    /**
+     * Create new magento crypt instance
+     *
+     * @param array $data
+     * @return \Magento\Encryption\Crypt
+     */
+    public function create($data = array())
+    {
+        return $this->_objectManager->create('Magento\Encryption\Crypt', $data);
+    }
+}
diff --git a/app/code/Magento/Core/Model/Encryption.php b/lib/Magento/Encryption/Encryptor.php
similarity index 67%
rename from app/code/Magento/Core/Model/Encryption.php
rename to lib/Magento/Encryption/Encryptor.php
index dcb12324ddf..064215eed61 100644
--- a/app/code/Magento/Core/Model/Encryption.php
+++ b/lib/Magento/Encryption/Encryptor.php
@@ -24,75 +24,55 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Encryption;
+
 /**
  * Provides basic logic for hashing passwords and encrypting/decrypting misc data
- *
- * @category   Magento
- * @package    Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Core\Model;
-
-class Encryption implements \Magento\Core\Model\EncryptionInterface
+class Encryptor implements EncryptorInterface
 {
+    /**
+     * Crypt key
+     */
     const PARAM_CRYPT_KEY = 'crypt.key';
 
     /**
-     * @var \Magento\Crypt
+     * @var \Magento\Math\Random
      */
-    protected $_crypt;
+    protected $_randomGenerator;
 
     /**
+     * Cryptographic key
+     *
      * @var string
      */
-    protected $_helper;
+    protected $_cryptKey;
 
     /**
-     * @var \Magento\ObjectManager|null
+     * @var \Magento\Encryption\CryptFactory
      */
-    protected $_objectManager = null;
+    protected $_cryptFactory;
 
     /**
-     * Cryptographic key
-     *
-     * @var string
+     * @var \Magento\Encryption\Crypt
      */
-    protected $_cryptKey;
+    protected $_crypt;
 
     /**
-     * @param \Magento\ObjectManager $objectManager
+     * @param \Magento\Math\Random $randomGenerator
+     * @param \Magento\Encryption\CryptFactory $cryptFactory
      * @param string $cryptKey
      */
     public function __construct(
-        \Magento\ObjectManager $objectManager,
+        \Magento\Math\Random $randomGenerator,
+        \Magento\Encryption\CryptFactory $cryptFactory,
         $cryptKey
     ) {
-        $this->_objectManager = $objectManager;
+        $this->_randomGenerator = $randomGenerator;
+        $this->_cryptFactory = $cryptFactory;
         $this->_cryptKey = $cryptKey;
     }
 
-    /**
-     * Set helper instance
-     *
-     * @param \Magento\Core\Helper\Data|string $helper
-     * @return \Magento\Core\Model\Encryption
-     * @throws \InvalidArgumentException
-     */
-    public function setHelper($helper)
-    {
-        if (!is_string($helper)) {
-            if ($helper instanceof \Magento\Core\Helper\AbstractHelper) {
-                $helper = get_class($helper);
-            } else {
-                throw new \InvalidArgumentException(
-                    'Input parameter "$helper" must be either "string" or instance of "Magento\Core\Helper\AbstractHelper"'
-                );
-            }
-        }
-        $this->_helper = $helper;
-        return $this;
-    }
-
     /**
      * Generate a [salted] hash.
      *
@@ -108,7 +88,7 @@ class Encryption implements \Magento\Core\Model\EncryptionInterface
     public function getHash($password, $salt = false)
     {
         if (is_integer($salt)) {
-            $salt = $this->_objectManager->get($this->_helper)->getRandomString($salt);
+            $salt = $this->_randomGenerator->getRandomString($salt);
         }
         return $salt === false ? $this->hash($password) : $this->hash($salt . $password) . ':' . $salt;
     }
@@ -129,7 +109,7 @@ class Encryption implements \Magento\Core\Model\EncryptionInterface
      *
      * @param string $password
      * @param string $hash
-     * @throws \Magento\Core\Exception
+     * @throws \InvalidArgumentException
      * @return bool
      */
     public function validateHash($password, $hash)
@@ -140,27 +120,10 @@ class Encryption implements \Magento\Core\Model\EncryptionInterface
                 return $this->hash($password) === $hash;
             case 2:
                 return $this->hash($hashArr[1] . $password) === $hashArr[0];
+            default:
+                break;
         }
-        throw new \Magento\Core\Exception('Invalid hash.');
-    }
-
-    /**
-     * Instantiate crypt model
-     *
-     * @param string $key
-     * @return \Magento\Crypt
-     */
-    protected function _getCrypt($key = null)
-    {
-        if (null !== $key) {
-            return $this->_objectManager->create('Magento\Crypt', array('key' => $key));
-        }
-
-        if (!$this->_crypt) {
-            $this->_crypt = $this->_objectManager->create('Magento\Crypt', array('key' => $this->_cryptKey));
-        }
-        
-        return $this->_crypt;
+        throw new \InvalidArgumentException('Invalid hash.');
     }
 
     /**
@@ -171,6 +134,9 @@ class Encryption implements \Magento\Core\Model\EncryptionInterface
      */
     public function encrypt($data)
     {
+        if (empty($this->_cryptKey)) {
+            return $data;
+        }
         return base64_encode($this->_getCrypt()->encrypt((string)$data));
     }
 
@@ -182,6 +148,10 @@ class Encryption implements \Magento\Core\Model\EncryptionInterface
      */
     public function decrypt($data)
     {
+        if (empty($this->_cryptKey)) {
+            return $data;
+        }
+
         return trim($this->_getCrypt()->decrypt(base64_decode((string)$data)));
     }
 
@@ -189,10 +159,28 @@ class Encryption implements \Magento\Core\Model\EncryptionInterface
      * Return crypt model, instantiate if it is empty
      *
      * @param string $key
-     * @return \Magento\Crypt
+     * @return \Magento\Encryption\Crypt
      */
     public function validateKey($key)
     {
         return $this->_getCrypt($key);
     }
+
+    /**
+     * Instantiate crypt model
+     *
+     * @param string $key
+     * @return \Magento\Encryption\Crypt
+     */
+    protected function _getCrypt($key = null)
+    {
+        if ($key === null) {
+            if (!$this->_crypt) {
+                $this->_crypt = $this->_cryptFactory->create(array('key' => $this->_cryptKey));
+            }
+            return $this->_crypt;
+        } else {
+            return $this->_cryptFactory->create(array('key' => $key));
+        }
+    }
 }
diff --git a/app/code/Magento/Core/Model/EncryptionInterface.php b/lib/Magento/Encryption/EncryptorInterface.php
similarity index 85%
rename from app/code/Magento/Core/Model/EncryptionInterface.php
rename to lib/Magento/Encryption/EncryptorInterface.php
index f30881d2450..3b9f9e51f0e 100644
--- a/app/code/Magento/Core/Model/EncryptionInterface.php
+++ b/lib/Magento/Encryption/EncryptorInterface.php
@@ -21,19 +21,13 @@
  * @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;
+namespace Magento\Encryption;
 
-interface EncryptionInterface
+/**
+ * Encryptor interface
+ */
+interface EncryptorInterface
 {
-    /**
-     * Set helper instance
-     *
-     * @param \Magento\Core\Helper\Data|string $helper
-     * @return \Magento\Core\Model\Encryption
-     * @throws \InvalidArgumentException
-     */
-    public function setHelper($helper);
-
     /**
      * Generate a [salted] hash.
      *
@@ -62,7 +56,7 @@ interface EncryptionInterface
      * @param string $password
      * @param string $hash
      * @return bool
-     * @throws Exception
+     * @throws \Exception
      */
     public function validateHash($password, $hash);
 
@@ -86,7 +80,7 @@ interface EncryptionInterface
      * Return crypt model, instantiate if it is empty
      *
      * @param string $key
-     * @return \Magento\Crypt
+     * @return \Magento\Encryption\Crypt
      */
     public function validateKey($key);
 }
diff --git a/lib/Magento/Error/Handler.php b/lib/Magento/Error/Handler.php
new file mode 100644
index 00000000000..62f2a2e277e
--- /dev/null
+++ b/lib/Magento/Error/Handler.php
@@ -0,0 +1,118 @@
+<?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\Error;
+
+/**
+ * Default Error Handler
+ */
+class Handler implements HandlerInterface
+{
+    /**
+     * Error messages
+     *
+     * @var array
+     */
+    protected $errorPhrases = array(
+        E_ERROR             => 'Error',
+        E_WARNING           => 'Warning',
+        E_PARSE             => 'Parse Error',
+        E_NOTICE            => 'Notice',
+        E_CORE_ERROR        => 'Core Error',
+        E_CORE_WARNING      => 'Core Warning',
+        E_COMPILE_ERROR     => 'Compile Error',
+        E_COMPILE_WARNING   => 'Compile Warning',
+        E_USER_ERROR        => 'User Error',
+        E_USER_WARNING      => 'User Warning',
+        E_USER_NOTICE       => 'User Notice',
+        E_STRICT            => 'Strict Notice',
+        E_RECOVERABLE_ERROR => 'Recoverable Error',
+        E_DEPRECATED        => 'Deprecated Functionality',
+        E_USER_DEPRECATED   => 'User Deprecated Functionality'
+    );
+
+    /**
+     * Process exception
+     *
+     * @param \Exception $exception
+     * @param array $params
+     */
+    public function processException(\Exception $exception, array $params = array())
+    {
+        print '<pre>';
+        print $exception->getMessage() . "\n\n";
+        print $exception->getTraceAsString();
+        print '</pre>';
+    }
+
+    /**
+     * Show error as exception
+     *
+     * @param string $errorMessage
+     * @throws \Exception
+     */
+    protected function _processError($errorMessage)
+    {
+        throw new \Exception($errorMessage);
+    }
+
+    /**
+     * Custom error handler
+     *
+     * @param int $errorNo
+     * @param string $errorStr
+     * @param string $errorFile
+     * @param int $errorLine
+     * @return bool
+     */
+    public function handler($errorNo, $errorStr, $errorFile, $errorLine)
+    {
+        if (strpos($errorStr, 'DateTimeZone::__construct') !== false) {
+            // there's no way to distinguish between caught system exceptions and warnings
+            return false;
+        }
+        $errorNo = $errorNo & error_reporting();
+        if ($errorNo == 0) {
+            return false;
+        }
+
+        // PEAR specific message handling
+        if (stripos($errorFile . $errorStr, 'pear') !== false) {
+            // ignore strict and deprecated notices
+            if (($errorNo == E_STRICT) || ($errorNo == E_DEPRECATED)) {
+                return true;
+            }
+            // ignore attempts to read system files when open_basedir is set
+            if ($errorNo == E_WARNING && stripos($errorStr, 'open_basedir') !== false) {
+                return true;
+            }
+        }
+        $errorMessage = isset($this->errorPhrases[$errorNo])
+            ? $this->errorPhrases[$errorNo]
+            : "Unknown error ($errorNo)";
+        $errorMessage .= ": {$errorStr} in {$errorFile} on line {$errorLine}";
+        $this->_processError($errorMessage);
+        return true;
+    }
+}
diff --git a/lib/Magento/Error/HandlerInterface.php b/lib/Magento/Error/HandlerInterface.php
new file mode 100644
index 00000000000..e9292d4e3ec
--- /dev/null
+++ b/lib/Magento/Error/HandlerInterface.php
@@ -0,0 +1,50 @@
+<?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)
+ */
+
+/**
+ * Interface of Error Handler
+ */
+namespace Magento\Error;
+
+interface HandlerInterface
+{
+    /**
+     * Error handler callback method
+     *
+     * @param int $errorNo
+     * @param string $errorStr
+     * @param string $errorFile
+     * @param int $errorLine
+     * @return bool
+     */
+    public function handler($errorNo, $errorStr, $errorFile, $errorLine);
+
+    /**
+     * Process exception
+     *
+     * @param \Exception $exception
+     * @param array $params
+     */
+    public function processException(\Exception $exception, array $params = array());
+}
diff --git a/lib/Magento/Escaper.php b/lib/Magento/Escaper.php
new file mode 100644
index 00000000000..3390ed98abc
--- /dev/null
+++ b/lib/Magento/Escaper.php
@@ -0,0 +1,108 @@
+<?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\Escaper
+ * @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;
+/**
+ * Magento escape methods
+ */
+class Escaper
+{
+    /**
+     * Escape html entities
+     *
+     * @param  string|array $data
+     * @param  array $allowedTags
+     * @return string|array
+     */
+    public function escapeHtml($data, $allowedTags = null)
+    {
+        if (is_array($data)) {
+            $result = array();
+            foreach ($data as $item) {
+                $result[] = $this->escapeHtml($item);
+            }
+        } else if(strlen($data)) {
+            if (is_array($allowedTags) and !empty($allowedTags)) {
+                $allowed = implode('|', $allowedTags);
+                $result = preg_replace('/<([\/\s\r\n]*)(' . $allowed . ')([\/\s\r\n]*)>/si', '##$1$2$3##', $data);
+                $result = htmlspecialchars($result, ENT_COMPAT, 'UTF-8', false);
+                $result = preg_replace('/##([\/\s\r\n]*)(' . $allowed . ')([\/\s\r\n]*)##/si', '<$1$2$3>', $result);
+            } else {
+                $result = htmlspecialchars($data, ENT_COMPAT, 'UTF-8', false);
+            }
+        } else {
+            $result = $data;
+        }
+        return $result;
+    }
+
+    /**
+     * Escape html entities in url
+     *
+     * @param string $data
+     * @return string
+     */
+    public function escapeUrl($data)
+    {
+        return htmlspecialchars($data);
+    }
+
+    /**
+     * Escape quotes in java script
+     *
+     * @param string|array $data
+     * @param string $quote
+     * @return string|array
+     */
+    public function escapeJsQuote($data, $quote = '\'')
+    {
+        if (is_array($data)) {
+            $result = array();
+            foreach ($data as $item) {
+                $result[] = $this->escapeJsQuote($item, $quote);
+            }
+        } else {
+            $result = str_replace($quote, '\\' . $quote, $data);
+        }
+        return $result;
+    }
+
+    /**
+     * Escape quotes inside html attributes
+     * Use $addSlashes = false for escaping js that inside html attribute (onClick, onSubmit etc)
+     *
+     * @param string $data
+     * @param bool $addSlashes
+     * @return string
+     */
+    public function escapeQuote($data, $addSlashes = false)
+    {
+        if ($addSlashes === true) {
+            $data = addslashes($data);
+        }
+        return htmlspecialchars($data, ENT_QUOTES, null, false);
+    }
+}
diff --git a/lib/Magento/Event/Invoker/InvokerDefault.php b/lib/Magento/Event/Invoker/InvokerDefault.php
index a2230ec5cc8..baac41ef9fd 100644
--- a/lib/Magento/Event/Invoker/InvokerDefault.php
+++ b/lib/Magento/Event/Invoker/InvokerDefault.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Event\Invoker;
 
+use Zend\Stdlib\Exception\LogicException;
+
 class InvokerDefault implements \Magento\Event\InvokerInterface
 {
     /**
@@ -79,14 +81,14 @@ class InvokerDefault implements \Magento\Event\InvokerInterface
      * @param string $method
      * @param \Magento\Event\Observer $observer
      * @return \Magento\Event\InvokerInterface
-     * @throws \Magento\Core\Exception
+     * @throws \LogicException
      */
     protected function _callObserverMethod($object, $method, $observer)
     {
         if (method_exists($object, $method)) {
             $object->$method($observer);
         } elseif ($this->_appState->getMode() == \Magento\App\State::MODE_DEVELOPER) {
-            throw new \Magento\Core\Exception('Method "' . $method . '" is not defined in "' . get_class($object) . '"');
+            throw new \LogicException('Method "' . $method . '" is not defined in "' . get_class($object) . '"');
         }
         return $this;
     }
diff --git a/lib/Magento/Event/Manager.php b/lib/Magento/Event/Manager.php
index 019f776dcd9..dc4576502c8 100644
--- a/lib/Magento/Event/Manager.php
+++ b/lib/Magento/Event/Manager.php
@@ -38,47 +38,27 @@ class Manager implements ManagerInterface
     /**
      * Event invoker
      *
-     * @var \Magento\Event\InvokerInterface
+     * @var InvokerInterface
      */
     protected $_invoker;
 
     /**
      * Event config
      *
-     * @var \Magento\Event\ConfigInterface
+     * @var ConfigInterface
      */
     protected $_eventConfig;
 
-    /**
-     * Magento event factory
-     *
-     * @var \Magento\EventFactory
-     */
-    protected $_eventFactory;
-
-    /**
-     * Magento event observer factory
-     *
-     * @var \Magento\Event\WrapperFactory
-     */
-    protected $wrapperFactory;
-
     /**
      * @param InvokerInterface $invoker
      * @param ConfigInterface $eventConfig
-     * @param \Magento\EventFactory $eventFactory
-     * @param WrapperFactory $wrapperFactory
      */
     public function __construct(
-        \Magento\Event\InvokerInterface $invoker,
-        \Magento\Event\ConfigInterface $eventConfig,
-        \Magento\EventFactory $eventFactory,
-        \Magento\Event\WrapperFactory $wrapperFactory
+        InvokerInterface $invoker,
+        ConfigInterface $eventConfig
     ) {
         $this->_invoker = $invoker;
         $this->_eventConfig = $eventConfig;
-        $this->_eventFactory = $eventFactory;
-        $this->wrapperFactory = $wrapperFactory;
     }
 
     /**
@@ -94,12 +74,10 @@ class Manager implements ManagerInterface
     {
         \Magento\Profiler::start('EVENT:' . $eventName, array('group' => 'EVENT', 'name' => $eventName));
         foreach ($this->_eventConfig->getObservers($eventName) as $observerConfig) {
-            /** @var $event \Magento\Event */
-            $event = $this->_eventFactory->create(array('data' => $data));
+            $event = new \Magento\Event($data);
             $event->setName($eventName);
 
-            /** @var $wrapper \Magento\Event\Observer */
-            $wrapper = $this->wrapperFactory->create();
+            $wrapper = new Observer();
             $wrapper->setData(array_merge(array('event' => $event), $data));
 
             \Magento\Profiler::start('OBSERVER:' . $observerConfig['name']);
diff --git a/lib/Magento/Filesystem.php b/lib/Magento/Filesystem.php
index b281d46d8e8..9ab844fa1f6 100644
--- a/lib/Magento/Filesystem.php
+++ b/lib/Magento/Filesystem.php
@@ -533,4 +533,21 @@ class Filesystem
     {
         return 0 === strpos(self::normalizePath($path), self::normalizePath($directory));
     }
+
+    /**
+     * Check LFI protection
+     *
+     * @throws \InvalidArgumentException
+     * @param string $name
+     * @return bool
+     */
+    public function checkLfiProtection($name)
+    {
+        if (preg_match('#\.\.[\\\/]#', $name)) {
+            throw new \InvalidArgumentException(
+                'Requested file may not include parent directory traversal ("../", "..\\" notation)'
+            );
+        }
+        return true;
+    }
 }
diff --git a/lib/Magento/Filter/AbstractFactory.php b/lib/Magento/Filter/AbstractFactory.php
new file mode 100644
index 00000000000..4df5b86eb86
--- /dev/null
+++ b/lib/Magento/Filter/AbstractFactory.php
@@ -0,0 +1,119 @@
+<?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_Filter
+ * @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\Filter;
+
+/**
+ * Magento filter factory abstract
+ */
+abstract class AbstractFactory implements FactoryInterface
+{
+    /**
+     * Set of filters
+     *
+     * @var array
+     */
+    protected $invokableClasses = array();
+
+    /**
+     * Whether or not to share by default; default to false
+     *
+     * @var bool
+     */
+    protected $shareByDefault = true;
+
+    /**
+     * Shared instances, by default is shared
+     *
+     * @var array
+     */
+    protected $shared = array();
+
+    /**
+     * @var \Magento\ObjectManager
+     */
+    protected $objectManager;
+
+    /**
+     * @var \Zend_Filter_Interface[]
+     */
+    protected $sharedInstances = array();
+
+    /**
+     * @param \Magento\ObjectManager $objectManger
+     */
+    public function __construct(\Magento\ObjectManager $objectManger)
+    {
+        $this->objectManager = $objectManger;
+    }
+
+    /**
+     * Check is it possible to create a filter by given name
+     *
+     * @param string $alias
+     * @return bool
+     */
+    public function canCreateFilter($alias)
+    {
+        return array_key_exists($alias, $this->invokableClasses);
+    }
+
+    /**
+     * Check is shared filter
+     *
+     * @param string $class
+     * @return bool
+     */
+    public function isShared($class)
+    {
+        return isset($this->shared[$class]) ? $this->shared[$class] : $this->shareByDefault;
+    }
+
+    /**
+     * Create a filter by given name
+     *
+     * @param string $alias
+     * @param array $arguments
+     * @return \Zend_Filter_Interface
+     */
+    public function createFilter($alias, array $arguments = array())
+    {
+        $addToShared = !$arguments || isset($this->sharedInstances[$alias])
+            xor $this->isShared($this->invokableClasses[$alias]);
+
+        if (!isset($this->sharedInstances[$alias])) {
+            $filter = $this->objectManager->create($this->invokableClasses[$alias], $arguments);
+        } else {
+            $filter = $this->sharedInstances[$alias];
+        }
+
+        if ($addToShared) {
+            $this->sharedInstances[$alias] = $filter;
+        }
+
+        return $filter;
+    }
+}
diff --git a/lib/Magento/Filter/ArrayFilter.php b/lib/Magento/Filter/ArrayFilter.php
index 1844d30f037..c84a4047f2c 100644
--- a/lib/Magento/Filter/ArrayFilter.php
+++ b/lib/Magento/Filter/ArrayFilter.php
@@ -24,16 +24,25 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-
 namespace Magento\Filter;
 
 class ArrayFilter extends \Zend_Filter
 {
+    /**
+     * @var array
+     */
     protected $_columnFilters = array();
-    
-    function addFilter(\Zend_Filter_Interface $filter, $column='')
+
+    /**
+     * {@inheritdoc}
+     *
+     * @param \Zend_Filter_Interface $filter
+     * @param string $column
+     * @return null|\Zend_Filter
+     */
+    public function addFilter(\Zend_Filter_Interface $filter, $column = '')
     {
-        if (''===$column) {
+        if ('' === $column) {
             parent::addFilter($filter);
         } else {
             if (!isset($this->_columnFilters[$column])) {
@@ -42,11 +51,17 @@ class ArrayFilter extends \Zend_Filter
             $this->_columnFilters[$column]->addFilter($filter);
         }
     }
-    
-    function filter($array)
+
+    /**
+     * {@inheritdoc}
+     *
+     * @param array $array
+     * @return array
+     */
+    public function filter($array)
     {
         $out = array();
-        foreach ($array as $column=>$value) {
+        foreach ($array as $column => $value) {
             $value = parent::filter($value);
             if (isset($this->_columnFilters[$column])) {
                 $value = $this->_columnFilters[$column]->filter($value);
diff --git a/lib/Magento/Filter/Decrypt.php b/lib/Magento/Filter/Decrypt.php
new file mode 100644
index 00000000000..b285cef0e6a
--- /dev/null
+++ b/lib/Magento/Filter/Decrypt.php
@@ -0,0 +1,39 @@
+<?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\Filter;
+
+/**
+ * Decrypt filter
+ */
+class Decrypt extends \Zend_Filter_Decrypt
+{
+    /**
+     * @param \Magento\Filter\Encrypt\AdapterInterface $adapter
+     */
+    public function __construct(\Magento\Filter\Encrypt\AdapterInterface $adapter)
+    {
+        $this->setAdapter($adapter);
+    }
+}
diff --git a/lib/Magento/Filter/Email.php b/lib/Magento/Filter/Email.php
index a3848529186..3d5c63fecde 100644
--- a/lib/Magento/Filter/Email.php
+++ b/lib/Magento/Filter/Email.php
@@ -24,13 +24,16 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-
 namespace Magento\Filter;
 
 class Email implements \Zend_Filter_Interface
-{  
+{
+    /**
+     * @param mixed $value
+     * @return mixed
+     */
     public function filter($value)
     {
-        $atIndex = 0;
+        return $value;
     }
 }
diff --git a/lib/Magento/Filter/Encrypt.php b/lib/Magento/Filter/Encrypt.php
new file mode 100644
index 00000000000..f0bb6a30f35
--- /dev/null
+++ b/lib/Magento/Filter/Encrypt.php
@@ -0,0 +1,39 @@
+<?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\Filter;
+
+/**
+ * Encrypt filter
+ */
+class Encrypt extends \Zend_Filter_Encrypt
+{
+    /**
+     * @param \Magento\Filter\Encrypt\AdapterInterface $adapter
+     */
+    public function __construct(\Magento\Filter\Encrypt\AdapterInterface $adapter)
+    {
+        $this->setAdapter($adapter);
+    }
+}
diff --git a/lib/Magento/Filter/Encrypt/AdapterInterface.php b/lib/Magento/Filter/Encrypt/AdapterInterface.php
new file mode 100644
index 00000000000..3121f3b2592
--- /dev/null
+++ b/lib/Magento/Filter/Encrypt/AdapterInterface.php
@@ -0,0 +1,33 @@
+<?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\Filter\Encrypt;
+
+/**
+ * Encrypt adapter interface
+ */
+interface AdapterInterface extends \Zend_Filter_Encrypt_Interface
+{
+
+}
diff --git a/lib/Magento/Filter/Encrypt/Basic.php b/lib/Magento/Filter/Encrypt/Basic.php
new file mode 100644
index 00000000000..0c998b9fbaa
--- /dev/null
+++ b/lib/Magento/Filter/Encrypt/Basic.php
@@ -0,0 +1,63 @@
+<?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\Filter\Encrypt;
+
+class Basic implements \Zend_Filter_Encrypt_Interface
+{
+    /**
+     * @var \Magento\Encryption\EncryptorInterface
+     */
+    protected $encryptor;
+
+    /**
+     * @param \Magento\Encryption\EncryptorInterface $encryptor
+     */
+    public function __construct(\Magento\Encryption\EncryptorInterface $encryptor)
+    {
+        $this->encryptor = $encryptor;
+    }
+
+    /**
+     * Encrypt value
+     *
+     * @param string $value
+     * @return string
+     */
+    public function encrypt($value)
+    {
+        return $this->encryptor->encrypt($value);
+    }
+
+    /**
+     * Decrypt value
+     *
+     * @param string $value
+     * @return string
+     */
+    public function decrypt($value)
+    {
+        return $this->encryptor->encrypt($value);
+    }
+}
diff --git a/lib/Magento/Filter/Factory.php b/lib/Magento/Filter/Factory.php
new file mode 100644
index 00000000000..c3966a573b5
--- /dev/null
+++ b/lib/Magento/Filter/Factory.php
@@ -0,0 +1,69 @@
+<?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_Filter
+ * @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\Filter;
+
+/**
+ * Magento filter factory
+ */
+class Factory extends AbstractFactory
+{
+    /**
+     * Set of filters
+     *
+     * @var array
+     */
+    protected $invokableClasses = array(
+        'email'         => 'Magento\Filter\Email',
+        'money'         => 'Magento\Filter\Money',
+        'simple'        => 'Magento\Filter\Template\Simple',
+        'object'        => 'Magento\Filter\Object',
+        'sprintf'       => 'Magento\Filter\Sprintf',
+        'template'      => 'Magento\Filter\Template',
+        'arrayFilter'   => 'Magento\Filter\ArrayFilter',
+        'removeAccents' => 'Magento\Filter\RemoveAccents',
+        'splitWords'    => 'Magento\Filter\SplitWords',
+        'removeTags'    => 'Magento\Filter\RemoveTags',
+        'stripTags'     => 'Magento\Filter\StripTags',
+        'truncate'      => 'Magento\Filter\Truncate',
+        'encrypt'       => 'Magento\Filter\Encrypt',
+        'decrypt'       => 'Magento\Filter\Decrypt',
+    );
+
+    /**
+     * Shared instances, by default is shared
+     *
+     * @var array
+     */
+    protected $shared = array(
+        'Magento\Filter\Sprintf' => false,
+        'Magento\Filter\Money' => false,
+        'Magento\Filter\RemoveAccents' => false,
+        'Magento\Filter\SplitWords' => false,
+        'Magento\Filter\StripTags' => false,
+        'Magento\Filter\Truncate' => false,
+    );
+}
diff --git a/app/code/Magento/Backend/Controller/Factory.php b/lib/Magento/Filter/FactoryInterface.php
similarity index 50%
rename from app/code/Magento/Backend/Controller/Factory.php
rename to lib/Magento/Filter/FactoryInterface.php
index 18aecc8d4db..a29066a4e34 100644
--- a/app/code/Magento/Backend/Controller/Factory.php
+++ b/lib/Magento/Filter/FactoryInterface.php
@@ -18,32 +18,41 @@
  * 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_Core
- * @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)
+ * @category   Magento
+ * @package    Magento_Filter
+ * @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\Filter;
+
 /**
- * Controller factory
- *
- * @category   Magento
- * @package    Magento_Core
- * @author     Magento Core Team <core@magentocommerce.com>
+ * Magento filter factory interface
  */
-namespace Magento\Backend\Controller;
-
-class Factory extends \Magento\App\ActionFactory
+interface FactoryInterface
 {
     /**
-     * @param string $controllerName
+     * Check is it possible to create a filter by given name
+     *
+     * @param string $alias
+     * @return bool
+     */
+    public function canCreateFilter($alias);
+
+    /**
+     * Check is shared filter
+     *
+     * @param string $class
+     * @return bool
+     */
+    public function isShared($class);
+
+    /**
+     * Create a filter by given name
+     *
+     * @param string $alias
      * @param array $arguments
-     * @return mixed
+     * @return \Zend_Filter_Interface
      */
-    public function createController($controllerName, array $arguments = array())
-    {
-        $context = $this->_objectManager->create('Magento\Backend\Controller\Context', $arguments);
-        $arguments['context'] = $context;
-        return $this->_objectManager->create($controllerName, $arguments);
-    }
+    public function createFilter($alias, array $arguments = array());
 }
diff --git a/lib/Magento/Filter/FilterManager.php b/lib/Magento/Filter/FilterManager.php
new file mode 100644
index 00000000000..7d8e572b031
--- /dev/null
+++ b/lib/Magento/Filter/FilterManager.php
@@ -0,0 +1,144 @@
+<?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_Filter
+ * @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\Filter;
+
+/**
+ * Magento Filter Manager
+ */
+class FilterManager
+{
+    /**
+     * @var \Magento\ObjectManager
+     */
+    protected $objectManager;
+
+    /**
+     * @var array
+     */
+    protected $filterInstances = array();
+
+    /**
+     * @var FilterManager\Config
+     */
+    protected $config;
+
+    /**
+     * @var array
+     */
+    protected $factoryInstances;
+
+    /**
+     * @param \Magento\ObjectManager $objectManger
+     * @param FilterManager\Config $config
+     */
+    public function __construct(
+        \Magento\ObjectManager $objectManger,
+        FilterManager\Config $config
+    ) {
+        $this->objectManager = $objectManger;
+        $this->config = $config;
+    }
+
+    /**
+     * Get filter object
+     *
+     * @param string $filterAlias
+     * @param array $arguments
+     * @return \Zend_Filter_Interface
+     * @throws \UnexpectedValueException
+     */
+    public function get($filterAlias, array $arguments = array())
+    {
+        $filter = $this->createFilterInstance($filterAlias, $arguments);
+        if (!$filter instanceof \Zend_Filter_Interface) {
+            throw new \UnexpectedValueException('Filter object must implement Zend_Filter_Interface interface, '
+                . get_class($filter) . ' was given.');
+        }
+        return $filter;
+    }
+
+    /**
+     * Create filter instance
+     *
+     * @param string $filterAlias
+     * @param array $arguments
+     * @return \Zend_Filter_Interface
+     * @throws \InvalidArgumentException
+     */
+    protected function createFilterInstance($filterAlias, $arguments)
+    {
+        /** @var FactoryInterface $factory */
+        foreach ($this->getFilterFactories() as $factory) {
+            if ($factory->canCreateFilter($filterAlias)) {
+                return $factory->createFilter($filterAlias, $arguments);
+            }
+        }
+        throw new \InvalidArgumentException('Filter was not found by given alias ' . $filterAlias);
+    }
+
+    /**
+     * Get registered factories
+     *
+     * @return FactoryInterface[]
+     * @throws \UnexpectedValueException
+     */
+    protected function getFilterFactories()
+    {
+        if (null === $this->factoryInstances) {
+            foreach ($this->config->getFactories() as $class) {
+                $factory = $this->objectManager->create($class);
+                if (!$factory instanceof FactoryInterface) {
+                    throw new \UnexpectedValueException(
+                        'Filter factory must implement FilterFactoryInterface interface, '
+                            . get_class($factory) . ' was given.'
+                    );
+                }
+                $this->factoryInstances[] = $factory;
+            }
+        }
+        return $this->factoryInstances;
+    }
+
+    /**
+     * Create filter and filer value
+     *
+     * @param string $filterAlias
+     * @param array $arguments
+     * @return mixed
+     */
+    public function __call($filterAlias, array $arguments = array())
+    {
+        $value = array_shift($arguments);
+        if (count($arguments)) {
+            $arguments = array_shift($arguments);
+            if (!is_array($arguments)) {
+                $arguments = array($arguments);
+            }
+        }
+        return $this->createFilterInstance($filterAlias, $arguments)->filter($value);
+    }
+}
diff --git a/lib/Magento/Filter/FilterManager/Config.php b/lib/Magento/Filter/FilterManager/Config.php
new file mode 100644
index 00000000000..ceca4b3bd58
--- /dev/null
+++ b/lib/Magento/Filter/FilterManager/Config.php
@@ -0,0 +1,61 @@
+<?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_Filter
+ * @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\Filter\FilterManager;
+
+/**
+ * Filter plugin manager config
+ */
+class Config implements ConfigInterface
+{
+    /**
+     * @var array
+     */
+    protected $factories = array(
+        'Magento\Filter\Factory',
+        'Magento\Filter\ZendFactory'
+    );
+
+    /**
+     * @param array $factories
+     */
+    public function __construct(array $factories = array())
+    {
+        if (!empty($factories)) {
+            $this->factories = array_merge($factories, $this->factories);
+        }
+    }
+
+    /**
+     * Get list of factories
+     *
+     * @return string[]
+     */
+    public function getFactories()
+    {
+        return $this->factories;
+    }
+}
diff --git a/lib/Magento/Filter/FilterManager/ConfigInterface.php b/lib/Magento/Filter/FilterManager/ConfigInterface.php
new file mode 100644
index 00000000000..59d46a84e44
--- /dev/null
+++ b/lib/Magento/Filter/FilterManager/ConfigInterface.php
@@ -0,0 +1,40 @@
+<?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_Filter
+ * @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\Filter\FilterManager;
+
+/**
+ * Filter manager config interface
+ */
+interface ConfigInterface
+{
+    /**
+     * Get list of factories
+     *
+     * @return string[]
+     */
+    public function getFactories();
+}
diff --git a/lib/Magento/Filter/GridArray/Grid.php b/lib/Magento/Filter/GridArray/Grid.php
index 36e0531fc2e..2c5408bca65 100644
--- a/lib/Magento/Filter/GridArray/Grid.php
+++ b/lib/Magento/Filter/GridArray/Grid.php
@@ -24,15 +24,18 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-
 namespace Magento\Filter\GridArray;
 
 class Grid extends \Magento\Filter\ArrayFilter
 {
-    function filter($grid)
+    /**
+     * @param array $grid
+     * @return array
+     */
+    public function filter($grid)
     {
         $out = array();
-        foreach ($grid as $i=>$array) {
+        foreach ($grid as $i => $array) {
             $out[$i] = parent::filter($array);
         }
         return $out;
diff --git a/lib/Magento/Filter/Money.php b/lib/Magento/Filter/Money.php
index d908839194a..e1deadaf7c5 100644
--- a/lib/Magento/Filter/Money.php
+++ b/lib/Magento/Filter/Money.php
@@ -24,18 +24,27 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-
 namespace Magento\Filter;
 
 class Money implements \Zend_Filter_Interface
 {
-    protected $_format = null;
-    
+    /**
+     * @var string
+     */
+    protected $_format;
+
+    /**
+     * @param string $format
+     */
     public function __construct($format)
     {
         $this->_format = $format;
     }
-    
+
+    /**
+     * @param float $value
+     * @return string
+     */
     public function filter($value)
     {
         return money_format($this->_format, $value);
diff --git a/lib/Magento/Filter/Object.php b/lib/Magento/Filter/Object.php
index 90344f26189..9a573010f4a 100644
--- a/lib/Magento/Filter/Object.php
+++ b/lib/Magento/Filter/Object.php
@@ -29,10 +29,13 @@ namespace Magento\Filter;
 
 class Object extends \Zend_Filter
 {
+    /**
+     * @var array
+     */
     protected $_columnFilters = array();
 
     /**
-     * @var \Magento\ObjectManager
+     * @var \Magento\Core\Model\EntityFactory
      */
     protected $_entityFactory;
 
@@ -43,10 +46,15 @@ class Object extends \Zend_Filter
     {
         $this->_entityFactory = $entityFactory;
     }
-    
-    function addFilter(\Zend_Filter_Interface $filter, $column='')
+
+    /**
+     * @param \Zend_Filter_Interface $filter
+     * @param string $column
+     * @return null|\Zend_Filter
+     */
+    public function addFilter(\Zend_Filter_Interface $filter, $column='')
     {
-        if (''===$column) {
+        if ('' === $column) {
             parent::addFilter($filter);
         } else {
             if (!isset($this->_columnFilters[$column])) {
@@ -55,15 +63,20 @@ class Object extends \Zend_Filter
             $this->_columnFilters[$column]->addFilter($filter);
         }
     }
-    
-    function filter($object)
+
+    /**
+     * @param mixed $object
+     * @return mixed
+     * @throws \Exception
+     */
+    public function filter($object)
     {
         if (!$object instanceof \Magento\Object) {
-            throw new \Exception('Expecting an instance of \Magento\Object');
+            throw new \InvalidArgumentException('Expecting an instance of \Magento\Object');
         }
         $class = get_class($object);
         $out = $this->_entityFactory->create($class);
-        foreach ($object->getData() as $column=>$value) {
+        foreach ($object->getData() as $column => $value) {
             $value = parent::filter($value);
             if (isset($this->_columnFilters[$column])) {
                 $value = $this->_columnFilters[$column]->filter($value);
diff --git a/lib/Magento/Filter/Object/Grid.php b/lib/Magento/Filter/Object/Grid.php
index cc9626a0d52..387b7920f25 100644
--- a/lib/Magento/Filter/Object/Grid.php
+++ b/lib/Magento/Filter/Object/Grid.php
@@ -29,7 +29,11 @@ namespace Magento\Filter\Object;
 
 class Grid extends \Magento\Filter\Object
 {
-    function filter($grid)
+    /**
+     * @param array $grid
+     * @return array
+     */
+    public function filter($grid)
     {
         $out = array();
         if (is_array($grid)) {
diff --git a/lib/Magento/Filter/RemoveAccents.php b/lib/Magento/Filter/RemoveAccents.php
new file mode 100644
index 00000000000..8a5aabdac64
--- /dev/null
+++ b/lib/Magento/Filter/RemoveAccents.php
@@ -0,0 +1,102 @@
+<?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\Filter;
+
+/**
+ * Remove accents from string
+ */
+class RemoveAccents implements \Zend_Filter_Interface
+{
+    /**
+     * @var bool
+     */
+    protected $german;
+
+    /**
+     * @param bool $german
+     */
+    public function __construct($german = false)
+    {
+        $this->german = $german;
+    }
+
+    /**
+     * @param string $string
+     * @return mixed|string
+     */
+    public function filter($string)
+    {
+        static $replacements;
+
+        if (empty($replacements[$this->german])) {
+            $substitutions = array(
+                // single ISO-8859-1 letters
+                192 => 'A', 193 => 'A', 194 => 'A', 195 => 'A', 196 => 'A', 197 => 'A', 199 => 'C',
+                208 => 'D', 200 => 'E', 201 => 'E', 202 => 'E', 203 => 'E', 204 => 'I', 205 => 'I',
+                206 => 'I', 207 => 'I', 209 => 'N', 210 => 'O', 211 => 'O', 212 => 'O', 213 => 'O',
+                214 => 'O', 216 => 'O', 138 => 'S', 217 => 'U', 218 => 'U', 219 => 'U', 220 => 'U',
+                221 => 'Y', 142 => 'Z', 224 => 'a', 225 => 'a', 226 => 'a', 227 => 'a', 228 => 'a',
+                229 => 'a', 231 => 'c', 232 => 'e', 233 => 'e', 234 => 'e', 235 => 'e', 236 => 'i',
+                237 => 'i', 238 => 'i', 239 => 'i', 241 => 'n', 240 => 'o', 242 => 'o', 243 => 'o',
+                244 => 'o', 245 => 'o', 246 => 'o', 248 => 'o', 154 => 's', 249 => 'u', 250 => 'u',
+                251 => 'u', 252 => 'u', 253 => 'y', 255 => 'y', 158 => 'z',
+                // HTML entities
+                258 => 'A', 260 => 'A', 262 => 'C', 268 => 'C', 270 => 'D', 272 => 'D', 280 => 'E',
+                282 => 'E', 286 => 'G', 304 => 'I', 313 => 'L', 317 => 'L', 321 => 'L', 323 => 'N',
+                327 => 'N', 336 => 'O', 340 => 'R', 344 => 'R', 346 => 'S', 350 => 'S', 354 => 'T',
+                356 => 'T', 366 => 'U', 368 => 'U', 377 => 'Z', 379 => 'Z', 259 => 'a', 261 => 'a',
+                263 => 'c', 269 => 'c', 271 => 'd', 273 => 'd', 281 => 'e', 283 => 'e', 287 => 'g',
+                305 => 'i', 322 => 'l', 314 => 'l', 318 => 'l', 324 => 'n', 328 => 'n', 337 => 'o',
+                341 => 'r', 345 => 'r', 347 => 's', 351 => 's', 357 => 't', 355 => 't', 367 => 'u',
+                369 => 'u', 378 => 'z', 380 => 'z',
+                // ligatures
+                198 => 'Ae', 230 => 'ae', 140 => 'Oe', 156 => 'oe', 223 => 'ss',
+            );
+
+            if ($this->german) {
+                // umlauts
+                $germanReplacements = array(
+                    196 => 'Ae', 228 => 'ae', 214 => 'Oe', 246 => 'oe', 220 => 'Ue', 252 => 'ue'
+                );
+                $substitutions = $germanReplacements + $substitutions;
+            }
+
+            $replacements[$this->german] = array();
+            foreach ($substitutions as $code => $value) {
+                $replacements[$this->german][$code < 256 ? chr($code) : '&#' . $code . ';'] = $value;
+            }
+        }
+
+        // convert string from default database format (UTF-8)
+        // to encoding which replacement arrays made with (ISO-8859-1)
+        $convertedString = @iconv('UTF-8', 'ISO-8859-1//IGNORE', $string);
+        if ($convertedString) {
+            $string = $convertedString;
+        }
+        // Replace
+        $string = strtr($string, $replacements[$this->german]);
+        return $string;
+    }
+}
diff --git a/lib/Magento/Filter/RemoveTags.php b/lib/Magento/Filter/RemoveTags.php
new file mode 100644
index 00000000000..5f14523a388
--- /dev/null
+++ b/lib/Magento/Filter/RemoveTags.php
@@ -0,0 +1,59 @@
+<?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\Filter;
+
+/**
+ * Remove tags from string
+ */
+class RemoveTags implements \Zend_Filter_Interface
+{
+    /**
+     * Convert html entities
+     *
+     * @param array $matches
+     * @return string
+     */
+    protected function _convertEntities($matches)
+    {
+        return htmlentities($matches[0]);
+    }
+
+    /**
+     * Returns the result of filtering $value
+     *
+     * @param string $value
+     * @return string
+     */
+    public function filter($value)
+    {
+        $value = preg_replace_callback(
+            "# <(?![/a-z]) | (?<=\s)>(?![a-z]) #xi",
+            array($this, '_convertEntities'),
+            $value
+        );
+        $value = strip_tags($value);
+        return htmlspecialchars_decode($value);
+    }
+}
diff --git a/lib/Magento/Filter/SplitWords.php b/lib/Magento/Filter/SplitWords.php
new file mode 100644
index 00000000000..6195d525530
--- /dev/null
+++ b/lib/Magento/Filter/SplitWords.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\Filter;
+
+/**
+ * Split words
+ */
+class SplitWords implements \Zend_Filter_Interface
+{
+    /**
+     * @var bool
+     */
+    protected $uniqueOnly;
+
+    /**
+     * @var int
+     */
+    protected $wordsQty;
+
+    /**
+     * @var string
+     */
+    protected $wordSeparatorRegexp;
+
+    /**
+     * @param bool $uniqueOnly Unique words only
+     * @param int $wordsQty Limit words qty in result
+     * @param string $wordSeparatorRegexp
+     */
+    public function __construct($uniqueOnly = true, $wordsQty = 0, $wordSeparatorRegexp = '\s')
+    {
+        $this->uniqueOnly = $uniqueOnly;
+        $this->wordsQty = $wordsQty;
+        $this->wordSeparatorRegexp = $wordSeparatorRegexp;
+    }
+
+    /**
+     * Filter value
+     *
+     * @param string $str The source string
+     * @return array
+     */
+    public function filter($str)
+    {
+        $result = array();
+        $split = preg_split('#' . $this->wordSeparatorRegexp . '#siu', $str, null, PREG_SPLIT_NO_EMPTY);
+        foreach ($split as $word) {
+            if ($this->uniqueOnly) {
+                $result[$word] = $word;
+            } else {
+                $result[] = $word;
+            }
+        }
+        if ($this->wordsQty && count($result) > $this->wordsQty) {
+            $result = array_slice($result, 0, $this->wordsQty);
+        }
+        return $result;
+    }
+}
diff --git a/lib/Magento/Filter/Sprintf.php b/lib/Magento/Filter/Sprintf.php
index b2836f992ff..03a409001b7 100644
--- a/lib/Magento/Filter/Sprintf.php
+++ b/lib/Magento/Filter/Sprintf.php
@@ -24,24 +24,48 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-
 namespace Magento\Filter;
 
 class Sprintf implements \Zend_Filter_Interface
 {
-    protected $_format = null;
-    protected $_decimals = null;
-    protected $_decPoint = null;
-    protected $_thousandsSep = null;
-    
-    public function __construct($format, $decimals=null, $decPoint='.', $thousandsSep=',')
+    /**
+     * @var string
+     */
+    protected $_format;
+
+    /**
+     * @var int
+     */
+    protected $_decimals;
+
+    /**
+     * @var string
+     */
+    protected $_decPoint;
+
+    /**
+     * @var string
+     */
+    protected $_thousandsSep;
+
+    /**
+     * @param string $format
+     * @param null|int $decimals
+     * @param string $decPoint
+     * @param string $thousandsSep
+     */
+    public function __construct($format, $decimals = 0, $decPoint = '.', $thousandsSep = ',')
     {
         $this->_format = $format;
         $this->_decimals = $decimals;
         $this->_decPoint = $decPoint;
         $this->_thousandsSep = $thousandsSep;
     }
-    
+
+    /**
+     * @param string $value
+     * @return mixed|string
+     */
     public function filter($value)
     {
         if (!is_null($this->_decimals)) {
diff --git a/lib/Magento/Filter/StripTags.php b/lib/Magento/Filter/StripTags.php
new file mode 100644
index 00000000000..31767e27cca
--- /dev/null
+++ b/lib/Magento/Filter/StripTags.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\Filter;
+
+/**
+ * Filter for standard strip_tags() function with extra functionality for html entities
+ */
+class StripTags implements \Zend_Filter_Interface
+{
+    /**
+     * @var \Magento\Escaper
+     */
+    protected $escaper;
+
+    /**
+     * @var string
+     */
+    protected $allowableTags;
+
+    /**
+     * @var bool
+     */
+    protected $escape;
+
+    /**
+     * @param \Magento\Escaper $escaper
+     * @param null $allowableTags
+     * @param bool $escape
+     */
+    public function __construct(\Magento\Escaper $escaper, $allowableTags = null, $escape = false)
+    {
+        $this->escaper = $escaper;
+        $this->allowableTags = $allowableTags;
+        $this->escape = $escape;
+    }
+
+    /**
+     * Returns the result of filtering $value
+     *
+     * @param string $value
+     * @return string
+     */
+    public function filter($value)
+    {
+        $result = strip_tags($value, $this->allowableTags);
+        return $this->escape ? $this->escaper->escapeHtml($result, $this->allowableTags) : $result;
+    }
+}
diff --git a/lib/Magento/Filter/Template.php b/lib/Magento/Filter/Template.php
index 23a4c348f88..43e4d861df3 100644
--- a/lib/Magento/Filter/Template.php
+++ b/lib/Magento/Filter/Template.php
@@ -57,6 +57,21 @@ class Template implements \Zend_Filter_Interface
      */
     protected $_includeProcessor = null;
 
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
+    /**
+     * @param \Magento\Stdlib\String $string
+     * @param array $variables
+     */
+    public function __construct(\Magento\Stdlib\String $string, $variables = array())
+    {
+        $this->string = $string;
+        $this->setVariables($variables);
+    }
+
     /**
      * Sets template variables that's can be called through {var ...} statement
      *
@@ -257,7 +272,7 @@ class Template implements \Zend_Filter_Interface
             ) {
                 // If object calling methods or getting properties
                 if ($stackVars[$i]['type'] == 'property') {
-                    $caller = 'get' . uc_words($stackVars[$i]['name'], '');
+                    $caller = 'get' . $this->string->upperCaseWords($stackVars[$i]['name'], '_', '');
                     $stackVars[$i]['variable'] = method_exists($stackVars[$i - 1]['variable'], $caller)
                         ? $stackVars[$i - 1]['variable']->$caller()
                         : $stackVars[$i - 1]['variable']->getData($stackVars[$i]['name']);
diff --git a/lib/Magento/Filter/Template/Simple.php b/lib/Magento/Filter/Template/Simple.php
index e7f99118378..2b085d71833 100644
--- a/lib/Magento/Filter/Template/Simple.php
+++ b/lib/Magento/Filter/Template/Simple.php
@@ -22,14 +22,27 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-
 namespace Magento\Filter\Template;
 
 class Simple extends \Magento\Object implements \Zend_Filter_Interface
 {
+    /**
+     * @var string
+     */
     protected $_startTag = '{{';
+
+    /**
+     * @var string
+     */
     protected $_endTag = '}}';
 
+    /**
+     * Set tags
+     *
+     * @param string $start
+     * @param string $end
+     * @return $this
+     */
     public function setTags($start, $end)
     {
         $this->_startTag = $start;
@@ -37,6 +50,12 @@ class Simple extends \Magento\Object implements \Zend_Filter_Interface
         return $this;
     }
 
+    /**
+     * {@inheritdoc}
+     *
+     * @param string $value
+     * @return string
+     */
     public function filter($value)
     {
         $callback = function ($matches) {
diff --git a/lib/Magento/Filter/Template/Tokenizer/AbstractTokenizer.php b/lib/Magento/Filter/Template/Tokenizer/AbstractTokenizer.php
index 3ab3ae9ea9a..866a67ecdca 100644
--- a/lib/Magento/Filter/Template/Tokenizer/AbstractTokenizer.php
+++ b/lib/Magento/Filter/Template/Tokenizer/AbstractTokenizer.php
@@ -24,65 +24,61 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Filter\Template\Tokenizer;
+
 /**
  * Template constructions tokenizer
- *
- * @category   Magento
- * @package    Magento_Filter
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-
-namespace Magento\Filter\Template\Tokenizer;
-
 abstract class AbstractTokenizer
 {
     /**
      * Current index in string
+     *
      * @var int
      */
     protected $_currentIndex;
-    
+
     /**
      * String for tokenize
      */
     protected $_string;
-    
+
     /**
-     * Move current index to next char. 
+     * Move current index to next char.
      *
      * If index out of bounds returns false
      *
      * @return boolean
      */
-    public function next() 
+    public function next()
     {
         if($this->_currentIndex + 1 >= strlen($this->_string)) {
             return false;
         }
-        
+
         $this->_currentIndex++;
-        return true; 
+        return true;
     }
-    
+
     /**
-     * Move current index to previus char. 
+     * Move current index to previus char.
      *
      * If index out of bounds returns false
      *
      * @return boolean
      */
-    public function prev() 
+    public function prev()
     {
         if($this->_currentIndex - 1 < 0) {
             return false;
         }
-        
+
         $this->_currentIndex--;
-        return true; 
+        return true;
     }
-    
+
     /**
-     * Return current char 
+     * Return current char
      *
      * @return string
      */
@@ -90,8 +86,8 @@ abstract class AbstractTokenizer
     {
         return $this->_string{$this->_currentIndex};
     }
-    
-    
+
+
     /**
      * Set string for tokenize
      */
@@ -100,15 +96,15 @@ abstract class AbstractTokenizer
         $this->_string = $value;
         $this->reset();
     }
-    
+
     /**
      * Move char index to begin of string
      */
-    public function reset() 
+    public function reset()
     {
         $this->_currentIndex = 0;
     }
-    
+
     /**
      * Return true if current char is white-space
      *
@@ -117,7 +113,7 @@ abstract class AbstractTokenizer
     public function isWhiteSpace() {
         return trim($this->char()) != $this->char();
     }
-    
+
     abstract public function tokenize();
-    
+
 }
diff --git a/lib/Magento/Filter/Template/Tokenizer/Parameter.php b/lib/Magento/Filter/Template/Tokenizer/Parameter.php
index 8caad459ba9..e60e18c4abd 100644
--- a/lib/Magento/Filter/Template/Tokenizer/Parameter.php
+++ b/lib/Magento/Filter/Template/Tokenizer/Parameter.php
@@ -24,77 +24,70 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Filter\Template\Tokenizer;
+
 /**
  * Template constructions parameters tokenizer
- *
- * @category   Magento
- * @package    Magento_Filter
- * @author      Magento Core Team <core@magentocommerce.com>
  */
- 
-namespace Magento\Filter\Template\Tokenizer;
-
 class Parameter extends \Magento\Filter\Template\Tokenizer\AbstractTokenizer
 {
-       
+
     /**
      * Tokenize string and return getted parameters
      *
      * @return array
      */
-    public function tokenize() 
+    public function tokenize()
     {
         $parameters = array();
         $parameterName = '';
-        while($this->next()) {
-            if($this->isWhiteSpace()) {
+        while ($this->next()) {
+            if ($this->isWhiteSpace()) {
                 continue;
-            } else if($this->char()!='=') {
+            } elseif($this->char() != '=') {
                 $parameterName .= $this->char();
             } else {
                 $parameters[$parameterName] = $this->getValue();
                 $parameterName = '';
             }
-            
-        }       
+        }
         return $parameters;
     }
-    
+
     /**
-     * Get string value in parameters througth tokenize
-     * 
+     * Get string value in parameters through tokenize
+     *
      * @return string
      */
-    public function getValue() {
+    public function getValue()
+    {
         $this->next();
         $value = '';
-        if($this->isWhiteSpace()) { 
+        if ($this->isWhiteSpace()) {
             return $value;
         }
         $quoteStart = $this->char() == "'" || $this->char() == '"';
-        
-        
-        if($quoteStart) {
+
+
+        if ($quoteStart) {
            $breakSymbol = $this->char();
-        } else { 
+        } else {
            $breakSymbol = false;
            $value .= $this->char();
         }
-          
+
         while ($this->next()) {
             if (!$breakSymbol && $this->isWhiteSpace()) {
                 break;
-            } else if ($breakSymbol && $this->char() == $breakSymbol) {
+            } elseif ($breakSymbol && $this->char() == $breakSymbol) {
                 break;
-            } else if ($this->char() == '\\') {
+            } elseif ($this->char() == '\\') {
                 $this->next();
                 $value .= $this->char();
             } else {
                 $value .= $this->char();
-            }                        
+            }
         }
-        
         return $value;
     }
-    
 }
diff --git a/lib/Magento/Filter/Template/Tokenizer/Variable.php b/lib/Magento/Filter/Template/Tokenizer/Variable.php
index b849d60329b..e598f84e3a9 100644
--- a/lib/Magento/Filter/Template/Tokenizer/Variable.php
+++ b/lib/Magento/Filter/Template/Tokenizer/Variable.php
@@ -24,19 +24,13 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+namespace Magento\Filter\Template\Tokenizer;
+
 /**
  * Template constructions variables tokenizer
- *
- * @category   Magento
- * @package    Magento_Filter
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-
-namespace Magento\Filter\Template\Tokenizer;
-
 class Variable extends \Magento\Filter\Template\Tokenizer\AbstractTokenizer
 {
-
     /**
      * Tokenize string and return getted variable stack path
      *
@@ -48,40 +42,40 @@ class Variable extends \Magento\Filter\Template\Tokenizer\AbstractTokenizer
         $parameterName = '';
         $variableSet = false;
         do {
-            if($this->isWhiteSpace()) {
+            if ($this->isWhiteSpace()) {
                 // Ignore white spaces
                 continue;
-            } else if($this->char()!='.' && $this->char()!='(') {
+            } elseif ($this->char() != '.' && $this->char() != '(') {
                 // Property or method name
                 $parameterName .= $this->char();
-            } else if($this->char()=='(') {
+            } elseif ($this->char() == '(') {
                 // Method declaration
                 $methodArgs = $this->getMethodArgs();
-                $actions[] = array('type'=>'method',
-                                   'name'=>$parameterName,
-                                   'args'=>$methodArgs);
+                $actions[] = array('type' => 'method',
+                                   'name' => $parameterName,
+                                   'args' => $methodArgs);
                 $parameterName = '';
-            } else if($parameterName!='') {
+            } elseif ($parameterName != '') {
                 // Property or variable declaration
-                if($variableSet) {
-                    $actions[] = array('type'=>'property',
-                                       'name'=>$parameterName);
+                if ($variableSet) {
+                    $actions[] = array('type' => 'property',
+                                       'name' => $parameterName);
                 } else {
                     $variableSet = true;
-                    $actions[] = array('type'=>'variable',
-                                       'name'=>$parameterName);
+                    $actions[] = array('type' => 'variable',
+                                       'name' => $parameterName);
                 }
                 $parameterName = '';
             }
         } while ($this->next());
 
-        if($parameterName != '' ) {
-            if($variableSet) {
-                    $actions[] = array('type'=>'property',
-                                       'name'=>$parameterName);
+        if ($parameterName != '') {
+            if ($variableSet) {
+                    $actions[] = array('type' => 'property',
+                                       'name' => $parameterName);
             } else {
-                $actions[] = array('type'=>'variable',
-                                   'name'=>$parameterName);
+                $actions[] = array('type' => 'variable',
+                                   'name' => $parameterName);
             }
         }
 
@@ -93,15 +87,15 @@ class Variable extends \Magento\Filter\Template\Tokenizer\AbstractTokenizer
      *
      * @return string
      */
-    public function getString() {
-
+    public function getString()
+    {
         $value = '';
-        if($this->isWhiteSpace()) {
+        if ($this->isWhiteSpace()) {
             return $value;
         }
         $qouteStart = $this->isQuote();
 
-        if($qouteStart) {
+        if ($qouteStart) {
            $breakSymbol = $this->char();
         } else {
            $breakSymbol = false;
@@ -109,20 +103,18 @@ class Variable extends \Magento\Filter\Template\Tokenizer\AbstractTokenizer
         }
 
         while ($this->next()) {
-            if (!$breakSymbol && ($this->isWhiteSpace() || $this->char() == ',' || $this->char() == ')') ) {
+            if (!$breakSymbol && ($this->isWhiteSpace() || $this->char() == ',' || $this->char() == ')')) {
                 $this->prev();
                 break;
-            } else if ($breakSymbol && $this->char() == $breakSymbol) {
+            } elseif ($breakSymbol && $this->char() == $breakSymbol) {
                 break;
-            } else if ($this->char() == '\\') {
+            } elseif ($this->char() == '\\') {
                 $this->next();
                 $value .= $this->char();
             } else {
                 $value .= $this->char();
-
             }
         }
-
         return $value;
     }
 
@@ -131,38 +123,39 @@ class Variable extends \Magento\Filter\Template\Tokenizer\AbstractTokenizer
      *
      * @return boolean
      */
-    public function isNumeric() {
+    public function isNumeric()
+    {
         return $this->char() >= '0' && $this->char() <= '9';
     }
 
     /**
-     * Return true if current char is qoute or apostroph
+     * Return true if current char is quote or apostrophe
      *
      * @return boolean
      */
-    public function isQuote() {
+    public function isQuote()
+    {
         return $this->char() == '"' || $this->char() == "'";
     }
 
     /**
-     * Return array of arguments for method.
+     * Return array of arguments for method
      *
      * @return array
      */
-    public function getMethodArgs() {
+    public function getMethodArgs()
+    {
         $value = array();
-        $numberStr = '';
 
-        while($this->next() && $this->char() != ')') {
-            if($this->isWhiteSpace() || $this->char() == ',') {
+        while ($this->next() && $this->char() != ')') {
+            if ($this->isWhiteSpace() || $this->char() == ',') {
                 continue;
-            } else if($this->isNumeric()) {
+            } elseif($this->isNumeric()) {
                 $value[] = $this->getNumber();
             } else {
                 $value[] = $this->getString();
             }
         }
-
         return $value;
     }
 
@@ -171,17 +164,16 @@ class Variable extends \Magento\Filter\Template\Tokenizer\AbstractTokenizer
      *
      * @return float
      */
-    public function getNumber() {
+    public function getNumber()
+    {
         $value = $this->char();
-        while( ($this->isNumeric() || $this->char()=='.') && $this->next() ) {
-            $value.= $this->char();
+        while (($this->isNumeric() || $this->char() == '.') && $this->next()) {
+            $value .= $this->char();
         }
 
-        if(!$this->isNumeric()) {
+        if (!$this->isNumeric()) {
             $this->prev();
         }
-
         return floatval($value);
     }
-
 }
diff --git a/lib/Magento/Filter/Truncate.php b/lib/Magento/Filter/Truncate.php
new file mode 100644
index 00000000000..9717c061e5f
--- /dev/null
+++ b/lib/Magento/Filter/Truncate.php
@@ -0,0 +1,115 @@
+<?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\Filter;
+
+/**
+ * Truncate filter
+ *
+ * Truncate a string to a certain length if necessary, appending the $etc string.
+ * $remainder will contain the string that has been replaced with $etc.
+ */
+class Truncate implements \Zend_Filter_Interface
+{
+    /**
+     * @var int
+     */
+    protected $length;
+
+    /**
+     * @var string
+     */
+    protected $etc;
+
+    /**
+     * @var string
+     */
+    protected $remainder;
+
+    /**
+     * @var bool
+     */
+    protected $breakWords;
+
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $string;
+
+    /**
+     * @param \Magento\Stdlib\String $string
+     * @param int $length
+     * @param string $etc
+     * @param string &$remainder
+     * @param bool $breakWords
+     */
+    public function __construct(
+        \Magento\Stdlib\String $string,
+        $length = 80,
+        $etc = '...',
+        &$remainder = '',
+        $breakWords = true
+    ) {
+        $this->string = $string;
+        $this->length = $length;
+        $this->etc = $etc;
+        $this->remainder = &$remainder;
+        $this->breakWords = $breakWords;
+    }
+
+    /**
+     * Filter value
+     *
+     * @param string $string
+     * @return string
+     */
+    public function filter($string)
+    {
+        $length = $this->length;
+        $this->remainder = '';
+        if (0 == $length) {
+            return '';
+        }
+
+        $originalLength = $this->string->strlen($string);
+        if ($originalLength > $length) {
+            $length -= $this->string->strlen($this->etc);
+            if ($length <= 0) {
+                return '';
+            }
+            $preparedString = $string;
+            $preparedLength = $length;
+            if (!$this->breakWords) {
+                $preparedString = preg_replace(
+                    '/\s+?(\S+)?$/u', '', $this->string->substr($string, 0, $length + 1)
+                );
+                $preparedLength = $this->string->strlen($preparedString);
+            }
+            $this->remainder = $this->string->substr($string, $preparedLength, $originalLength);
+            return $this->string->substr($preparedString, 0, $length) . $this->etc;
+        }
+
+        return $string;
+    }
+}
diff --git a/lib/Magento/Filter/ZendFactory.php b/lib/Magento/Filter/ZendFactory.php
new file mode 100644
index 00000000000..f2c86f7d4e7
--- /dev/null
+++ b/lib/Magento/Filter/ZendFactory.php
@@ -0,0 +1,102 @@
+<?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_Filter
+ * @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\Filter;
+
+/**
+ * Zend filter factory
+ */
+class ZendFactory extends AbstractFactory
+{
+    /**
+     * Set of filters
+     *
+     * @var array
+     */
+    protected $invokableClasses = array(
+        'stripTags'             => 'Zend_Filter_StripTags',
+        'stripNewlines'         => 'Zend_Filter_StripNewlines',
+        'stringTrim'            => 'Zend_Filter_StringTrim',
+        'stringToUpper'         => 'Zend_Filter_StringToUpper',
+        'stringToLower'         => 'Zend_Filter_StringToLower',
+        'realPath'              => 'Zend_Filter_RealPath',
+        'pregReplace'           => 'Zend_Filter_PregReplace',
+        'null'                  => 'Zend_Filter_Null',
+        'normalizedToLocalized' => 'Zend_Filter_NormalizedToLocalized',
+        'localizedToNormalized' => 'Zend_Filter_LocalizedToNormalized',
+        'int'                   => 'Zend_Filter_Int',
+        'inflector'             => 'Zend_Filter_Inflector',
+        'htmlEntities'          => 'Zend_Filter_HtmlEntities',
+        'zendEncrypt'           => 'Zend_Filter_Encrypt',
+        'zendDecrypt'           => 'Zend_Filter_Decrypt',
+        'dir'                   => 'Zend_Filter_Dir',
+        'digits'                => 'Zend_Filter_Digits',
+        'zendDecompress'        => 'Zend_Filter_Decompress',
+        'zendCompress'          => 'Zend_Filter_Compress',
+        'callback'              => 'Zend_Filter_Callback',
+        'boolean'               => 'Zend_Filter_Boolean',
+        'baseName'              => 'Zend_Filter_BaseName',
+        'alpha'                 => 'Zend_Filter_Alpha',
+        'alnum'                 => 'Zend_Filter_Alnum',
+        'underscoreToSeparator' => 'Zend_Filter_Word_UnderscoreToSeparator',
+        'underscoreToDash'      => 'Zend_Filter_Word_UnderscoreToDash',
+        'underscoreToCamelCase' => 'Zend_Filter_Word_UnderscoreToCamelCase',
+        'separatorToSeparator'  => 'Zend_Filter_Word_SeparatorToSeparator',
+        'separatorToDash'       => 'Zend_Filter_Word_SeparatorToDash',
+        'separatorToCamelCase'  => 'Zend_Filter_Word_SeparatorToCamelCase',
+        'dashToUnderscore'      => 'Zend_Filter_Word_DashToUnderscore',
+        'dashToSeparator'       => 'Zend_Filter_Word_DashToSeparator',
+        'dashToCamelCase'       => 'Zend_Filter_Word_DashToCamelCase',
+        'camelCaseToUnderscore' => 'Zend_Filter_Word_CamelCaseToUnderscore',
+        'camelCaseToSeparator'  => 'Zend_Filter_Word_CamelCaseToSeparator',
+        'camelCaseToDash'       => 'Zend_Filter_Word_CamelCaseToDash',
+        'fileUpperCase'         => 'Zend_Filter_File_UpperCase',
+        'fileRename'            => 'Zend_Filter_File_Rename',
+        'lowerCase'             => 'Zend_Filter_File_LowerCase',
+        'fileEncrypt'           => 'Zend_Filter_File_Encrypt',
+        'fileDecrypt'           => 'Zend_Filter_File_Decrypt',
+    );
+
+    /**
+     * Whether or not to share by default; default to false
+     *
+     * @var bool
+     */
+    protected $shareByDefault = false;
+
+    /**
+     * Shared instances, by default is shared
+     *
+     * @var array
+     */
+    protected $shared = array(
+        'Zend_Filter_StripNewlines' => true,
+        'Zend_Filter_Int' => true,
+        'Zend_Filter_Dir' => true,
+        'Zend_Filter_Digits' => true,
+        'Zend_Filter_BaseName' => true,
+    );
+}
diff --git a/lib/Magento/HTTP/Authentication.php b/lib/Magento/HTTP/Authentication.php
new file mode 100644
index 00000000000..aeddb9be1e4
--- /dev/null
+++ b/lib/Magento/HTTP/Authentication.php
@@ -0,0 +1,111 @@
+<?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_Connect
+ * @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\HTTP;
+
+/**
+ * Library for working with HTTP authentication
+ */
+class Authentication
+{
+    /**
+     * Request object
+     *
+     * @var \Magento\App\RequestInterface
+     */
+    protected $request;
+
+    /**
+     * Response object
+     *
+     * @var \Magento\App\ResponseInterface
+     */
+    protected $response;
+
+    /**
+     * @param \Magento\App\RequestInterface $httpRequest
+     * @param \Magento\App\ResponseInterface $httpResponse
+     */
+    public function __construct(
+        \Magento\App\RequestInterface $httpRequest,
+        \Magento\App\ResponseInterface $httpResponse
+    ) {
+        $this->request = $httpRequest;
+        $this->response = $httpResponse;
+    }
+
+    /**
+     * Extract "login" and "password" credentials from HTTP-request
+     *
+     * Returns plain array with 2 items: login and password respectively
+     *
+     * @return array
+     */
+    public function getCredentials()
+    {
+        $server = $this->request->getServer();
+        $user = '';
+        $pass = '';
+
+        if (empty($server['HTTP_AUTHORIZATION'])) {
+            foreach ($server as $k => $v) {
+                if (substr($k, -18) === 'HTTP_AUTHORIZATION' && !empty($v)) {
+                    $server['HTTP_AUTHORIZATION'] = $v;
+                    break;
+                }
+            }
+        }
+
+        if (isset($server['PHP_AUTH_USER']) && isset($server['PHP_AUTH_PW'])) {
+            $user = $server['PHP_AUTH_USER'];
+            $pass = $server['PHP_AUTH_PW'];
+        } elseif (!empty($server['HTTP_AUTHORIZATION'])) {
+            /**
+             * IIS Note: for HTTP authentication to work with IIS,
+             * the PHP directive cgi.rfc2616_headers must be set to 0 (the default value).
+             */
+            $auth = $server['HTTP_AUTHORIZATION'];
+            list($user, $pass) = explode(':', base64_decode(substr($auth, strpos($auth, " ") + 1)));
+        } elseif (!empty($server['Authorization'])) {
+            $auth = $server['Authorization'];
+            list($user, $pass) = explode(':', base64_decode(substr($auth, strpos($auth, " ") + 1)));
+        }
+
+        return array($user, $pass);
+    }
+
+    /**
+     * Set "auth failed" headers to the specified response object
+     *
+     * @param string $realm
+     */
+    public function setAuthenticationFailed($realm)
+    {
+        $this->response->setHeader('HTTP/1.1', '401 Unauthorized')
+            ->setHeader('WWW-Authenticate', 'Basic realm="' . $realm . '"')
+            ->setBody('<h1>401 Unauthorized</h1>');
+    }
+}
diff --git a/lib/Magento/HTTP/Header.php b/lib/Magento/HTTP/Header.php
new file mode 100644
index 00000000000..ec6df3c0701
--- /dev/null
+++ b/lib/Magento/HTTP/Header.php
@@ -0,0 +1,145 @@
+<?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_Connect
+ * @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\HTTP;
+
+/**
+ * Library for working with HTTP headers
+ */
+class Header
+{
+    /**
+     * Request object
+     *
+     * @var \Magento\App\RequestInterface
+     */
+    protected $_request;
+
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $_converter;
+
+    /**
+     * @param \Magento\App\RequestInterface $httpRequest
+     * @param \Magento\Stdlib\String $converter
+     */
+    public function __construct(
+        \Magento\App\RequestInterface $httpRequest,
+        \Magento\Stdlib\String $converter
+    ) {
+        $this->_request = $httpRequest;
+        $this->_converter = $converter;
+    }
+
+    /**
+     * Retrieve HTTP HOST
+     *
+     * @param boolean $clean clean non UTF-8 characters
+     * @return string
+     */
+    public function getHttpHost($clean = true)
+    {
+        return $this->_getHttpCleanValue('HTTP_HOST', $clean);
+    }
+
+    /**
+     * Retrieve HTTP USER AGENT
+     *
+     * @param boolean $clean clean non UTF-8 characters
+     * @return string
+     */
+    public function getHttpUserAgent($clean = true)
+    {
+        return $this->_getHttpCleanValue('HTTP_USER_AGENT', $clean);
+    }
+
+    /**
+     * Retrieve HTTP ACCEPT LANGUAGE
+     *
+     * @param boolean $clean clean non UTF-8 characters
+     * @return string
+     */
+    public function getHttpAcceptLanguage($clean = true)
+    {
+        return $this->_getHttpCleanValue('HTTP_ACCEPT_LANGUAGE', $clean);
+    }
+
+    /**
+     * Retrieve HTTP ACCEPT CHARSET
+     *
+     * @param boolean $clean clean non UTF-8 characters
+     * @return string
+     */
+    public function getHttpAcceptCharset($clean = true)
+    {
+        return $this->_getHttpCleanValue('HTTP_ACCEPT_CHARSET', $clean);
+    }
+
+    /**
+     * Retrieve HTTP REFERER
+     *
+     * @param boolean $clean clean non UTF-8 characters
+     * @return string
+     */
+    public function getHttpReferer($clean = true)
+    {
+        return $this->_getHttpCleanValue('HTTP_REFERER', $clean);
+    }
+
+    /**
+     * Returns the REQUEST_URI taking into account
+     * platform differences between Apache and IIS
+     *
+     * @param boolean $clean clean non UTF-8 characters
+     * @return string
+     */
+    public function getRequestUri($clean = false)
+    {
+        $uri = $this->_request->getRequestUri();
+        if ($clean) {
+            $uri = $this->_converter->cleanString($uri);
+        }
+        return $uri;
+    }
+
+    /**
+     * Retrieve HTTP "clean" value
+     *
+     * @param string $var
+     * @param boolean $clean clean non UTF-8 characters
+     * @return string
+     */
+    protected function _getHttpCleanValue($var, $clean = true)
+    {
+        $value = $this->_request->getServer($var, '');
+        if ($clean) {
+            $value = $this->_converter->cleanString($value);
+        }
+
+        return $value;
+    }
+}
diff --git a/lib/Magento/HTTP/PhpEnvironment/RemoteAddress.php b/lib/Magento/HTTP/PhpEnvironment/RemoteAddress.php
new file mode 100644
index 00000000000..8831f7c16ec
--- /dev/null
+++ b/lib/Magento/HTTP/PhpEnvironment/RemoteAddress.php
@@ -0,0 +1,101 @@
+<?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_Connect
+ * @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\HTTP\PhpEnvironment;
+
+/**
+ * Library for working with client ip address
+ */
+class RemoteAddress
+{
+    /**
+     * Request object
+     *
+     * @var \Magento\App\RequestInterface
+     */
+    protected $request;
+
+    /**
+     * Remote address cache
+     *
+     * @var string
+     */
+    protected $remoteAddress;
+
+    /**
+     * @var array
+     */
+    protected $alternativeHeaders;
+
+    /**
+     * @param \Magento\App\RequestInterface $httpRequest
+     * @param array $alternativeHeaders
+     * @throws \InvalidArgumentException
+     */
+    public function __construct(
+        \Magento\App\RequestInterface $httpRequest,
+        $alternativeHeaders = array()
+    ) {
+        $this->request = $httpRequest;
+
+        if (!is_array($alternativeHeaders)) {
+            throw new \InvalidArgumentException(sprintf(
+                'Invalid value of type "%s" given while array is expected as alternative headers',
+                gettype($alternativeHeaders)
+            ));
+        }
+
+        $this->alternativeHeaders = $alternativeHeaders;
+    }
+
+    /**
+     * Retrieve Client Remote Address
+     *
+     * @param bool $ipToLong converting IP to long format
+     * @return string IPv4|long
+     */
+    public function getRemoteAddress($ipToLong = false)
+    {
+        if (is_null($this->remoteAddress)) {
+            foreach ($this->alternativeHeaders as $var) {
+                if ($this->request->getServer($var, false)) {
+                    $this->remoteAddress = $this->request->getServer($var);
+                    break;
+                }
+            }
+
+            if (!$this->remoteAddress) {
+                $this->remoteAddress = $this->request->getServer('REMOTE_ADDR');
+            }
+        }
+
+        if (!$this->remoteAddress) {
+            return false;
+        }
+
+        return $ipToLong ? ip2long($this->remoteAddress) : $this->remoteAddress;
+    }
+}
diff --git a/lib/Magento/HTTP/PhpEnvironment/ServerAddress.php b/lib/Magento/HTTP/PhpEnvironment/ServerAddress.php
new file mode 100644
index 00000000000..7a16bd9256e
--- /dev/null
+++ b/lib/Magento/HTTP/PhpEnvironment/ServerAddress.php
@@ -0,0 +1,61 @@
+<?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_Connect
+ * @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\HTTP\PhpEnvironment;
+
+/**
+ * Library for working with server ip address
+ */
+class ServerAddress
+{
+    /**
+     * Request object
+     *
+     * @var \Magento\App\RequestInterface
+     */
+    protected $request;
+
+    public function __construct(
+        \Magento\App\RequestInterface $httpRequest
+    ) {
+        $this->request = $httpRequest;
+    }
+
+    /**
+     * Retrieve Server IP address
+     *
+     * @param bool $ipToLong converting IP to long format
+     * @return string IPv4|long
+     */
+    public function getServerAddress($ipToLong = false)
+    {
+        $address = $this->request->getServer('SERVER_ADDR');
+        if (!$address) {
+            return false;
+        }
+        return $ipToLong ? ip2long($address) : $address;
+    }
+}
diff --git a/app/code/Magento/Core/Model/Logger.php b/lib/Magento/Logger.php
similarity index 77%
rename from app/code/Magento/Core/Model/Logger.php
rename to lib/Magento/Logger.php
index bc5bc45b052..160a5e45626 100644
--- a/app/code/Magento/Core/Model/Logger.php
+++ b/lib/Magento/Logger.php
@@ -18,8 +18,6 @@
  * 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_Core
  * @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)
  */
@@ -27,7 +25,7 @@
 /**
  * Logger model
  */
-namespace Magento\Core\Model;
+namespace Magento;
 
 class Logger
 {
@@ -53,17 +51,21 @@ class Logger
      */
     protected $_fileSystem;
 
+
     /**
      * @param \Magento\App\Dir $dirs
      * @param \Magento\Io\File $fileSystem
      * @param string $defaultFile
      */
-    public function __construct(\Magento\App\Dir $dirs, \Magento\Io\File $fileSystem, $defaultFile = '')
-    {
+    public function __construct(
+        \Magento\App\Dir $dirs,
+        \Magento\Io\File $fileSystem,
+        $defaultFile = ''
+    ) {
         $this->_dirs = $dirs;
         $this->_fileSystem = $fileSystem;
-        $this->addStreamLog(\Magento\Core\Model\Logger::LOGGER_SYSTEM, $defaultFile)
-            ->addStreamLog(\Magento\Core\Model\Logger::LOGGER_EXCEPTION, $defaultFile);
+        $this->addStreamLog(self::LOGGER_SYSTEM, $defaultFile)
+            ->addStreamLog(self::LOGGER_EXCEPTION, $defaultFile);
     }
 
     /**
@@ -74,7 +76,7 @@ class Logger
      * @param string $loggerKey
      * @param string $fileOrWrapper
      * @param string $writerClass
-     * @return \Magento\Core\Model\Logger
+     * @return \Magento\Logger
      * @link http://php.net/wrappers
      */
     public function addStreamLog($loggerKey, $fileOrWrapper = '', $writerClass = '')
@@ -98,32 +100,14 @@ class Logger
     }
 
     /**
-     * Reset all loggers and initialize them according to store configuration
+     * Unset all declared loggers
      *
-     * @param \Magento\Core\Model\Store $store
-     * @param \Magento\Core\Model\ConfigInterface $config
+     * @return $this
      */
-    public function initForStore(\Magento\Core\Model\Store $store, \Magento\Core\Model\ConfigInterface $config)
+    public function unsetLoggers()
     {
         $this->_loggers = array();
-        if ($store->getConfig('dev/log/active')) {
-            $writer = (string)$config->getNode('global/log/core/writer_model');
-            $this->addStreamLog(self::LOGGER_SYSTEM, $store->getConfig('dev/log/file'), $writer);
-            $this->addStreamLog(self::LOGGER_EXCEPTION, $store->getConfig('dev/log/exception_file'), $writer);
-        }
-    }
-
-    /**
-     * Add a logger if store configuration allows
-     *
-     * @param string $loggerKey
-     * @param \Magento\Core\Model\Store $store
-     */
-    public function addStoreLog($loggerKey, \Magento\Core\Model\Store $store)
-    {
-        if ($store->getConfig('dev/log/active')) {
-            $this->addStreamLog($loggerKey);
-        }
+        return $this;
     }
 
     /**
diff --git a/lib/Magento/Math/Division.php b/lib/Magento/Math/Division.php
new file mode 100644
index 00000000000..e0141a8fc9d
--- /dev/null
+++ b/lib/Magento/Math/Division.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\Math;
+
+/**
+ * Division library
+ */
+class Division
+{
+    /**
+     * Const for correct dividing decimal values
+     */
+    const DIVIDE_EPSILON = 10000;
+
+    /**
+     * Returns the floating point remainder (modulo) of the division of the arguments
+     *
+     * @param float|int $dividend
+     * @param float|int $divisor
+     * @return float|int
+     */
+    public function getExactDivision($dividend, $divisor)
+    {
+        $epsilon = $divisor / self::DIVIDE_EPSILON;
+
+        $remainder = fmod($dividend, $divisor);
+        if (abs($remainder - $divisor) < $epsilon || abs($remainder) < $epsilon) {
+            $remainder = 0;
+        }
+
+        return $remainder;
+    }
+}
diff --git a/lib/Magento/Math/Random.php b/lib/Magento/Math/Random.php
new file mode 100644
index 00000000000..dde477fa140
--- /dev/null
+++ b/lib/Magento/Math/Random.php
@@ -0,0 +1,84 @@
+<?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\Math;
+
+/**
+ * Random data generator
+ */
+class Random
+{
+    const CHARS_LOWERS                          = 'abcdefghijklmnopqrstuvwxyz';
+    const CHARS_UPPERS                          = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+    const CHARS_DIGITS                          = '0123456789';
+    const CHARS_SPECIALS                        = '!$*+-.=?@^_|~';
+    const CHARS_PASSWORD_LOWERS                 = 'abcdefghjkmnpqrstuvwxyz';
+    const CHARS_PASSWORD_UPPERS                 = 'ABCDEFGHJKLMNPQRSTUVWXYZ';
+    const CHARS_PASSWORD_DIGITS                 = '23456789';
+    const CHARS_PASSWORD_SPECIALS               = '!$*-.=?@_';
+
+    /**
+     * Permission level to deny access
+     */
+    const RULE_PERM_DENY = 0;
+
+    /**
+     * Permission level to inherit access from parent role
+     */
+    const RULE_PERM_INHERIT = 1;
+
+    /**
+     * Permission level to allow access
+     */
+    const RULE_PERM_ALLOW = 2;
+
+    /**
+     * Get random string
+     *
+     * @param int $length
+     * @param null|string $chars
+     * @return string
+     */
+    public function getRandomString($length, $chars = null)
+    {
+        if (is_null($chars)) {
+            $chars = self::CHARS_LOWERS . self::CHARS_UPPERS . self::CHARS_DIGITS;
+        }
+        mt_srand(10000000 * (double)microtime());
+        for ($i = 0, $string = '', $lc = strlen($chars)-1; $i < $length; $i++) {
+            $string .= $chars[mt_rand(0, $lc)];
+        }
+        return $string;
+    }
+
+    /**
+     * Generate a hash from unique ID
+     *
+     * @param string $prefix
+     * @return string
+     */
+    public function getUniqueHash($prefix = '')
+    {
+        return $prefix . md5(uniqid(microtime() . mt_rand(), true));
+    }
+}
diff --git a/lib/Magento/App/Module/Declaration/Converter/Dom.php b/lib/Magento/Module/Declaration/Converter/Dom.php
similarity index 97%
rename from lib/Magento/App/Module/Declaration/Converter/Dom.php
rename to lib/Magento/Module/Declaration/Converter/Dom.php
index 7625dd3b2a0..1a06b031cbe 100644
--- a/lib/Magento/App/Module/Declaration/Converter/Dom.php
+++ b/lib/Magento/Module/Declaration/Converter/Dom.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Module declaration xml converter. Converts declaration DOM Document to internal array representation.
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,7 +23,7 @@
  * @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\App\Module\Declaration\Converter;
+namespace Magento\Module\Declaration\Converter;
 
 class Dom implements \Magento\Config\ConverterInterface
 {
diff --git a/lib/Magento/App/Module/Declaration/FileResolver.php b/lib/Magento/Module/Declaration/FileResolver.php
similarity index 94%
rename from lib/Magento/App/Module/Declaration/FileResolver.php
rename to lib/Magento/Module/Declaration/FileResolver.php
index aba33599fb8..33514c2ff17 100644
--- a/lib/Magento/App/Module/Declaration/FileResolver.php
+++ b/lib/Magento/Module/Declaration/FileResolver.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Module declaration file resolver. Reads list of module declaration files from module /etc directories.
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,7 +23,7 @@
  * @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\App\Module\Declaration;
+namespace Magento\Module\Declaration;
 
 class FileResolver implements \Magento\Config\FileResolverInterface
 {
diff --git a/lib/Magento/App/Module/Declaration/Reader/Filesystem.php b/lib/Magento/Module/Declaration/Reader/Filesystem.php
similarity index 93%
rename from lib/Magento/App/Module/Declaration/Reader/Filesystem.php
rename to lib/Magento/Module/Declaration/Reader/Filesystem.php
index dd21f43b16d..2de54646d2c 100644
--- a/lib/Magento/App/Module/Declaration/Reader/Filesystem.php
+++ b/lib/Magento/Module/Declaration/Reader/Filesystem.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Module declaration reader. Reads module.xml declaration files from module /etc directories.
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,7 +23,7 @@
  * @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\App\Module\Declaration\Reader;
+namespace Magento\Module\Declaration\Reader;
 
 class Filesystem extends \Magento\Config\Reader\Filesystem
 {
@@ -43,9 +45,9 @@ class Filesystem extends \Magento\Config\Reader\Filesystem
     );
 
     /**
-     * @param \Magento\App\Module\Declaration\FileResolver $fileResolver
-     * @param \Magento\App\Module\Declaration\Converter\Dom $converter
-     * @param \Magento\App\Module\Declaration\SchemaLocator $schemaLocator
+     * @param \Magento\Module\Declaration\FileResolver $fileResolver
+     * @param \Magento\Module\Declaration\Converter\Dom $converter
+     * @param \Magento\Module\Declaration\SchemaLocator $schemaLocator
      * @param \Magento\Config\ValidationStateInterface $validationState
      * @param string $fileName
      * @param array $idAttributes
@@ -53,9 +55,9 @@ class Filesystem extends \Magento\Config\Reader\Filesystem
      * @param array $allowedModules
      */
     public function __construct(
-        \Magento\App\Module\Declaration\FileResolver $fileResolver,
-        \Magento\App\Module\Declaration\Converter\Dom $converter,
-        \Magento\App\Module\Declaration\SchemaLocator $schemaLocator,
+        \Magento\Module\Declaration\FileResolver $fileResolver,
+        \Magento\Module\Declaration\Converter\Dom $converter,
+        \Magento\Module\Declaration\SchemaLocator $schemaLocator,
         \Magento\Config\ValidationStateInterface $validationState,
         $fileName = 'module.xml',
         $idAttributes = array(),
@@ -183,6 +185,7 @@ class Filesystem extends \Magento\Config\Reader\Filesystem
      * @param array $modules
      * @return array
      * @SuppressWarnings(PHPMD.ShortVariable)
+     * @SuppressWarnings(PHPMD.UnusedLocalVariable)
      */
     protected function _sortModules(array $modules)
     {
@@ -191,7 +194,7 @@ class Filesystem extends \Magento\Config\Reader\Filesystem
          * (in order not to add extra information about dependencies to module config)
          */
         $moduleDependencyMap = array();
-        foreach (array_keys($modules) as $moduleName) {
+        foreach ($modules as $moduleName => $value) {
             $moduleDependencyMap[] = array(
                 'moduleName' => $moduleName,
                 'dependencies' => $this->_getExtendedModuleDependencies($moduleName, $modules),
diff --git a/lib/Magento/App/Module/Declaration/SchemaLocator.php b/lib/Magento/Module/Declaration/SchemaLocator.php
similarity index 92%
rename from lib/Magento/App/Module/Declaration/SchemaLocator.php
rename to lib/Magento/Module/Declaration/SchemaLocator.php
index c61020159d1..b7ec4d5d6f1 100644
--- a/lib/Magento/App/Module/Declaration/SchemaLocator.php
+++ b/lib/Magento/Module/Declaration/SchemaLocator.php
@@ -23,7 +23,7 @@
  * @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\App\Module\Declaration;
+namespace Magento\Module\Declaration;
 
 class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
 {
@@ -34,7 +34,7 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
      */
     public function getSchema()
     {
-        return realpath(__DIR__ . '/../../etc/module.xsd');
+        return realpath(__DIR__ . '/../etc/module.xsd');
     }
 
     /**
diff --git a/lib/Magento/App/Module/Dir.php b/lib/Magento/Module/Dir.php
similarity index 87%
rename from lib/Magento/App/Module/Dir.php
rename to lib/Magento/Module/Dir.php
index ebe1b15d5b5..336892f5b95 100644
--- a/lib/Magento/App/Module/Dir.php
+++ b/lib/Magento/Module/Dir.php
@@ -23,7 +23,7 @@
  * @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\App\Module;
+namespace Magento\Module;
 
 class Dir
 {
@@ -34,12 +34,19 @@ class Dir
      */
     protected $_applicationDirs;
 
+    /**
+     * @var \Magento\Stdlib\String
+     */
+    protected $_string;
+
     /**
      * @param \Magento\App\Dir $applicationDirs
+     * @param \Magento\Stdlib\String $string
      */
-    public function __construct(\Magento\App\Dir $applicationDirs)
+    public function __construct(\Magento\App\Dir $applicationDirs, \Magento\Stdlib\String $string)
     {
         $this->_applicationDirs = $applicationDirs;
+        $this->_string = $string;
     }
 
     /**
@@ -54,7 +61,7 @@ class Dir
     {
         $result = $this->_applicationDirs->getDir(\Magento\App\Dir::MODULES)
             . DIRECTORY_SEPARATOR
-            . uc_words($moduleName, DIRECTORY_SEPARATOR);
+            . $this->_string->upperCaseWords($moduleName, '_', DIRECTORY_SEPARATOR);
         if ($type) {
             if (!in_array($type, array('etc', 'sql', 'data', 'i18n', 'view'))) {
                 throw new \InvalidArgumentException("Directory type '$type' is not recognized.");
diff --git a/app/code/Magento/Core/Model/Config/Modules/Reader.php b/lib/Magento/Module/Dir/Reader.php
similarity index 53%
rename from app/code/Magento/Core/Model/Config/Modules/Reader.php
rename to lib/Magento/Module/Dir/Reader.php
index 494bc763bbf..2744a76f88f 100644
--- a/app/code/Magento/Core/Model/Config/Modules/Reader.php
+++ b/lib/Magento/Module/Dir/Reader.php
@@ -23,7 +23,7 @@
  * @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\Config\Modules;
+namespace Magento\Module\Dir;
 
 class Reader
 {
@@ -37,82 +37,29 @@ class Reader
     /**
      * Directory registry
      *
-     * @var \Magento\App\Module\Dir
+     * @var \Magento\Module\Dir
      */
     protected $_moduleDirs;
 
     /**
      * Modules configuration provider
      *
-     * @var \Magento\App\ModuleListInterface
+     * @var \Magento\Module\ModuleListInterface
      */
     protected $_modulesList;
 
     /**
-     * Base config factory
-     *
-     * @var \Magento\Core\Model\Config\BaseFactory
-     */
-    protected $_prototypeFactory;
-
-    /**
-     * @param \Magento\App\Module\Dir $moduleDirs
-     * @param \Magento\Core\Model\Config\BaseFactory $prototypeFactory
-     * @param \Magento\App\ModuleListInterface $moduleList
+     * @param \Magento\Module\Dir $moduleDirs
+     * @param \Magento\Module\ModuleListInterface $moduleList
      */
     public function __construct(
-        \Magento\App\Module\Dir $moduleDirs,
-        \Magento\Core\Model\Config\BaseFactory $prototypeFactory,
-        \Magento\App\ModuleListInterface $moduleList
+        \Magento\Module\Dir $moduleDirs,
+        \Magento\Module\ModuleListInterface $moduleList
     ) {
         $this->_moduleDirs = $moduleDirs;
-        $this->_prototypeFactory = $prototypeFactory;
         $this->_modulesList = $moduleList;
     }
 
-    /**
-     * Load configuration from single file
-     *
-     * @param string $configFile
-     * @param string $moduleName
-     * @param \Magento\Core\Model\Config\Base $mergeToObject
-     * @param \Magento\Core\Model\Config\Base $mergeModel
-     */
-    public function _loadFileConfig($configFile, $moduleName, $mergeToObject, $mergeModel)
-    {
-        $configFilePath = $this->getModuleDir('etc', $moduleName) . DS . $configFile;
-        if ($mergeModel->loadFile($configFilePath)) {
-            $mergeToObject->extend($mergeModel, true);
-        }
-    }
-
-    /**
-     * Iterate all active modules "etc" folders and combine data from
-     * specified xml file name to one object
-     *
-     * @param string $fileName
-     * @param \Magento\Core\Model\Config\Base|null $mergeToObject
-     * @param \Magento\Core\Model\Config\Base|null $mergeModel
-     * @return \Magento\Core\Model\Config\Base|null
-     */
-    public function loadModulesConfiguration($fileName, $mergeToObject = null, $mergeModel = null)
-    {
-        $mergeToObject = null === $mergeToObject ? $this->_prototypeFactory->create('<config/>') : $mergeToObject;
-        $mergeModel = null === $mergeModel ? $mergeModel = $this->_prototypeFactory->create('<config/>'): $mergeModel;
-
-        /** @var $module \Magento\Core\Model\Config\Element */
-        foreach (array_keys($this->_modulesList->getModules()) as $moduleName) {
-            if (!is_array($fileName)) {
-                $fileName = array($fileName);
-            }
-            foreach ($fileName as $configFile) {
-                $this->_loadFileConfig($configFile, $moduleName, $mergeToObject, $mergeModel);
-            }
-
-        }
-        return $mergeToObject;
-    }
-
     /**
      * Go through all modules and find configuration files of active modules
      *
diff --git a/lib/Magento/App/Module/Dir/ReverseResolver.php b/lib/Magento/Module/Dir/ReverseResolver.php
similarity index 85%
rename from lib/Magento/App/Module/Dir/ReverseResolver.php
rename to lib/Magento/Module/Dir/ReverseResolver.php
index cff0b9c4053..7c159bd5803 100644
--- a/lib/Magento/App/Module/Dir/ReverseResolver.php
+++ b/lib/Magento/Module/Dir/ReverseResolver.php
@@ -23,27 +23,27 @@
  * @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\App\Module\Dir;
+namespace Magento\Module\Dir;
 
 class ReverseResolver
 {
     /**
-     * @var \Magento\App\ModuleListInterface
+     * @var \Magento\Module\ModuleListInterface
      */
     protected $_moduleList;
 
     /**
-     * @var \Magento\App\Module\Dir
+     * @var \Magento\Module\Dir
      */
     protected $_moduleDirs;
 
     /**
-     * @param \Magento\App\ModuleListInterface $moduleList
-     * @param \Magento\App\Module\Dir $moduleDirs
+     * @param \Magento\Module\ModuleListInterface $moduleList
+     * @param \Magento\Module\Dir $moduleDirs
      */
     public function __construct(
-        \Magento\App\ModuleListInterface $moduleList,
-        \Magento\App\Module\Dir $moduleDirs
+        \Magento\Module\ModuleListInterface $moduleList,
+        \Magento\Module\Dir $moduleDirs
     ) {
         $this->_moduleList = $moduleList;
         $this->_moduleDirs = $moduleDirs;
diff --git a/app/code/Magento/Core/App/FrontController/Plugin/Install.php b/lib/Magento/Module/FrontController/Plugin/Install.php
similarity index 86%
rename from app/code/Magento/Core/App/FrontController/Plugin/Install.php
rename to lib/Magento/Module/FrontController/Plugin/Install.php
index 37012d76f08..ad4393c9870 100644
--- a/app/code/Magento/Core/App/FrontController/Plugin/Install.php
+++ b/lib/Magento/Module/FrontController/Plugin/Install.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Application installation plugin. Should be used b applications that require module install/upgrade.
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,7 +23,7 @@
  * @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\App\FrontController\Plugin;
+namespace Magento\Module\FrontController\Plugin;
 
 class Install
 {
@@ -36,19 +38,19 @@ class Install
     protected $_cache;
 
     /**
-     * @var \Magento\App\UpdaterInterface
+     * @var \Magento\Module\UpdaterInterface
      */
     protected $_updater;
 
     /**
      * @param \Magento\App\State $appState
      * @param \Magento\Cache\FrontendInterface $cache
-     * @param \Magento\App\UpdaterInterface $dbUpdater
+     * @param \Magento\Module\UpdaterInterface $dbUpdater
      */
     public function __construct(
         \Magento\App\State $appState,
         \Magento\Cache\FrontendInterface $cache,
-        \Magento\App\UpdaterInterface $dbUpdater
+        \Magento\Module\UpdaterInterface $dbUpdater
     ) {
         $this->_appState = $appState;
         $this->_cache = $cache;
diff --git a/lib/Magento/App/ModuleList.php b/lib/Magento/Module/ModuleList.php
similarity index 88%
rename from lib/Magento/App/ModuleList.php
rename to lib/Magento/Module/ModuleList.php
index 20ffd25d552..60bfa19549c 100644
--- a/lib/Magento/App/ModuleList.php
+++ b/lib/Magento/Module/ModuleList.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * List of application active application modules.
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,9 +23,9 @@
  * @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\App;
+namespace Magento\Module;
 
-class ModuleList implements \Magento\App\ModuleListInterface
+class ModuleList implements \Magento\Module\ModuleListInterface
 {
     /**
      * Configuration data
@@ -40,12 +42,12 @@ class ModuleList implements \Magento\App\ModuleListInterface
     protected $_scope = 'global';
 
     /**
-     * @param \Magento\App\Module\Declaration\Reader\Filesystem $reader
+     * @param \Magento\Module\Declaration\Reader\Filesystem $reader
      * @param \Magento\Config\CacheInterface $cache
      * @param string $cacheId
      */
     public function __construct(
-        Module\Declaration\Reader\Filesystem $reader,
+        Declaration\Reader\Filesystem $reader,
         \Magento\Config\CacheInterface $cache,
         $cacheId = 'modules_declaration_cache'
     ) {
diff --git a/lib/Magento/App/ModuleListInterface.php b/lib/Magento/Module/ModuleListInterface.php
similarity index 94%
rename from lib/Magento/App/ModuleListInterface.php
rename to lib/Magento/Module/ModuleListInterface.php
index 9d22d6adbca..ac5956e2eaf 100644
--- a/lib/Magento/App/ModuleListInterface.php
+++ b/lib/Magento/Module/ModuleListInterface.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * List of active application modules.
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,7 +23,7 @@
  * @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\App;
+namespace Magento\Module;
 
 interface ModuleListInterface
 {
diff --git a/lib/Magento/App/Module/ResourceResolver.php b/lib/Magento/Module/ResourceResolver.php
similarity index 88%
rename from lib/Magento/App/Module/ResourceResolver.php
rename to lib/Magento/Module/ResourceResolver.php
index ca42738dd95..22d656c815b 100644
--- a/lib/Magento/App/Module/ResourceResolver.php
+++ b/lib/Magento/Module/ResourceResolver.php
@@ -23,12 +23,12 @@
  * @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\App\Module;
+namespace Magento\Module;
 
-class ResourceResolver implements \Magento\App\Module\ResourceResolverInterface
+class ResourceResolver implements \Magento\Module\ResourceResolverInterface
 {
     /**
-     * @var \Magento\Core\Model\Config\Modules\Reader
+     * @var \Magento\Module\Dir\Reader
      */
     protected $_moduleReader;
 
@@ -40,9 +40,9 @@ class ResourceResolver implements \Magento\App\Module\ResourceResolverInterface
     protected $_moduleResources = array();
 
     /**
-     * @param \Magento\Core\Model\Config\Modules\Reader $moduleReader
+     * @param \Magento\Module\Dir\Reader $moduleReader
      */
-    public function __construct(\Magento\Core\Model\Config\Modules\Reader $moduleReader)
+    public function __construct(Dir\Reader $moduleReader)
     {
         $this->_moduleReader = $moduleReader;
     }
diff --git a/lib/Magento/App/Module/ResourceResolverInterface.php b/lib/Magento/Module/ResourceResolverInterface.php
similarity index 97%
rename from lib/Magento/App/Module/ResourceResolverInterface.php
rename to lib/Magento/Module/ResourceResolverInterface.php
index 35f85a0b3f9..49dc8350ef4 100644
--- a/lib/Magento/App/Module/ResourceResolverInterface.php
+++ b/lib/Magento/Module/ResourceResolverInterface.php
@@ -23,7 +23,7 @@
  * @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\App\Module;
+namespace Magento\Module;
 
 interface ResourceResolverInterface
 {
diff --git a/lib/Magento/App/Updater.php b/lib/Magento/Module/Updater.php
similarity index 83%
rename from lib/Magento/App/Updater.php
rename to lib/Magento/Module/Updater.php
index 01fcf8a629e..4c8a3603d98 100644
--- a/lib/Magento/App/Updater.php
+++ b/lib/Magento/Module/Updater.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Application module updater. Used to install/upgrade module schemas.
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -22,14 +24,16 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\App;
+namespace Magento\Module;
+
+use Magento\App\State;
 
-class Updater implements \Magento\App\UpdaterInterface
+class Updater implements \Magento\Module\UpdaterInterface
 {
     /**
      * Setup model factory
      *
-     * @var \Magento\App\Updater\SetupFactory
+     * @var \Magento\Module\Updater\SetupFactory
      */
     protected $_factory;
 
@@ -62,12 +66,12 @@ class Updater implements \Magento\App\UpdaterInterface
     protected $_resourceList;
 
     /**
-     * @var \Magento\App\ModuleListInterface
+     * @var \Magento\Module\ModuleListInterface
      */
     protected $_moduleList;
 
     /**
-     * @var \Magento\App\Module\ResourceResolverInterface
+     * @var \Magento\Module\ResourceResolverInterface
      */
     protected $_resourceResolver;
 
@@ -79,22 +83,22 @@ class Updater implements \Magento\App\UpdaterInterface
     /**
      * @param Updater\SetupFactory $setupFactory
      * @param State $appState
-     * @param ModuleListInterface $moduleList
-     * @param Module\ResourceResolverInterface $resourceResolver
+     * @param \Magento\Module\ModuleListInterface $moduleList
+     * @param \Magento\Module\ResourceResolverInterface $resourceResolver
      * @param bool $skipModuleUpdate
      */
     public function __construct(
-        \Magento\App\Updater\SetupFactory $setupFactory,
+        \Magento\Module\Updater\SetupFactory $setupFactory,
         \Magento\App\State $appState,
-        \Magento\App\ModuleListInterface $moduleList,
-        \Magento\App\Module\ResourceResolverInterface $resourceResolver,
+        \Magento\Module\ModuleListInterface $moduleList,
+        \Magento\Module\ResourceResolverInterface $resourceResolver,
         $skipModuleUpdate = false
     ) {
         $this->_appState = $appState;
         $this->_moduleList = $moduleList;
         $this->_resourceResolver = $resourceResolver;
         $this->_setupFactory = $setupFactory;
-        $this->_skipModuleUpdate = (bool)$skipModuleUpdate;
+        $this->_skipModuleUpdate = $skipModuleUpdate;
     }
 
     /**
@@ -135,7 +139,7 @@ class Updater implements \Magento\App\UpdaterInterface
             }
         }
 
-        /** @var $setup \Magento\App\Updater\SetupInterface*/
+        /** @var $setup \Magento\Module\Updater\SetupInterface*/
         foreach ($afterApplyUpdates as $setup) {
             $setup->afterApplyAllUpdates();
         }
diff --git a/lib/Magento/App/Updater/SetupFactory.php b/lib/Magento/Module/Updater/SetupFactory.php
similarity index 86%
rename from lib/Magento/App/Updater/SetupFactory.php
rename to lib/Magento/Module/Updater/SetupFactory.php
index 3ee75f5409c..c8286b5bfde 100644
--- a/lib/Magento/App/Updater/SetupFactory.php
+++ b/lib/Magento/Module/Updater/SetupFactory.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Module setup factory. Creates setups used during application install/upgrade.
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,12 +23,13 @@
  * @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\App\Updater;
+namespace Magento\Module\Updater;
+use Magento\Module\Updater\SetupInterface;
 use \Magento\ObjectManager;
 
 class SetupFactory
 {
-    const INSTANCE_TYPE = 'Magento\App\Updater\SetupInterface';
+    const INSTANCE_TYPE = 'Magento\Module\Updater\SetupInterface';
 
     /**
      * @var ObjectManager
@@ -58,10 +61,10 @@ class SetupFactory
     {
         $className = isset($this->_resourceTypes[$resourceName])
             ? $this->_resourceTypes[$resourceName]
-            : 'Magento\App\Updater\SetupInterface';
+            : 'Magento\Module\Updater\SetupInterface';
 
         if (false == (is_subclass_of($className, self::INSTANCE_TYPE)) && $className !== self::INSTANCE_TYPE) {
-            throw new \LogicException($className . ' is not a \Magento\App\Updater\SetupInterface');
+            throw new \LogicException($className . ' is not a \Magento\Module\Updater\SetupInterface');
         }
 
         return $this->_objectManager->create($className, array(
diff --git a/lib/Magento/App/Updater/SetupInterface.php b/lib/Magento/Module/Updater/SetupInterface.php
similarity index 90%
rename from lib/Magento/App/Updater/SetupInterface.php
rename to lib/Magento/Module/Updater/SetupInterface.php
index cfa2d93739a..e97d027be15 100644
--- a/lib/Magento/App/Updater/SetupInterface.php
+++ b/lib/Magento/Module/Updater/SetupInterface.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Module setup. Used to install/upgrade module schema.
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,7 +23,7 @@
  * @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\App\Updater;
+namespace Magento\Module\Updater;
 
 interface SetupInterface
 {
@@ -40,7 +42,7 @@ interface SetupInterface
     /**
      * Apply module resource install, upgrade and data scripts
      *
-     * @return \Magento\App\Updater\SetupInterface
+     * @return \Magento\Module\Updater\SetupInterface
      */
     public function applyUpdates();
 
@@ -55,7 +57,7 @@ interface SetupInterface
     /**
      * Run each time after applying of all updates,
      *
-     * @return \Magento\App\Updater\SetupInterface
+     * @return \Magento\Module\Updater\SetupInterface
      */
     public function afterApplyAllUpdates();
 
diff --git a/lib/Magento/App/UpdaterInterface.php b/lib/Magento/Module/UpdaterInterface.php
similarity index 97%
rename from lib/Magento/App/UpdaterInterface.php
rename to lib/Magento/Module/UpdaterInterface.php
index edd9c9441c6..a3ead5b74df 100644
--- a/lib/Magento/App/UpdaterInterface.php
+++ b/lib/Magento/Module/UpdaterInterface.php
@@ -23,7 +23,7 @@
  * @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\App;
+namespace Magento\Module;
 
 interface UpdaterInterface
 {
diff --git a/lib/Magento/App/etc/module.xsd b/lib/Magento/Module/etc/module.xsd
old mode 100755
new mode 100644
similarity index 100%
rename from lib/Magento/App/etc/module.xsd
rename to lib/Magento/Module/etc/module.xsd
diff --git a/lib/Magento/ObjectManager.php b/lib/Magento/ObjectManager.php
index cb9ece5ec7d..3b736d01ad4 100644
--- a/lib/Magento/ObjectManager.php
+++ b/lib/Magento/ObjectManager.php
@@ -28,6 +28,13 @@ namespace Magento;
 
 interface ObjectManager
 {
+    /**
+     * Set factory
+     *
+     * @param ObjectManager\Factory $factory
+     */
+    public function setFactory(ObjectManager\Factory $factory);
+
     /**
      * Create new object instance
      *
diff --git a/lib/Magento/ObjectManager/Config.php b/lib/Magento/ObjectManager/Config.php
index 1cee4806646..2ef59bc9059 100644
--- a/lib/Magento/ObjectManager/Config.php
+++ b/lib/Magento/ObjectManager/Config.php
@@ -30,14 +30,14 @@ interface Config
      *
      * @param \Magento\ObjectManager\Relations $relations
      */
-    public function setRelations(\Magento\ObjectManager\Relations $relations);
+    public function setRelations(Relations $relations);
 
     /**
      * Set configuration cache instance
      *
      * @param \Magento\ObjectManager\ConfigCache $cache
      */
-    public function setCache(\Magento\ObjectManager\ConfigCache $cache);
+    public function setCache(ConfigCache $cache);
 
     /**
      * Retrieve list of arguments per type
diff --git a/lib/Magento/ObjectManager/Config/Config.php b/lib/Magento/ObjectManager/Config/Config.php
index a2dd5ba0d56..43743952b95 100644
--- a/lib/Magento/ObjectManager/Config/Config.php
+++ b/lib/Magento/ObjectManager/Config/Config.php
@@ -246,7 +246,7 @@ class Config implements \Magento\ObjectManager\Config
      *
      * @param array $configuration
      */
-    public function _mergeConfiguration(array $configuration)
+    protected function _mergeConfiguration(array $configuration)
     {
         foreach ($configuration as $key => $curConfig) {
             switch ($key) {
diff --git a/app/code/Magento/Core/Model/ObjectManager/DefinitionFactory.php b/lib/Magento/ObjectManager/DefinitionFactory.php
similarity index 50%
rename from app/code/Magento/Core/Model/ObjectManager/DefinitionFactory.php
rename to lib/Magento/ObjectManager/DefinitionFactory.php
index a24fe3d0e10..c38113d8706 100644
--- a/app/code/Magento/Core/Model/ObjectManager/DefinitionFactory.php
+++ b/lib/Magento/ObjectManager/DefinitionFactory.php
@@ -24,7 +24,7 @@
  * @license   {@license_link}
  *
  */
-namespace Magento\Core\Model\ObjectManager;
+namespace Magento\ObjectManager;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -32,55 +32,56 @@ namespace Magento\Core\Model\ObjectManager;
 class DefinitionFactory
 {
     /**
-     * Format of definitions
+     * Directory containig compiled class metadata
      *
      * @var string
      */
-    protected $_definitionFormat;
+    protected $_definitionDir;
 
     /**
-     * @var \Magento\Core\Model\Config\Primary
+     * Class generation dir
+     *
+     * @var string
      */
-    protected $_config;
+    protected $_generationDir;
 
     /**
-     * @param \Magento\Core\Model\Config\Primary $config
+     * Format of definitions
+     *
+     * @var string
      */
-    public function __construct(\Magento\Core\Model\Config\Primary $config)
-    {
-        $this->_config = $config;
-        $this->_definitionFormat = $config->getDefinitionFormat();
-    }
+    protected $_definitionFormat;
 
     /**
-     * Get definition model name
+     * List of defintion models
      *
-     * @param string $format
-     * @return string
+     * @var array
      */
-    protected function _getDefinitionModel($format)
-    {
-        switch ($format) {
-            case 'igbinary':
-                return 'Magento\ObjectManager\Definition\Compiled\Binary';
+    protected $_definitionClasses = array(
+        'igbinary' => 'Magento\ObjectManager\Definition\Compiled\Binary',
+        'serialized' => 'Magento\ObjectManager\Definition\Compiled\Serialized'
+    );
 
-            case 'serialized':
-            default:
-                return 'Magento\ObjectManager\Definition\Compiled\Serialized';
-        }
+    /**
+     * @param $definitionDir
+     * @param $generationDir
+     * @param $definitionFormat
+     */
+    public function __construct($definitionDir, $generationDir, $definitionFormat)
+    {
+        $this->_definitionDir = $definitionDir;
+        $this->_generationDir = $generationDir;
+        $this->_definitionFormat = $definitionFormat;
     }
 
     /**
-     * Create object manager definition reader based on configuration
-     *
-     * @return \Magento\ObjectManager\Definition
+     * @param $definitions
+     * @return \Magento\ObjectManager\Definition\Runtime
      */
-    public function createClassDefinition()
+    public function createClassDefinition($definitions)
     {
-        \Magento\Profiler::start('di_definitions_create');
-        $definitions = $this->_config->getParam('definitions', false);
-        if (!$definitions) { // check whether definitions were provided as application init param
-            $path = $this->_config->getDefinitionPath() . DIRECTORY_SEPARATOR . 'definitions.php';
+        if (!$definitions) {
+            $path = $this->_definitionDir . DIRECTORY_SEPARATOR . 'definitions.php';
             if (is_readable($path)) {
                 $definitions = file_get_contents($path);
             }
@@ -89,30 +90,28 @@ class DefinitionFactory
             if (is_string($definitions)) {
                 $definitions = $this->_unpack($definitions);
             }
-            $definitionModel = $this->_getDefinitionModel($this->_definitionFormat);
-            $output = new $definitionModel($definitions);
+            $definitionModel = $this->_definitionClasses[$this->_definitionFormat];
+            $result = new $definitionModel($definitions);
         } else {
-            $genDir = $this->_config->getDirectories()->getDir(\Magento\App\Dir::GENERATION);
             $autoloader = new \Magento\Autoload\IncludePath();
-            $generatorIo = new \Magento\Code\Generator\Io(new \Magento\Io\File(), $autoloader, $genDir);
-            $generator = new \Magento\Code\Generator\ClassGenerator(
-                new \Magento\Code\Generator(null, $autoloader, $generatorIo)
-            );
-            $definition =  new \Magento\ObjectManager\Definition\Runtime();
-            $output = new \Magento\Code\Generator\DefinitionDecorator($definition, $generator);
+            $generatorIo = new \Magento\Code\Generator\Io(new \Magento\Io\File(), $autoloader, $this->_generationDir);
+            $generator = new \Magento\Code\Generator(null, $autoloader, $generatorIo);
+            $autoloader = new \Magento\Code\Generator\Autoloader($generator);
+            spl_autoload_register(array($autoloader, 'load'));
+
+            $result =  new \Magento\ObjectManager\Definition\Runtime();
         }
-        \Magento\Profiler::stop('di_definitions_create');
-        return $output;
+        return $result;
     }
 
     /**
-     * Retrieve list of plugin definitions
+     * Create plugin definitions
      *
      * @return \Magento\Interception\Definition
      */
     public function createPluginDefinition()
     {
-        $path = $this->_config->getDefinitionPath() . DIRECTORY_SEPARATOR . 'plugins.php';
+        $path = $this->_definitionDir . DIRECTORY_SEPARATOR . 'plugins.php';
         if (is_readable($path)) {
             return new \Magento\Interception\Definition\Compiled($this->_unpack(file_get_contents($path)));
         } else {
@@ -121,15 +120,13 @@ class DefinitionFactory
     }
 
     /**
-     * Retreive class relations list
-     *
-     * @return \Magento\Core\Model\ObjectManager\Relations|\Magento\ObjectManager\Relations\Runtime
+     * @return \Magento\ObjectManager\Relations
      */
     public function createRelations()
     {
-        $path = $this->_config->getDefinitionPath() . DIRECTORY_SEPARATOR . 'relations.php';
+        $path = $this->_definitionDir . DIRECTORY_SEPARATOR . 'relations.php';
         if (is_readable($path)) {
-            return new \Magento\Core\Model\ObjectManager\Relations($this->_unpack(file_get_contents($path)));
+            return new \Magento\ObjectManager\Relations\Compiled($this->_unpack(file_get_contents($path)));
         } else {
             return new \Magento\ObjectManager\Relations\Runtime();
         }
diff --git a/app/code/Magento/Core/Model/ObjectManager/DynamicConfigInterface.php b/lib/Magento/ObjectManager/DynamicConfigInterface.php
similarity index 96%
rename from app/code/Magento/Core/Model/ObjectManager/DynamicConfigInterface.php
rename to lib/Magento/ObjectManager/DynamicConfigInterface.php
index ae2a0984d4c..6fb5051874d 100644
--- a/app/code/Magento/Core/Model/ObjectManager/DynamicConfigInterface.php
+++ b/lib/Magento/ObjectManager/DynamicConfigInterface.php
@@ -21,7 +21,7 @@
  * @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\ObjectManager;
+namespace Magento\ObjectManager;
 
 interface DynamicConfigInterface
 {
diff --git a/lib/Magento/ObjectManager/Factory/Factory.php b/lib/Magento/ObjectManager/Factory/Factory.php
index 8f83d638cd8..b43943c92d8 100644
--- a/lib/Magento/ObjectManager/Factory/Factory.php
+++ b/lib/Magento/ObjectManager/Factory/Factory.php
@@ -70,7 +70,7 @@ class Factory implements \Magento\ObjectManager\Factory
     ) {
         $this->_objectManager = $objectManager;
         $this->_config = $config;
-        $this->_definitions = $definitions ?: new \Magento\ObjectManager\Definition\Runtime();
+        $this->_definitions = $definitions ? : new \Magento\ObjectManager\Definition\Runtime();
         $this->_globalArguments = $globalArguments;
     }
 
@@ -96,7 +96,10 @@ class Factory implements \Magento\ObjectManager\Factory
             $argument = null;
             if (array_key_exists($paramName, $arguments)) {
                 $argument = $arguments[$paramName];
-            } else if ($paramRequired) {
+            } elseif (array_key_exists('options', $arguments) && array_key_exists($paramName, $arguments['options'])) {
+                // The parameter name doesn't exist in the arguments, but it is contained in the 'options' argument.
+                $argument = $arguments['options'][$paramName];
+            } elseif ($paramRequired) {
                 if ($paramType) {
                     $argument = array('instance' => $paramType);
                 } else {
@@ -123,14 +126,13 @@ class Factory implements \Magento\ObjectManager\Factory
                     );
                 }
                 $this->_creationStack[$requestedType] = 1;
-
                 $isShared = (!isset($argument['shared']) && $this->_config->isShared($argumentType))
                     || (isset($argument['shared']) && $argument['shared']);
                 $argument = $isShared
                     ? $this->_objectManager->get($argumentType)
                     : $this->_objectManager->create($argumentType);
                 unset($this->_creationStack[$requestedType]);
-            } else if (is_array($argument) && isset($argument['argument'])) {
+            } elseif (is_array($argument) && isset($argument['argument'])) {
                 $argKey = $argument['argument'];
                 $argument = isset($this->_globalArguments[$argKey]) ? $this->_globalArguments[$argKey] : $paramDefault;
             }
@@ -164,36 +166,31 @@ class Factory implements \Magento\ObjectManager\Factory
     {
         $type = $this->_config->getInstanceType($requestedType);
         $parameters = $this->_definitions->getParameters($type);
+        if (!isset($this->_instances[$type])) {
+            $this->_instances[$type] = 0;
+        }
+        $this->_instances[$type]++;
         if ($parameters == null) {
             return new $type();
         }
         $args = $this->_resolveArguments($requestedType, $parameters, $arguments);
-
-        switch(count($args)) {
+        switch (count($args)) {
             case 1:
                 return new $type($args[0]);
-
             case 2:
                 return new $type($args[0], $args[1]);
-
             case 3:
                 return new $type($args[0], $args[1], $args[2]);
-
             case 4:
                 return new $type($args[0], $args[1], $args[2], $args[3]);
-
             case 5:
                 return new $type($args[0], $args[1], $args[2], $args[3], $args[4]);
-
             case 6:
                 return new $type($args[0], $args[1], $args[2], $args[3], $args[4], $args[5]);
-
             case 7:
                 return new $type($args[0], $args[1], $args[2], $args[3], $args[4], $args[5], $args[6]);
-
             case 8:
                 return new $type($args[0], $args[1], $args[2], $args[3], $args[4], $args[5], $args[6], $args[7]);
-
             default:
                 $reflection = new \ReflectionClass($type);
                 return $reflection->newInstanceArgs($args);
diff --git a/lib/Magento/ObjectManager/ObjectManager.php b/lib/Magento/ObjectManager/ObjectManager.php
index c7b0e3189fe..ee97dea833c 100644
--- a/lib/Magento/ObjectManager/ObjectManager.php
+++ b/lib/Magento/ObjectManager/ObjectManager.php
@@ -45,22 +45,34 @@ class ObjectManager implements \Magento\ObjectManager
     protected $_sharedInstances = array();
 
     /**
-     * @param \Magento\ObjectManager\Factory $factory
-     * @param \Magento\ObjectManager\Config $config
+     * @var Config\Config
+     */
+    protected $_config;
+
+    /**
+     * @param Factory $factory
+     * @param Config $config
      * @param array $sharedInstances
      */
-    public function __construct(
-        \Magento\ObjectManager\Factory $factory = null,
-        \Magento\ObjectManager\Config $config = null,
-        array $sharedInstances = array()
-    ) {
-        $this->_config = $config ?: new \Magento\ObjectManager\Config\Config();
-        $this->_factory = $factory ?: new \Magento\ObjectManager\Factory\Factory($this->_config, $this);
+    public function __construct(Factory $factory = null, Config $config = null, array $sharedInstances = array())
+    {
+        $this->_config = $config ?: new Config\Config();
+        $this->_factory = $factory ?: new Factory\Factory($this->_config, $this);
         $this->_factory->setObjectManager($this);
         $this->_sharedInstances = $sharedInstances;
         $this->_sharedInstances['Magento\ObjectManager'] = $this;
     }
 
+    /**
+     * Set creation factory
+     *
+     * @param Factory $factory
+     */
+    public function setFactory(Factory $factory)
+    {
+        $this->_factory = $factory;
+    }
+
     /**
      * Create new object instance
      *
diff --git a/app/code/Magento/Core/Model/ObjectManager/Relations.php b/lib/Magento/ObjectManager/Relations/Compiled.php
similarity index 93%
rename from app/code/Magento/Core/Model/ObjectManager/Relations.php
rename to lib/Magento/ObjectManager/Relations/Compiled.php
index cb8ee2d07ac..9e5f22032d5 100644
--- a/app/code/Magento/Core/Model/ObjectManager/Relations.php
+++ b/lib/Magento/ObjectManager/Relations/Compiled.php
@@ -23,9 +23,9 @@
  * @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\ObjectManager;
+namespace Magento\ObjectManager\Relations;
 
-class Relations implements \Magento\ObjectManager\Relations
+class Compiled implements \Magento\ObjectManager\Relations
 {
     /**
      * List of class relations
diff --git a/lib/Magento/Outbound/Authentication/Factory.php b/lib/Magento/Outbound/Authentication/Factory.php
index 3e07c5c5f53..d26e3628013 100644
--- a/lib/Magento/Outbound/Authentication/Factory.php
+++ b/lib/Magento/Outbound/Authentication/Factory.php
@@ -30,7 +30,7 @@ namespace Magento\Outbound\Authentication;
 
 class Factory
 {
-    /** @var \Magento\Core\Model\ObjectManager  */
+    /** @var \Magento\App\ObjectManager  */
     private $_objectManager;
 
     /**
diff --git a/lib/Magento/Stdlib/ArrayUtils.php b/lib/Magento/Stdlib/ArrayUtils.php
new file mode 100644
index 00000000000..bebda10afae
--- /dev/null
+++ b/lib/Magento/Stdlib/ArrayUtils.php
@@ -0,0 +1,61 @@
+<?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\Stdlib
+ * @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\Stdlib;
+
+/**
+ * Class ArrayUtils
+ *
+ * @package Magento\Stdlib
+ */
+class ArrayUtils
+{
+    /**
+     * Sorts array with multibyte string keys
+     *
+     * @param  array $sort
+     * @param  string $locale
+     * @return array|bool
+     */
+    public function ksortMultibyte(array &$sort, $locale)
+    {
+        if (empty($sort)) {
+            return false;
+        }
+        $oldLocale = setlocale(LC_COLLATE, "0");
+        // use fallback locale if $localeCode is not available
+
+        if (strpos($locale, '.UTF8') === false) {
+            $locale .= '.UTF8';
+        }
+
+        setlocale(LC_COLLATE,  $locale, 'C.UTF-8', 'en_US.utf8');
+        ksort($sort, SORT_LOCALE_STRING);
+        setlocale(LC_COLLATE, $oldLocale);
+
+        return $sort;
+    }
+}
diff --git a/lib/Magento/Date.php b/lib/Magento/Stdlib/DateTime.php
similarity index 75%
rename from lib/Magento/Date.php
rename to lib/Magento/Stdlib/DateTime.php
index 12cb0993e78..c4edaf79986 100644
--- a/lib/Magento/Date.php
+++ b/lib/Magento/Stdlib/DateTime.php
@@ -19,22 +19,18 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category   Magento
- * @package    Magento_Date
+ * @package    \Magento\Stdlib
  * @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\Stdlib;
+
 /**
  * Converter of date formats
  * Internal dates
- *
- * @category Magento
- * @package  Magento_Date
- * @author   Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento;
-
-class Date
+class DateTime
 {
     /**#@+
      * Date format, used as default. Compatible with \Zend_Date
@@ -46,29 +42,14 @@ class Date
     const DATE_PHP_FORMAT           = 'Y-m-d';
     /**#@-*/
 
-    /**
-     * Convert value by dictionary
-     *
-     * @param string $value
-     * @param array $dictionary
-     * @return string
-     */
-    protected static function _convert($value, $dictionary)
-    {
-        foreach ($dictionary as $search => $replace) {
-            $value = preg_replace('/(^|[^%])' . $search . '/', '$1' . $replace, $value);
-        }
-        return $value;
-    }
-
     /**
      * Convert date to UNIX timestamp
      * Returns current UNIX timestamp if date is true
      *
-     * @param \Zend_Date|string|bool $date
+     * @param \Zend_Date|bool $date
      * @return int
      */
-    public static function toTimestamp($date)
+    public function toTimestamp($date)
     {
         if ($date instanceof \Zend_Date) {
             return $date->getTimestamp();
@@ -87,7 +68,7 @@ class Date
      * @param boolean $withoutTime day only flag
      * @return string
      */
-    public static function now($withoutTime = false)
+    public function now($withoutTime = false)
     {
         $format = $withoutTime ? self::DATE_PHP_FORMAT : self::DATETIME_PHP_FORMAT;
         return date($format);
@@ -96,14 +77,14 @@ class Date
     /**
      * Format date to internal format
      *
-     * @param string|Zend_Date|bool|null $date
+     * @param string|\Zend_Date|bool|null $date
      * @param boolean $includeTime
      * @return string|null
      */
-    public static function formatDate($date, $includeTime = true)
+    public function formatDate($date, $includeTime = true)
     {
         if ($date === true) {
-            return self::now(!$includeTime);
+            return $this->now(!$includeTime);
         }
 
         if ($date instanceof \Zend_Date) {
@@ -119,10 +100,21 @@ class Date
         }
 
         if (!is_numeric($date)) {
-            $date = self::toTimestamp($date);
+            $date = $this->toTimestamp($date);
         }
 
         $format = $includeTime ? self::DATETIME_PHP_FORMAT : self::DATE_PHP_FORMAT;
         return date($format, $date);
     }
+
+    /**
+     * Check whether sql date is empty
+     *
+     * @param string $date
+     * @return boolean
+     */
+    public function isEmptyDate($date)
+    {
+        return preg_replace('#[ 0:-]#', '', $date) === '';
+    }
 }
diff --git a/lib/Magento/Stdlib/String.php b/lib/Magento/Stdlib/String.php
new file mode 100644
index 00000000000..8f8a38ac8cc
--- /dev/null
+++ b/lib/Magento/Stdlib/String.php
@@ -0,0 +1,234 @@
+<?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\Stdlib
+ * @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\Stdlib;
+
+/**
+ * Magento methods to work with string
+ */
+class String
+{
+    /**
+     * Default charset
+     */
+    const ICONV_CHARSET = 'UTF-8';
+
+    /**
+     * Capitalize first letters and convert separators if needed
+     *
+     * @param string $str
+     * @param string $sourceSeparator
+     * @param string $destinationSeparator
+     * @return string
+     */
+    public function upperCaseWords($str, $sourceSeparator = '_', $destinationSeparator = '_')
+    {
+        return str_replace(' ', $destinationSeparator, ucwords(str_replace($sourceSeparator, ' ', $str)));
+    }
+
+    /**
+     * Split string and appending $insert string after $needle
+     *
+     * @param string $str
+     * @param integer $length
+     * @param string $needle
+     * @param string $insert
+     * @return string
+     */
+    public function splitInjection($str, $length = 50, $needle = '-', $insert = ' ')
+    {
+        $str = $this->split($str, $length);
+        $newStr = '';
+        foreach ($str as $part) {
+            if ($this->strlen($part) >= $length) {
+                $lastDelimiter = $this->strpos($this->strrev($part), $needle);
+                $tmpNewStr = $this->substr($this->strrev($part), 0, $lastDelimiter)
+                    . $insert . $this->substr($this->strrev($part), $lastDelimiter);
+                $newStr .= $this->strrev($tmpNewStr);
+            } else {
+                $newStr .= $part;
+            }
+        }
+        return $newStr;
+    }
+
+    /**
+     * Binary-safe variant of strSplit()
+     * + option not to break words
+     * + option to trim spaces (between each word)
+     * + option to set character(s) (pcre pattern) to be considered as words separator
+     *
+     * @param string $value
+     * @param int $length
+     * @param bool $keepWords
+     * @param bool $trim
+     * @param string $wordSeparatorRegex
+     * @return array
+     */
+    public function split($value, $length = 1, $keepWords = false, $trim = false, $wordSeparatorRegex = '\s')
+    {
+        $result = array();
+        $strLen = $this->strlen($value);
+        if (!$strLen || !is_int($length) || $length <= 0) {
+            return $result;
+        }
+        if ($trim) {
+            $value = trim(preg_replace('/\s{2,}/siu', ' ', $value));
+        }
+        // do a usual str_split, but safe for our encoding
+        if (!$keepWords || $length < 2) {
+            for ($offset = 0; $offset < $strLen; $offset += $length) {
+                $result[] = $this->substr($value, $offset, $length);
+            }
+        } else {
+            // split smartly, keeping words
+            $split = preg_split('/(' . $wordSeparatorRegex . '+)/siu', $value, null, PREG_SPLIT_DELIM_CAPTURE);
+            $index = 0;
+            $space = '';
+            $spaceLen = 0;
+            foreach ($split as $key => $part) {
+                if ($trim) {
+                    // ignore spaces (even keys)
+                    if ($key % 2) {
+                        continue;
+                    }
+                    $space = ' ';
+                    $spaceLen = 1;
+                }
+                if (empty($result[$index])) {
+                    $currentLength = 0;
+                    $result[$index] = '';
+                    $space = '';
+                    $spaceLen = 0;
+                } else {
+                    $currentLength = $this->strlen($result[$index]);
+                }
+                $partLength = $this->strlen($part);
+                // add part to current last element
+                if (($currentLength + $spaceLen + $partLength) <= $length) {
+                    $result[$index] .= $space . $part;
+                } elseif ($partLength <= $length) {
+                    // add part to new element
+                    $index++;
+                    $result[$index] = $part;
+                } else {
+                    // break too long part recursively
+                    foreach ($this->split($part, $length, false, $trim, $wordSeparatorRegex) as $subPart) {
+                        $index++;
+                        $result[$index] = $subPart;
+                    }
+                }
+            }
+        }
+        // remove last element, if empty
+        $count = count($result);
+        if ($count) {
+            if ($result[$count - 1] === '') {
+                unset($result[$count - 1]);
+            }
+        }
+        // remove first element, if empty
+        if (isset($result[0]) && $result[0] === '') {
+            array_shift($result);
+        }
+        return $result;
+    }
+
+    /**
+     * Retrieve string length using default charset
+     *
+     * @param string $string
+     * @return int
+     */
+    public function strlen($string)
+    {
+        return iconv_strlen($string, self::ICONV_CHARSET);
+    }
+
+    /**
+     * Clean non UTF-8 characters
+     *
+     * @param string $string
+     * @return string
+     */
+    public function cleanString($string)
+    {
+        if ('"libiconv"' == ICONV_IMPL) {
+            return iconv(self::ICONV_CHARSET, self::ICONV_CHARSET . '//IGNORE', $string);
+        } else {
+            return $string;
+        }
+    }
+
+    /**
+     * Pass through to iconv_substr()
+     *
+     * @param string $string
+     * @param int $offset
+     * @param int $length
+     * @return string
+     */
+    public function substr($string, $offset, $length = null)
+    {
+        $string = $this->cleanString($string);
+        if (is_null($length)) {
+            $length = $this->strlen($string) - $offset;
+        }
+        return iconv_substr($string, $offset, $length, self::ICONV_CHARSET);
+    }
+
+    /**
+     * Binary-safe strrev()
+     *
+     * @param string $str
+     * @return string
+     */
+    public function strrev($str)
+    {
+        $result = '';
+        $strLen = $this->strlen($str);
+        if (!$strLen) {
+            return $result;
+        }
+        for ($i = $strLen - 1; $i >= 0; $i--) {
+            $result .= $this->substr($str, $i, 1);
+        }
+        return $result;
+    }
+
+    /**
+     * Find position of first occurrence of a string
+     *
+     * @param string $haystack
+     * @param string $needle
+     * @param int $offset
+     * @return int|bool
+     */
+    public function strpos($haystack, $needle, $offset = null)
+    {
+        return iconv_strpos($haystack, $needle, $offset, self::ICONV_CHARSET);
+    }
+}
diff --git a/lib/Magento/UrlInterface.php b/lib/Magento/UrlInterface.php
index 6110c104388..5c2bcd94cf8 100644
--- a/lib/Magento/UrlInterface.php
+++ b/lib/Magento/UrlInterface.php
@@ -18,8 +18,6 @@
  * 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_Core
  * @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)
  */
@@ -136,21 +134,6 @@ interface UrlInterface
      */
     public function isSecure();
 
-    /**
-     * Set store entity
-     *
-     * @param mixed $params
-     * @return \Magento\UrlInterface
-     */
-    public function setStore($params);
-
-    /**
-     * Get current store for the url instance
-     *
-     * @return \Magento\Core\Model\Store
-     */
-    public function getStore();
-
     /**
      * Retrieve Base URL
      *
diff --git a/lib/Magento/View/Context.php b/lib/Magento/View/Context.php
index 911ce27216f..23cce2d4ab3 100644
--- a/lib/Magento/View/Context.php
+++ b/lib/Magento/View/Context.php
@@ -34,12 +34,12 @@ use Magento\Core\Model\Store\Config as StoreConfig;
 use Magento\Core\Model\Factory\Helper as FactoryHelper;
 use Magento\Core\Model\View\Url as ViewUrl;
 use Magento\View\ConfigInterface as ViewConfig;
-use Magento\Core\Model\Logger;
+use Magento\Logger;
 use Magento\Core\Model\App;
 use Magento\App\State as AppState;
 
 use Magento\Core\Model\Session\AbstractSession;
-use Magento\Core\Model\CacheInterface as Cache;
+use Magento\App\CacheInterface as Cache;
 use Magento\Core\Model\Cache\StateInterface as CacheState;
 use Magento\UrlInterface;
 use Magento\Event\ManagerInterface;
@@ -74,7 +74,7 @@ class Context
     protected $translator;
 
     /**
-     * @var \Magento\Core\Model\CacheInterface
+     * @var \Magento\App\CacheInterface
      */
     protected $cache;
 
@@ -108,6 +108,11 @@ class Context
      */
     protected $viewUrl;
 
+    /**
+     * @var \Magento\View\LayoutInterface
+     */
+    protected $layout;
+
     /**
      * View config model
      *
@@ -121,7 +126,7 @@ class Context
     protected $cacheState;
 
     /**
-     * @var \Magento\Core\Model\Logger
+     * @var \Magento\Logger
      */
     protected $logger;
 
@@ -193,7 +198,7 @@ class Context
     }
 
     /**
-     * @return \Magento\Core\Model\CacheInterface
+     * @return \Magento\App\CacheInterface
      */
     public function getCache()
     {
@@ -305,7 +310,7 @@ class Context
     }
 
     /**
-     * @return \Magento\Core\Model\Logger
+     * @return \Magento\Logger
      */
     public function getLogger()
     {
diff --git a/lib/Magento/View/DesignInterface.php b/lib/Magento/View/DesignInterface.php
index b5be26f55ff..bf2fc4ab291 100644
--- a/lib/Magento/View/DesignInterface.php
+++ b/lib/Magento/View/DesignInterface.php
@@ -39,6 +39,7 @@ interface DesignInterface
     /**
      * Set package area
      *
+     * @deprecated
      * @param string $area
      * @return DesignInterface
      */
@@ -47,6 +48,7 @@ interface DesignInterface
     /**
      * Retrieve package area
      *
+     * @deprecated
      * @return string
      */
     public function getArea();
diff --git a/lib/Magento/View/Layout/File/Source/Decorator/ModuleDependency.php b/lib/Magento/View/Layout/File/Source/Decorator/ModuleDependency.php
index fc0f1c686ae..69093881200 100644
--- a/lib/Magento/View/Layout/File/Source/Decorator/ModuleDependency.php
+++ b/lib/Magento/View/Layout/File/Source/Decorator/ModuleDependency.php
@@ -28,7 +28,7 @@ namespace Magento\View\Layout\File\Source\Decorator;
 
 use Magento\View\Layout\File\SourceInterface;
 use Magento\View\Layout\File;
-use Magento\App\ModuleListInterface;
+use Magento\Module\ModuleListInterface;
 use Magento\View\Design\ThemeInterface;
 
 class ModuleDependency implements SourceInterface
diff --git a/pub/cron.php b/pub/cron.php
index 93925197fa0..c48a244271b 100644
--- a/pub/cron.php
+++ b/pub/cron.php
@@ -35,9 +35,8 @@ try {
         \Magento\Core\Model\App::PARAM_RUN_CODE => 'admin',
         \Magento\Core\Model\Store::CUSTOM_ENTRY_POINT_PARAM => true
     );
-    $config = new \Magento\Core\Model\Config\Primary(BP, $params);
-    $entryPoint = new \Magento\Core\Model\EntryPoint\Cron($config);
-    $entryPoint->processRequest();
+    $entryPoint = new \Magento\App\EntryPoint\EntryPoint(BP, $params);
+    $entryPoint->run('Magento\App\Cron');
 } catch (\Exception $e) {
     print $e->getMessage() . "\n\n";
     print $e->getTraceAsString();
diff --git a/pub/get.php b/pub/get.php
index e38e5587ded..79fb37af363 100644
--- a/pub/get.php
+++ b/pub/get.php
@@ -80,8 +80,12 @@ if (empty($mediaDirectory)) {
     $params[\Magento\Core\Model\App::PARAM_CACHE_OPTIONS]['frontend_options']['disable_save'] = true;
 }
 
-$config = new \Magento\Core\Model\Config\Primary(dirname(__DIR__), $params);
-$entryPoint = new \Magento\Core\Model\EntryPoint\Media(
-    $config, $request, $isAllowed, __DIR__, $mediaDirectory, $configCacheFile, $relativeFilename
-);
-$entryPoint->processRequest();
+$entryPoint = new \Magento\App\EntryPoint\EntryPoint(dirname(__DIR__), $params);
+$entryPoint->run('Magento\Core\App\Media', array(
+    'request' => $request,
+    'workingDirectory' => __DIR__,
+    'mediaDirectory' => $mediaDirectory,
+    'configCacheFile' => $configCacheFile,
+    'isAllowed' => $isAllowed,
+    'relativeFileName' => $relativeFilename,
+));
diff --git a/pub/index.php b/pub/index.php
index 459fa5dc8f6..0e136bc5e00 100644
--- a/pub/index.php
+++ b/pub/index.php
@@ -26,7 +26,8 @@
 require __DIR__ . '/../app/bootstrap.php';
 \Magento\Profiler::start('magento');
 $params = $_SERVER;
-$params[\Magento\Core\Model\App::PARAM_APP_URIS][\Magento\App\Dir::PUB] = '';
-$entryPoint = new \Magento\Core\Model\EntryPoint\Http(new \Magento\Core\Model\Config\Primary(BP, $params));
-$entryPoint->processRequest();
+$params[\Magento\App\Dir::PARAM_APP_URIS][\Magento\App\Dir::PUB] = '';
+$entryPoint = new \Magento\App\EntryPoint\EntryPoint(BP, $params);
+$result = $entryPoint->run('Magento\App\Http');
 \Magento\Profiler::stop('magento');
+return $result;
diff --git a/pub/lib/mage/item-table.js b/pub/lib/mage/item-table.js
index ab8e83c15b3..d51145c24f9 100644
--- a/pub/lib/mage/item-table.js
+++ b/pub/lib/mage/item-table.js
@@ -125,7 +125,7 @@
             e.stopPropagation();
 
             // remove the deletable item
-            e.target.remove();
+            $(e.target).remove();
 
             if (this.options.keepLastRow) {
                 // determine if there is only one element remaining, in which case, disable the delete mechanism on it
diff --git a/pub/lib/mage/validation.js b/pub/lib/mage/validation.js
index 0fc6ef11973..72571905ea6 100644
--- a/pub/lib/mage/validation.js
+++ b/pub/lib/mage/validation.js
@@ -936,7 +936,7 @@
              */
                 function(value, element, params) {
                 if (value && params && creditCartTypes[value]) {
-                    return creditCartTypes[value][0].test($(params).val());
+                    return creditCartTypes[value][0].test($(params).val().replace(/\s+/g, ''));
                 }
                 return false;
             }, 'Card type does not match credit card number.'
-- 
GitLab