diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1926afa07676fc63d7817a6e18ce43f47d9ea90a..88806577cdcb049a92fb0380f520e0923772faa2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,25 @@
+2.0.0.0-dev72
+=============
+* Framework Improvements:
+  * Fixed performance degradation caused by DI argument processors
+* Modularity improvements:
+  * Introduced the Magento_UrlRewrite module, and moved corresponding classes from Magento_Core to Magento_UrlRewrite
+  * Moved all Install logic to the Magento_Install module
+  * Eliminated the Core\Helper\Js class
+  * Moved the Email related logic from the Magento_Core module to the Magento_Email module
+  * Moved the Cache related logic from the Magento_Core module to library
+* Indexer improvements:
+  * Added execution time hints for console reindex
+* Customer Service usage:
+  * Refactored the Magento_Newsletter module to use Customer service layer
+* Fixed bugs:
+  * Fixed an issue with resetting customer password from the frontend
+  * Fixed an issue where mistakenly the attribute of the Customer Address Edit form was cached
+  * Fixed an issue where admin could not unsubscribe customer on the customer edit page in the backend
+  * Fixed an issue where customers were always subscribed to the newsletter even if not selected during registration
+* GitHub requests:
+  * [#325] (https://github.com/magento/magento2/pull/325) -- ImportExport: Fix notice if _attribute_set column is missing
+
 2.0.0.0-dev71
 =============
 * Fixed bugs:
diff --git a/app/code/Magento/Backend/Block/Page/Head.php b/app/code/Magento/Backend/Block/Page/Head.php
index 9c91d25e5008184b78ff0e845a2828883222a580..73be3e9f7852389f8b5237a7dbea5debef46356e 100644
--- a/app/code/Magento/Backend/Block/Page/Head.php
+++ b/app/code/Magento/Backend/Block/Page/Head.php
@@ -53,6 +53,7 @@ class Head extends \Magento\Theme\Block\Html\Head
      * @param \Magento\View\Asset\MergeService $assetMergeService
      * @param \Magento\View\Asset\MinifyService $assetMinifyService
      * @param \Magento\Locale\ResolverInterface $localeResolver
+     * @param \Magento\Translation\Block\Js $jsTranslation
      * @param \Magento\App\Action\Title $titles
      * @param \Magento\Data\Form\FormKey $formKey
      * @param array $data
@@ -65,6 +66,7 @@ class Head extends \Magento\Theme\Block\Html\Head
         \Magento\View\Asset\MergeService $assetMergeService,
         \Magento\View\Asset\MinifyService $assetMinifyService,
         \Magento\Locale\ResolverInterface $localeResolver,
+        \Magento\Translation\Block\Js $jsTranslation,
         \Magento\App\Action\Title $titles,
         \Magento\Data\Form\FormKey $formKey,
         array $data = array()
@@ -79,6 +81,7 @@ class Head extends \Magento\Theme\Block\Html\Head
             $assetMergeService,
             $assetMinifyService,
             $localeResolver,
+            $jsTranslation,
             $data
         );
         $this->formKey = $formKey;
diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Fieldset.php b/app/code/Magento/Backend/Block/System/Config/Form/Fieldset.php
index dc3eadd1345af7869da74e96c53111bf2da8a969..a17a612e886c7bf09d74f5a87a236de651e3ac1b 100644
--- a/app/code/Magento/Backend/Block/System/Config/Form/Fieldset.php
+++ b/app/code/Magento/Backend/Block/System/Config/Form/Fieldset.php
@@ -38,20 +38,20 @@ class Fieldset extends \Magento\Backend\Block\AbstractBlock implements
     protected $_authSession;
 
     /**
-     * @var \Magento\Core\Helper\Js
+     * @var \Magento\View\Helper\Js
      */
     protected $_jsHelper;
 
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Backend\Model\Auth\Session $authSession
-     * @param \Magento\Core\Helper\Js $jsHelper
+     * @param \Magento\View\Helper\Js $jsHelper
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Backend\Model\Auth\Session $authSession,
-        \Magento\Core\Helper\Js $jsHelper,
+        \Magento\View\Helper\Js $jsHelper,
         array $data = array()
     ) {
         $this->_jsHelper = $jsHelper;
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 511570e512ff17bd70a046d000e19a8b708c0935..77ddff349216c3dbe1c24464972f03df049e0305 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
@@ -54,14 +54,14 @@ class DisableOutput extends \Magento\Backend\Block\System\Config\Form\Fieldset
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Backend\Model\Auth\Session $authSession
-     * @param \Magento\Core\Helper\Js $jsHelper
+     * @param \Magento\View\Helper\Js $jsHelper
      * @param \Magento\Module\ModuleListInterface $moduleList
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Backend\Model\Auth\Session $authSession,
-        \Magento\Core\Helper\Js $jsHelper,
+        \Magento\View\Helper\Js $jsHelper,
         \Magento\Module\ModuleListInterface $moduleList,
         array $data = array()
     ) {
diff --git a/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Category/Edit.php b/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Category/Edit.php
index e717417c2fcda3485c068bf35de1c0ed286a6c66..d3385a0ef03dfc0f60657c47f552bd066edf59ad 100644
--- a/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Category/Edit.php
+++ b/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Category/Edit.php
@@ -45,14 +45,14 @@ class Edit extends \Magento\Backend\Block\Urlrewrite\Edit
 
     /**
      * @param \Magento\Backend\Block\Template\Context $context
-     * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory
      * @param \Magento\Backend\Helper\Data $adminhtmlData
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
-        \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+        \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory,
         \Magento\Backend\Helper\Data $adminhtmlData,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
         array $data = array()
diff --git a/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Edit/Form.php b/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Edit/Form.php
index 1f56370777b5f023313b58ad4dee175b5a964d9a..bad9decfd39493203ced881d8f1be29218986bb7 100644
--- a/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Edit/Form.php
+++ b/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Edit/Form.php
@@ -64,9 +64,9 @@ class Form extends \Magento\Backend\Block\Urlrewrite\Edit\Form
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Registry $registry
      * @param \Magento\Data\FormFactory $formFactory
-     * @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory
-     * @param \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory
-     * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Backend\Helper\Data $adminhtmlData
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
@@ -80,9 +80,9 @@ class Form extends \Magento\Backend\Block\Urlrewrite\Edit\Form
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Registry $registry,
         \Magento\Data\FormFactory $formFactory,
-        \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory,
-        \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory,
-        \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+        \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory,
+        \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory,
+        \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory,
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Backend\Helper\Data $adminhtmlData,
         \Magento\Catalog\Model\ProductFactory $productFactory,
diff --git a/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Product/Edit.php b/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Product/Edit.php
index fa8ad22fb423e5b9149e990f7de2dc885021bb7b..17b2c6e4f44043cf8de891433e4256550851a2b0 100644
--- a/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Product/Edit.php
+++ b/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Product/Edit.php
@@ -53,7 +53,7 @@ class Edit extends \Magento\Backend\Block\Urlrewrite\Edit
 
     /**
      * @param \Magento\Backend\Block\Template\Context $context
-     * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory
      * @param \Magento\Backend\Helper\Data $adminhtmlData
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
@@ -61,7 +61,7 @@ class Edit extends \Magento\Backend\Block\Urlrewrite\Edit
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
-        \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+        \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory,
         \Magento\Backend\Helper\Data $adminhtmlData,
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
diff --git a/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit.php b/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit.php
index c50dd0040d613b0c4b524ed74b238df75a8ec035..2f12b6a972b5316c7a0c6ca821b80ac78dc9a9a5 100644
--- a/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit.php
+++ b/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit.php
@@ -44,14 +44,14 @@ class Edit extends \Magento\Backend\Block\Urlrewrite\Edit
 
     /**
      * @param \Magento\Backend\Block\Template\Context $context
-     * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory
      * @param \Magento\Backend\Helper\Data $adminhtmlData
      * @param \Magento\Cms\Model\PageFactory $pageFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
-        \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+        \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory,
         \Magento\Backend\Helper\Data $adminhtmlData,
         \Magento\Cms\Model\PageFactory $pageFactory,
         array $data = array()
diff --git a/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/Form.php b/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/Form.php
index 028afefefbf9402fcb25f7a850a93c7019fff3fe..657d747c53e8105870d1e27ab3441f0cb150c8de 100644
--- a/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/Form.php
+++ b/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/Form.php
@@ -57,9 +57,9 @@ class Form extends \Magento\Backend\Block\Urlrewrite\Edit\Form
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Registry $registry
      * @param \Magento\Data\FormFactory $formFactory
-     * @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory
-     * @param \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory
-     * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Backend\Helper\Data $adminhtmlData
      * @param \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory
@@ -72,9 +72,9 @@ class Form extends \Magento\Backend\Block\Urlrewrite\Edit\Form
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Registry $registry,
         \Magento\Data\FormFactory $formFactory,
-        \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory,
-        \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory,
-        \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+        \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory,
+        \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory,
+        \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory,
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Backend\Helper\Data $adminhtmlData,
         \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory,
diff --git a/app/code/Magento/Backend/Block/Urlrewrite/Edit.php b/app/code/Magento/Backend/Block/Urlrewrite/Edit.php
index 1a2d7bf68e3ccdec96bccb9fe7524426557f0b2a..dc397d549d860fd6f9773f27b135122f12fcf8c3 100644
--- a/app/code/Magento/Backend/Block/Urlrewrite/Edit.php
+++ b/app/code/Magento/Backend/Block/Urlrewrite/Edit.php
@@ -28,8 +28,8 @@ namespace Magento\Backend\Block\Urlrewrite;
 /**
  * Block for URL rewrites edit page
  *
- * @method \Magento\Core\Model\Url\Rewrite getUrlRewrite()
- * @method \Magento\Backend\Block\Urlrewrite\Edit setUrlRewrite(\Magento\Core\Model\Url\Rewrite $urlRewrite)
+ * @method \Magento\UrlRewrite\Model\UrlRewrite getUrlRewrite()
+ * @method \Magento\Backend\Block\Urlrewrite\Edit setUrlRewrite(\Magento\UrlRewrite\Model\UrlRewrite $urlRewrite)
  *
  * @category   Magento
  * @package    Magento_Adminhtml
@@ -64,19 +64,19 @@ class Edit extends \Magento\Backend\Block\Widget\Container
     protected $_adminhtmlData = null;
 
     /**
-     * @var \Magento\Core\Model\Url\RewriteFactory
+     * @var \Magento\UrlRewrite\Model\UrlRewriteFactory
      */
     protected $_rewriteFactory;
 
     /**
      * @param \Magento\Backend\Block\Template\Context $context
-     * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory
      * @param \Magento\Backend\Helper\Data $adminhtmlData
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
-        \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+        \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory,
         \Magento\Backend\Helper\Data $adminhtmlData,
         array $data = array()
     ) {
@@ -292,7 +292,7 @@ class Edit extends \Magento\Backend\Block\Widget\Container
     /**
      * Get or create new instance of URL rewrite
      *
-     * @return \Magento\Core\Model\Url\Rewrite
+     * @return \Magento\UrlRewrite\Model\UrlRewrite
      */
     protected function _getUrlRewrite()
     {
diff --git a/app/code/Magento/Backend/Block/Urlrewrite/Edit/Form.php b/app/code/Magento/Backend/Block/Urlrewrite/Edit/Form.php
index b1d3ad0615aa7461f1a9cee480bbe5006113374c..5c00e1e87b489831351541111f7d0fe82c5a982e 100644
--- a/app/code/Magento/Backend/Block/Urlrewrite/Edit/Form.php
+++ b/app/code/Magento/Backend/Block/Urlrewrite/Edit/Form.php
@@ -28,8 +28,8 @@ namespace Magento\Backend\Block\Urlrewrite\Edit;
 /**
  * URL rewrites edit form
  *
- * @method \Magento\Core\Model\Url\Rewrite getUrlRewrite()
- * @method \Magento\Backend\Block\Urlrewrite\Edit\Form setUrlRewrite(\Magento\Core\Model\Url\Rewrite $model)
+ * @method \Magento\UrlRewrite\Model\UrlRewrite getUrlRewrite()
+ * @method \Magento\Backend\Block\Urlrewrite\Edit\Form setUrlRewrite(\Magento\UrlRewrite\Model\UrlRewrite $model)
  *
  * @category   Magento
  * @package    Magento_Adminhtml
@@ -73,17 +73,17 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     protected $_systemStore;
 
     /**
-     * @var \Magento\Core\Model\Url\RewriteFactory
+     * @var \Magento\UrlRewrite\Model\UrlRewriteFactory
      */
     protected $_rewriteFactory;
 
     /**
-     * @var \Magento\Core\Model\Source\Urlrewrite\OptionsFactory
+     * @var \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory
      */
     protected $_optionFactory;
 
     /**
-     * @var \Magento\Core\Model\Source\Urlrewrite\TypesFactory
+     * @var \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory
      */
     protected $_typesFactory;
 
@@ -91,9 +91,9 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Registry $registry
      * @param \Magento\Data\FormFactory $formFactory
-     * @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory
-     * @param \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory
-     * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory
      * @param \Magento\Core\Model\System\Store $systemStore
      * @param \Magento\Backend\Helper\Data $adminhtmlData
      * @param array $data
@@ -104,9 +104,9 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Registry $registry,
         \Magento\Data\FormFactory $formFactory,
-        \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory,
-        \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory,
-        \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+        \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory,
+        \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory,
+        \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory,
         \Magento\Core\Model\System\Store $systemStore,
         \Magento\Backend\Helper\Data $adminhtmlData,
         array $data = array()
@@ -179,7 +179,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
 
         $fieldset = $form->addFieldset('base_fieldset', array('legend' => __('URL Rewrite Information')));
 
-        /** @var $typesModel \Magento\Core\Model\Source\Urlrewrite\Types */
+        /** @var $typesModel \Magento\UrlRewrite\Model\UrlRewrite\TypeProvider */
         $typesModel = $this->_typesFactory->create();
         $fieldset->addField(
             'is_system',
@@ -233,7 +233,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
             )
         );
 
-        /** @var $optionsModel \Magento\Core\Model\Source\Urlrewrite\Options */
+        /** @var $optionsModel \Magento\UrlRewrite\Model\UrlRewrite\OptionProvider */
         $optionsModel = $this->_optionFactory->create();
         $fieldset->addField(
             'options',
@@ -339,7 +339,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
     /**
      * Get URL rewrite model instance
      *
-     * @return \Magento\Core\Model\Url\Rewrite
+     * @return \Magento\UrlRewrite\Model\UrlRewrite
      */
     protected function _getModel()
     {
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Urlrewrite.php b/app/code/Magento/Backend/Controller/Adminhtml/Urlrewrite.php
index 3b9cf64c05bd4059fa671abeb485512afa44d776..34b14e41417a0d2f973c5174416ca0f3cb830737 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/Urlrewrite.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/Urlrewrite.php
@@ -29,7 +29,6 @@ use Magento\Backend\App\Action;
 use Magento\Catalog\Model\Category;
 use Magento\Catalog\Model\Product;
 use Magento\Model\Exception;
-use Magento\Core\Model\Url\Rewrite;
 
 /**
  * URL rewrite adminhtml controller
@@ -64,7 +63,7 @@ class Urlrewrite extends Action
     private $_cmsPage;
 
     /**
-     * @var Rewrite
+     * @var \Magento\UrlRewrite\Model\UrlRewrite
      */
     private $_urlRewrite;
 
@@ -223,12 +222,12 @@ class Urlrewrite extends Action
             $session = $this->_objectManager->get('Magento\Backend\Model\Session');
             try {
                 // set basic urlrewrite data
-                /** @var $model Rewrite */
+                /** @var $model \Magento\UrlRewrite\Model\UrlRewrite */
                 $model = $this->_getUrlRewrite();
 
                 // Validate request path
                 $requestPath = $this->getRequest()->getParam('request_path');
-                $this->_objectManager->get('Magento\Core\Helper\Url\Rewrite')->validateRequestPath($requestPath);
+                $this->_objectManager->get('Magento\UrlRewrite\Helper\UrlRewrite')->validateRequestPath($requestPath);
 
                 // Proceed and save request
                 $model->setIdPath(
@@ -274,7 +273,7 @@ class Urlrewrite extends Action
     /**
      * Call before save urlrewrite handlers
      *
-     * @param Rewrite $model
+     * @param \Magento\UrlRewrite\Model\UrlRewrite $model
      * @return void
      */
     protected function _onUrlRewriteSaveBefore($model)
@@ -286,7 +285,7 @@ class Urlrewrite extends Action
     /**
      * Call after save urlrewrite handlers
      *
-     * @param Rewrite $model
+     * @param \Magento\UrlRewrite\Model\UrlRewrite $model
      * @return void
      */
     protected function _onUrlRewriteSaveAfter($model)
@@ -297,7 +296,7 @@ class Urlrewrite extends Action
     /**
      * Override urlrewrite data, basing on current category and product
      *
-     * @param Rewrite $model
+     * @param \Magento\UrlRewrite\Model\UrlRewrite $model
      * @return void
      * @throws Exception
      */
@@ -314,10 +313,10 @@ class Urlrewrite extends Action
 
             // if redirect specified try to find friendly URL
             $generateTarget = true;
-            if ($this->_objectManager->get('Magento\Core\Helper\Url\Rewrite')->hasRedirectOptions($model)) {
+            if ($this->_objectManager->get('Magento\UrlRewrite\Helper\UrlRewrite')->hasRedirectOptions($model)) {
                 /** @var $rewriteResource \Magento\Catalog\Model\Resource\Url */
                 $rewriteResource = $this->_objectManager->create('Magento\Catalog\Model\Resource\Url');
-                /** @var $rewrite Rewrite */
+                /** @var $rewrite \Magento\UrlRewrite\Model\UrlRewrite */
                 $rewrite = $rewriteResource->getRewriteByIdPath($idPath, $model->getStoreId());
                 if (!$rewrite) {
                     if ($product) {
@@ -341,7 +340,7 @@ class Urlrewrite extends Action
     /**
      * Get product instance applicable for generatePath
      *
-     * @param Rewrite $model
+     * @param \Magento\UrlRewrite\Model\UrlRewrite $model
      * @return Product|null
      */
     private function _getInitializedProduct($model)
@@ -360,7 +359,7 @@ class Urlrewrite extends Action
     /**
      * Get category instance applicable for generatePath
      *
-     * @param Rewrite $model
+     * @param \Magento\UrlRewrite\Model\UrlRewrite $model
      * @return Category|null
      */
     private function _getInitializedCategory($model)
@@ -378,7 +377,7 @@ class Urlrewrite extends Action
     /**
      * Override URL rewrite data, basing on current CMS page
      *
-     * @param Rewrite $model
+     * @param \Magento\UrlRewrite\Model\UrlRewrite $model
      * @return void
      * @throws Exception
      */
@@ -397,10 +396,10 @@ class Urlrewrite extends Action
 
         // if redirect specified try to find friendly URL
         $generateTarget = true;
-        if ($this->_objectManager->get('Magento\Core\Helper\Url\Rewrite')->hasRedirectOptions($model)) {
+        if ($this->_objectManager->get('Magento\UrlRewrite\Helper\UrlRewrite')->hasRedirectOptions($model)) {
             /** @var $rewriteResource \Magento\Catalog\Model\Resource\Url */
             $rewriteResource = $this->_objectManager->create('Magento\Catalog\Model\Resource\Url');
-            /** @var $rewrite Rewrite */
+            /** @var $rewrite \Magento\UrlRewrite\Model\UrlRewrite */
             $rewrite = $rewriteResource->getRewriteByIdPath($idPath, $model->getStoreId());
             if (!$rewrite) {
                 throw new Exception(__('Chosen cms page does not associated with the chosen store.'));
@@ -418,7 +417,7 @@ class Urlrewrite extends Action
     /**
      * Save CMS page URL rewrite additional information
      *
-     * @param Rewrite $model
+     * @param \Magento\UrlRewrite\Model\UrlRewrite $model
      * @return void
      */
     private function _handleCmsPageUrlRewriteSave($model)
@@ -542,12 +541,12 @@ class Urlrewrite extends Action
     /**
      * Get URL rewrite from request
      *
-     * @return Rewrite
+     * @return \Magento\UrlRewrite\Model\UrlRewrite
      */
     private function _getUrlRewrite()
     {
         if (!$this->_urlRewrite) {
-            $this->_urlRewrite = $this->_objectManager->create('Magento\Core\Model\Url\Rewrite');
+            $this->_urlRewrite = $this->_objectManager->create('Magento\UrlRewrite\Model\UrlRewrite');
 
             $urlRewriteId = (int)$this->getRequest()->getParam('id', 0);
             if ($urlRewriteId) {
diff --git a/app/code/Magento/Backend/Helper/Js.php b/app/code/Magento/Backend/Helper/Js.php
index bfb8827585c22833cd0add14e0ec21e5a18eec58..299d27ed5ba0ce3f25056417cc0027e9d701d840 100644
--- a/app/code/Magento/Backend/Helper/Js.php
+++ b/app/code/Magento/Backend/Helper/Js.php
@@ -33,7 +33,7 @@
  */
 namespace Magento\Backend\Helper;
 
-class Js extends \Magento\Core\Helper\Js
+class Js
 {
     /**
      * Decode serialized grid data
diff --git a/app/code/Magento/Backend/Helper/Media/Js.php b/app/code/Magento/Backend/Helper/Media/Js.php
deleted file mode 100644
index 639f00639faf9f826ea0cbe3775b4b59a1540693..0000000000000000000000000000000000000000
--- a/app/code/Magento/Backend/Helper/Media/Js.php
+++ /dev/null
@@ -1,61 +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_Adminhtml
- * @copyright   Copyright (c) 2014 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\Media;
-
-/**
- * Media library js helper
- *
- * @deprecated since 1.7.0.0
- * @category   Magento
- * @package    Magento_Adminhtml
- * @author     Magento Core Team <core@magentocommerce.com>
- */
-class Js extends \Magento\Core\Helper\Js
-{
-    /**
-     * {@inheritdoc}
-     */
-    protected function _populateTranslateData()
-    {
-        $this->_addTranslation('Complete', __('Complete'));
-        $this->_addTranslation(
-            'The file size should be more than 0 bytes.',
-            __('The file size should be more than 0 bytes.')
-        );
-        $this->_addTranslation('Upload Security Error', __('Upload Security Error'));
-        $this->_addTranslation('Upload HTTP Error', __('Upload HTTP Error'));
-        $this->_addTranslation('Upload I/O Error', __('Upload I/O Error'));
-        $this->_addTranslation(
-            'SSL Error: Invalid or self-signed certificate',
-            __('SSL Error: Invalid or self-signed certificate')
-        );
-        $this->_addTranslation('Tb', __('Tb'));
-        $this->_addTranslation('Gb', __('Gb'));
-        $this->_addTranslation('Mb', __('Mb'));
-        $this->_addTranslation('Kb', __('Kb'));
-        $this->_addTranslation('b', __('b'));
-    }
-}
diff --git a/app/code/Magento/Backend/Model/Config.php b/app/code/Magento/Backend/Model/Config.php
index c9f44d9dccbec293f5b6849997b66aa53e9e70b6..75cb407b5a497528654493f5e1ed8773b26b2df9 100644
--- a/app/code/Magento/Backend/Model/Config.php
+++ b/app/code/Magento/Backend/Model/Config.php
@@ -59,7 +59,7 @@ class Config extends \Magento\Object
     /**
      * Application config
      *
-     * @var \Magento\App\ConfigInterface
+     * @var \Magento\App\ReinitableConfigInterface
      */
     protected $_appConfig;
 
@@ -97,7 +97,7 @@ class Config extends \Magento\Object
     protected $_storeManager;
 
     /**
-     * @param \Magento\App\ConfigInterface $config
+     * @param \Magento\App\ReinitableConfigInterface $config
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Backend\Model\Config\Structure $configStructure
      * @param \Magento\DB\TransactionFactory $transactionFactory
@@ -107,7 +107,7 @@ class Config extends \Magento\Object
      * @param array $data
      */
     public function __construct(
-        \Magento\App\ConfigInterface $config,
+        \Magento\App\ReinitableConfigInterface $config,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Backend\Model\Config\Structure $configStructure,
         \Magento\DB\TransactionFactory $transactionFactory,
@@ -172,7 +172,7 @@ class Config extends \Magento\Object
             $saveTransaction->save();
 
             // re-init configuration
-            $this->_eventManager->dispatch('application_process_reinit_config');
+            $this->_appConfig->reinit();
             $this->_storeManager->reinitStores();
 
             // website and store codes can be used in event implementation, so set them as well
@@ -182,7 +182,7 @@ class Config extends \Magento\Object
             );
         } catch (\Exception $e) {
             // re-init configuration
-            $this->_eventManager->dispatch('application_process_reinit_config');
+            $this->_appConfig->reinit();
             $this->_storeManager->reinitStores();
             throw $e;
         }
diff --git a/app/code/Magento/Core/Model/Layout/Filter/Acl.php b/app/code/Magento/Backend/Model/Layout/Filter/Acl.php
similarity index 97%
rename from app/code/Magento/Core/Model/Layout/Filter/Acl.php
rename to app/code/Magento/Backend/Model/Layout/Filter/Acl.php
index bc9f68d53fc5f69e6e4b2f3be563b84720e5dc37..7959498de69cec90ff7eda9d70f8e586b1b7c752 100644
--- a/app/code/Magento/Core/Model/Layout/Filter/Acl.php
+++ b/app/code/Magento/Backend/Model/Layout/Filter/Acl.php
@@ -23,7 +23,7 @@
  * @copyright Copyright (c) 2014 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\Layout\Filter;
+namespace Magento\Backend\Model\Layout\Filter;
 
 class Acl
 {
diff --git a/app/code/Magento/Backend/Model/Url.php b/app/code/Magento/Backend/Model/Url.php
index 26fa44a8f6fd9bce9c8311957496fa16ba42e6f9..b431163ce857b8d97bd3ade4f63b65743a1938dd 100644
--- a/app/code/Magento/Backend/Model/Url.php
+++ b/app/code/Magento/Backend/Model/Url.php
@@ -101,6 +101,11 @@ class Url extends \Magento\Url implements \Magento\Backend\Model\UrlInterface
      */
     protected $formKey;
 
+    /**
+     * @var \Magento\Core\Model\Store
+     */
+    protected $_scope;
+
     /**
      * @param \Magento\App\Route\ConfigInterface $routeConfig
      * @param \Magento\App\RequestInterface $request
@@ -427,12 +432,15 @@ class Url extends \Magento\Url implements \Magento\Backend\Model\UrlInterface
      */
     protected function _getScope()
     {
-        return $this->_storeFactory->create(
-            array(
-                'url' => $this,
-                'data' => array('code' => 'admin', 'force_disable_rewrites' => true, 'disable_store_in_url' => true)
-            )
-        );
+        if (!$this->_scope) {
+            $this->_scope = $this->_storeFactory->create(
+                array(
+                    'url' => $this,
+                    'data' => array('code' => 'admin', 'force_disable_rewrites' => true, 'disable_store_in_url' => true)
+                )
+            );
+        }
+        return $this->_scope;
     }
 
     /**
diff --git a/app/code/Magento/Backend/Model/View.php b/app/code/Magento/Backend/Model/View.php
index 2b59c4be35e87e205b7c5f79ae42300337841a16..cded557c95df8d069a355952293e83013f45c32f 100644
--- a/app/code/Magento/Backend/Model/View.php
+++ b/app/code/Magento/Backend/Model/View.php
@@ -26,7 +26,7 @@ namespace Magento\Backend\Model;
 class View extends \Magento\App\View
 {
     /**
-     * @var \Magento\Core\Model\Layout\Filter\Acl
+     * @var Layout\Filter\Acl
      */
     protected $_aclFilter;
 
@@ -38,7 +38,7 @@ class View extends \Magento\App\View
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Translate\InlineInterface $translateInline
      * @param \Magento\App\ActionFlag $actionFlag
-     * @param \Magento\Core\Model\Layout\Filter\Acl $aclFilter
+     * @param Layout\Filter\Acl $aclFilter
      */
     public function __construct(
         \Magento\View\LayoutInterface $layout,
@@ -48,7 +48,7 @@ class View extends \Magento\App\View
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Translate\InlineInterface $translateInline,
         \Magento\App\ActionFlag $actionFlag,
-        \Magento\Core\Model\Layout\Filter\Acl $aclFilter
+        Layout\Filter\Acl $aclFilter
     ) {
         $this->_aclFilter = $aclFilter;
         parent::__construct($layout, $request, $response, $configScope, $eventManager, $translateInline, $actionFlag);
diff --git a/app/code/Magento/Backend/etc/adminhtml/di.xml b/app/code/Magento/Backend/etc/adminhtml/di.xml
index 97a4d138a58d94fb5b77725ce5ae566c5897af5d..1efa27a99d571652417a91ac33b668eb9decd645 100644
--- a/app/code/Magento/Backend/etc/adminhtml/di.xml
+++ b/app/code/Magento/Backend/etc/adminhtml/di.xml
@@ -94,12 +94,12 @@
         <arguments>
             <argument name="routerList" xsi:type="array">
                 <item name="admin" xsi:type="array">
-                    <item name="instance" xsi:type="string">Magento\Backend\App\Router\DefaultRouter</item>
+                    <item name="class" xsi:type="string">Magento\Backend\App\Router\DefaultRouter</item>
                     <item name="disable" xsi:type="boolean">false</item>
                     <item name="sortOrder" xsi:type="string">10</item>
                 </item>
                 <item name="default" xsi:type="array">
-                    <item name="instance" xsi:type="string">Magento\App\Router\DefaultRouter</item>
+                    <item name="class" xsi:type="string">Magento\App\Router\DefaultRouter</item>
                     <item name="disable" xsi:type="boolean">false</item>
                     <item name="sortOrder" xsi:type="string">100</item>
                 </item>
diff --git a/app/code/Magento/Backend/etc/di.xml b/app/code/Magento/Backend/etc/di.xml
index c4cf726d2ac214b0dcd52d1606273d009360cce3..8dd99014def25260517f61945ccae5c5fe98f0c9 100644
--- a/app/code/Magento/Backend/etc/di.xml
+++ b/app/code/Magento/Backend/etc/di.xml
@@ -74,7 +74,7 @@
         <arguments>
             <argument name="handlerClassesList" xsi:type="array">
                 <item name="backend" xsi:type="array">
-                    <item name="instance" xsi:type="string">Magento\Backend\App\Router\NoRouteHandler</item>
+                    <item name="class" xsi:type="string">Magento\Backend\App\Router\NoRouteHandler</item>
                     <item name="sortOrder" xsi:type="string">10</item>
                 </item>
             </argument>
diff --git a/app/code/Magento/Backend/etc/module.xml b/app/code/Magento/Backend/etc/module.xml
index 5b6f60290c1dc794a95eabb3b027ddddd9c939e3..26702f8307909f3c40faa161a215a034651b6d2c 100644
--- a/app/code/Magento/Backend/etc/module.xml
+++ b/app/code/Magento/Backend/etc/module.xml
@@ -48,6 +48,8 @@
             <module name="Magento_Customer"/>
             <module name="Magento_Tax"/>
             <module name="Magento_Checkout"/>
+            <module name="Magento_UrlRewrite"/>
+            <module name="Magento_Translation"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_urlrewrite_index.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_urlrewrite_index.xml
index 1f3c72254099c46e6a7696126354aafa17421ece..d710505fa24ad6a163d42cb13f70b51d4d7a1faa 100644
--- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_urlrewrite_index.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_urlrewrite_index.xml
@@ -29,7 +29,7 @@
             <block class="Magento\Backend\Block\Widget\Grid" name="adminhtml.block.urlrewrite.grid" as="grid">
                 <arguments>
                     <argument name="id" xsi:type="string">urlrewriteGrid</argument>
-                    <argument name="dataSource" xsi:type="object">Magento\Core\Model\Resource\Url\Rewrite\Collection</argument>
+                    <argument name="dataSource" xsi:type="object">Magento\UrlRewrite\Model\Resource\UrlRewrite\Collection</argument>
                     <argument name="default_sort" xsi:type="string">url_rewrite_id</argument>
                 </arguments>
                 <block class="Magento\Backend\Block\Widget\Grid\ColumnSet" as="grid.columnSet" name="adminhtml.urlrewrite.grid.columnSet">
diff --git a/app/code/Magento/Backend/view/adminhtml/page/head.phtml b/app/code/Magento/Backend/view/adminhtml/page/head.phtml
index 40d98d69b8f538f348d1f75085a772b2ca31b599..b91be770ceeb9238720a0622055b7648a7ce7714 100644
--- a/app/code/Magento/Backend/view/adminhtml/page/head.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/page/head.phtml
@@ -60,4 +60,4 @@
 <?php echo $this->getChildHtml('components'); ?>
 <?php echo $this->getChildHtml('calendar'); ?>
 <?php echo $this->getChildHtml('optional_zip_countries'); ?>
-<?php echo $this->helper('Magento\Core\Helper\Js')->getTranslatorScript() ?>
+<?php echo $this->getTranslatorScript(); ?>
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Update/Result.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Update/Result.php
index 16ebdc3f6c71633b2b4219ef6431ffcd0368b116..c43d7393ffa112c604c08e3ae872e7661f722c4a 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Update/Result.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Update/Result.php
@@ -38,11 +38,9 @@ namespace Magento\Catalog\Block\Adminhtml\Product\Composite\Update;
 class Result extends \Magento\View\Element\Template
 {
     /**
-     * Adminhtml js
-     *
-     * @var \Magento\Backend\Helper\Js
+     * @var \Magento\View\Helper\Js
      */
-    protected $_adminhtmlJs = null;
+    protected $_jsHelper = null;
 
     /**
      * Core registry
@@ -59,19 +57,19 @@ class Result extends \Magento\View\Element\Template
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Json\EncoderInterface $jsonEncoder
-     * @param \Magento\Backend\Helper\Js $adminhtmlJs
+     * @param \Magento\View\Helper\Js $jsHelper
      * @param \Magento\Registry $registry
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Json\EncoderInterface $jsonEncoder,
-        \Magento\Backend\Helper\Js $adminhtmlJs,
+        \Magento\View\Helper\Js $jsHelper,
         \Magento\Registry $registry,
         array $data = array()
     ) {
         $this->_jsonEncoder = $jsonEncoder;
-        $this->_adminhtmlJs = $adminhtmlJs;
+        $this->_jsHelper = $jsHelper;
         $this->_coreRegistry = $registry;
         parent::__construct($context, $data);
     }
@@ -86,6 +84,6 @@ class Result extends \Magento\View\Element\Template
         $updateResult = $this->_coreRegistry->registry('composite_update_result');
         $resultJson = $this->_jsonEncoder->encode($updateResult);
         $jsVarname = $updateResult->getJsVarName();
-        return $this->_adminhtmlJs->getScript(sprintf('var %s = %s', $jsVarname, $resultJson));
+        return $this->_jsHelper->getScript(sprintf('var %s = %s', $jsVarname, $resultJson));
     }
 }
diff --git a/app/code/Magento/Catalog/Block/Category/Widget/Link.php b/app/code/Magento/Catalog/Block/Category/Widget/Link.php
index fa341afde02a1a42f2e6c7bc3728c8c42fe8929f..b115191636f5a4cde6edca01acb6e386e426d22f 100644
--- a/app/code/Magento/Catalog/Block/Category/Widget/Link.php
+++ b/app/code/Magento/Catalog/Block/Category/Widget/Link.php
@@ -37,13 +37,13 @@ class Link extends \Magento\Catalog\Block\Widget\Link
 {
     /**
      * @param \Magento\View\Element\Template\Context $context
-     * @param \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite
+     * @param \Magento\UrlRewrite\Model\Resource\UrlRewrite $urlRewrite
      * @param \Magento\Catalog\Model\Resource\Category $resourceCategory
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
-        \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite,
+        \Magento\UrlRewrite\Model\Resource\UrlRewrite $urlRewrite,
         \Magento\Catalog\Model\Resource\Category $resourceCategory,
         array $data = array()
     ) {
diff --git a/app/code/Magento/Catalog/Block/Product/ListProduct.php b/app/code/Magento/Catalog/Block/Product/ListProduct.php
index 4788cf3208c5b775ede2d9bfc5a6201df250bfdb..b45779ebadf01fa3e997b999d1e03c7ad8b74511 100644
--- a/app/code/Magento/Catalog/Block/Product/ListProduct.php
+++ b/app/code/Magento/Catalog/Block/Product/ListProduct.php
@@ -68,8 +68,14 @@ class ListProduct extends \Magento\Catalog\Block\Product\AbstractProduct impleme
      */
     protected $_categoryFactory;
 
+    /**
+     * @var \Magento\Core\Helper\PostData
+     */
+    protected $_postDataHelper;
+    
     /**
      * @param Context $context
+     * @param \Magento\Core\Helper\PostData $postDataHelper
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
      * @param \Magento\Catalog\Model\Layer $catalogLayer
      * @param array $data
@@ -77,6 +83,7 @@ class ListProduct extends \Magento\Catalog\Block\Product\AbstractProduct impleme
      */
     public function __construct(
         \Magento\Catalog\Block\Product\Context $context,
+        \Magento\Core\Helper\PostData $postDataHelper,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
         \Magento\Catalog\Model\Layer $catalogLayer,
         array $data = array(),
@@ -84,6 +91,7 @@ class ListProduct extends \Magento\Catalog\Block\Product\AbstractProduct impleme
     ) {
         $this->_categoryFactory = $categoryFactory;
         $this->_catalogLayer = $catalogLayer;
+        $this->_postDataHelper = $postDataHelper;
         parent::__construct(
             $context,
             $data,
@@ -332,4 +340,20 @@ class ListProduct extends \Magento\Catalog\Block\Product\AbstractProduct impleme
         }
         return array_merge($this->getLayer()->getCurrentCategory()->getIdentities(), $identities);
     }
+
+    /**
+     * Get post parameters
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @return string
+     */
+    public function getAddToCartPostParams(\Magento\Catalog\Model\Product $product)
+    {
+        $url = $this->getAddToCartUrl($product);
+        $data = [
+            'product' => $product->getEntityId(),
+            \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->_postDataHelper->getEncodedUrl($url)
+        ];
+        return $this->_postDataHelper->getPostData($url, $data);
+    }
 }
diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php b/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php
index 7a1691fae5e9fe78f1cb9ba15d08ec64e422fef2..72b6d870be9337710ce438f62f235553f0bda14f 100644
--- a/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php
+++ b/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php
@@ -46,6 +46,7 @@ class Promotion extends \Magento\Catalog\Block\Product\ListProduct
 
     /**
      * @param \Magento\Catalog\Block\Product\Context $context
+     * @param \Magento\Core\Helper\PostData $postDataHelper
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
      * @param \Magento\Catalog\Model\Layer\Category $catalogLayer
      * @param \Magento\Catalog\Model\LayerFactory $layerFactory
@@ -55,6 +56,7 @@ class Promotion extends \Magento\Catalog\Block\Product\ListProduct
      */
     public function __construct(
         \Magento\Catalog\Block\Product\Context $context,
+        \Magento\Core\Helper\PostData $postDataHelper,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
         \Magento\Catalog\Model\Layer\Category $catalogLayer,
         \Magento\Catalog\Model\LayerFactory $layerFactory,
@@ -66,6 +68,7 @@ class Promotion extends \Magento\Catalog\Block\Product\ListProduct
         $this->_productCollectionFactory = $productCollectionFactory;
         parent::__construct(
             $context,
+            $postDataHelper,
             $categoryFactory,
             $catalogLayer,
             $data,
diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Random.php b/app/code/Magento/Catalog/Block/Product/ProductList/Random.php
index bd6263e11fabaca8e8ff61511d9b2253353fc8c8..0f953016224d9b8732bb4aea83c642ceaa129593 100644
--- a/app/code/Magento/Catalog/Block/Product/ProductList/Random.php
+++ b/app/code/Magento/Catalog/Block/Product/ProductList/Random.php
@@ -48,6 +48,7 @@ class Random extends \Magento\Catalog\Block\Product\ListProduct
 
     /**
      * @param \Magento\Catalog\Block\Product\Context $context
+     * @param \Magento\Core\Helper\PostData $postDataHelper
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
      * @param \Magento\Catalog\Model\Layer\Category $catalogLayer
      * @param \Magento\Catalog\Model\LayerFactory $layerFactory
@@ -57,6 +58,7 @@ class Random extends \Magento\Catalog\Block\Product\ListProduct
      */
     public function __construct(
         \Magento\Catalog\Block\Product\Context $context,
+        \Magento\Core\Helper\PostData $postDataHelper,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
         \Magento\Catalog\Model\Layer\Category $catalogLayer,
         \Magento\Catalog\Model\LayerFactory $layerFactory,
@@ -68,6 +70,7 @@ class Random extends \Magento\Catalog\Block\Product\ListProduct
         $this->_productCollectionFactory = $productCollectionFactory;
         parent::__construct(
             $context,
+            $postDataHelper,
             $categoryFactory,
             $catalogLayer,
             $data,
diff --git a/app/code/Magento/Catalog/Block/Product/Widget/Link.php b/app/code/Magento/Catalog/Block/Product/Widget/Link.php
index c29f71ffdf16cff94ff767418e8e3f9184b86acd..7d0e2c81d98ab00dcead05ef01398fbb2f7c96e2 100644
--- a/app/code/Magento/Catalog/Block/Product/Widget/Link.php
+++ b/app/code/Magento/Catalog/Block/Product/Widget/Link.php
@@ -37,13 +37,13 @@ class Link extends \Magento\Catalog\Block\Widget\Link
 {
     /**
      * @param \Magento\View\Element\Template\Context $context
-     * @param \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite
+     * @param \Magento\UrlRewrite\Model\Resource\UrlRewrite $urlRewrite
      * @param \Magento\Catalog\Model\Resource\Product $catalogProduct
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
-        \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite,
+        \Magento\UrlRewrite\Model\Resource\UrlRewrite $urlRewrite,
         \Magento\Catalog\Model\Resource\Product $catalogProduct,
         array $data = array()
     ) {
diff --git a/app/code/Magento/Catalog/Block/Widget/Link.php b/app/code/Magento/Catalog/Block/Widget/Link.php
index bc9e505c04dcb0ad7b4555c80bc7d20afd3b004f..6ae1edb11ca4fa9d0abfa27310e5eaf4c2c320c0 100644
--- a/app/code/Magento/Catalog/Block/Widget/Link.php
+++ b/app/code/Magento/Catalog/Block/Widget/Link.php
@@ -58,18 +58,18 @@ class Link extends \Magento\View\Element\Html\Link implements \Magento\Widget\Bl
     /**
      * Url rewrite
      *
-     * @var \Magento\Core\Model\Resource\Url\Rewrite
+     * @var \Magento\UrlRewrite\Model\Resource\UrlRewrite
      */
     protected $_urlRewrite;
 
     /**
      * @param \Magento\View\Element\Template\Context $context
-     * @param \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite
+     * @param \Magento\UrlRewrite\Model\Resource\UrlRewrite $urlRewrite
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
-        \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite,
+        \Magento\UrlRewrite\Model\Resource\UrlRewrite $urlRewrite,
         array $data = array()
     ) {
         $this->_urlRewrite = $urlRewrite;
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php
index 29330668227976b03b2a0a0233f77035146536c7..f3ae7d5a42c9791ccdfe844240fdc73166b2ebef 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php
@@ -30,11 +30,6 @@ class Helper
      */
     protected $request;
 
-    /**
-     * @var \Magento\Backend\Helper\Js
-     */
-    protected $jsHelper;
-
     /**
      * @var \Magento\Core\Model\StoreManagerInterface
      */
@@ -52,20 +47,17 @@ class Helper
 
     /**
      * @param \Magento\App\RequestInterface $request
-     * @param \Magento\Backend\Helper\Js $jsHelper
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param StockDataFilter $stockFilter
      * @param Helper\ProductLinks $productLinks
      */
     public function __construct(
         \Magento\App\RequestInterface $request,
-        \Magento\Backend\Helper\Js $jsHelper,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         StockDataFilter $stockFilter,
         Helper\ProductLinks $productLinks
     ) {
         $this->request = $request;
-        $this->jsHelper = $jsHelper;
         $this->storeManager = $storeManager;
         $this->stockFilter = $stockFilter;
         $this->productLinks = $productLinks;
diff --git a/app/code/Magento/Catalog/Controller/Product.php b/app/code/Magento/Catalog/Controller/Product.php
index 5e04dcf3acce46dbff53f76724d42fc2907527c5..2121c09e01165d61dd895310e526c09da78fa113 100644
--- a/app/code/Magento/Catalog/Controller/Product.php
+++ b/app/code/Magento/Catalog/Controller/Product.php
@@ -57,6 +57,12 @@ class Product extends \Magento\App\Action\Action implements \Magento\Catalog\Con
         return $this;
     }
 
+    /**
+     * Product view action
+     *
+     * @return void
+     */
+
     /**
      * Product view action
      *
@@ -69,6 +75,19 @@ class Product extends \Magento\App\Action\Action implements \Magento\Catalog\Con
         $productId = (int)$this->getRequest()->getParam('id');
         $specifyOptions = $this->getRequest()->getParam('options');
 
+        if ($this->getRequest()->isPost() && $this->getRequest()->getParam(self::PARAM_NAME_URL_ENCODED)) {
+            if ($specifyOptions) {
+                $product = $this->_initProduct();
+                if (!$product) {
+                    $this->noProductRedirect();
+                }
+                $notice = $product->getTypeInstance()->getSpecifyOptionMessage();
+                $this->messageManager->addNotice($notice);
+                $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl());
+            }
+            return;
+        }
+
         // Prepare helper and params
         /** @var \Magento\Catalog\Helper\Product\View $viewHelper */
         $viewHelper = $this->_objectManager->get('Magento\Catalog\Helper\Product\View');
@@ -82,11 +101,7 @@ class Product extends \Magento\App\Action\Action implements \Magento\Catalog\Con
             $viewHelper->prepareAndRender($productId, $this, $params);
         } catch (\Exception $e) {
             if ($e->getCode() == $viewHelper->ERR_NO_PRODUCT_LOADED) {
-                if (isset($_GET['store']) && !$this->getResponse()->isRedirect()) {
-                    $this->_redirect('');
-                } elseif (!$this->getResponse()->isRedirect()) {
-                    $this->_forward('noroute');
-                }
+                $this->noProductRedirect();
             } else {
                 $this->_objectManager->get('Magento\Logger')->logException($e);
                 $this->_forward('noroute');
@@ -112,4 +127,18 @@ class Product extends \Magento\App\Action\Action implements \Magento\Catalog\Con
         $this->_view->loadLayout();
         $this->_view->renderLayout();
     }
+
+    /**
+     * Redirect if product failed to load
+     *
+     * @return void
+     */
+    protected function noProductRedirect()
+    {
+        if (isset($_GET['store']) && !$this->getResponse()->isRedirect()) {
+            $this->_redirect('');
+        } elseif (!$this->getResponse()->isRedirect()) {
+            $this->_forward('noroute');
+        }
+    }
 }
diff --git a/app/code/Magento/Catalog/Helper/Product/View.php b/app/code/Magento/Catalog/Helper/Product/View.php
index bf67df6afe088fa686f4e9da5d004d2e54f2c17a..9f4f3b803409fea185c840caf63c0035c73d2bd0 100644
--- a/app/code/Magento/Catalog/Helper/Product/View.php
+++ b/app/code/Magento/Catalog/Helper/Product/View.php
@@ -247,11 +247,6 @@ class View extends \Magento\App\Helper\AbstractHelper
 
         $this->_eventManager->dispatch('catalog_controller_product_view', array('product' => $product));
 
-        if ($params->getSpecifyOptions()) {
-            $notice = $product->getTypeInstance()->getSpecifyOptionMessage();
-            $this->messageManager->addNotice($notice);
-        }
-
         $this->_catalogSession->setLastViewedProductId($product->getId());
 
         $this->initProductLayout($product, $controller, $params);
diff --git a/app/code/Magento/Catalog/Model/Category.php b/app/code/Magento/Catalog/Model/Category.php
index 098d00de30042b200c5bac79ff6800aafcfb185f..bfc2b01f8088d31912e6f87d15c89321be0599c4 100644
--- a/app/code/Magento/Catalog/Model/Category.php
+++ b/app/code/Magento/Catalog/Model/Category.php
@@ -87,7 +87,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements \Magento\
     /**
      * URL rewrite model
      *
-     * @var \Magento\Core\Model\Url\Rewrite
+     * @var \Magento\UrlRewrite\Model\UrlRewrite
      */
     protected $_urlRewrite;
 
@@ -150,7 +150,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements \Magento\
     /**
      * Url rewrite factory
      *
-     * @var \Magento\Core\Model\Url\RewriteFactory
+     * @var \Magento\UrlRewrite\Model\UrlRewriteFactory
      */
     protected $_urlRewriteFactory;
 
@@ -195,7 +195,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements \Magento\
      * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTreeResource
      * @param \Magento\Catalog\Model\Resource\Category\TreeFactory $categoryTreeFactory
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
-     * @param \Magento\Core\Model\Url\RewriteFactory $urlRewriteFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $urlRewriteFactory
      * @param \Magento\Core\Model\Resource\Store\CollectionFactory $storeCollectionFactory
      * @param \Magento\UrlInterface $url
      * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
@@ -216,7 +216,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements \Magento\
         \Magento\Catalog\Model\Resource\Category\Tree $categoryTreeResource,
         \Magento\Catalog\Model\Resource\Category\TreeFactory $categoryTreeFactory,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
-        \Magento\Core\Model\Url\RewriteFactory $urlRewriteFactory,
+        \Magento\UrlRewrite\Model\UrlRewriteFactory $urlRewriteFactory,
         \Magento\Core\Model\Resource\Store\CollectionFactory $storeCollectionFactory,
         \Magento\UrlInterface $url,
         \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory,
@@ -301,7 +301,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements \Magento\
     /**
      * Get url rewrite model
      *
-     * @return \Magento\Core\Model\Url\Rewrite
+     * @return \Magento\UrlRewrite\Model\UrlRewrite
      */
     public function getUrlRewrite()
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Url.php b/app/code/Magento/Catalog/Model/Product/Url.php
index 90f2a85d9f2cfa02751d573fa4ed917b03fe869b..450bb15e7d051fba0f3af48cfd8c250ec5a93c13 100644
--- a/app/code/Magento/Catalog/Model/Product/Url.php
+++ b/app/code/Magento/Catalog/Model/Product/Url.php
@@ -48,7 +48,7 @@ class Url extends \Magento\Object
     /**
      * Static URL Rewrite Instance
      *
-     * @var \Magento\Core\Model\Url\Rewrite
+     * @var \Magento\UrlRewrite\Model\UrlRewrite
      */
     protected $_urlRewrite;
 
@@ -79,7 +79,7 @@ class Url extends \Magento\Object
     /**
      * Construct
      *
-     * @param \Magento\Core\Model\Url\RewriteFactory $urlRewriteFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $urlRewriteFactory
      * @param \Magento\UrlInterface $url
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Helper\Category $catalogCategory
@@ -88,7 +88,7 @@ class Url extends \Magento\Object
      * @param array $data
      */
     public function __construct(
-        \Magento\Core\Model\Url\RewriteFactory $urlRewriteFactory,
+        \Magento\UrlRewrite\Model\UrlRewriteFactory $urlRewriteFactory,
         \Magento\UrlInterface $url,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Helper\Category $catalogCategory,
@@ -118,7 +118,7 @@ class Url extends \Magento\Object
     /**
      * Retrieve URL Rewrite Instance
      *
-     * @return \Magento\Core\Model\Url\Rewrite
+     * @return \Magento\UrlRewrite\Model\UrlRewrite
      */
     public function getUrlRewrite()
     {
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php
index aa09cb3ea8785e3378456d2b3adf0981bab4133f..7296897d6fad3fac1757049949d9222ccb9c5924 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php
@@ -1224,7 +1224,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl
             'core_url_rewrite',
             'entity_id=entity_id',
             array('request_path'),
-            '{{table}}.type = ' . \Magento\Core\Model\Url\Rewrite::TYPE_PRODUCT,
+            '{{table}}.type = ' . \Magento\UrlRewrite\Model\UrlRewrite::TYPE_PRODUCT,
             'left'
         );
 
diff --git a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php
index 79337d55bed236038d38971112323a71cdc5ce35..e1f976875b9e12bcbc8eefa2d0ede9e9c3643899 100644
--- a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php
+++ b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php
@@ -34,7 +34,7 @@ class Suffix extends \Magento\Core\Model\Config\Value
     /**
      * Core url rewrite
      *
-     * @var \Magento\Core\Helper\Url\Rewrite
+     * @var \Magento\UrlRewrite\Helper\UrlRewrite
      */
     protected $_coreUrlRewrite = null;
 
@@ -43,7 +43,7 @@ class Suffix extends \Magento\Core\Model\Config\Value
      * @param \Magento\Registry $registry
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\App\ConfigInterface $config
-     * @param \Magento\Core\Helper\Url\Rewrite $coreUrlRewrite
+     * @param \Magento\UrlRewrite\Helper\UrlRewrite $coreUrlRewrite
      * @param \Magento\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -53,7 +53,7 @@ class Suffix extends \Magento\Core\Model\Config\Value
         \Magento\Registry $registry,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\App\ConfigInterface $config,
-        \Magento\Core\Helper\Url\Rewrite $coreUrlRewrite,
+        \Magento\UrlRewrite\Helper\UrlRewrite $coreUrlRewrite,
         \Magento\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
diff --git a/app/code/Magento/Catalog/etc/module.xml b/app/code/Magento/Catalog/etc/module.xml
index 7fd7dcedb6ba1529b6e2c3fee392bb87f696b7b8..0c029453dbc5bb60eb2e14aca314b460a01ffbd2 100644
--- a/app/code/Magento/Catalog/etc/module.xml
+++ b/app/code/Magento/Catalog/etc/module.xml
@@ -55,6 +55,7 @@
             <module name="Magento_CatalogSearch"/>
             <module name="Magento_Weee"/>
             <module name="Magento_ProductAlert"/>
+            <module name="Magento_UrlRewrite"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Catalog/view/frontend/js/msrp.js b/app/code/Magento/Catalog/view/frontend/js/msrp.js
index b2e34bbf4dce5aa7f70e8d5251aa834d225ceaaf..893a4db0be24725310cb1bc23ad1a3e41c031ca8 100644
--- a/app/code/Magento/Catalog/view/frontend/js/msrp.js
+++ b/app/code/Magento/Catalog/view/frontend/js/msrp.js
@@ -27,15 +27,16 @@
 (function($) {
     $.widget('mage.addToCart', {
         options: {
-            showAddToCart: true
+            showAddToCart: true,
+            cartForm: '.form.map.checkout'
         },
 
         _create: function() {
-            $(document).on('click', this.options.cartButtonId, $.proxy(function() {
+            $(this.options.cartButtonId).on('click', $.proxy(function() {
                 this._addToCartSubmit();
             }, this));
 
-            $(document).on('click', this.options.popupId, $.proxy(function(e) {
+            $(this.options.popupId).on('click', $.proxy(function(e) {
                 if (this.options.submitUrl) {
                     location.href = this.options.submitUrl;
                 } else {
@@ -60,7 +61,7 @@
                 }
             }, this));
 
-            $(document).on('click', this.options.helpLinkId, $.proxy(function(e) {
+            $(this.options.helpLinkId).on('click', $.proxy(function(e) {
                 $('#map-popup-heading').text(this.options.productName);
                 var width = $('#map-popup').width();
                 var offsetX = e.pageX - (width / 2) + "px";
@@ -71,7 +72,7 @@
                 return false;
             }, this));
 
-            $(document).on('click', $.proxy(function() {
+            $(this.options.closeButtonId).on('click', $.proxy(function() {
                 $('#map-popup').removeClass('active').hide();
                 return false;
             }, this));
@@ -81,16 +82,9 @@
         _addToCartSubmit: function() {
             this.element.trigger('addToCart', this.element);
             if (this.options.addToCartUrl) {
-                $('#map-popup').hide();
-                if (opener) {
-                    opener.location.href = this.options.addToCartUrl;
-                } else {
-                    location.href = this.options.addToCartUrl;
-                }
-
-            } else if (this.options.cartForm) {
-                $(this.options.cartForm).submit();
+                $(this.options.cartForm).attr('action', this.options.addToCartUrl);
             }
+            $(this.options.cartForm).submit();
         }
     });
 })(jQuery);
diff --git a/app/code/Magento/Catalog/view/frontend/product/list.phtml b/app/code/Magento/Catalog/view/frontend/product/list.phtml
index 14c557c4304c2feefa10ccf60ed11b49ea52f5b1..5264ade8919ead97d5a7b045dd74c77717db6c11 100644
--- a/app/code/Magento/Catalog/view/frontend/product/list.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/list.phtml
@@ -84,21 +84,10 @@ $imageBlock =  $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Im
                         <div class="product actions"<?php echo strpos($pos, $viewMode . '-actions') ? $position : ''; ?>>
                             <div class="primary"<?php echo strpos($pos, $viewMode . '-primary') ? $position: ''; ?>>
                                 <?php if ($_product->isSaleable()): ?>
-                                    <?php if ($_product->getTypeInstance()->hasRequiredOptions($_product)): ?>
                                         <button type="button" title="<?php echo __('Add to Cart') ?>" class="action tocart"
-                                                data-mage-init='{"redirectUrl":{"url":"<?php echo $this->getAddToCartUrl($_product) ?>"}}'>
+                                                data-post='<?php echo $this->getAddToCartPostParams($_product); ?>'>
                                             <span><?php echo __('Add to Cart') ?></span>
                                         </button>
-                                    <?php else: ?>
-                                        <?php
-                                        $postDataHelper = $this->helper('Magento\Core\Helper\PostData');
-                                        $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]);
-                                        ?>
-                                        <button type="button" title="<?php echo __('Add to Cart') ?>" class="action tocart"
-                                                data-post='<?php echo $postData; ?>'>
-                                            <span><?php echo __('Add to Cart') ?></span>
-                                        </button>
-                                    <?php endif; ?>
                                 <?php else: ?>
                                     <?php if ($_product->getIsSalable()): ?>
                                         <p class="stock available"><span><?php echo __('In stock') ?></span></p>
diff --git a/app/code/Magento/Cms/etc/frontend/di.xml b/app/code/Magento/Cms/etc/frontend/di.xml
index 2ac676bafd3595b96be6f8031c223b85e9c399eb..59cdf039bb243003bd5dd83bf602a87eabf87ab8 100644
--- a/app/code/Magento/Cms/etc/frontend/di.xml
+++ b/app/code/Magento/Cms/etc/frontend/di.xml
@@ -28,7 +28,7 @@
         <arguments>
             <argument name="routerList" xsi:type="array">
                 <item name="cms" xsi:type="array">
-                    <item name="instance" xsi:type="string">Magento\Cms\Controller\Router</item>
+                    <item name="class" xsi:type="string">Magento\Cms\Controller\Router</item>
                     <item name="disable" xsi:type="boolean">false</item>
                     <item name="sortOrder" xsi:type="string">60</item>
                 </item>
diff --git a/app/code/Magento/Cms/etc/module.xml b/app/code/Magento/Cms/etc/module.xml
index 8ef60e63dd0bf555b21a28e5926f86d068126107..892237ac4f7aa2db57bbe6817976c27ed71f47f1 100644
--- a/app/code/Magento/Cms/etc/module.xml
+++ b/app/code/Magento/Cms/etc/module.xml
@@ -27,6 +27,7 @@
     <module name="Magento_Cms" version="2.0.0.0" active="true">
         <sequence>
             <module name="Magento_Core"/>
+            <module name="Magento_UrlRewrite" />
             <module name="Magento_Theme"/>
         </sequence>
         <depends>
diff --git a/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php b/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php
index 2d9df1edd29357d702969411ec50aa1fd6bcce02..f3b9038865694c4f01c9677259729f25e4ef48e6 100644
--- a/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php
+++ b/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php
@@ -120,7 +120,6 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
             $data,
             $priceBlockTypes
         );
-        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Core/App/FrontController/Plugin/MessageBox.php b/app/code/Magento/Core/App/FrontController/Plugin/MessageBox.php
index a6fe711e97afb2b15d2fb160b8e62b1d4171d317..be03ba0abfc95bbdd7f7dbe0babce6bb4608ee2a 100644
--- a/app/code/Magento/Core/App/FrontController/Plugin/MessageBox.php
+++ b/app/code/Magento/Core/App/FrontController/Plugin/MessageBox.php
@@ -57,7 +57,7 @@ class MessageBox
     protected $config;
 
     /**
-     * @var \Magento\Message\ManagerInterface
+     * @var \Magento\Message\Manager
      */
     protected $messageManager;
 
@@ -90,20 +90,9 @@ class MessageBox
      */
     public function afterDispatch(\Magento\App\FrontController $subject, \Magento\App\ResponseInterface $response)
     {
-        if ($this->request->isPost() && $this->config->isEnabled() && $this->hasMessages()) {
+        if ($this->request->isPost() && $this->config->isEnabled() && $this->messageManager->hasMessages()) {
             $this->cookie->set(self::COOKIE_NAME, 1, self::COOKIE_PERIOD, '/');
         }
         return $response;
     }
-
-    /**
-     * Returns true if there are any messages for customer,
-     * false - in other case
-     *
-     * @return bool
-     */
-    protected function hasMessages()
-    {
-        return ($this->messageManager->getMessages()->getCount() > 0);
-    }
 }
diff --git a/app/code/Magento/Core/Helper/Js.php b/app/code/Magento/Core/Helper/Js.php
deleted file mode 100644
index d5d2c51e8b6a66967549a270320066f69142df30..0000000000000000000000000000000000000000
--- a/app/code/Magento/Core/Helper/Js.php
+++ /dev/null
@@ -1,467 +0,0 @@
-<?php
-/**
- * JavaScript helper
- *
- * @author      Magento Core Team <core@magentocommerce.com>
- *
- * 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) 2014 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 Js extends \Magento\App\Helper\AbstractHelper
-{
-    /**
-     * Array of sentences of JS translations
-     *
-     * @var array
-     */
-    protected $_translateData = [];
-
-    /**
-     * @var \Magento\View\Url
-     */
-    protected $_viewUrl;
-
-    /**
-     * @param \Magento\App\Helper\Context $context
-     * @param \Magento\View\Url $viewUrl
-     */
-    public function __construct(
-        \Magento\App\Helper\Context $context,
-        \Magento\View\Url $viewUrl
-    ) {
-        parent::__construct($context);
-        $this->_viewUrl = $viewUrl;
-    }
-
-    /**
-     * Retrieve JS translator initialization javascript
-     *
-     * @return string
-     */
-    public function getTranslatorScript()
-    {
-        $script = '(function($) {$.mage.translate.add('
-            . $this->encode($this->getTranslateData())
-            . ')})(jQuery);';
-        return $this->getScript($script);
-    }
-
-    /**
-     * Retrieve framed javascript
-     *
-     * @param   string $script
-     * @return  string
-     */
-    public function getScript($script)
-    {
-        return '<script type="text/javascript">//<![CDATA[' . "\n{$script}\n" . '//]]></script>';
-    }
-
-    /**
-     * Retrieve javascript include code
-     *
-     * @param   string $file
-     * @return  string
-     */
-    public function includeScript($file)
-    {
-        return '<script type="text/javascript" src="' . $this->_viewUrl->getViewFileUrl($file) . '"></script>' . "\n";
-    }
-
-    /**
-     * Retrieve JS translation array
-     *
-     * @return array
-     */
-    public function getTranslateData()
-    {
-        if (!$this->_translateData) {
-            $this->_populateTranslateData();
-        }
-        return $this->_translateData;
-    }
-
-    /**
-     * Helper function that populates _translateData with default values.
-     *
-     * @return void
-     * @SuppressWarnings(PHPMD)
-     */
-    protected function _populateTranslateData()
-    {
-        // @codingStandardsIgnoreStart
-        //flexuploader.js
-        $this->_addTranslation('Complete', __('Complete'));
-        $this->_addTranslation('Upload Security Error', __('Upload Security Error'));
-        $this->_addTranslation('Upload HTTP Error', __('Upload HTTP Error'));
-        $this->_addTranslation('Upload I/O Error', __('Upload I/O Error'));
-        $this->_addTranslation(
-            'SSL Error: Invalid or self-signed certificate',
-            __('SSL Error: Invalid or self-signed certificate')
-        );
-        $this->_addTranslation('TB', __('TB'));
-        $this->_addTranslation('GB', __('GB'));
-        $this->_addTranslation('MB', __('MB'));
-        $this->_addTranslation('kB', __('kB'));
-        $this->_addTranslation('B', __('B'));
-        $this->_addTranslation('Add Products', __('Add Products'));
-        //addbysku.js
-        $this->_addTranslation('Add Products By SKU', __('Add Products By SKU'));
-        $this->_addTranslation('Insert Widget...', __('Insert Widget...'));
-        //rules.js
-        $this->_addTranslation('Please wait, loading...', __('Please wait, loading...'));
-        //validation.js
-        $this->_addTranslation('HTML tags are not allowed', __('HTML tags are not allowed'));
-        $this->_addTranslation('Please select an option.', __('Please select an option.'));
-        $this->_addTranslation('This is a required field.', __('This is a required field.'));
-        $this->_addTranslation(
-            'Please enter a valid number in this field.',
-            __('Please enter a valid number in this field.')
-        );
-        $this->_addTranslation(
-            'The value is not within the specified range.',
-            __('The value is not within the specified range.')
-        );
-        $this->_addTranslation(
-            'Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas.',
-            __(
-                'Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas.'
-            )
-        );
-        $this->_addTranslation(
-            'Please use letters only (a-z or A-Z) in this field.',
-            __('Please use letters only (a-z or A-Z) in this field.')
-        );
-        $this->_addTranslation(
-            'Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.',
-            __(
-                'Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.'
-            )
-        );
-        $this->_addTranslation(
-            'Please use only letters (a-z or A-Z) or numbers (0-9) only in this field. No spaces or other characters are allowed.',
-            __(
-                'Please use only letters (a-z or A-Z) or numbers (0-9) only in this field. No spaces or other characters are allowed.'
-            )
-        );
-        $this->_addTranslation(
-            'Please use only letters (a-z or A-Z) or numbers (0-9) or spaces and # only in this field.',
-            __('Please use only letters (a-z or A-Z) or numbers (0-9) or spaces and # only in this field.')
-        );
-        $this->_addTranslation(
-            'Please enter a valid fax number. For example (123) 456-7890 or 123-456-7890.',
-            __('Please enter a valid fax number. For example (123) 456-7890 or 123-456-7890.')
-        );
-        $this->_addTranslation('Please enter a valid date.', __('Please enter a valid date.'));
-        $this->_addTranslation(
-            'The From Date value should be less than or equal to the To Date value.',
-            __('The From Date value should be less than or equal to the To Date value.')
-        );
-        $this->_addTranslation(
-            'Please enter a valid email address. For example johndoe@domain.com.',
-            __('Please enter a valid email address. For example johndoe@domain.com.')
-        );
-        $this->_addTranslation(
-            'Please use only visible characters and spaces.',
-            __('Please use only visible characters and spaces.')
-        );
-        $this->_addTranslation(
-            'Please enter 6 or more characters. Leading or trailing spaces will be ignored.',
-            __('Please enter 6 or more characters. Leading or trailing spaces will be ignored.')
-        );
-        $this->_addTranslation(
-            'Please enter 7 or more characters. Password should contain both numeric and alphabetic characters.',
-            __('Please enter 7 or more characters. Password should contain both numeric and alphabetic characters.')
-        );
-        $this->_addTranslation('Please make sure your passwords match.', __('Please make sure your passwords match.'));
-        $this->_addTranslation(
-            'Please enter a valid URL. Protocol is required (http://, https:// or ftp://)',
-            __('Please enter a valid URL. Protocol is required (http://, https:// or ftp://)')
-        );
-        $this->_addTranslation(
-            'Please enter a valid URL Key. For example "example-page", "example-page.html" or "anotherlevel/example-page".',
-            __(
-                'Please enter a valid URL Key. For example "example-page", "example-page.html" or "anotherlevel/example-page".'
-            )
-        );
-        $this->_addTranslation(
-            'Please enter a valid XML-identifier. For example something_1, block5, id-4.',
-            __('Please enter a valid XML-identifier. For example something_1, block5, id-4.')
-        );
-        $this->_addTranslation(
-            'Please enter a valid social security number. For example 123-45-6789.',
-            __('Please enter a valid social security number. For example 123-45-6789.')
-        );
-        $this->_addTranslation(
-            'Please enter a valid zip code. For example 90602 or 90602-1234.',
-            __('Please enter a valid zip code. For example 90602 or 90602-1234.')
-        );
-        $this->_addTranslation('Please enter a valid zip code.', __('Please enter a valid zip code.'));
-        $this->_addTranslation(
-            'Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.',
-            __('Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.')
-        );
-        $this->_addTranslation(
-            'Please select one of the above options.',
-            __('Please select one of the above options.')
-        );
-        $this->_addTranslation('Please select one of the options.', __('Please select one of the options.'));
-        $this->_addTranslation('Please select State/Province.', __('Please select State/Province.'));
-        $this->_addTranslation(
-            'Please enter a number greater than 0 in this field.',
-            __('Please enter a number greater than 0 in this field.')
-        );
-        $this->_addTranslation(
-            'Please enter a number 0 or greater in this field.',
-            __('Please enter a number 0 or greater in this field.')
-        );
-        $this->_addTranslation(
-            'Please enter a valid credit card number.',
-            __('Please enter a valid credit card number.')
-        );
-        $this->_addTranslation(
-            'Credit card number does not match credit card type.',
-            __('Credit card number does not match credit card type.')
-        );
-        $this->_addTranslation(
-            'Card type does not match credit card number.',
-            __('Card type does not match credit card number.')
-        );
-        $this->_addTranslation('Incorrect credit card expiration date.', __('Incorrect credit card expiration date.'));
-        $this->_addTranslation(
-            'Please enter a valid credit card verification number.',
-            __('Please enter a valid credit card verification number.')
-        );
-        $this->_addTranslation(
-            'Please use only letters (a-z or A-Z), numbers (0-9) or underscore(_) in this field, first character should be a letter.',
-            __(
-                'Please use only letters (a-z or A-Z), numbers (0-9) or underscore(_) in this field, first character should be a letter.'
-            )
-        );
-        $this->_addTranslation(
-            'Please input a valid CSS-length. For example 100px or 77pt or 20em or .5ex or 50%.',
-            __('Please input a valid CSS-length. For example 100px or 77pt or 20em or .5ex or 50%.')
-        );
-        $this->_addTranslation(
-            'Text length does not satisfy specified text range.',
-            __('Text length does not satisfy specified text range.')
-        );
-        $this->_addTranslation('Please enter a number lower than 100.', __('Please enter a number lower than 100.'));
-        $this->_addTranslation('Please select a file', __('Please select a file'));
-        $this->_addTranslation(
-            'Please enter issue number or start date for switch/solo card type.',
-            __('Please enter issue number or start date for switch/solo card type.')
-        );
-        //js.js
-        $this->_addTranslation('This date is a required value.', __('This date is a required value.'));
-        $this->_addTranslation('Please enter a valid day (1-%1).', __('Please enter a valid day (1-%1).'));
-        $this->_addTranslation('Please enter a valid month (1-12).', __('Please enter a valid month (1-12).'));
-        $this->_addTranslation('Please enter a valid year (1900-%1).', __('Please enter a valid year (1900-%1).'));
-        $this->_addTranslation('Please enter a valid full date', __('Please enter a valid full date'));
-        //various files
-        $this->_addTranslation('Allow', __('Allow'));
-        $this->_addTranslation('Activate', __('Activate'));
-        $this->_addTranslation('Reauthorize', __('Reauthorize'));
-        $this->_addTranslation('Cancel', __('Cancel'));
-        $this->_addTranslation('Done', __('Done'));
-        $this->_addTranslation('Save', __('Save'));
-        $this->_addTranslation(
-            'File extension not known or unsupported type.',
-            __('File extension not known or unsupported type.')
-        );
-        $this->_addTranslation('Configure Product', __('Configure Product'));
-        $this->_addTranslation('OK', __('OK'));
-        $this->_addTranslation('Gift Options for ', __('Gift Options for '));
-        $this->_addTranslation('New Option', __('New Option'));
-        $this->_addTranslation('Add Products to New Option', __('Add Products to New Option'));
-        $this->_addTranslation('Add Products to Option "%1"', __('Add Products to Option "%1"'));
-        $this->_addTranslation('Add Selected Products', __('Add Selected Products'));
-        $this->_addTranslation('Select type of option.', __('Select type of option.'));
-        $this->_addTranslation('Please add rows to option.', __('Please add rows to option.'));
-        $this->_addTranslation('Select Product', __('Select Product'));
-        $this->_addTranslation('Import', __('Import'));
-        $this->_addTranslation('Please select items.', __('Please select items.'));
-        $this->_addTranslation('Add Products to Group', __('Add Products to Group'));
-        $this->_addTranslation('start typing to search category', __('start typing to search category'));
-        $this->_addTranslation('Choose existing category.', __('Choose existing category.'));
-        $this->_addTranslation('Create Category', __('Create Category'));
-        $this->_addTranslation('Sorry, there was an unknown error.', __('Sorry, there was an unknown error.'));
-        $this->_addTranslation(
-            'Something went wrong while loading the theme.',
-            __('Something went wrong while loading the theme.')
-        );
-        $this->_addTranslation(
-            'We don\'t recognize or support this file extension type.',
-            __('We don\'t recognize or support this file extension type.')
-        );
-        $this->_addTranslation('Error', __('Error'));
-        $this->_addTranslation('No stores were reassigned.', __('No stores were reassigned.'));
-        $this->_addTranslation('Assign theme to your live store-view:', __('Assign theme to your live store-view:'));
-        $this->_addTranslation('Default title', __('Default title'));
-        $this->_addTranslation(
-            'The URL to assign stores is not defined.',
-            __('The URL to assign stores is not defined.')
-        );
-        $this->_addTranslation('No', __('No'));
-        $this->_addTranslation('Yes', __('Yes'));
-        $this->_addTranslation('Some problem with revert action', __('Some problem with revert action'));
-        $this->_addTranslation('Error: unknown error.', __('Error: unknown error.'));
-        $this->_addTranslation('Some problem with save action', __('Some problem with save action'));
-        $this->_addTranslation('Delete', __('Delete'));
-        $this->_addTranslation('Folder', __('Folder'));
-        $this->_addTranslation('Delete Folder', __('Delete Folder'));
-        $this->_addTranslation(
-            'Are you sure you want to delete the folder named',
-            __('Are you sure you want to delete the folder named')
-        );
-        $this->_addTranslation('Delete File', __('Delete File'));
-        $this->_addTranslation('Method ', __('Method '));
-        $this->_addTranslation('Please wait...', __('Please wait...'));
-        $this->_addTranslation('Loading...', __('Loading...'));
-        $this->_addTranslation('Translate', __('Translate'));
-        $this->_addTranslation('Submit', __('Submit'));
-        $this->_addTranslation('Close', __('Close'));
-        $this->_addTranslation(
-            'Please enter a value less than or equal to %s.',
-            __('Please enter a value less than or equal to %s.')
-        );
-        $this->_addTranslation(
-            'Please enter a value greater than or equal to %s.',
-            __('Please enter a value greater than or equal to %s.')
-        );
-        $this->_addTranslation(
-            'Maximum length of this field must be equal or less than %1 symbols.',
-            __('Maximum length of this field must be equal or less than %1 symbols.')
-        );
-        $this->_addTranslation('No records found.', __('No records found.'));
-        $this->_addTranslation('Recent items', __('Recent items'));
-        $this->_addTranslation('Show all...', __('Show all...'));
-        $this->_addTranslation('Please enter a date in the past.', __('Please enter a date in the past.'));
-        $this->_addTranslation(
-            'Please enter a date between %min and %max.',
-            __('Please enter a date between %min and %max.')
-        );
-        // opcheckout.js
-        $this->_addTranslation(
-            'Please choose to register or to checkout as a guest.',
-            __('Please choose to register or to checkout as a guest.')
-        );
-        $this->_addTranslation(
-            'We are not able to ship to the selected shipping address. Please choose another address or edit the current address.',
-            __(
-                'We are not able to ship to the selected shipping address. Please choose another address or edit the current address.'
-            )
-        );
-        $this->_addTranslation('Please specify a shipping method.', __('Please specify a shipping method.'));
-        // opcheckout.js and payment.js
-        $this->_addTranslation(
-            'We can\'t complete your order because you don\'t have a payment method available.',
-            __('We can\'t complete your order because you don\'t have a payment method available.')
-        );
-        //multiple-wishlist.js
-        $this->_addTranslation(
-            'Error happened while creating wishlist. Please try again later',
-            __('Error happened while creating wishlist. Please try again later')
-        );
-        $this->_addTranslation('You must select items to move', __('You must select items to move'));
-        $this->_addTranslation('You must select items to copy', __('You must select items to copy'));
-        $this->_addTranslation(
-            'You are about to delete your wish list. This action cannot be undone. Are you sure you want to continue?',
-            __(
-                'You are about to delete your wish list. This action cannot be undone. Are you sure you want to continue?'
-            )
-        );
-        //various files
-        $this->_addTranslation('Please specify payment method.', __('Please specify payment method.'));
-        $this->_addTranslation(
-            'Are you sure you want to delete this address?',
-            __('Are you sure you want to delete this address?')
-        );
-        $this->_addTranslation('Use gift registry shipping address', __('Use gift registry shipping address'));
-        $this->_addTranslation(
-            'You can change the number of gift registry items on the Gift Registry Info page or directly in your cart, but not while in checkout.',
-            __(
-                'You can change the number of gift registry items on the Gift Registry Info page or directly in your cart, but not while in checkout.'
-            )
-        );
-        $this->_addTranslation('No confirmation', __('No confirmation'));
-        $this->_addTranslation('Sorry, something went wrong.', __('Sorry, something went wrong.'));
-        $this->_addTranslation(
-            'Sorry, something went wrong. Please try again later.',
-            __('Sorry, something went wrong. Please try again later.')
-        );
-        $this->_addTranslation('select all', __('select all'));
-        $this->_addTranslation('unselect all', __('unselect all'));
-        $this->_addTranslation(
-            'Please agree to all Terms and Conditions before placing the orders.',
-            __('Please agree to all Terms and Conditions before placing the orders.')
-        );
-        $this->_addTranslation(
-            'Please choose to register or to checkout as a guest',
-            __('Please choose to register or to checkout as a guest')
-        );
-        $this->_addTranslation(
-            'Your order cannot be completed at this time as there is no shipping methods available for it. Please make necessary changes in your shipping address.',
-            __(
-                'Your order cannot be completed at this time as there is no shipping methods available for it. Please make necessary changes in your shipping address.'
-            )
-        );
-        $this->_addTranslation('Please specify shipping method.', __('Please specify shipping method.'));
-        $this->_addTranslation(
-            'Your order cannot be completed at this time as there is no payment methods available for it.',
-            __('Your order cannot be completed at this time as there is no payment methods available for it.')
-        );
-        // @codingStandardsIgnoreEnd
-    }
-
-    /**
-     * Adds some translated text to the translated data array as long as the key and text don't match.
-     *
-     * There is no point in having translated text added if the key is already representing the translated text.
-     *
-     * @param string $key
-     * @param string $translatedText
-     * @return void
-     */
-    protected function _addTranslation($key, $translatedText)
-    {
-        if ($key !== $translatedText) {
-            $this->_translateData[$key] = $translatedText;
-        }
-    }
-
-    /**
-     * Encode the mixed $data into the JSON format.
-     *
-     * @param mixed $data
-     * @return string
-     */
-    public function encode($data)
-    {
-        $json = \Zend_Json::encode($data);
-        $this->translateInline->processResponseBody($json, false);
-        return $json;
-    }
-}
diff --git a/app/code/Magento/Core/Model/Observer.php b/app/code/Magento/Core/Model/Observer.php
index 71041357b0687a10c303e69c49dfe631957bac52..c78b282a6a841b5f67af6c857ddfd39471d35a37 100644
--- a/app/code/Magento/Core/Model/Observer.php
+++ b/app/code/Magento/Core/Model/Observer.php
@@ -47,11 +47,6 @@ class Observer
      */
     private $_pageAssets;
 
-    /**
-     * @var \Magento\App\ReinitableConfigInterface
-     */
-    protected $_config;
-
     /**
      * @var \Magento\View\Asset\PublicFileFactory
      */
@@ -71,16 +66,14 @@ class Observer
      * @param \Magento\App\Cache\Frontend\Pool $cacheFrontendPool
      * @param \Magento\View\DesignInterface $design
      * @param \Magento\View\Asset\GroupedCollection $assets
-     * @param \Magento\App\ReinitableConfigInterface $config
      * @param \Magento\View\Asset\PublicFileFactory $assetFileFactory
-     * @param \Magento\Core\Model\Theme\Registration $registration
+     * @param Theme\Registration $registration
      * @param \Magento\Logger $logger
      */
     public function __construct(
         \Magento\App\Cache\Frontend\Pool $cacheFrontendPool,
         \Magento\View\DesignInterface $design,
         \Magento\View\Asset\GroupedCollection $assets,
-        \Magento\App\ReinitableConfigInterface $config,
         \Magento\View\Asset\PublicFileFactory $assetFileFactory,
         \Magento\Core\Model\Theme\Registration $registration,
         \Magento\Logger $logger
@@ -88,7 +81,6 @@ class Observer
         $this->_cacheFrontendPool = $cacheFrontendPool;
         $this->_currentTheme = $design->getDesignTheme();
         $this->_pageAssets = $assets;
-        $this->_config = $config;
         $this->_assetFileFactory = $assetFileFactory;
         $this->_registration = $registration;
         $this->_logger = $logger;
@@ -151,17 +143,4 @@ class Observer
             }
         }
     }
-
-    /**
-     * Rebuild whole config and save to fast storage
-     *
-     * @param  \Magento\Event\Observer $observer
-     * @return $this
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    public function processReinitConfig(\Magento\Event\Observer $observer)
-    {
-        $this->_config->reinit();
-        return $this;
-    }
 }
diff --git a/app/code/Magento/Core/Model/Resource/Setup.php b/app/code/Magento/Core/Model/Resource/Setup.php
index 81e942c86d421256d78177e2969352c9832d7985..3b44ad4407c2b548a2bdffdfc8df009278fa9637 100644
--- a/app/code/Magento/Core/Model/Resource/Setup.php
+++ b/app/code/Magento/Core/Model/Resource/Setup.php
@@ -93,7 +93,7 @@ class Setup implements \Magento\Module\Updater\SetupInterface
     protected $_logger;
 
     /**
-     * @var \Magento\Core\Model\Resource\Resource
+     * @var \Magento\Module\ResourceInterface
      */
     protected $_resourceResource;
 
diff --git a/app/code/Magento/Core/Model/Resource/Setup/Context.php b/app/code/Magento/Core/Model/Resource/Setup/Context.php
index 264f1078dfd1a09c3d920a28dab892f48caea0ae..961117209e06763f1d6a1ccc026160533318a029 100644
--- a/app/code/Magento/Core/Model/Resource/Setup/Context.php
+++ b/app/code/Magento/Core/Model/Resource/Setup/Context.php
@@ -51,7 +51,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_moduleList;
 
     /**
-     * @var \Magento\Core\Model\Resource\Resource
+     * @var \Magento\Module\ResourceInterface
      */
     protected $_resourceResource;
 
@@ -88,7 +88,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
      * @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\Module\ResourceInterface $resourceResource
      * @param MigrationFactory $migrationFactory
      * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $themeResourceFactory
      * @param \Magento\Core\Model\Theme\CollectionFactory $themeFactory
@@ -101,7 +101,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
         \Magento\App\Resource $resource,
         \Magento\Module\Dir\Reader $modulesReader,
         \Magento\Module\ModuleListInterface $moduleList,
-        \Magento\Core\Model\Resource\Resource $resourceResource,
+        \Magento\Module\ResourceInterface $resourceResource,
         \Magento\Core\Model\Resource\Setup\MigrationFactory $migrationFactory,
         \Magento\Core\Model\Resource\Theme\CollectionFactory $themeResourceFactory,
         \Magento\Core\Model\Theme\CollectionFactory $themeFactory,
@@ -170,7 +170,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Core\Model\Resource\Resource
+     * @return \Magento\Module\ResourceInterface
      */
     public function getResourceResource()
     {
diff --git a/app/code/Magento/Core/etc/config.xml b/app/code/Magento/Core/etc/config.xml
index 11793f11b492a11679acc75cf33208e26a8b3f2c..66381b948fda5eb8dc5ff558ae2bcc50112fb957 100644
--- a/app/code/Magento/Core/etc/config.xml
+++ b/app/code/Magento/Core/etc/config.xml
@@ -165,9 +165,6 @@
                 <use_store>0</use_store>
                 <redirect_to_base>1</redirect_to_base>
             </url>
-            <seo>
-                <use_rewrites>0</use_rewrites>
-            </seo>
             <unsecure>
                 <base_url>{{base_url}}</base_url>
                 <base_web_url>{{unsecure_base_url}}</base_web_url>
diff --git a/app/code/Magento/Core/etc/di.xml b/app/code/Magento/Core/etc/di.xml
index 5bc0bd73fdca1ce07987dfd129bb5437998d24da..ad2b39457f71c7395db4f14cdd3b5162bc134f91 100644
--- a/app/code/Magento/Core/etc/di.xml
+++ b/app/code/Magento/Core/etc/di.xml
@@ -266,7 +266,7 @@
         <arguments>
             <argument name="handlerClassesList" xsi:type="array">
                 <item name="default" xsi:type="array">
-                    <item name="instance" xsi:type="string">Magento\Core\App\Router\NoRouteHandler</item>
+                    <item name="class" xsi:type="string">Magento\Core\App\Router\NoRouteHandler</item>
                     <item name="sortOrder" xsi:type="string">100</item>
                 </item>
             </argument>
@@ -444,7 +444,6 @@
         <plugin name="messageBox" type="Magento\Core\App\FrontController\Plugin\MessageBox" sortOrder="0"/>
     </type>
     <type name="Magento\App\Action\Action">
-        <plugin name="installInitializer" type="Magento\Core\App\Action\Plugin\Install" sortOrder="5"/>
         <plugin name="storeCheck" type="Magento\Core\App\Action\Plugin\StoreCheck" sortOrder="10"/>
         <plugin name="designLoader" type="Magento\Core\App\Action\Plugin\Design" sortOrder="30"/>
     </type>
diff --git a/app/code/Magento/Core/etc/events.xml b/app/code/Magento/Core/etc/events.xml
index 16f7814f394595338f62488c285af9c445c68d95..6ccdf7f1a9f0d205ec91e9a631adf5418d9ea5eb 100644
--- a/app/code/Magento/Core/etc/events.xml
+++ b/app/code/Magento/Core/etc/events.xml
@@ -33,7 +33,4 @@
     <event name="theme_registration_from_filesystem">
         <observer name="theme_registration_observer" instance="Magento\Core\Model\Observer" method="themeRegistration" />
     </event>
-    <event name="application_process_reinit_config">
-        <observer name="reinit_config_observer" instance="Magento\Core\Model\Observer" method="processReinitConfig" />
-    </event>
 </config>
diff --git a/app/code/Magento/Core/etc/frontend/di.xml b/app/code/Magento/Core/etc/frontend/di.xml
index e7eb880db17c89918c6f9a17bb6492ca3e5dc736..95377dec5279ffa54eb7e565f5c55e7d58371eb1 100644
--- a/app/code/Magento/Core/etc/frontend/di.xml
+++ b/app/code/Magento/Core/etc/frontend/di.xml
@@ -38,7 +38,6 @@
     </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\Action\Action">
         <plugin name="core-app-action-dispatchController-context-plugin" type="Magento\Core\Model\App\Action\ContextPlugin" sortOrder="10"/>
@@ -48,12 +47,12 @@
         <arguments>
             <argument name="routerList" xsi:type="array">
                 <item name="standard" xsi:type="array">
-                    <item name="instance" xsi:type="string">Magento\Core\App\Router\Base</item>
+                    <item name="class" xsi:type="string">Magento\Core\App\Router\Base</item>
                     <item name="disable" xsi:type="boolean">false</item>
                     <item name="sortOrder" xsi:type="string">20</item>
                 </item>
                 <item name="default" xsi:type="array">
-                    <item name="instance" xsi:type="string">Magento\App\Router\DefaultRouter</item>
+                    <item name="class" xsi:type="string">Magento\App\Router\DefaultRouter</item>
                     <item name="disable" xsi:type="boolean">false</item>
                     <item name="sortOrder" xsi:type="string">100</item>
                 </item>
diff --git a/app/code/Magento/Core/etc/module.xml b/app/code/Magento/Core/etc/module.xml
index 5a4a7db225aea4d531f4d8f1afa90b07c31e0997..1c2d659e2c3fe252cc8cf75aec40f079cc6ec5ae 100644
--- a/app/code/Magento/Core/etc/module.xml
+++ b/app/code/Magento/Core/etc/module.xml
@@ -30,7 +30,6 @@
             <module name="Magento_Directory"/>
             <module name="Magento_Index"/>
             <module name="Magento_Cron"/>
-            <module name="Magento_Catalog"/>
             <module name="Magento_Theme"/>
             <module name="Magento_AdminNotification"/>
             <module name="Magento_CatalogInventory"/>
@@ -43,7 +42,6 @@
             <module name="Magento_ProductAlert"/>
             <module name="Magento_SalesRule"/>
             <module name="Magento_Eav"/>
-            <module name="Magento_Install"/>
             <module name="Magento_PageCache"/>
             <extension name="spl"/>
             <extension name="dom"/>
diff --git a/app/code/Magento/Core/i18n/de_DE.csv b/app/code/Magento/Core/i18n/de_DE.csv
index fc018a13627b3e2cd99b8af10537dcdbfe7e6020..24650af77d88edb3561c521060eefcba2ebb949c 100644
--- a/app/code/Magento/Core/i18n/de_DE.csv
+++ b/app/code/Magento/Core/i18n/de_DE.csv
@@ -25,7 +25,6 @@
 "Anchor Text for Next","Link-Text für Weiter"
 "Anchor Text for Previous","Link-Text für Zurück"
 "Anchor symbol (#) is not supported in request path","Das Doppelkreuz (#) wird im Anforderungspfad nicht unterstützt"
-"Anchor symbol (#) is not supported in url rewrite suffix","Das Doppelkreuz (#) wird beim URL-Überschreiben-Suffix nicht unterstützt"
 "Are you sure?","Sind Sie sicher?"
 "Auto-redirect to Base URL","Automatische Weiterleitung zur Basis-URL"
 "Back","Zurück"
@@ -336,7 +335,6 @@
 "Translate, blocks and other output caches should be disabled for both frontend and admin inline translations.","Übersetzen, Blöcke und andere Ausgangs-Caches sollten sowohl für Frontend und Admin-Inline-Übersetzungen deaktiviert werden."
 "Translations","Übersetzungen"
 "Two and more slashes together are not permitted in request path","Zwei und mehr zusammenhängende Schrägstriche sind in diesem Pfad nicht zulässig"
-"Two and more slashes together are not permitted in url rewrite suffix","Zwei und mehr zusammenhängende Schrägstriche sind im URL-Rewrite-Suffix nicht zulässig"
 "Unable to create directory: %s","Verzeichnis kann nicht angelegt werden: %s"
 "Unable to delete store view. Please, try again later.","Dieser StoreView kann nicht gelöscht werden. Versuchen Sie es später noch einmal."
 "Unable to delete store. Please, try again later.","Shop kann nicht gelöscht werden. Bitte versuchen Sie es später noch einmal."
diff --git a/app/code/Magento/Core/i18n/en_US.csv b/app/code/Magento/Core/i18n/en_US.csv
index 7f163736c50745316a71ed81458f6c6eb5ea665e..6e480a3fce962f764949efdb80504edca536c691 100644
--- a/app/code/Magento/Core/i18n/en_US.csv
+++ b/app/code/Magento/Core/i18n/en_US.csv
@@ -27,7 +27,6 @@
 "Anchor Text for Next","Anchor Text for Next"
 "Anchor Text for Previous","Anchor Text for Previous"
 "Anchor symbol (#) is not supported in request path","Anchor symbol (#) is not supported in request path"
-"Anchor symbol (#) is not supported in url rewrite suffix","Anchor symbol (#) is not supported in url rewrite suffix"
 "Are you sure?","Are you sure?"
 "Auto-redirect to Base URL","Auto-redirect to Base URL"
 "Back","Back"
@@ -337,7 +336,6 @@
 "Translate, blocks and other output caches should be disabled for both frontend and admin inline translations.","Translate, blocks and other output caches should be disabled for both frontend and admin inline translations."
 "Translations","Translations"
 "Two and more slashes together are not permitted in request path","Two and more slashes together are not permitted in request path"
-"Two and more slashes together are not permitted in url rewrite suffix","Two and more slashes together are not permitted in url rewrite suffix"
 "Unable to create directory: %s","Unable to create directory: %s"
 "Unable to delete store view. Please, try again later.","Unable to delete store view. Please, try again later."
 "Unable to delete store. Please, try again later.","Unable to delete store. Please, try again later."
diff --git a/app/code/Magento/Core/i18n/es_ES.csv b/app/code/Magento/Core/i18n/es_ES.csv
index 80bc314650ad3544fb3ad83307bf84d91e25c47a..94139d20d434dcbffc55d7295fdf610a07c8b9ec 100644
--- a/app/code/Magento/Core/i18n/es_ES.csv
+++ b/app/code/Magento/Core/i18n/es_ES.csv
@@ -25,7 +25,6 @@
 "Anchor Text for Next","Texto de ancla para página siguiente"
 "Anchor Text for Previous","Texto de ancla para página anterior"
 "Anchor symbol (#) is not supported in request path","El símbolo ancla (#) no está soportado en la ruta solicitada"
-"Anchor symbol (#) is not supported in url rewrite suffix","El símbolo ancla (#) no está soportado en el sufijo de reescritura de url"
 "Are you sure?","¿Está seguro?"
 "Auto-redirect to Base URL","Redireccionar automáticamente a la dirección URL básica"
 "Back","Volver"
@@ -336,7 +335,6 @@
 "Translate, blocks and other output caches should be disabled for both frontend and admin inline translations.","Traducir, bloques y otros caches de salida deben ser desactivadso para las traducciones de la parte delantera y de admininstración."
 "Translations","Traducciones"
 "Two and more slashes together are not permitted in request path","No se permiten dos o más barras juntas en la linea de solicitud"
-"Two and more slashes together are not permitted in url rewrite suffix","No se permiten dos o más barras juntas en el sufijo de la url"
 "Unable to create directory: %s","No ha sido posible crear el directorio: %s"
 "Unable to delete store view. Please, try again later.","No se puede eliminar la vista de tienda. Vuelva a intentarlo más tarde."
 "Unable to delete store. Please, try again later.","No se ha podido borrar la tienda. Por favor, inténtelo de nuevo más tarde."
diff --git a/app/code/Magento/Core/i18n/fr_FR.csv b/app/code/Magento/Core/i18n/fr_FR.csv
index 7241ea4de0bf5058f915948452396ac14484ff65..edb7a3c35446ee16cf53fd3a84cb50f2d9503159 100644
--- a/app/code/Magento/Core/i18n/fr_FR.csv
+++ b/app/code/Magento/Core/i18n/fr_FR.csv
@@ -25,7 +25,6 @@
 "Anchor Text for Next","Ancrer texte pour suivant"
 "Anchor Text for Previous","Ancrer texte pour précédent"
 "Anchor symbol (#) is not supported in request path","Le symbole d'ancrage (#) n'est pas pris en charge dans la demande de chemin d'accès"
-"Anchor symbol (#) is not supported in url rewrite suffix","Le symbole d'ancrage (#) n'est pas pris en charge dans le suffixe de réécriture de l'url"
 "Are you sure?","Etes-vous sûr ?"
 "Auto-redirect to Base URL","Redirige automatiquement vers base URL"
 "Back","Retour"
@@ -336,7 +335,6 @@
 "Translate, blocks and other output caches should be disabled for both frontend and admin inline translations.","Traductions, blocks et autres sorties doivent être désactivés pour la gestion administrateur et utilisateur en ligne."
 "Translations","Traductions"
 "Two and more slashes together are not permitted in request path","Deux slashs ou plus ne sont pas autorisés ensemble dans le répertoire"
-"Two and more slashes together are not permitted in url rewrite suffix","Deux slashs ou plus ne sont pas autorisés dans le suffixe de réécriture de l'URL"
 "Unable to create directory: %s","Impossible de créer le répertoire : %s"
 "Unable to delete store view. Please, try again later.","Incapable d'effacer la vue de boutique. Veuillez réessayer plus tard."
 "Unable to delete store. Please, try again later.","Impossible de supprimer le magasin. Veuillez réessayer plus tard."
diff --git a/app/code/Magento/Core/i18n/nl_NL.csv b/app/code/Magento/Core/i18n/nl_NL.csv
index 010635982200ce5ab4e5910a2dbb492085d9f34e..5780032ec737136a5ef633673b9336716a9c9e64 100644
--- a/app/code/Magento/Core/i18n/nl_NL.csv
+++ b/app/code/Magento/Core/i18n/nl_NL.csv
@@ -25,7 +25,6 @@
 "Anchor Text for Next","Ankertekst voor Volgende"
 "Anchor Text for Previous","Ankertekst voor Vorige"
 "Anchor symbol (#) is not supported in request path","Ankersymbool (#) wordt niet ondersteund in gevraagd pad"
-"Anchor symbol (#) is not supported in url rewrite suffix","Anker symbool (#) is niet ondersteund in URL herschrijvings toevoeging"
 "Are you sure?","Weet u het zeker"
 "Auto-redirect to Base URL","Stuur automatisch door naar basis URL"
 "Back","terug"
@@ -336,7 +335,6 @@
 "Translate, blocks and other output caches should be disabled for both frontend and admin inline translations.","Vertalingen, blokken en andere uitvoer zouden uitgeschakeld moeten zijn voor zowel front-end en administrator inline vertalingen."
 "Translations","Vertalingen"
 "Two and more slashes together are not permitted in request path","Twee of meer schuine strepen zijn niet toegestaan in gevraagde pad."
-"Two and more slashes together are not permitted in url rewrite suffix","Twee of meer schuine strepen zijn niet toegestaan in URL herschrijvings navoeging"
 "Unable to create directory: %s","Niet in staat om directory %s te maken"
 "Unable to delete store view. Please, try again later.","Niet instaat om het winkelzicht te verwijderen. Probeer het later nogmaals."
 "Unable to delete store. Please, try again later.","Kan de winkel niet verwijderen. Probeer het later nog eens a.u.b."
diff --git a/app/code/Magento/Core/i18n/pt_BR.csv b/app/code/Magento/Core/i18n/pt_BR.csv
index 1f9bfa9d64f3ea6068671dbb0e4aef9b8f056dce..0008f040aac75cd85f06e3d08b1cda5d9a63c07a 100644
--- a/app/code/Magento/Core/i18n/pt_BR.csv
+++ b/app/code/Magento/Core/i18n/pt_BR.csv
@@ -27,7 +27,6 @@ local até que o processo de sincronização esteja completo."
 "Anchor Text for Next","Texto Âncora para Seguinte"
 "Anchor Text for Previous","Texto Âncora para Anterior"
 "Anchor symbol (#) is not supported in request path","Símbolo âncora (#) não é suportado no caminho pedido"
-"Anchor symbol (#) is not supported in url rewrite suffix","Símbolo âncora (#) não é suportado no sufixo url reescrito"
 "Are you sure?","Tem certeza?"
 "Auto-redirect to Base URL","Auto-redirecionado para URL Base"
 "Back","Voltar"
@@ -338,7 +337,6 @@ local até que o processo de sincronização esteja completo."
 "Translate, blocks and other output caches should be disabled for both frontend and admin inline translations.","Traduzir, blocos e outras caches de saída devem ser desativadas para ambos os frontend e traduções em linha admin."
 "Translations","Traduções"
 "Two and more slashes together are not permitted in request path","Duas ou mais barras juntas não são permitidas no caminho pedido"
-"Two and more slashes together are not permitted in url rewrite suffix","Duas ou mais barras juntas não são permitidas em sufixo url reescrito"
 "Unable to create directory: %s","Não é possível criar diretório: %s"
 "Unable to delete store view. Please, try again later.","Não é possível excluir a vista da loja. Por favor, tente novamente mais tarde."
 "Unable to delete store. Please, try again later.","Não é possível apagar loja. Por favor, tente novamente mais tarde."
diff --git a/app/code/Magento/Core/i18n/zh_CN.csv b/app/code/Magento/Core/i18n/zh_CN.csv
index 042555f0eed05cbfb12d9a3c8620c85de90c3998..89f40124a8e8c385b04ec79245fc8cec38decb9a 100644
--- a/app/code/Magento/Core/i18n/zh_CN.csv
+++ b/app/code/Magento/Core/i18n/zh_CN.csv
@@ -25,7 +25,6 @@
 "Anchor Text for Next","下一个的锚点文字"
 "Anchor Text for Previous","上一个的锚点文字"
 "Anchor symbol (#) is not supported in request path","锚点符号(#)不能用于请求路径中"
-"Anchor symbol (#) is not supported in url rewrite suffix","URL 重写后缀不支持固定标志 (#)"
 "Are you sure?","您是否确认?"
 "Auto-redirect to Base URL","自定重定向到基本 URL"
 "Back","返回"
@@ -336,7 +335,6 @@
 "Translate, blocks and other output caches should be disabled for both frontend and admin inline translations.","对于前端和管理员内嵌翻译,翻译区块和其它输出缓存应被禁用。"
 "Translations","翻译"
 "Two and more slashes together are not permitted in request path","两个或更多斜杠在请求的路径中不被允许"
-"Two and more slashes together are not permitted in url rewrite suffix","两个或更多斜杠在 URL 重写后缀中不被允许"
 "Unable to create directory: %s","无法创建目录:%s"
 "Unable to delete store view. Please, try again later.","无法删除商店视图。请稍后重试。"
 "Unable to delete store. Please, try again later.","无法删除商店。请稍后重试。"
diff --git a/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php b/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php
index fd99584cfa39b15e7c2350a0e30437c7fcb802e8..d169d08af6b761128a4fc537b4c5392af686ed3a 100644
--- a/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php
+++ b/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php
@@ -488,96 +488,6 @@ $table = $installer->getConnection()->newTable(
 );
 $installer->getConnection()->createTable($table);
 
-/**
- * Create table 'core_url_rewrite'
- */
-$table = $installer->getConnection()->newTable(
-    $installer->getTable('core_url_rewrite')
-)->addColumn(
-    'url_rewrite_id',
-    \Magento\DB\Ddl\Table::TYPE_INTEGER,
-    null,
-    array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true),
-    'Rewrite Id'
-)->addColumn(
-    'store_id',
-    \Magento\DB\Ddl\Table::TYPE_SMALLINT,
-    null,
-    array('unsigned' => true, 'nullable' => false, 'default' => '0'),
-    'Store Id'
-)->addColumn(
-    'id_path',
-    \Magento\DB\Ddl\Table::TYPE_TEXT,
-    255,
-    array(),
-    'Id Path'
-)->addColumn(
-    'request_path',
-    \Magento\DB\Ddl\Table::TYPE_TEXT,
-    255,
-    array(),
-    'Request Path'
-)->addColumn(
-    'target_path',
-    \Magento\DB\Ddl\Table::TYPE_TEXT,
-    255,
-    array(),
-    'Target Path'
-)->addColumn(
-    'is_system',
-    \Magento\DB\Ddl\Table::TYPE_SMALLINT,
-    null,
-    array('unsigned' => true, 'default' => '1'),
-    'Defines is Rewrite System'
-)->addColumn(
-    'options',
-    \Magento\DB\Ddl\Table::TYPE_TEXT,
-    255,
-    array('nullable' => true),
-    'Options'
-)->addColumn(
-    'description',
-    \Magento\DB\Ddl\Table::TYPE_TEXT,
-    255,
-    array(),
-    'Deascription'
-)->addIndex(
-    $installer->getIdxName(
-        'core_url_rewrite',
-        array('request_path', 'store_id'),
-        \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
-    ),
-    array('request_path', 'store_id'),
-    array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE)
-)->addIndex(
-    $installer->getIdxName(
-        'core_url_rewrite',
-        array('id_path', 'is_system', 'store_id'),
-        \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
-    ),
-    array('id_path', 'is_system', 'store_id'),
-    array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE)
-)->addIndex(
-    $installer->getIdxName('core_url_rewrite', array('target_path', 'store_id')),
-    array('target_path', 'store_id')
-)->addIndex(
-    $installer->getIdxName('core_url_rewrite', array('id_path')),
-    array('id_path')
-)->addIndex(
-    $installer->getIdxName('core_url_rewrite', array('store_id')),
-    array('store_id')
-)->addForeignKey(
-    $installer->getFkName('core_url_rewrite', 'store_id', 'core_store', 'store_id'),
-    'store_id',
-    $installer->getTable('core_store'),
-    'store_id',
-    \Magento\DB\Ddl\Table::ACTION_CASCADE,
-    \Magento\DB\Ddl\Table::ACTION_CASCADE
-)->setComment(
-    'Url Rewrites'
-);
-$installer->getConnection()->createTable($table);
-
 /**
  * Create table 'design_change'
  */
diff --git a/app/code/Magento/Customer/Block/Account/Dashboard.php b/app/code/Magento/Customer/Block/Account/Dashboard.php
index 6efc5303eeeabe059d93d78d412c76575ff19f74..e1281fe0de85969b15a6d342a28d890b1233f581 100644
--- a/app/code/Magento/Customer/Block/Account/Dashboard.php
+++ b/app/code/Magento/Customer/Block/Account/Dashboard.php
@@ -164,9 +164,8 @@ class Dashboard extends \Magento\View\Element\Template
     public function getSubscriptionObject()
     {
         if (is_null($this->_subscription)) {
-            $this->_subscription = $this->_createSubscriber()->loadByCustomer(
-                $this->_customerSession->getCustomerId()
-            );
+            $this->_subscription =
+                $this->_createSubscriber()->loadByCustomerId($this->_customerSession->getCustomerId());
         }
 
         return $this->_subscription;
diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php b/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php
index 0ed6c69ed996adb9b16fe914c3c7c0728f9ec181..a10fd9dac01c6cd305dad78cddff442ffb179635 100644
--- a/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php
+++ b/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php
@@ -79,9 +79,8 @@ class Newsletter extends \Magento\View\Element\Template
     public function getSubscriptionObject()
     {
         if (is_null($this->_subscription)) {
-            $this->_subscription = $this->_createSubscriber()->loadByCustomer(
-                $this->_customerSession->getCustomerId()
-            );
+            $this->_subscription =
+                $this->_createSubscriber()->loadByCustomerId($this->_customerSession->getCustomerId());
         }
         return $this->_subscription;
     }
diff --git a/app/code/Magento/Customer/Block/Account/Forgotpassword.php b/app/code/Magento/Customer/Block/Account/Forgotpassword.php
index 7daae214e8e34b2447c037d9fab18f4f4abbb155..e206deb50fe19bb55bfacba8d0f2a0252b72b115 100644
--- a/app/code/Magento/Customer/Block/Account/Forgotpassword.php
+++ b/app/code/Magento/Customer/Block/Account/Forgotpassword.php
@@ -28,15 +28,4 @@ namespace Magento\Customer\Block\Account;
  */
 class Forgotpassword extends \Magento\View\Element\Template
 {
-    /**
-     * Forgot Password Constructor.
-     *
-     * @param \Magento\View\Element\Template\Context $context
-     * @param array $data
-     */
-    public function __construct(\Magento\View\Element\Template\Context $context, array $data = array())
-    {
-        parent::__construct($context, $data);
-        $this->_isScopePrivate = true;
-    }
 }
diff --git a/app/code/Magento/Customer/Block/Account/Resetpassword.php b/app/code/Magento/Customer/Block/Account/Resetpassword.php
index dddf1a8f9fc66bcce710953017cfae158165109f..70a1f5911a973bc4b54ddbbe30c3504cd13e67e1 100644
--- a/app/code/Magento/Customer/Block/Account/Resetpassword.php
+++ b/app/code/Magento/Customer/Block/Account/Resetpassword.php
@@ -23,22 +23,9 @@
  */
 namespace Magento\Customer\Block\Account;
 
-use Magento\View\Element\Template\Context;
-
 /**
  * Customer reset password form
  */
 class Resetpassword extends \Magento\View\Element\Template
 {
-    /**
-     * Reset Password Constructor.
-     *
-     * @param Context $context
-     * @param array $data
-     */
-    public function __construct(Context $context, array $data = array())
-    {
-        parent::__construct($context, $data);
-        $this->_isScopePrivate = true;
-    }
 }
diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php
index 5cbdef028bd9891ec3a14ebb4512e76fd5fbea11..5d7f82bab7203c69cd513f38a12cfe9d582c0d36 100644
--- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php
@@ -80,7 +80,7 @@ class Newsletter extends \Magento\Backend\Block\Widget\Form\Generic
         $form = $this->_formFactory->create();
         $form->setHtmlIdPrefix('_newsletter');
         $customerId = $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
-        $subscriber = $this->_subscriberFactory->create()->loadByCustomer($customerId);
+        $subscriber = $this->_subscriberFactory->create()->loadByCustomerId($customerId);
         $this->_coreRegistry->register('subscriber', $subscriber);
 
         $fieldset = $form->addFieldset('base_fieldset', array('legend' => __('Newsletter Information')));
diff --git a/app/code/Magento/Customer/Controller/Account.php b/app/code/Magento/Customer/Controller/Account.php
index 0b5b4a39ae6eb9272ac98aaaee59259eecc51d01..61c80a239abfe05da6093b988ceb0c5e23487576 100644
--- a/app/code/Magento/Customer/Controller/Account.php
+++ b/app/code/Magento/Customer/Controller/Account.php
@@ -448,7 +448,7 @@ class Account extends \Magento\App\Action\Action
             $customer = $this->_customerAccountService->createAccount($customerDetails, $password, $redirectUrl);
 
             if ($this->getRequest()->getParam('is_subscribed', false)) {
-                $this->_subscriberFactory->create()->updateSubscription($customer->getId(), true);
+                $this->_subscriberFactory->create()->subscribeCustomerById($customer->getId());
             }
 
             $this->_eventManager->dispatch(
diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index.php b/app/code/Magento/Customer/Controller/Adminhtml/Index.php
index 9e1337b3c2c50b6183decc4bcbd289bb65e3bfbb..73b50fcc95f776555a270438059195a2ed678ab4 100644
--- a/app/code/Magento/Customer/Controller/Adminhtml/Index.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Index.php
@@ -268,10 +268,10 @@ class Index extends \Magento\Backend\App\Action
 
         // restore data from SESSION
         if ($data && (!isset(
-            $data['customer_id']
-        ) || isset(
-            $data['customer_id']
-        ) && $data['customer_id'] == $customerId)
+                $data['customer_id']
+                ) || isset(
+                $data['customer_id']
+                ) && $data['customer_id'] == $customerId)
         ) {
             $request = clone $this->getRequest();
             $request->setParams($data);
@@ -390,7 +390,6 @@ class Index extends \Magento\Backend\App\Action
                 $addressesData = $this->_extractCustomerAddressData();
                 $request = $this->getRequest();
                 $isExistingCustomer = (bool)$customerId;
-
                 $customerBuilder = $this->_customerBuilder;
                 if ($isExistingCustomer) {
                     $savedCustomerData = $this->_customerAccountService->getCustomer($customerId);
@@ -402,7 +401,6 @@ class Index extends \Magento\Backend\App\Action
                 unset($customerData[Customer::DEFAULT_BILLING]);
                 unset($customerData[Customer::DEFAULT_SHIPPING]);
                 $customerBuilder->populateWithArray($customerData);
-
                 $addresses = array();
                 foreach ($addressesData as $addressData) {
                     $addresses[] = $this->_addressBuilder->populateWithArray($addressData)->create();
@@ -417,17 +415,22 @@ class Index extends \Magento\Backend\App\Action
                 // Save customer
                 $customerDetails = $this->_customerDetailsBuilder->setCustomer(
                     $customer
-                )->setAddresses(
-                    $addresses
-                )->create();
+                )->setAddresses($addresses)->create();
                 if ($isExistingCustomer) {
                     $this->_customerAccountService->updateCustomer($customerDetails);
                 } else {
                     $customer = $this->_customerAccountService->createAccount($customerDetails);
+                    $customerId = $customer->getId();
                 }
 
-                if ($customerData['is_subscribed']) {
-                    $this->_subscriberFactory->create()->updateSubscription($customerId, true);
+                $isSubscribed = false;
+                if ($this->_authorization->isAllowed(null)) {
+                    $isSubscribed = $this->getRequest()->getPost('subscription') !== null;
+                }
+                if ($isSubscribed) {
+                    $this->_subscriberFactory->create()->subscribeCustomerById($customerId);
+                } else {
+                    $this->_subscriberFactory->create()->unsubscribeCustomerById($customerId);
                 }
 
                 // After save
@@ -437,11 +440,8 @@ class Index extends \Magento\Backend\App\Action
                 );
 
                 // Done Saving customer, finish save action
-                $customerId = $customer->getId();
                 $this->_coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID, $customerId);
-
                 $this->messageManager->addSuccess(__('You saved the customer.'));
-
                 $returnToEdit = (bool)$this->getRequest()->getParam('back', false);
             } catch (\Magento\Validator\ValidatorException $exception) {
                 $this->_addSessionErrorMessages($exception->getMessages());
@@ -465,7 +465,6 @@ class Index extends \Magento\Backend\App\Action
                 $returnToEdit = true;
             }
         }
-
         if ($returnToEdit) {
             if ($customerId) {
                 $this->_redirect('customer/*/edit', array('id' => $customerId, '_current' => true));
@@ -563,10 +562,6 @@ class Index extends \Magento\Backend\App\Action
             );
         }
 
-        if ($this->_authorization->isAllowed(null)) {
-            $customerData['is_subscribed'] = $this->getRequest()->getPost('subscription') !== null;
-        }
-
         if (isset($customerData['disable_auto_group_change'])) {
             $customerData['disable_auto_group_change'] = empty($customerData['disable_auto_group_change']) ? '0' : '1';
         }
@@ -607,12 +602,12 @@ class Index extends \Magento\Backend\App\Action
                 // Set default billing and shipping flags to address
                 $addressData[Customer::DEFAULT_BILLING] = isset(
                     $customerData[Customer::DEFAULT_BILLING]
-                ) &&
+                    ) &&
                     $customerData[Customer::DEFAULT_BILLING] &&
                     $customerData[Customer::DEFAULT_BILLING] == $addressId;
                 $addressData[Customer::DEFAULT_SHIPPING] = isset(
                     $customerData[Customer::DEFAULT_SHIPPING]
-                ) &&
+                    ) &&
                     $customerData[Customer::DEFAULT_SHIPPING] &&
                     $customerData[Customer::DEFAULT_SHIPPING] == $addressId;
 
@@ -685,11 +680,9 @@ class Index extends \Magento\Backend\App\Action
     {
         $this->_initCustomer();
         $customerId = $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
-        $subscriber = $this->_objectManager->create(
-            'Magento\Newsletter\Model\Subscriber'
-        )->loadByCustomer(
-            $customerId
-        );
+        $subscriber = $this->_objectManager
+            ->create('Magento\Newsletter\Model\Subscriber')
+            ->loadByCustomer($customerId);
 
         $this->_coreRegistry->register('subscriber', $subscriber);
         $this->_view->loadLayout()->renderLayout();
@@ -745,13 +738,12 @@ class Index extends \Magento\Backend\App\Action
         // delete an item from cart
         $deleteItemId = $this->getRequest()->getPost('delete');
         if ($deleteItemId) {
-            $quote = $this->_objectManager->create(
-                'Magento\Sales\Model\Quote'
-            )->setWebsite(
-                $this->_objectManager->get('Magento\Core\Model\StoreManagerInterface')->getWebsite($websiteId)
-            )->loadByCustomer(
-                $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID)
-            );
+            $quote = $this->_objectManager
+                ->create('Magento\Sales\Model\Quote')
+                ->setWebsite(
+                    $this->_objectManager->get('Magento\Core\Model\StoreManagerInterface')->getWebsite($websiteId)
+                )
+                ->loadByCustomer($this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID));
             $item = $quote->getItemById($deleteItemId);
             if ($item && $item->getId()) {
                 $quote->removeItem($deleteItemId);
@@ -773,9 +765,7 @@ class Index extends \Magento\Backend\App\Action
     {
         $this->_initCustomer();
         $this->_view->loadLayout();
-        $this->_view->getLayout()->getBlock(
-            'admin.customer.view.cart'
-        )->setWebsiteId(
+        $this->_view->getLayout()->getBlock('admin.customer.view.cart')->setWebsiteId(
             (int)$this->getRequest()->getParam('website_id')
         );
         $this->_view->renderLayout();
@@ -802,13 +792,10 @@ class Index extends \Magento\Backend\App\Action
     {
         $this->_initCustomer();
         $this->_view->loadLayout();
-        $this->_view->getLayout()->getBlock(
-            'admin.customer.reviews'
-        )->setCustomerId(
+        $this->_view->getLayout()->getBlock('admin.customer.reviews')->setCustomerId(
             $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID)
-        )->setUseAjax(
-            true
-        );
+        )
+            ->setUseAjax(true);
         $this->_view->renderLayout();
     }
 
@@ -926,7 +913,7 @@ class Index extends \Magento\Backend\App\Action
             function ($customerId) {
                 // Verify customer exists
                 $this->_customerAccountService->getCustomer($customerId);
-                $this->_subscriberFactory->create()->updateSubscription($customerId, true);
+                $this->_subscriberFactory->create()->subscribeCustomerById($customerId);
             },
             $customerIds
         );
@@ -948,7 +935,7 @@ class Index extends \Magento\Backend\App\Action
             function ($customerId) {
                 // Verify customer exists
                 $this->_customerAccountService->getCustomer($customerId);
-                $this->_subscriberFactory->create()->updateSubscription($customerId, false);
+                $this->_subscriberFactory->create()->unsubscribeCustomerById($customerId);
             },
             $customerIds
         );
@@ -1045,9 +1032,7 @@ class Index extends \Magento\Backend\App\Action
                 ->urlDecode($this->getRequest()->getParam('file'));
         } elseif ($this->getRequest()->getParam('image')) {
             // show plain image
-            $file = $this->_objectManager->get(
-                'Magento\Core\Helper\Data'
-            )->urlDecode(
+            $file = $this->_objectManager->get('Magento\Core\Helper\Data')->urlDecode(
                 $this->getRequest()->getParam('image')
             );
             $plain = true;
@@ -1060,13 +1045,8 @@ class Index extends \Magento\Backend\App\Action
         $directory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR);
         $fileName = 'customer' . '/' . ltrim($file, '/');
         $path = $directory->getAbsolutePath($fileName);
-        if (!$directory->isFile(
-            $fileName
-        ) && !$this->_objectManager->get(
-            'Magento\Core\Helper\File\Storage'
-        )->processStorageFile(
-            $path
-        )
+        if (!$directory->isFile($fileName)
+            && !$this->_objectManager->get('Magento\Core\Helper\File\Storage')->processStorageFile($path)
         ) {
             throw new NotFoundException();
         }
@@ -1091,23 +1071,17 @@ class Index extends \Magento\Backend\App\Action
             $contentLength = $stat['size'];
             $contentModify = $stat['mtime'];
 
-            $this->getResponse()->setHttpResponseCode(
-                200
-            )->setHeader(
-                'Pragma',
-                'public',
-                true
-            )->setHeader(
-                'Content-type',
-                $contentType,
-                true
-            )->setHeader(
-                'Content-Length',
-                $contentLength
-            )->setHeader(
-                'Last-Modified',
-                date('r', $contentModify)
-            )->clearBody();
+            $this->getResponse()
+                ->setHttpResponseCode(200)
+                ->setHeader('Pragma', 'public', true)
+                ->setHeader(
+                    'Content-type',
+                    $contentType,
+                    true
+                )
+                ->setHeader('Content-Length', $contentLength)
+                ->setHeader('Last-Modified', date('r', $contentModify))
+                ->clearBody();
             $this->getResponse()->sendHeaders();
 
             echo $directory->readFile($fileName);
diff --git a/app/code/Magento/Customer/Model/Converter.php b/app/code/Magento/Customer/Model/Converter.php
index cf1650eddec17a01b5b3e8e4897782bdb440c3e4..faf75ff4ccec405be9363ba36701367bb758da18 100644
--- a/app/code/Magento/Customer/Model/Converter.php
+++ b/app/code/Magento/Customer/Model/Converter.php
@@ -160,12 +160,12 @@ class Converter
      * Update customer model with the data from the data object
      *
      * @param Customer $customerModel
-     * @param \Magento\Customer\Service\V1\Data\Customer $customerData
+     * @param CustomerDataObject $customerData
      * @return void
      */
     public function updateCustomerModel(
         \Magento\Customer\Model\Customer $customerModel,
-        \Magento\Customer\Service\V1\Data\Customer $customerData
+        CustomerDataObject $customerData
     ) {
         $attributes = \Magento\Service\DataObjectConverter::toFlatArray($customerData);
         foreach ($attributes as $attributeCode => $attributeValue) {
@@ -197,7 +197,7 @@ class Converter
                 continue;
             }
             if ($attrCode == 'entity_id') {
-                $attributes[\Magento\Customer\Service\V1\Data\Customer::ID] = $value;
+                $attributes[CustomerDataObject::ID] = $value;
             } else {
                 $attributes[$attrCode] = $value;
             }
diff --git a/app/code/Magento/Customer/Model/Customer.php b/app/code/Magento/Customer/Model/Customer.php
index 390288b6ab8b5a7822c99d5f03662d89d2deef2d..533f0d015f32cf3fb540a3917b2c06ff2501d119 100644
--- a/app/code/Magento/Customer/Model/Customer.php
+++ b/app/code/Magento/Customer/Model/Customer.php
@@ -29,6 +29,7 @@ use Magento\Customer\Model\Config\Share;
 use Magento\Customer\Model\Resource\Address\CollectionFactory;
 use Magento\Customer\Model\Resource\Customer as ResourceCustomer;
 use Magento\Customer\Service\V1\Data\CustomerBuilder;
+use Magento\Customer\Service\V1\Data\Customer as CustomerData;
 
 /**
  * Customer model
@@ -353,10 +354,10 @@ class Customer extends \Magento\Model\AbstractModel
     protected function _afterSave()
     {
         $customerData = (array)$this->getData();
-        $customerData[\Magento\Customer\Service\V1\Data\Customer::ID] = $this->getId();
+        $customerData[CustomerData::ID] = $this->getId();
         $dataObject = $this->_customerDataBuilder->populateWithArray($customerData)->create();
         $customerOrigData = (array)$this->getOrigData();
-        $customerOrigData[\Magento\Customer\Service\V1\Data\Customer::ID] = $this->getId();
+        $customerOrigData[CustomerData::ID] = $this->getId();
         $origDataObject = $this->_customerDataBuilder->populateWithArray($customerOrigData)->create();
         $this->_eventManager->dispatch(
             'customer_save_after_data_object',
diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_address_form.xml b/app/code/Magento/Customer/view/frontend/layout/customer_address_form.xml
index cd6aed54f9688221439f4297567ec42ad2bab9f5..2bf65f6a457077fb4c2db0ac02369710e624c037 100644
--- a/app/code/Magento/Customer/view/frontend/layout/customer_address_form.xml
+++ b/app/code/Magento/Customer/view/frontend/layout/customer_address_form.xml
@@ -31,6 +31,6 @@
         </arguments>
     </referenceBlock>
     <referenceContainer name="content">
-        <block class="Magento\Customer\Block\Address\Edit" name="customer_address_edit" template="address/edit.phtml"/>
+        <block class="Magento\Customer\Block\Address\Edit" name="customer_address_edit" template="address/edit.phtml" cacheable="false"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php b/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php
index 7c330675a64a1235b8773882199f89a6aebf6b2d..81c76f0de99a609edc74ac13887aa0b7e2181124 100644
--- a/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php
+++ b/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php
@@ -49,7 +49,7 @@ class Standard extends \Magento\Core\App\Router\Base
     protected $_routerList;
 
     /**
-     * @var \Magento\Core\App\Request\RewriteService
+     * @var \Magento\UrlRewrite\App\Request\RewriteService
      */
     protected $_urlRewriteService;
 
@@ -82,7 +82,7 @@ class Standard extends \Magento\Core\App\Router\Base
      * @param \Magento\Code\NameBuilder $nameBuilder
      * @param \Magento\App\RouterListInterface $routerList
      * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Core\App\Request\RewriteService $urlRewriteService
+     * @param \Magento\UrlRewrite\App\Request\RewriteService $urlRewriteService
      * @param \Magento\DesignEditor\Helper\Data $designEditorHelper
      * @param \Magento\DesignEditor\Model\State $designEditorState
      * @param \Magento\Backend\Model\Auth\Session $session
@@ -103,7 +103,7 @@ class Standard extends \Magento\Core\App\Router\Base
         \Magento\Code\NameBuilder $nameBuilder,
         \Magento\App\RouterListInterface $routerList,
         \Magento\ObjectManager $objectManager,
-        \Magento\Core\App\Request\RewriteService $urlRewriteService,
+        \Magento\UrlRewrite\App\Request\RewriteService $urlRewriteService,
         \Magento\DesignEditor\Helper\Data $designEditorHelper,
         \Magento\DesignEditor\Model\State $designEditorState,
         \Magento\Backend\Model\Auth\Session $session
diff --git a/app/code/Magento/DesignEditor/Model/AreaEmulator.php b/app/code/Magento/DesignEditor/Model/AreaEmulator.php
index 96401fd49072ebfccbd61d9fed8be23164463ee2..89210d61f3a2f7dab96ed08b85e541a3956c447e 100644
--- a/app/code/Magento/DesignEditor/Model/AreaEmulator.php
+++ b/app/code/Magento/DesignEditor/Model/AreaEmulator.php
@@ -47,10 +47,7 @@ class AreaEmulator
         $configuration = array(
             'Magento\Core\Model\Layout' => array(
                 'arguments' => array(
-                    'area' => array(
-                        \Magento\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE => 'string',
-                        'value' => $areaCode
-                    )
+                    'area' => $areaCode
                 )
             )
         );
diff --git a/app/code/Magento/DesignEditor/etc/frontend/di.xml b/app/code/Magento/DesignEditor/etc/frontend/di.xml
index a377d268aef636be1a768b9a2e7f0eb664231c46..afa34908efc8635f0e28d139eff7ece9f613fcb9 100644
--- a/app/code/Magento/DesignEditor/etc/frontend/di.xml
+++ b/app/code/Magento/DesignEditor/etc/frontend/di.xml
@@ -28,7 +28,7 @@
         <arguments>
             <argument name="routerList" xsi:type="array">
                 <item name="vde" xsi:type="array">
-                    <item name="instance" xsi:type="string">Magento\DesignEditor\Controller\Varien\Router\Standard</item>
+                    <item name="class" xsi:type="string">Magento\DesignEditor\Controller\Varien\Router\Standard</item>
                     <item name="disable" xsi:type="boolean">false</item>
                     <item name="sortOrder" xsi:type="string">40</item>
                 </item>
diff --git a/app/code/Magento/DesignEditor/etc/module.xml b/app/code/Magento/DesignEditor/etc/module.xml
index b894e8f3ef2671b3850c39af49521299cd3d54e2..bd8504b96d200ca402d5b176ebb9a238f85acc90 100644
--- a/app/code/Magento/DesignEditor/etc/module.xml
+++ b/app/code/Magento/DesignEditor/etc/module.xml
@@ -33,6 +33,7 @@
             <module name="Magento_Backend"/>
             <module name="Magento_Core"/>
             <module name="Magento_Eav"/>
+            <module name="Magento_UrlRewrite"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Eav/Model/Entity/Setup/Context.php b/app/code/Magento/Eav/Model/Entity/Setup/Context.php
index 7036a748551a162d70e1e6912ba51189f1059764..24f657a191f363647b4b68c4b73e94fcb7914722 100644
--- a/app/code/Magento/Eav/Model/Entity/Setup/Context.php
+++ b/app/code/Magento/Eav/Model/Entity/Setup/Context.php
@@ -38,7 +38,7 @@ class Context extends \Magento\Core\Model\Resource\Setup\Context
      * @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\Module\ResourceInterface $resourceResource
      * @param \Magento\Core\Model\Resource\Setup\MigrationFactory $migrationFactory
      * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $themeResourceFactory
      * @param \Magento\Core\Model\Theme\CollectionFactory $themeFactory
@@ -52,7 +52,7 @@ class Context extends \Magento\Core\Model\Resource\Setup\Context
         \Magento\App\Resource $resource,
         \Magento\Module\Dir\Reader $modulesReader,
         \Magento\Module\ModuleListInterface $moduleList,
-        \Magento\Core\Model\Resource\Resource $resourceResource,
+        \Magento\Module\ResourceInterface $resourceResource,
         \Magento\Core\Model\Resource\Setup\MigrationFactory $migrationFactory,
         \Magento\Core\Model\Resource\Theme\CollectionFactory $themeResourceFactory,
         \Magento\Core\Model\Theme\CollectionFactory $themeFactory,
diff --git a/app/code/Magento/Core/Model/Template.php b/app/code/Magento/Email/Model/AbstractTemplate.php
similarity index 97%
rename from app/code/Magento/Core/Model/Template.php
rename to app/code/Magento/Email/Model/AbstractTemplate.php
index d350ffc83bb4a2ee0eb98efd6bbcd7511c92ba59..424349458e2a85878625f4984848b5cc37d04a78 100644
--- a/app/code/Magento/Core/Model/Template.php
+++ b/app/code/Magento/Email/Model/AbstractTemplate.php
@@ -23,7 +23,7 @@
  * @copyright   Copyright (c) 2014 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\Email\Model;
 
 /**
  * Template model class
@@ -32,7 +32,7 @@ namespace Magento\Core\Model;
  * @package     Magento_Core
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-abstract class Template extends \Magento\Model\AbstractModel implements \Magento\App\TemplateTypesInterface
+abstract class AbstractTemplate extends \Magento\Model\AbstractModel implements \Magento\App\TemplateTypesInterface
 {
     /**
      * Default design area for emulation
diff --git a/app/code/Magento/Email/Model/Template.php b/app/code/Magento/Email/Model/Template.php
index b5ea656352fa5230a2129584719f1cc6af60673e..47204cc6b9934c35d38d246870be0a416de982da 100644
--- a/app/code/Magento/Email/Model/Template.php
+++ b/app/code/Magento/Email/Model/Template.php
@@ -70,7 +70,7 @@ use Magento\Filter\Template as FilterTemplate;
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-class Template extends \Magento\Core\Model\Template implements \Magento\Mail\TemplateInterface
+class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento\Mail\TemplateInterface
 {
     /**
      * Configuration path for default email templates
diff --git a/app/code/Magento/GiftMessage/view/adminhtml/form.phtml b/app/code/Magento/GiftMessage/view/adminhtml/form.phtml
deleted file mode 100644
index 5c2611c86c3d21f8c19c1f45541b4139c7a944d7..0000000000000000000000000000000000000000
--- a/app/code/Magento/GiftMessage/view/adminhtml/form.phtml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    design
- * @package     default_default
- * @copyright   Copyright (c) 2014 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->helper('Magento\Core\Helper\Js')->includeScript('Magento_Sales::order/create/giftmessage.js') ?>
-<?php if(!$this->getSaveMode()): ?>
-<form action="<?php echo $this->getSaveUrl() ?>" id="message-form" method="post" class="a-left">
-    <?php echo $this->getBlockHtml('formkey')?>
-    <?php echo $this->getFormHtml(); ?>
-    <?php echo $this->getSaveButtonHtml() ?>
-    <?php echo $this->getCancelButtonHtml() ?>
-    <?php if($this->getMessage()->getGiftMessageId()): ?>
-    <?php echo $this->getRemoveButtonHtml() ?>
-    <?php endif; ?>
-</form>
-<?php elseif($this->getSaveMode()=='save'): ?>
-<h3><?php echo __('The gift message has been saved.') ?></h3>
-<br /><?php echo $this->getCloseButtonHtml() ?>
-<?php else: ?>
-<h3><?php echo __('The gift message has been removed.') ?></h3>
-<br /><?php echo $this->getCloseButtonHtml() ?>
-<?php endif; ?>
-<script type="text/javascript">
-<!--
-<?php if(!$this->getSaveMode()): ?>
-    var giftMessageWindowObject = new GiftMessageWindow('<?php echo $this->getUniqueId() ?>','message-form', '<?php echo $this->getRemoveUrl() ?>');
-    giftMessageWindowObject.confirmMessage = '<?php echo $this->getEscapedForJs(__('Are you sure?')) ?>';
-<?php else: ?>
-    var giftMessageWindowObject = new GiftMessageWindow('<?php echo $this->getUniqueId() ?>', null, '<?php echo $this->getRemoveUrl() ?>');
-    Event.observe(window, 'load', function(evt) {
-        giftMessageWindowObject.updateParent('<?php echo $this->getEditUrl() ?>', '<?php echo $this->getButtonUrl() ?>');
-    });
-<?php endif; ?>
-//-->
-</script>
diff --git a/app/code/Magento/GiftMessage/view/adminhtml/helper.phtml b/app/code/Magento/GiftMessage/view/adminhtml/helper.phtml
deleted file mode 100644
index 072af8a2902510809ecfb9ab524b83864d4c0ff1..0000000000000000000000000000000000000000
--- a/app/code/Magento/GiftMessage/view/adminhtml/helper.phtml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    design
- * @package     default_default
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
- */
-?>
-<?php if($this->getType()!== 'main' && !$this->getScriptIncluded() && $this->getCanDisplayContainer()): ?>
-<?php echo $this->helper('Magento\Core\Helper\Js')->includeScript('Magento_Sales::order/create/giftmessage.js') ?>
-<?php $this->setScriptIncluded(true); ?>
-<?php endif; ?>
-<?php if($this->getCanDisplayContainer()): ?>
-<div id="<?php echo $this->getId() ?>">
-<?php endif; ?>
-<?php switch ($this->getType()): ?>
-<?php case 'item': ?>
-    <a class="listen-for-click" href="#">
-        <?php if($this->hasGiftMessage()): ?>
-        <?php echo __('Edit') ?>
-        <?php else: ?>
-        <?php echo __('Add') ?>
-        <?php endif; ?>
-    </a>
-    <?php break; ?>
-<?php case 'order_item': ?>
-    <a class="listen-for-click" href="#">
-        <?php if($this->hasGiftMessage()): ?>
-        <?php echo __('Edit') ?>
-        <?php else: ?>
-        <?php echo __('Add') ?>
-        <?php endif; ?>
-    </a>
-    <?php break; ?>
-<?php case 'main': ?>
-        <?php if($this->hasGiftMessage()): ?>
-            <?php if($_giftMessage=$this->getMessage()): ?>
-            <span class="field-row">
-                <label><?php echo __('From') ?></label>
-                <?php echo $this->escapeHtml($_giftMessage->getSender()) ?>
-            </span>
-            <span class="field-row">
-                <label><?php echo __('To') ?></label>
-                <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?>
-            </span>
-            <span class="field-row">
-                <label><?php echo __('Message') ?></label>
-                 <div class="f-left"><?php echo $this->prepareAsIs($_giftMessage->getMessage()) ?></div>
-            </span>
-            <?php endif; ?>
-        <?php echo $this->getWidgetButtonHtml(__('Edit'), 'edit') ?>
-        <?php else: ?>
-        <?php echo $this->getWidgetButtonHtml(__('Add'), 'add') ?>
-        <?php endif; ?>
-    <?php break; ?>
-<?php case 'order': ?>
-        <?php if($this->hasGiftMessage()): ?>
-            <?php if($_giftMessage=$this->getMessage()): ?>
-
-            <span class="field-row">
-                <label><?php echo __('From') ?></label>
-                <?php echo $this->escapeHtml($_giftMessage->getSender()) ?>
-            </span>
-            <span class="field-row">
-                <label><?php echo __('To') ?></label>
-                <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?>
-            </span>
-            <span class="field-row">
-                <label><?php echo __('Message') ?></label>
-                <div class="f-left"><?php echo $this->prepareAsIs($_giftMessage->getMessage()) ?></div>
-            </span>
-
-            <?php endif; ?>
-        <?php echo $this->getWidgetButtonHtml(__('Edit'), 'edit') ?>
-        <?php else: ?>
-        <?php echo $this->getWidgetButtonHtml(__('Add'), 'add') ?>
-        <?php endif; ?>
-    <?php break; ?>
-<?php endswitch ?>
-<?php if($this->getCanDisplayContainer()): ?>
-</div>
-<script type="text/javascript">
-var <?php echo $this->getJsObjectName() ?> = new GiftMessage('<?php echo $this->getId() ?>');
-<?php echo $this->getJsObjectName() ?>.url = '<?php echo $this->getEditUrl() ?>';
-</script>
-<?php endif; ?>
diff --git a/app/code/Magento/Index/Model/Shell.php b/app/code/Magento/Index/Model/Shell.php
index b7e42e46e1c4e9947e3fe461966aa84811e00efc..29c0afb6e88d853f2e0f2e56475a877e18bd55db 100644
--- a/app/code/Magento/Index/Model/Shell.php
+++ b/app/code/Magento/Index/Model/Shell.php
@@ -192,8 +192,11 @@ class Shell extends \Magento\App\AbstractShell
         foreach ($processes as $process) {
             /* @var $process \Magento\Index\Model\Process */
             try {
+                $startTime = microtime(true);
                 $process->reindexEverything();
-                echo $process->getIndexer()->getName() . " index was rebuilt successfully\n";
+                $resultTime = microtime(true) - $startTime;
+                echo $process->getIndexer()->getName()
+                    . " index was rebuilt successfully in " . gmdate('H:i:s', $resultTime) . "\n";
             } catch (\Magento\Model\Exception $e) {
                 echo $e->getMessage() . "\n";
                 $this->_hasErrors = true;
diff --git a/app/code/Magento/Indexer/Model/Shell.php b/app/code/Magento/Indexer/Model/Shell.php
index fe5ee2cb764dc7fc6055c6da5c958adb12e0b35f..a9c72bdf9a59c3ef97c4283e37ef3d412e1fb666 100644
--- a/app/code/Magento/Indexer/Model/Shell.php
+++ b/app/code/Magento/Indexer/Model/Shell.php
@@ -184,13 +184,16 @@ class Shell extends \Magento\App\AbstractShell
 
         foreach ($indexers as $indexer) {
             try {
+                $startTime = microtime(true);
                 $indexer->reindexAll();
-                echo $indexer->getTitle() . " index has been rebuilt successfully" . PHP_EOL;
+                $resultTime = microtime(true) - $startTime;
+                echo $indexer->getTitle() . ' index has been rebuilt successfully in '
+                    . gmdate('H:i:s', $resultTime) . PHP_EOL;
             } catch (\Magento\Model\Exception $e) {
                 echo $e->getMessage() . PHP_EOL;
                 $this->hasErrors = true;
             } catch (\Exception $e) {
-                echo $indexer->getTitle() . " indexer process unknown error:" . PHP_EOL;
+                echo $indexer->getTitle() . ' indexer process unknown error:' . PHP_EOL;
                 echo $e . PHP_EOL;
                 $this->hasErrors = true;
             }
diff --git a/app/code/Magento/Core/App/Action/Plugin/Install.php b/app/code/Magento/Install/App/Action/Plugin/Install.php
similarity index 98%
rename from app/code/Magento/Core/App/Action/Plugin/Install.php
rename to app/code/Magento/Install/App/Action/Plugin/Install.php
index e782b7cd40d226b22d24505d0386b7a48f71137f..57e3b716c500cd8c826c4ae3a8f50aeb9344d001 100644
--- a/app/code/Magento/Core/App/Action/Plugin/Install.php
+++ b/app/code/Magento/Install/App/Action/Plugin/Install.php
@@ -22,7 +22,7 @@
  * @copyright   Copyright (c) 2014 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\Action\Plugin;
+namespace Magento\Install\App\Action\Plugin;
 
 class Install
 {
diff --git a/app/code/Magento/Core/Model/Resource/Resource.php b/app/code/Magento/Install/Model/Resource/Resource.php
similarity index 86%
rename from app/code/Magento/Core/Model/Resource/Resource.php
rename to app/code/Magento/Install/Model/Resource/Resource.php
index 8ce9180fda1d8f0c38ae6404b055ab77a9629efc..e1e613a722926df9336307bf96bd1ff1e09bcba5 100644
--- a/app/code/Magento/Core/Model/Resource/Resource.php
+++ b/app/code/Magento/Install/Model/Resource/Resource.php
@@ -18,21 +18,15 @@
  * 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) 2014 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\Install\Model\Resource;
 
 /**
- * Core Resource Resource Model
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Resource Resource Model
  */
-class Resource extends \Magento\Model\Resource\Db\AbstractDb
+class Resource extends \Magento\Model\Resource\Db\AbstractDb implements \Magento\Module\ResourceInterface
 {
     /**
      * Database versions
@@ -95,10 +89,7 @@ class Resource extends \Magento\Model\Resource\Db\AbstractDb
     }
 
     /**
-     * Get Module version from DB
-     *
-     * @param string $resName
-     * @return false|string
+     * {@inheritdoc}
      */
     public function getDbVersion($resName)
     {
@@ -110,11 +101,7 @@ class Resource extends \Magento\Model\Resource\Db\AbstractDb
     }
 
     /**
-     * Set module version into DB
-     *
-     * @param string $resName
-     * @param string $version
-     * @return int
+     * {@inheritdoc}
      */
     public function setDbVersion($resName, $version)
     {
@@ -134,10 +121,7 @@ class Resource extends \Magento\Model\Resource\Db\AbstractDb
     }
 
     /**
-     * Get resource data version
-     *
-     * @param string $resName
-     * @return string|false
+     * {@inheritdoc}
      */
     public function getDataVersion($resName)
     {
@@ -151,11 +135,7 @@ class Resource extends \Magento\Model\Resource\Db\AbstractDb
     }
 
     /**
-     * Specify resource data version
-     *
-     * @param string $resName
-     * @param string $version
-     * @return $this
+     * {@inheritdoc}
      */
     public function setDataVersion($resName, $version)
     {
@@ -168,6 +148,5 @@ class Resource extends \Magento\Model\Resource\Db\AbstractDb
             self::$_dataVersions[$resName] = $version;
             $this->_getWriteAdapter()->insert($this->getMainTable(), $data);
         }
-        return $this;
     }
 }
diff --git a/app/code/Magento/Install/etc/di.xml b/app/code/Magento/Install/etc/di.xml
index 9cd09570203e910670093fcd87560d32ea32fc20..547c3f2e3c21427871d343da220fe5f8d436a7fb 100644
--- a/app/code/Magento/Install/etc/di.xml
+++ b/app/code/Magento/Install/etc/di.xml
@@ -25,6 +25,7 @@
 -->
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/ObjectManager/etc/config.xsd">
     <preference for="Magento\View\Design\Theme\ListInterface" type="Magento\Core\Model\Theme\Collection" />
+    <preference for="Magento\Module\ResourceInterface" type="Magento\Install\Model\Resource\Resource" />
     <virtualType name="Magento\Install\Model\Session\Storage" type="Magento\Session\Storage">
         <arguments>
             <argument name="namespace" xsi:type="string">install</argument>
@@ -140,4 +141,7 @@
             <argument name="areaCode" xsi:type="string">adminhtml</argument>
         </arguments>
     </type>
+    <type name="Magento\App\Action\Action">
+        <plugin name="installInitializer" type="Magento\Install\App\Action\Plugin\Install" sortOrder="5"/>
+    </type>
 </config>
diff --git a/app/code/Magento/Install/etc/install/di.xml b/app/code/Magento/Install/etc/install/di.xml
index 426b6b60179f6e4dfea3f3edef4aee903346971a..ec4b144de731b4f8a79ebcedfaa15609d02a54aa 100644
--- a/app/code/Magento/Install/etc/install/di.xml
+++ b/app/code/Magento/Install/etc/install/di.xml
@@ -29,7 +29,7 @@
         <arguments>
             <argument name="routerList" xsi:type="array">
                 <item name="install" xsi:type="array">
-                    <item name="instance" xsi:type="string">Magento\Core\App\Router\Base</item>
+                    <item name="class" xsi:type="string">Magento\Core\App\Router\Base</item>
                     <item name="disable" xsi:type="boolean">false</item>
                     <item name="sortOrder" xsi:type="string">20</item>
                 </item>
diff --git a/app/code/Magento/Install/view/install/page.phtml b/app/code/Magento/Install/view/install/page.phtml
index cc55f4f7d62bf90e323f17d6dbcce1e1871a29e5..6aa82558d6bd3a47809b867485a15b09a985e6c9 100644
--- a/app/code/Magento/Install/view/install/page.phtml
+++ b/app/code/Magento/Install/view/install/page.phtml
@@ -26,7 +26,7 @@
 ?>
 <?php
 /**
- * Template for \Magento\Theme\Block\Html
+ * @var $this \Magento\Theme\Block\Html\Head
  */
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -51,7 +51,7 @@
     <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/reset.css') ?>" type="text/css" media="all"/>
     <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/boxes.css') ?>" type="text/css" media="all"/>
     <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/clears.css') ?>" type="text/css" media="all"/>
-    <?php echo $this->helper('Magento\Core\Helper\Js')->getTranslatorScript() ?>
+    <?php echo $this->getTranslatorScript(); ?>
 </head>
 
 <body>
diff --git a/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_customer_address.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_customer_address.xml
index f3864993932ff31fd1ea38e606f8651df8c5cc77..566da08e97d687ffe54343573b5544e71e3c9cd8 100644
--- a/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_customer_address.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_customer_address.xml
@@ -25,7 +25,7 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Core/etc/layout_single.xsd" label="Multishipping Checkout Customer Address Edit Form" design_abstraction="custom">
     <referenceContainer name="content">
-        <block class="Magento\Customer\Block\Address\Edit" name="customer_address_edit" template="address/edit.phtml"/>
+        <block class="Magento\Customer\Block\Address\Edit" name="customer_address_edit" template="address/edit.phtml" cacheable="false"/>
     </referenceContainer>
     <update handle="customer_form_template_handle"/>
 </layout>
diff --git a/app/code/Magento/Newsletter/Controller/Manage.php b/app/code/Magento/Newsletter/Controller/Manage.php
index df40cdb6b574c747dbf3b4d39148135926fe0a6e..350a6916c57a32d16a287e3726039a88d169c252 100644
--- a/app/code/Magento/Newsletter/Controller/Manage.php
+++ b/app/code/Magento/Newsletter/Controller/Manage.php
@@ -25,7 +25,6 @@
  */
 namespace Magento\Newsletter\Controller;
 
-use Magento\App\Action\NotFoundException;
 use Magento\App\RequestInterface;
 
 /**
@@ -50,22 +49,54 @@ class Manage extends \Magento\App\Action\Action
      */
     protected $_storeManager;
 
+    /**
+     * @var \Magento\Customer\Service\V1\CustomerAccountServiceInterface
+     */
+    protected $_customerAccountService;
+
+    /**
+     * @var \Magento\Customer\Service\V1\Data\CustomerDetailsBuilder
+     */
+    protected $_customerDetailsBuilder;
+
+    /**
+     * @var \Magento\Customer\Service\V1\Data\CustomerBuilder
+     */
+    protected $_customerBuilder;
+
+    /**
+     * @var \Magento\Newsletter\Model\SubscriberFactory
+     */
+    protected $_subscriberFactory;
+
     /**
      * @param \Magento\App\Action\Context $context
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService
+     * @param \Magento\Customer\Service\V1\Data\CustomerDetailsBuilder $customerDetailsBuilder
+     * @param \Magento\Customer\Service\V1\Data\CustomerBuilder $customerBuilder
+     * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
      */
     public function __construct(
         \Magento\App\Action\Context $context,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Core\App\Action\FormKeyValidator $formKeyValidator,
-        \Magento\Core\Model\StoreManagerInterface $storeManager
+        \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService,
+        \Magento\Customer\Service\V1\Data\CustomerDetailsBuilder $customerDetailsBuilder,
+        \Magento\Customer\Service\V1\Data\CustomerBuilder $customerBuilder,
+        \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
     ) {
         $this->_storeManager = $storeManager;
         parent::__construct($context);
         $this->_formKeyValidator = $formKeyValidator;
         $this->_customerSession = $customerSession;
+        $this->_customerAccountService = $customerAccountService;
+        $this->_customerDetailsBuilder = $customerDetailsBuilder;
+        $this->_customerBuilder = $customerBuilder;
+        $this->_subscriberFactory = $subscriberFactory;
     }
 
     /**
@@ -109,19 +140,29 @@ class Manage extends \Magento\App\Action\Action
         if (!$this->_formKeyValidator->validate($this->getRequest())) {
             return $this->_redirect('customer/account/');
         }
-        try {
-            $this->_customerSession->getCustomer()->setStoreId(
-                $this->_storeManager->getStore()->getId()
-            )->setIsSubscribed(
-                (bool)$this->getRequest()->getParam('is_subscribed', false)
-            )->save();
-            if ((bool)$this->getRequest()->getParam('is_subscribed', false)) {
-                $this->messageManager->addSuccess(__('We saved the subscription.'));
-            } else {
-                $this->messageManager->addSuccess(__('We removed the subscription.'));
-            }
-        } catch (\Exception $e) {
+
+        $customerId = $this->_customerSession->getCustomerId();
+        if (is_null($customerId)) {
             $this->messageManager->addError(__('Something went wrong while saving your subscription.'));
+        } else {
+            try {
+                $customer = $this->_customerAccountService->getCustomer($customerId);
+                $storeId = $this->_storeManager->getStore()->getId();
+                $customerDetails = $this->_customerDetailsBuilder->setAddresses(null)
+                    ->setCustomer($this->_customerBuilder->populate($customer)->setStoreId($storeId)->create())
+                    ->create();
+                $this->_customerAccountService->updateCustomer($customerDetails);
+
+                if ((boolean)$this->getRequest()->getParam('is_subscribed', false)) {
+                    $this->_subscriberFactory->create()->subscribeCustomerById($customerId);
+                    $this->messageManager->addSuccess(__('We saved the subscription.'));
+                } else {
+                    $this->_subscriberFactory->create()->unsubscribeCustomerById($customerId);
+                    $this->messageManager->addSuccess(__('We removed the subscription.'));
+                }
+            } catch (\Exception $e) {
+                $this->messageManager->addError(__('Something went wrong while saving your subscription.'));
+            }
         }
         $this->_redirect('customer/account/');
     }
diff --git a/app/code/Magento/Newsletter/Controller/Subscriber.php b/app/code/Magento/Newsletter/Controller/Subscriber.php
index 1392bf2dfca2a5cb1a9a2a26752b250f6f1033ac..2fc1a8ab2990c923214bc2dd684e5cf4044d71dc 100644
--- a/app/code/Magento/Newsletter/Controller/Subscriber.php
+++ b/app/code/Magento/Newsletter/Controller/Subscriber.php
@@ -33,63 +33,68 @@
  */
 namespace Magento\Newsletter\Controller;
 
+use Magento\App\Action\Context;
+use Magento\Core\Model\StoreManagerInterface;
+use Magento\Customer\Model\Session;
+use Magento\Customer\Service\V1\CustomerAccountServiceInterface;
+use Magento\Newsletter\Model\SubscriberFactory;
+use Magento\Customer\Helper\Data as CustomerHelper;
+
 class Subscriber extends \Magento\App\Action\Action
 {
-    /**
-     * Session
-     *
-     * @var \Magento\Core\Model\Session
-     */
-    protected $_session;
-
     /**
      * Customer session
      *
-     * @var \Magento\Customer\Model\Session
+     * @var Session
      */
     protected $_customerSession;
 
     /**
-     * Customer factory
+     * Customer Service
      *
-     * @var \Magento\Customer\Model\CustomerFactory
+     * @var CustomerAccountServiceInterface
      */
-    protected $_customerFactory;
+    protected $_customerService;
 
     /**
      * Subscriber factory
      *
-     * @var \Magento\Newsletter\Model\SubscriberFactory
+     * @var SubscriberFactory
      */
     protected $_subscriberFactory;
 
     /**
-     * @var \Magento\Core\Model\StoreManagerInterface
+     * @var StoreManagerInterface
      */
     protected $_storeManager;
 
     /**
-     * @param \Magento\App\Action\Context $context
-     * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
-     * @param \Magento\Customer\Model\CustomerFactory $customerFactory
-     * @param \Magento\Customer\Model\Session $customerSession
-     * @param \Magento\Core\Model\Session $session
-     * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @var CustomerHelper
+     */
+    protected $_customerHelper;
+
+    /**
+     * @param Context $context
+     * @param SubscriberFactory $subscriberFactory
+     * @param CustomerAccountServiceInterface $customerService
+     * @param Session $customerSession
+     * @param StoreManagerInterface $storeManager
+     * @param CustomerHelper $customerHelper
      */
     public function __construct(
-        \Magento\App\Action\Context $context,
-        \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
-        \Magento\Customer\Model\CustomerFactory $customerFactory,
-        \Magento\Customer\Model\Session $customerSession,
-        \Magento\Core\Model\Session $session,
-        \Magento\Core\Model\StoreManagerInterface $storeManager
+        Context $context,
+        SubscriberFactory $subscriberFactory,
+        CustomerAccountServiceInterface $customerService,
+        Session $customerSession,
+        StoreManagerInterface $storeManager,
+        CustomerHelper $customerHelper
     ) {
-        $this->_storeManager = $storeManager;
         parent::__construct($context);
+        $this->_storeManager = $storeManager;
         $this->_subscriberFactory = $subscriberFactory;
-        $this->_customerFactory = $customerFactory;
+        $this->_customerService = $customerService;
         $this->_customerSession = $customerSession;
-        $this->_session = $session;
+        $this->_customerHelper = $customerHelper;
     }
 
     /**
@@ -104,33 +109,9 @@ class Subscriber extends \Magento\App\Action\Action
             $email = (string)$this->getRequest()->getPost('email');
 
             try {
-                if (!\Zend_Validate::is($email, 'EmailAddress')) {
-                    throw new \Magento\Model\Exception(__('Please enter a valid email address.'));
-                }
-
-                if ($this->_objectManager->get(
-                    'Magento\Core\Model\Store\Config'
-                )->getConfig(
-                    \Magento\Newsletter\Model\Subscriber::XML_PATH_ALLOW_GUEST_SUBSCRIBE_FLAG
-                ) != 1 && !$this->_customerSession->isLoggedIn()
-                ) {
-                    throw new \Magento\Model\Exception(
-                        __(
-                            'Sorry, but the administrator denied subscription for guests. ' .
-                            'Please <a href="%1">register</a>.',
-                            $this->_objectManager->get('Magento\Customer\Helper\Data')->getRegisterUrl()
-                        )
-                    );
-                }
-
-                $ownerId = $this->_customerFactory->create()->setWebsiteId(
-                    $this->_storeManager->getStore()->getWebsiteId()
-                )->loadByEmail(
-                    $email
-                )->getId();
-                if ($ownerId !== null && $ownerId != $this->_customerSession->getId()) {
-                    throw new \Magento\Model\Exception(__('This email address is already assigned to another user.'));
-                }
+                $this->validateEmailFormat($email);
+                $this->validateGuestSubscription();
+                $this->validateEmailAvailable($email);
 
                 $status = $this->_subscriberFactory->create()->subscribe($email);
                 if ($status == \Magento\Newsletter\Model\Subscriber::STATUS_NOT_ACTIVE) {
@@ -198,4 +179,57 @@ class Subscriber extends \Magento\App\Action\Action
         }
         $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl());
     }
+
+    /**
+     * Validates that the email address isn't being used by a different account.
+     *
+     * @param string $email
+     * @throws \Magento\Model\Exception
+     * @return void
+     */
+    protected function validateEmailAvailable($email)
+    {
+        $websiteId = $this->_storeManager->getStore()->getWebsiteId();
+        if ($this->_customerSession->getCustomerDataObject()->getEmail() !== $email
+            && !$this->_customerService->isEmailAvailable($email, $websiteId)
+        ) {
+            throw new \Magento\Model\Exception(__('This email address is already assigned to another user.'));
+        }
+    }
+
+    /**
+     * Validates that if the current user is a guest, that they can subscribe to a newsletter.
+     *
+     * @throws \Magento\Model\Exception
+     * @return void
+     */
+    protected function validateGuestSubscription()
+    {
+        if ($this->_objectManager->get('Magento\Core\Model\Store\Config')
+                ->getConfig(\Magento\Newsletter\Model\Subscriber::XML_PATH_ALLOW_GUEST_SUBSCRIBE_FLAG) != 1
+            && !$this->_customerSession->isLoggedIn()
+        ) {
+            throw new \Magento\Model\Exception(
+                __(
+                    'Sorry, but the administrator denied subscription for guests. '
+                    . 'Please <a href="%1">register</a>.',
+                    $this->_customerHelper->getRegisterUrl()
+                )
+            );
+        }
+    }
+
+    /**
+     * Validates the format of the email address
+     *
+     * @param string $email
+     * @throws \Magento\Model\Exception
+     * @return void
+     */
+    protected function validateEmailFormat($email)
+    {
+        if (!\Zend_Validate::is($email, 'EmailAddress')) {
+            throw new \Magento\Model\Exception(__('Please enter a valid email address.'));
+        }
+    }
 }
diff --git a/app/code/Magento/Newsletter/Model/Observer.php b/app/code/Magento/Newsletter/Model/Observer.php
index 8c126039745a3b624131deb312c699a3c3d13e4b..4224d15cd1d9cdef81d744c95b3ad6e0c87f6fac 100644
--- a/app/code/Magento/Newsletter/Model/Observer.php
+++ b/app/code/Magento/Newsletter/Model/Observer.php
@@ -41,74 +41,33 @@ class Observer
      */
     protected $_queueCollectionFactory;
 
-    /**
-     * Subscriber factory
-     *
-     * @var \Magento\Newsletter\Model\SubscriberFactory
-     */
-    protected $_subscriberFactory;
-
     /**
      * Construct
      *
-     * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
      * @param \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $queueCollectionFactory
      */
     public function __construct(
-        \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
         \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $queueCollectionFactory
     ) {
-        $this->_subscriberFactory = $subscriberFactory;
         $this->_queueCollectionFactory = $queueCollectionFactory;
     }
 
     /**
-     * Subscribe customer handler
-     *
-     * @param \Magento\Object $observer
-     * @return $this
-     */
-    public function subscribeCustomer($observer)
-    {
-        $customer = $observer->getEvent()->getCustomer();
-        if ($customer instanceof \Magento\Customer\Model\Customer) {
-            $this->_subscriberFactory->create()->subscribeCustomer($customer);
-        }
-        return $this;
-    }
-
-    /**
-     * Customer delete handler
-     *
-     * @param \Magento\Object $observer
-     * @return $this
-     */
-    public function customerDeleted($observer)
-    {
-        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
-        $subscriber = $this->_subscriberFactory->create();
-        $subscriber->loadByEmail($observer->getEvent()->getCustomer()->getEmail());
-        if ($subscriber->getId()) {
-            $subscriber->delete();
-        }
-        return $this;
-    }
-
-    /**
-     * Customer delete handler
+     * Scheduled send handler
      *
      * @param Schedule $schedule
      * @return void
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function scheduledSend($schedule)
     {
-        $countOfQueue = 3;
-        $countOfSubscritions = 20;
+        $countOfQueue  = 3;
+        $countOfSubscriptions = 20;
 
         /** @var \Magento\Newsletter\Model\Resource\Queue\Collection $collection */
         $collection = $this->_queueCollectionFactory->create();
         $collection->setPageSize($countOfQueue)->setCurPage(1)->addOnlyForSendingFilter()->load();
 
-        $collection->walk('sendPerSubscriber', array($countOfSubscritions));
+         $collection->walk('sendPerSubscriber', array($countOfSubscriptions));
     }
 }
diff --git a/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php
new file mode 100644
index 0000000000000000000000000000000000000000..e0e1ab094ffa6ac8f5bbf4fc72631823dd4e65d4
--- /dev/null
+++ b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php
@@ -0,0 +1,113 @@
+<?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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\Newsletter\Model\Plugin;
+
+use Magento\Customer\Service\V1\CustomerAccountServiceInterface;
+use Magento\Customer\Service\V1\Data\Customer;
+use Magento\Customer\Service\V1\Data\CustomerDetails;
+use Magento\Newsletter\Model\SubscriberFactory;
+
+class CustomerPlugin
+{
+    /**
+     * Factory used for manipulating newsletter subscriptions
+     *
+     * @var SubscriberFactory
+     */
+    private $subscriberFactory;
+
+    /**
+     * Constructor
+     *
+     * @param SubscriberFactory $subscriberFactory
+     */
+    public function __construct(
+        SubscriberFactory $subscriberFactory
+    ) {
+        $this->subscriberFactory = $subscriberFactory;
+    }
+
+    /**
+     * Plugin after create account that updates any newsletter subscription that may have existed.
+     *
+     * @param CustomerAccountServiceInterface $subject
+     * @param Customer $customer
+     * @return Customer
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function afterCreateAccount(CustomerAccountServiceInterface $subject, Customer $customer)
+    {
+        $this->subscriberFactory->create()->updateSubscription($customer->getId());
+
+        return $customer;
+    }
+
+    /**
+     * Plugin around updating a customer account that updates any newsletter subscription that may have existed.
+     *
+     * @param CustomerAccountServiceInterface $subject
+     * @param callable $updateCustomer
+     * @param CustomerDetails $customerDetails
+     * @return void
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function aroundUpdateCustomer(
+        CustomerAccountServiceInterface $subject,
+        callable $updateCustomer,
+        CustomerDetails $customerDetails
+    ) {
+        $updateCustomer($customerDetails);
+
+        $this->subscriberFactory->create()->updateSubscription($customerDetails->getCustomer()->getId());
+    }
+
+    /**
+     * Plugin after delete customer that updates any newsletter subscription that may have existed.
+     *
+     * @param CustomerAccountServiceInterface $subject
+     * @param callable $deleteCustomer Function we are wrapping around
+     * @param int $customerId Input to the function
+     * @return void
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function aroundDeleteCustomer(
+        CustomerAccountServiceInterface $subject,
+        callable $deleteCustomer,
+        $customerId
+    ) {
+        $customer = $subject->getCustomer($customerId);
+
+        $deleteCustomer($customerId);
+
+        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+        $subscriber = $this->subscriberFactory->create();
+        $subscriber->loadByEmail($customer->getEmail());
+        if ($subscriber->getId()) {
+            $subscriber->delete();
+        }
+    }
+}
diff --git a/app/code/Magento/Newsletter/Model/Queue.php b/app/code/Magento/Newsletter/Model/Queue.php
index 8deec1cad0c45df02fbfa09e90f7df5077fd3371..5e934a20930adb71f84099162af36eef3138b198 100644
--- a/app/code/Magento/Newsletter/Model/Queue.php
+++ b/app/code/Magento/Newsletter/Model/Queue.php
@@ -52,7 +52,7 @@ namespace Magento\Newsletter\Model;
  * @method \Magento\Newsletter\Model\Queue setQueueFinishAt(string $value)
  * @SuppressWarnings(PHPMD.LongVariable)
  */
-class Queue extends \Magento\Core\Model\Template
+class Queue extends \Magento\Email\Model\AbstractTemplate
 {
     /**
      * Newsletter Template object
diff --git a/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php
index 8f2a95f631ab05b90bfb574e10e5705be833d6f4..ccb3321ad2eabfbdc875e07c780822cf103b8685 100644
--- a/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php
+++ b/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php
@@ -25,6 +25,9 @@
  */
 namespace Magento\Newsletter\Model\Resource\Problem;
 
+use Magento\Customer\Service\V1\CustomerAccountServiceInterface;
+use Magento\Exception\NoSuchEntityException;
+
 /**
  * Newsletter problems collection
  *
@@ -53,12 +56,35 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio
      */
     protected $_customerCollectionFactory;
 
+    /**
+     * Customer Service
+     *
+     * @var CustomerAccountServiceInterface
+     */
+    protected $_customerAccountService;
+
+    /**
+     * Customer View Helper
+     *
+     * @var \Magento\Customer\Helper\View
+     */
+    protected $_customerView;
+
+    /**
+     * checks if customer data is loaded
+     *
+     * @var boolean
+     */
+    protected $_loadCustomersDataFlag = false;
+
+
     /**
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerCollectionFactory
+     * @param CustomerAccountServiceInterface $customerAccountService,
+     * @param \Magento\Customer\Helper\View $customerView
      * @param null|\Zend_Db_Adapter_Abstract $connection
      * @param \Magento\Model\Resource\Db\AbstractDb $resource
      */
@@ -67,12 +93,14 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio
         \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerCollectionFactory,
+        CustomerAccountServiceInterface $customerAccountService,
+        \Magento\Customer\Helper\View $customerView,
         $connection = null,
         \Magento\Model\Resource\Db\AbstractDb $resource = null
     ) {
         parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
-        $this->_customerCollectionFactory = $customerCollectionFactory;
+        $this->_customerAccountService = $customerAccountService;
+        $this->_customerView = $customerView;
     }
 
     /**
@@ -85,6 +113,19 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio
         $this->_init('Magento\Newsletter\Model\Problem', 'Magento\Newsletter\Model\Resource\Problem');
     }
 
+    /**
+     * Set customer loaded status
+     *
+     * @param bool $flag
+     * @return $this
+     */
+    protected function _setIsLoaded($flag = true)
+    {
+        if (!$flag) {
+            $this->_loadCustomersDataFlag = false;
+        }
+        return parent::_setIsLoaded($flag);
+    }
     /**
      * Adds subscribers info
      *
@@ -129,34 +170,25 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio
      */
     protected function _addCustomersData()
     {
-        $customersIds = array();
-
-        foreach ($this->getItems() as $item) {
-            if ($item->getCustomerId()) {
-                $customersIds[] = $item->getCustomerId();
-            }
-        }
-
-        if (count($customersIds) == 0) {
+        if ($this->_loadCustomersDataFlag) {
             return;
         }
-
-        /** @var \Magento\Customer\Model\Resource\Customer\Collection $customers */
-        $customers = $this->_customerCollectionFactory->create();
-        $customers->addNameToSelect()->addAttributeToFilter('entity_id', array("in" => $customersIds));
-
-        $customers->load();
-
-        foreach ($customers->getItems() as $customer) {
-            $problems = $this->getItemsByColumnValue('customer_id', $customer->getId());
-            foreach ($problems as $problem) {
-                $problem->setCustomerName(
-                    $customer->getName()
-                )->setCustomerFirstName(
-                    $customer->getFirstName()
-                )->setCustomerLastName(
-                    $customer->getLastName()
-                );
+        $this->_loadCustomersDataFlag = true;
+        foreach ($this->getItems() as $item) {
+            if ($item->getCustomerId()) {
+                $customerId = $item->getCustomerId();
+                try {
+                    $customer = $this->_customerAccountService->getCustomer($customerId);
+                    $problems = $this->getItemsByColumnValue('customer_id', $customerId);
+                    $customerName = $this->_customerView->getCustomerName($customer);
+                    foreach ($problems as $problem) {
+                        $problem->setCustomerName($customerName)
+                            ->setCustomerFirstName($customer->getFirstName())
+                            ->setCustomerLastName($customer->getLastName());
+                    }
+                } catch (NoSuchEntityException $e) {
+                    // do nothing if customer is not found by id
+                }
             }
         }
     }
@@ -171,7 +203,7 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio
     public function load($printQuery = false, $logQuery = false)
     {
         parent::load($printQuery, $logQuery);
-        if ($this->_subscribersInfoJoinedFlag && !$this->isLoaded()) {
+        if ($this->_subscribersInfoJoinedFlag) {
             $this->_addCustomersData();
         }
         return $this;
diff --git a/app/code/Magento/Newsletter/Model/Resource/Subscriber.php b/app/code/Magento/Newsletter/Model/Resource/Subscriber.php
index 3c82cf898f847c2143c2c1841adb37ae78480f67..35417d13b4ddaf8c4f44bdb1be2249778432defd 100644
--- a/app/code/Magento/Newsletter/Model/Resource/Subscriber.php
+++ b/app/code/Magento/Newsletter/Model/Resource/Subscriber.php
@@ -138,10 +138,10 @@ class Subscriber extends \Magento\Model\Resource\Db\AbstractDb
     /**
      * Load subscriber by customer
      *
-     * @param \Magento\Customer\Model\Customer $customer
+     * @param \Magento\Customer\Service\V1\Data\Customer $customer
      * @return array
      */
-    public function loadByCustomer(\Magento\Customer\Model\Customer $customer)
+    public function loadByCustomerData(\Magento\Customer\Service\V1\Data\Customer $customer)
     {
         $select = $this->_read->select()->from($this->getMainTable())->where('customer_id=:customer_id');
 
diff --git a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php
index 0788cf15b8f4e8c3202459c31017fdf3713535df..9748a9507c0e2a10c5b023b87d97e4b5b937af60 100644
--- a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php
+++ b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php
@@ -26,6 +26,7 @@
 namespace Magento\Newsletter\Model\Resource\Subscriber;
 
 use Magento\Newsletter\Model\Queue as ModelQueue;
+use Magento\Customer\Service\V1\CustomerMetadataServiceInterface as CustomerMetadataService;
 
 /**
  * Newsletter subscribers collection
@@ -72,18 +73,18 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio
     protected $_countFilterPart = array();
 
     /**
-     * Customer factory
+     * Customer Eav data
      *
-     * @var \Magento\Customer\Model\CustomerFactory
+     * @var   \Magento\Eav\Helper\Data
      */
-    protected $_customerFactory;
+    protected $_customerHelperData;
 
     /**
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Customer\Model\CustomerFactory $customerFactory
+     * @param \Magento\Eav\Helper\Data $customerHelperData
      * @param null|\Zend_Db_Adapter_Abstract $connection
      * @param \Magento\Model\Resource\Db\AbstractDb $resource
      */
@@ -92,12 +93,11 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio
         \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Customer\Model\CustomerFactory $customerFactory,
+        \Magento\Eav\Helper\Data $customerHelperData,
         $connection = null,
         \Magento\Model\Resource\Db\AbstractDb $resource = null
     ) {
-        // _customerFactory is used in parent class constructor
-        $this->_customerFactory = $customerFactory;
+        $this->_customerHelperData = $customerHelperData;
         parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
     }
 
@@ -170,28 +170,35 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio
     public function showCustomerInfo()
     {
         $adapter = $this->getConnection();
-        /** @var \Magento\Customer\Model\Customer $customer */
-        $customer = $this->_customerFactory->create();
-        $firstname = $customer->getAttribute('firstname');
-        $lastname = $customer->getAttribute('lastname');
 
-        $this->getSelect()->joinLeft(
-            array('customer_lastname_table' => $lastname->getBackend()->getTable()),
-            $adapter->quoteInto(
-                'customer_lastname_table.entity_id=main_table.customer_id
-                 AND customer_lastname_table.attribute_id = ?',
-                (int)$lastname->getAttributeId()
-            ),
-            array('customer_lastname' => 'value')
-        )->joinLeft(
-            array('customer_firstname_table' => $firstname->getBackend()->getTable()),
-            $adapter->quoteInto(
-                'customer_firstname_table.entity_id=main_table.customer_id
-                 AND customer_firstname_table.attribute_id = ?',
-                (int)$firstname->getAttributeId()
-            ),
-            array('customer_firstname' => 'value')
+        $lastNameData = $this->_customerHelperData->getAttributeMetadata(
+            CustomerMetadataService::ENTITY_TYPE_CUSTOMER,
+            'lastname'
         );
+        $firstNameData = $this->_customerHelperData->getAttributeMetadata(
+            CustomerMetadataService::ENTITY_TYPE_CUSTOMER,
+            'firstname'
+        );
+
+        $this->getSelect()
+            ->joinLeft(
+                array('customer_lastname_table' => $lastNameData['attribute_table']),
+                $adapter->quoteInto(
+                    'customer_lastname_table.entity_id=main_table.customer_id
+                                     AND customer_lastname_table.attribute_id = ?',
+                    (int)$lastNameData['attribute_id']
+                ),
+                array('customer_lastname' => 'value')
+            )
+            ->joinLeft(
+                array('customer_firstname_table' => $firstNameData['attribute_table']),
+                $adapter->quoteInto(
+                    'customer_firstname_table.entity_id=main_table.customer_id
+                                     AND customer_firstname_table.attribute_id = ?',
+                    (int)$firstNameData['attribute_id']
+                ),
+                array('customer_firstname' => 'value')
+            );
 
         return $this;
     }
diff --git a/app/code/Magento/Newsletter/Model/Subscriber.php b/app/code/Magento/Newsletter/Model/Subscriber.php
index d3b6d0b91f911e7531644d5761e670bf646ff5bb..9e0cb2a6dbd0ae8372341ba9c1e580b74293b39a 100644
--- a/app/code/Magento/Newsletter/Model/Subscriber.php
+++ b/app/code/Magento/Newsletter/Model/Subscriber.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Newsletter\Model;
 
+use Magento\Customer\Service\V1\CustomerAccountServiceInterface;
+use Magento\Exception\NoSuchEntityException;
+
 /**
  * Subscriber model
  *
@@ -42,31 +45,24 @@ namespace Magento\Newsletter\Model;
  * @method $this setSubscriberConfirmCode(string $value)
  * @method int getSubscriberId()
  * @method Subscriber setSubscriberId(int $value)
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @SuppressWarnings(PHPMD.CyclomaticComplexity)
  */
 class Subscriber extends \Magento\Model\AbstractModel
 {
     const STATUS_SUBSCRIBED = 1;
-
     const STATUS_NOT_ACTIVE = 2;
-
     const STATUS_UNSUBSCRIBED = 3;
-
     const STATUS_UNCONFIRMED = 4;
 
     const XML_PATH_CONFIRM_EMAIL_TEMPLATE = 'newsletter/subscription/confirm_email_template';
-
     const XML_PATH_CONFIRM_EMAIL_IDENTITY = 'newsletter/subscription/confirm_email_identity';
-
     const XML_PATH_SUCCESS_EMAIL_TEMPLATE = 'newsletter/subscription/success_email_template';
-
     const XML_PATH_SUCCESS_EMAIL_IDENTITY = 'newsletter/subscription/success_email_identity';
-
     const XML_PATH_UNSUBSCRIBE_EMAIL_TEMPLATE = 'newsletter/subscription/un_email_template';
-
     const XML_PATH_UNSUBSCRIBE_EMAIL_IDENTITY = 'newsletter/subscription/un_email_identity';
-
     const XML_PATH_CONFIRMATION_FLAG = 'newsletter/subscription/confirm';
-
     const XML_PATH_ALLOW_GUEST_SUBSCRIBE_FLAG = 'newsletter/subscription/allow_guest_subscribe';
 
     /**
@@ -121,11 +117,11 @@ class Subscriber extends \Magento\Model\AbstractModel
     protected $_storeManager;
 
     /**
-     * Customer factory
+     * Customer account service
      *
-     * @var \Magento\Customer\Model\CustomerFactory
+     * @var CustomerAccountServiceInterface
      */
-    protected $_customerFactory;
+    protected $_customerAccountService;
 
     /**
      * @var \Magento\Mail\Template\TransportBuilder
@@ -138,18 +134,22 @@ class Subscriber extends \Magento\Model\AbstractModel
     protected $inlineTranslation;
 
     /**
-     * @param \Magento\Model\Context $context
-     * @param \Magento\Registry $registry
-     * @param \Magento\Newsletter\Helper\Data $newsletterData
-     * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Mail\Template\TransportBuilder $transportBuilder
-     * @param \Magento\Customer\Model\CustomerFactory $customerFactory
+     * Construct
+     *
+     * @param \Magento\Model\Context                    $context
+     * @param \Magento\Registry                         $registry
+     * @param \Magento\Newsletter\Helper\Data           $newsletterData
+     * @param \Magento\Core\Model\Store\Config          $coreStoreConfig
+     * @param \Magento\Mail\Template\TransportBuilder   $transportBuilder
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Customer\Model\Session $customerSession
-     * @param \Magento\Translate\Inline\StateInterface $inlineTranslation
-     * @param \Magento\Model\Resource\AbstractResource $resource
-     * @param \Magento\Data\Collection\Db $resourceCollection
-     * @param array $data
+     * @param \Magento\Customer\Model\Session           $customerSession
+     * @param CustomerAccountServiceInterface           $customerAccountService
+     * @param \Magento\Translate\Inline\StateInterface  $inlineTranslation
+     * @param \Magento\Model\Resource\AbstractResource  $resource
+     * @param \Magento\Data\Collection\Db               $resourceCollection
+     * @param array                                     $data
+     *
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\Model\Context $context,
@@ -157,20 +157,20 @@ class Subscriber extends \Magento\Model\AbstractModel
         \Magento\Newsletter\Helper\Data $newsletterData,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Mail\Template\TransportBuilder $transportBuilder,
-        \Magento\Customer\Model\CustomerFactory $customerFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Customer\Model\Session $customerSession,
+        CustomerAccountServiceInterface $customerAccountService,
         \Magento\Translate\Inline\StateInterface $inlineTranslation,
         \Magento\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
-        array $data = array()
+        array $data = []
     ) {
         $this->_newsletterData = $newsletterData;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_transportBuilder = $transportBuilder;
-        $this->_customerFactory = $customerFactory;
         $this->_storeManager = $storeManager;
         $this->_customerSession = $customerSession;
+        $this->_customerAccountService = $customerAccountService;
         $this->inlineTranslation = $inlineTranslation;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
@@ -274,6 +274,7 @@ class Subscriber extends \Magento\Model\AbstractModel
      * @param boolean $scope
      * @return $this
      */
+
     public function setMessagesScope($scope)
     {
         $this->getResource()->setMessagesScope($scope);
@@ -307,9 +308,9 @@ class Subscriber extends \Magento\Model\AbstractModel
      * @param boolean $value
      * @return $this
      */
-    public function setIsStatusChanged($value)
+    public function setStatusChanged($value)
     {
-        $this->_isStatusChanged = (bool)$value;
+        $this->_isStatusChanged = (boolean) $value;
         return $this;
     }
 
@@ -318,7 +319,7 @@ class Subscriber extends \Magento\Model\AbstractModel
      *
      * @return boolean
      */
-    public function getIsStatusChanged()
+    public function isStatusChanged()
     {
         return $this->_isStatusChanged;
     }
@@ -355,19 +356,19 @@ class Subscriber extends \Magento\Model\AbstractModel
      * @param int $customerId
      * @return $this
      */
-    public function loadByCustomer($customerId)
+    public function loadByCustomerId($customerId)
     {
-        /** @var \Magento\Customer\Model\Customer $customer */
-        $customer = $this->_customerFactory->create()->load($customerId);
-        $data = $this->getResource()->loadByCustomer($customer);
-        $this->addData($data);
-        if (!empty($data) && $customer->getId() && !$this->getCustomerId()) {
-            $this->setCustomerId($customer->getId());
-            $this->setSubscriberConfirmCode($this->randomSequence());
-            if ($this->getStatus() == self::STATUS_NOT_ACTIVE) {
-                $this->setStatus($customer->getIsSubscribed() ? self::STATUS_SUBSCRIBED : self::STATUS_UNSUBSCRIBED);
+        try {
+            /** @var \Magento\Customer\Service\V1\Data\Customer $customerData */
+            $customerData = $this->_customerAccountService->getCustomer($customerId);
+            $data = $this->getResource()->loadByCustomerData($customerData);
+            $this->addData($data);
+            if (!empty($data) && $customerData->getId() && !$this->getCustomerId()) {
+                $this->setCustomerId($customerData->getId());
+                $this->setSubscriberConfirmCode($this->randomSequence());
+                $this->save();
             }
-            $this->save();
+        } catch (\Magento\Exception\NoSuchEntityException $e) {
         }
         return $this;
     }
@@ -398,6 +399,9 @@ class Subscriber extends \Magento\Model\AbstractModel
      * @param string $email
      * @throws \Exception
      * @return int
+     *
+     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
+     * @SuppressWarnings(PHPMD.NPathComplexity)
      */
     public function subscribe($email)
     {
@@ -407,18 +411,14 @@ class Subscriber extends \Magento\Model\AbstractModel
             $this->setSubscriberConfirmCode($this->randomSequence());
         }
 
-        $isConfirmNeed = $this->_coreStoreConfig->getConfig(self::XML_PATH_CONFIRMATION_FLAG) == 1 ? true : false;
+        $isConfirmNeed = ($this->_coreStoreConfig->getConfig(self::XML_PATH_CONFIRMATION_FLAG) == 1) ? true : false;
         $isOwnSubscribes = false;
-        $ownerId = $this->_customerFactory->create()->setWebsiteId(
-            $this->_storeManager->getStore()->getWebsiteId()
-        )->loadByEmail(
-            $email
-        )->getId();
-        $isSubscribeOwnEmail = $this->_customerSession->isLoggedIn() && $ownerId == $this->_customerSession->getId();
-
-        if (!$this->getId() ||
-            $this->getStatus() == self::STATUS_UNSUBSCRIBED ||
-            $this->getStatus() == self::STATUS_NOT_ACTIVE
+
+        $isSubscribeOwnEmail = $this->_customerSession->isLoggedIn()
+            && $this->_customerSession->getCustomerDataObject()->getEmail() == $email;
+
+        if (!$this->getId() || $this->getStatus() == self::STATUS_UNSUBSCRIBED
+            || $this->getStatus() == self::STATUS_NOT_ACTIVE
         ) {
             if ($isConfirmNeed === true) {
                 // if user subscribes own login email - confirmation is not needed
@@ -435,25 +435,30 @@ class Subscriber extends \Magento\Model\AbstractModel
         }
 
         if ($isSubscribeOwnEmail) {
-            /** @var \Magento\Customer\Model\Customer $customer */
-            $customer = $this->_customerFactory->create()->load($this->_customerSession->getCustomerId());
-            $this->setStoreId($customer->getStoreId());
-            $this->setCustomerId($customer->getId());
+            try {
+                $customer = $this->_customerAccountService->getCustomer($this->_customerSession->getCustomerId());
+                $this->setStoreId($customer->getStoreId());
+                $this->setCustomerId($customer->getId());
+            } catch (NoSuchEntityException $e) {
+                $this->setStoreId($this->_storeManager->getStore()->getId());
+                $this->setCustomerId(0);
+            }
         } else {
             $this->setStoreId($this->_storeManager->getStore()->getId());
             $this->setCustomerId(0);
         }
 
-        $this->setIsStatusChanged(true);
+        $this->setStatusChanged(true);
 
         try {
             $this->save();
-            if ($isConfirmNeed === true && $isOwnSubscribes === false) {
+            if ($isConfirmNeed === true
+                && $isOwnSubscribes === false
+            ) {
                 $this->sendConfirmationRequestEmail();
             } else {
                 $this->sendConfirmationSuccessEmail();
             }
-
             return $this->getStatus();
         } catch (\Exception $e) {
             throw new \Exception($e->getMessage());
@@ -472,46 +477,68 @@ class Subscriber extends \Magento\Model\AbstractModel
             throw new \Magento\Model\Exception(__('This is an invalid subscription confirmation code.'));
         }
 
-        $this->setSubscriberStatus(self::STATUS_UNSUBSCRIBED)->save();
-        $this->sendUnsubscriptionEmail();
+        if ($this->getSubscriberStatus() != self::STATUS_UNSUBSCRIBED) {
+            $this->setSubscriberStatus(self::STATUS_UNSUBSCRIBED)->save();
+            $this->sendUnsubscriptionEmail();
+        }
         return $this;
     }
 
     /**
-     * Update newsletter subscription for given customer
+     * Subscribe the customer with the id provided
      *
      * @param int $customerId
-     * @param boolean $subscribe
+     * @return $this
+     */
+    public function subscribeCustomerById($customerId)
+    {
+        return $this->_updateCustomerSubscription($customerId, true);
+    }
+
+    /**
+     * unsubscribe the customer with the id provided
      *
-     * @return  \Magento\Newsletter\Model\Subscriber
+     * @param int $customerId
+     * @return $this
      */
-    public function updateSubscription($customerId, $subscribe)
+    public function unsubscribeCustomerById($customerId)
     {
-        /** @var \Magento\Customer\Model\Customer $customerModel */
-        $customerModel = $this->_customerFactory->create()->load($customerId);
-        $customerModel->setIsSubscribed($subscribe);
-        $this->subscribeCustomer($customerModel);
+        return $this->_updateCustomerSubscription($customerId, false);
+    }
 
+    /**
+     * Update the subscription based on latest information of associated customer.
+     *
+     * @param int $customerId
+     * @return $this
+     */
+    public function updateSubscription($customerId)
+    {
+        $this->loadByCustomerId($customerId);
+        $this->_updateCustomerSubscription($customerId, $this->isSubscribed());
         return $this;
     }
 
     /**
      * Saving customer subscription status
      *
-     * @param   \Magento\Customer\Model\Customer $customer
+     * @param int $customerId
+     * @param bool $subscribe indicates whether the customer should be subscribed or unsubscribed
      * @return  $this
+     *
+     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
+     * @SuppressWarnings(PHPMD.NPathComplexity)
      */
-    public function subscribeCustomer($customer)
+    protected function _updateCustomerSubscription($customerId, $subscribe)
     {
-        $this->loadByCustomer($customer->getId());
-
-        if ($customer->getImportMode()) {
-            $this->setImportMode(true);
+        try {
+            $customerData = $this->_customerAccountService->getCustomer($customerId);
+        } catch (NoSuchEntityException $e) {
+            return $this;
         }
 
-        if (!$customer->getIsSubscribed() && !$this->getId()) {
-            // If subscription flag not set or customer is not a subscriber
-            // and no subscribe below
+        $this->loadByCustomerId($customerId);
+        if (!$subscribe && !$this->getId()) {
             return $this;
         }
 
@@ -519,54 +546,49 @@ class Subscriber extends \Magento\Model\AbstractModel
             $this->setSubscriberConfirmCode($this->randomSequence());
         }
 
-        /*
-         * Logical mismatch between customer registration confirmation code and customer password confirmation
-         */
-        $confirmation = null;
-        if ($customer->isConfirmationRequired() && $customer->getConfirmation() != $customer->getPassword()) {
-            $confirmation = $customer->getConfirmation();
-        }
-
         $sendInformationEmail = false;
-        if ($customer->hasIsSubscribed()) {
-            $status = $customer->getIsSubscribed() ? !is_null(
-                $confirmation
-            ) ? self::STATUS_UNCONFIRMED : self::STATUS_SUBSCRIBED : self::STATUS_UNSUBSCRIBED;
-            /**
-             * If subscription status has been changed then send email to the customer
-             */
-            if ($status != self::STATUS_UNCONFIRMED && $status != $this->getStatus()) {
-                $sendInformationEmail = true;
+        $status = self::STATUS_SUBSCRIBED;
+        if ($subscribe) {
+            if (CustomerAccountServiceInterface::ACCOUNT_CONFIRMATION_REQUIRED
+                == $this->_customerAccountService->getConfirmationStatus($customerId)
+            ) {
+                $status = self::STATUS_UNCONFIRMED;
             }
-        } elseif ($this->getStatus() == self::STATUS_UNCONFIRMED && is_null($confirmation)) {
-            $status = self::STATUS_SUBSCRIBED;
-            $sendInformationEmail = true;
         } else {
-            $status = $this->getStatus() == self::STATUS_NOT_ACTIVE ? self::STATUS_UNSUBSCRIBED : $this->getStatus();
+            $status = self::STATUS_UNSUBSCRIBED;
+        }
+        /**
+         * If subscription status has been changed then send email to the customer
+         */
+        if ($status != self::STATUS_UNCONFIRMED && $status != $this->getStatus()) {
+            $sendInformationEmail = true;
         }
 
         if ($status != $this->getStatus()) {
-            $this->setIsStatusChanged(true);
+            $this->setStatusChanged(true);
         }
 
         $this->setStatus($status);
 
         if (!$this->getId()) {
-            $storeId = $customer->getStoreId();
-            if ($customer->getStoreId() == 0) {
-                $storeId = $this->_storeManager->getWebsite($customer->getWebsiteId())->getDefaultStore()->getId();
+            $storeId = $customerData->getStoreId();
+            if ($customerData->getStoreId() == 0) {
+                $storeId = $this->_storeManager->getWebsite($customerData->getWebsiteId())->getDefaultStore()->getId();
             }
-            $this->setStoreId($storeId)->setCustomerId($customer->getId())->setEmail($customer->getEmail());
+            $this->setStoreId($storeId)
+                ->setCustomerId($customerData->getId())
+                ->setEmail($customerData->getEmail());
         } else {
-            $this->setStoreId($customer->getStoreId())->setEmail($customer->getEmail());
+            $this->setStoreId($customerData->getStoreId())
+                ->setEmail($customerData->getEmail());
         }
 
         $this->save();
-        $sendSubscription = $customer->getData('sendSubscription') || $sendInformationEmail;
+        $sendSubscription = $sendInformationEmail;
         if (is_null($sendSubscription) xor $sendSubscription) {
-            if ($this->getIsStatusChanged() && $status == self::STATUS_UNSUBSCRIBED) {
+            if ($this->isStatusChanged() && $status == self::STATUS_UNSUBSCRIBED) {
                 $this->sendUnsubscriptionEmail();
-            } elseif ($this->getIsStatusChanged() && $status == self::STATUS_SUBSCRIBED) {
+            } elseif ($this->isStatusChanged() && $status == self::STATUS_SUBSCRIBED) {
                 $this->sendConfirmationSuccessEmail();
             }
         }
@@ -582,7 +604,9 @@ class Subscriber extends \Magento\Model\AbstractModel
     public function confirm($code)
     {
         if ($this->getCode() == $code) {
-            $this->setStatus(self::STATUS_SUBSCRIBED)->setIsStatusChanged(true)->save();
+            $this->setStatus(self::STATUS_SUBSCRIBED)
+                ->setStatusChanged(true)
+                ->save();
             return true;
         }
 
@@ -608,36 +632,32 @@ class Subscriber extends \Magento\Model\AbstractModel
      */
     public function sendConfirmationRequestEmail()
     {
-        if ($this->getImportMode()) {
-            return $this;
-        }
-
-        if (!$this->_coreStoreConfig->getConfig(
-            self::XML_PATH_CONFIRM_EMAIL_TEMPLATE
-        ) || !$this->_coreStoreConfig->getConfig(
-            self::XML_PATH_CONFIRM_EMAIL_IDENTITY
-        )
+        if (!$this->_coreStoreConfig->getConfig(self::XML_PATH_CONFIRM_EMAIL_TEMPLATE)
+            || !$this->_coreStoreConfig->getConfig(self::XML_PATH_CONFIRM_EMAIL_IDENTITY)
         ) {
             return $this;
         }
 
         $this->inlineTranslation->suspend();
 
-        $this->_transportBuilder->setTemplateIdentifier(
-            $this->_coreStoreConfig->getConfig(self::XML_PATH_CONFIRM_EMAIL_TEMPLATE)
-        )->setTemplateOptions(
-            array(
-                'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND,
-                'store' => $this->_storeManager->getStore()->getId()
+        $this->_transportBuilder
+            ->setTemplateIdentifier(
+                $this->_coreStoreConfig->getConfig(self::XML_PATH_CONFIRM_EMAIL_TEMPLATE)
+            )
+            ->setTemplateOptions(
+                array(
+                    'area'  => \Magento\Core\Model\App\Area::AREA_FRONTEND,
+                    'store' => $this->_storeManager->getStore()->getId(),
+                )
+            )
+            ->setTemplateVars(
+                array(
+                    'subscriber' => $this,
+                    'store'      => $this->_storeManager->getStore(),
+                )
             )
-        )->setTemplateVars(
-            array('subscriber' => $this, 'store' => $this->_storeManager->getStore())
-        )->setFrom(
-            $this->_coreStoreConfig->getConfig(self::XML_PATH_CONFIRM_EMAIL_IDENTITY)
-        )->addTo(
-            $this->getEmail(),
-            $this->getName()
-        );
+            ->setFrom($this->_coreStoreConfig->getConfig(self::XML_PATH_CONFIRM_EMAIL_IDENTITY))
+            ->addTo($this->getEmail(), $this->getName());
         $transport = $this->_transportBuilder->getTransport();
         $transport->sendMessage();
 
@@ -653,36 +673,27 @@ class Subscriber extends \Magento\Model\AbstractModel
      */
     public function sendConfirmationSuccessEmail()
     {
-        if ($this->getImportMode()) {
-            return $this;
-        }
-
-        if (!$this->_coreStoreConfig->getConfig(
-            self::XML_PATH_SUCCESS_EMAIL_TEMPLATE
-        ) || !$this->_coreStoreConfig->getConfig(
-            self::XML_PATH_SUCCESS_EMAIL_IDENTITY
-        )
+        if (!$this->_coreStoreConfig->getConfig(self::XML_PATH_SUCCESS_EMAIL_TEMPLATE)
+            || !$this->_coreStoreConfig->getConfig(self::XML_PATH_SUCCESS_EMAIL_IDENTITY)
         ) {
             return $this;
         }
 
         $this->inlineTranslation->suspend();
 
-        $this->_transportBuilder->setTemplateIdentifier(
-            $this->_coreStoreConfig->getConfig(self::XML_PATH_SUCCESS_EMAIL_TEMPLATE)
-        )->setTemplateOptions(
-            array(
-                'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND,
-                'store' => $this->_storeManager->getStore()->getId()
+        $this->_transportBuilder
+            ->setTemplateIdentifier(
+                $this->_coreStoreConfig->getConfig(self::XML_PATH_SUCCESS_EMAIL_TEMPLATE)
+            )
+            ->setTemplateOptions(
+                array(
+                    'area'  => \Magento\Core\Model\App\Area::AREA_FRONTEND,
+                    'store' => $this->_storeManager->getStore()->getId(),
+                )
             )
-        )->setTemplateVars(
-            array('subscriber' => $this)
-        )->setFrom(
-            $this->_coreStoreConfig->getConfig(self::XML_PATH_SUCCESS_EMAIL_IDENTITY)
-        )->addTo(
-            $this->getEmail(),
-            $this->getName()
-        );
+            ->setTemplateVars(array('subscriber' => $this))
+            ->setFrom($this->_coreStoreConfig->getConfig(self::XML_PATH_SUCCESS_EMAIL_IDENTITY))
+            ->addTo($this->getEmail(), $this->getName());
         $transport = $this->_transportBuilder->getTransport();
         $transport->sendMessage();
 
@@ -692,41 +703,35 @@ class Subscriber extends \Magento\Model\AbstractModel
     }
 
     /**
-     * Sends out unsubsciption email
+     * Sends out unsubscription email
      *
      * @return $this
      */
     public function sendUnsubscriptionEmail()
     {
-        if ($this->getImportMode()) {
-            return $this;
-        }
-        if (!$this->_coreStoreConfig->getConfig(
-            self::XML_PATH_UNSUBSCRIBE_EMAIL_TEMPLATE
-        ) || !$this->_coreStoreConfig->getConfig(
-            self::XML_PATH_UNSUBSCRIBE_EMAIL_IDENTITY
-        )
+        if (!$this->_coreStoreConfig->getConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_TEMPLATE)
+            || !$this->_coreStoreConfig->getConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_IDENTITY)
         ) {
             return $this;
         }
 
         $this->inlineTranslation->suspend();
 
-        $this->_transportBuilder->setTemplateIdentifier(
-            $this->_coreStoreConfig->getConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_TEMPLATE)
-        )->setTemplateOptions(
-            array(
-                'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND,
-                'store' => $this->_storeManager->getStore()->getId()
+        $this->_transportBuilder
+            ->setTemplateIdentifier(
+                $this->_coreStoreConfig->getConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_TEMPLATE)
+            )
+            ->setTemplateOptions(
+                array(
+                    'area'  => \Magento\Core\Model\App\Area::AREA_FRONTEND,
+                    'store' => $this->_storeManager->getStore()->getId(),
+                )
+            )
+            ->setTemplateVars(array('subscriber' => $this))
+            ->setFrom(
+                $this->_coreStoreConfig->getConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_IDENTITY)
             )
-        )->setTemplateVars(
-            array('subscriber' => $this)
-        )->setFrom(
-            $this->_coreStoreConfig->getConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_IDENTITY)
-        )->addTo(
-            $this->getEmail(),
-            $this->getName()
-        );
+            ->addTo($this->getEmail(), $this->getName());
         $transport = $this->_transportBuilder->getTransport();
         $transport->sendMessage();
 
diff --git a/app/code/Magento/Newsletter/Model/Template.php b/app/code/Magento/Newsletter/Model/Template.php
index d89072784581a7d32b20f8cc594240abc8fa2293..7dc55992080623c2c9153c862c8d5a55d799461b 100644
--- a/app/code/Magento/Newsletter/Model/Template.php
+++ b/app/code/Magento/Newsletter/Model/Template.php
@@ -55,7 +55,7 @@ namespace Magento\Newsletter\Model;
  * @package     Magento_Newsletter
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-class Template extends \Magento\Core\Model\Template
+class Template extends \Magento\Email\Model\AbstractTemplate
 {
     /**
      * Template Text Preprocessed flag
diff --git a/app/code/Magento/Newsletter/etc/di.xml b/app/code/Magento/Newsletter/etc/di.xml
index 07207a43f090335f3ecfeb50f65e18204769a059..0a08e03ee4c761e8922173bac63399cebbd883fb 100644
--- a/app/code/Magento/Newsletter/etc/di.xml
+++ b/app/code/Magento/Newsletter/etc/di.xml
@@ -41,4 +41,8 @@
             <argument name="storage" xsi:type="object">Magento\Newsletter\Model\Session\Storage</argument>
         </arguments>
     </type>
+    <type name="Magento\Customer\Service\V1\CustomerAccountServiceInterface">
+        <plugin name="update_newsletter_subscription_on_customer_update"
+                type="Magento\Newsletter\Model\Plugin\CustomerPlugin"/>
+    </type>
 </config>
diff --git a/app/code/Magento/Newsletter/etc/module.xml b/app/code/Magento/Newsletter/etc/module.xml
index d0a50f7071db765aa57a04ca69865f84aa851722..c42ffa6cf90191e8c2fa00cf1b0e1a8f474dfe12 100644
--- a/app/code/Magento/Newsletter/etc/module.xml
+++ b/app/code/Magento/Newsletter/etc/module.xml
@@ -40,6 +40,7 @@
             <module name="Magento_Email"/>
             <module name="Magento_Theme"/>
             <module name="Magento_Cron"/>
+            <module name="Magento_Eav"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/PageCache/view/frontend/js/page-cache.js b/app/code/Magento/PageCache/view/frontend/js/page-cache.js
index 33a3cbb5e6bcd94631963db800a6d1fc892ba815..3dc403f9500132eb97d012d2121fd4925a343a7a 100644
--- a/app/code/Magento/PageCache/view/frontend/js/page-cache.js
+++ b/app/code/Magento/PageCache/view/frontend/js/page-cache.js
@@ -82,7 +82,7 @@
                     startReplacing = true;
                 }
                 if (startReplacing) {
-                    element.remove();
+                    $(element).remove();
                 } else if (element.nodeType != 8) {
                     //due to comment tag doesn't have siblings we try to find it manually
                     prevSibling = element;
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Expanded.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Expanded.php
index 3e1a46bc9f93228a2e135153ee3ac33d4a83e30a..d099623ee74ff4b2ff1a9f49501b4b6080c912cc 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Expanded.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Expanded.php
@@ -35,13 +35,13 @@ class Expanded extends \Magento\Backend\Block\System\Config\Form\Fieldset
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Backend\Model\Auth\Session $authSession
-     * @param \Magento\Core\Helper\Js $jsHelper
+     * @param \Magento\View\Helper\Js $jsHelper
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Backend\Model\Auth\Session $authSession,
-        \Magento\Core\Helper\Js $jsHelper,
+        \Magento\View\Helper\Js $jsHelper,
         array $data = array()
     ) {
         parent::__construct($context, $authSession, $jsHelper, $data);
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Group.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Group.php
index 83275c30d84ae8d4e1a9891e41b0965024263f37..f7da301d31e5fd263109f6cabf542c43ba0739bb 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Group.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Group.php
@@ -34,13 +34,13 @@ class Group extends \Magento\Backend\Block\System\Config\Form\Fieldset
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Backend\Model\Auth\Session $authSession
-     * @param \Magento\Core\Helper\Js $jsHelper
+     * @param \Magento\View\Helper\Js $jsHelper
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Backend\Model\Auth\Session $authSession,
-        \Magento\Core\Helper\Js $jsHelper,
+        \Magento\View\Helper\Js $jsHelper,
         array $data = array()
     ) {
         parent::__construct($context, $authSession, $jsHelper, $data);
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php
index e473e324d0b7744235237d3ed79ac0bcc9931e4a..ac67605590289c383fbffdbb04ca141aa979aff4 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php
@@ -37,18 +37,18 @@ class Hint extends \Magento\Backend\Block\Template implements \Magento\Data\Form
     protected $_template = 'Magento_Paypal::system/config/fieldset/hint.phtml';
 
     /**
-     * @var \Magento\Backend\Helper\Js
+     * @var \Magento\View\Helper\Js
      */
     protected $_jsHelper;
 
     /**
      * @param \Magento\Backend\Block\Template\Context $context
-     * @param \Magento\Backend\Helper\Js $jsHelper
+     * @param \Magento\View\Helper\Js $jsHelper
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
-        \Magento\Backend\Helper\Js $jsHelper,
+        \Magento\View\Helper\Js $jsHelper,
         array $data = array()
     ) {
         $this->_jsHelper = $jsHelper;
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php
index 48d1a175933dcd07d6583a02aad009d2d1028d08..15b5e20a3c1fdc6e735867cde6a6d9de7d74fad3 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php
@@ -38,14 +38,14 @@ class Payment extends \Magento\Backend\Block\System\Config\Form\Fieldset
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Backend\Model\Auth\Session $authSession
-     * @param \Magento\Core\Helper\Js $jsHelper
+     * @param \Magento\View\Helper\Js $jsHelper
      * @param \Magento\Backend\Model\Config $backendConfig
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Backend\Model\Auth\Session $authSession,
-        \Magento\Core\Helper\Js $jsHelper,
+        \Magento\View\Helper\Js $jsHelper,
         \Magento\Backend\Model\Config $backendConfig,
         array $data = array()
     ) {
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Load.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Load.php
index b292e265e882e60a5a49f1da2abf5e6155a04188..9371e199b438a90163db70d9468931b24cfe37b8 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Load.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Load.php
@@ -35,11 +35,9 @@ namespace Magento\Sales\Block\Adminhtml\Order\Create;
 class Load extends \Magento\View\Element\Template
 {
     /**
-     * Adminhtml js
-     *
-     * @var \Magento\Backend\Helper\Js
+     * @var \Magento\View\Helper\Js
      */
-    protected $_adminhtmlJs = null;
+    protected $_jsHelper = null;
 
     /**
      * Json encoder
@@ -51,17 +49,17 @@ class Load extends \Magento\View\Element\Template
     /**
      * @param \Magento\View\Element\Template\Context $context
      * @param \Magento\Json\EncoderInterface $jsonEncoder
-     * @param \Magento\Backend\Helper\Js $adminhtmlJs
+     * @param \Magento\View\Helper\Js $adminhtmlJs
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
         \Magento\Json\EncoderInterface $jsonEncoder,
-        \Magento\Backend\Helper\Js $adminhtmlJs,
+        \Magento\View\Helper\Js $jsHelper,
         array $data = array()
     ) {
         $this->_jsonEncoder = $jsonEncoder;
-        $this->_adminhtmlJs = $adminhtmlJs;
+        $this->_jsHelper = $jsHelper;
         parent::__construct($context, $data);
     }
 
@@ -80,7 +78,7 @@ class Load extends \Magento\View\Element\Template
         $resultJson = $this->_jsonEncoder->encode($result);
         $jsVarname = $this->getRequest()->getParam('as_js_varname');
         if ($jsVarname) {
-            return $this->_adminhtmlJs->getScript(sprintf('var %s = %s', $jsVarname, $resultJson));
+            return $this->_jsHelper->getScript(sprintf('var %s = %s', $jsVarname, $resultJson));
         } else {
             return $resultJson;
         }
diff --git a/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php b/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php
index 3a8c04b49260b62be47008f6b04e5dd079c9856a..b3acf2a405be521fb5110bf27a6c51e7b0fcc169 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php
@@ -56,14 +56,14 @@ class Statuses extends \Magento\Backend\Block\System\Config\Form\Fieldset
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Backend\Model\Auth\Session $authSession
-     * @param \Magento\Core\Helper\Js $jsHelper
+     * @param \Magento\View\Helper\Js $jsHelper
      * @param \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $orderStatusCollection
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Backend\Model\Auth\Session $authSession,
-        \Magento\Core\Helper\Js $jsHelper,
+        \Magento\View\Helper\Js $jsHelper,
         \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $orderStatusCollection,
         array $data = array()
     ) {
diff --git a/app/code/Magento/Sales/Model/Quote.php b/app/code/Magento/Sales/Model/Quote.php
index c8ef7835159d1a35e0442d92100a7e333218e8a4..107be83eeac88aee3e60aa58f755dcdf1ef0f3c2 100644
--- a/app/code/Magento/Sales/Model/Quote.php
+++ b/app/code/Magento/Sales/Model/Quote.php
@@ -520,7 +520,7 @@ class Quote extends \Magento\Model\AbstractModel
      */
     public function loadByCustomer($customer)
     {
-        /* @TODO: remove this if after external usages of loadByCustomer are refactored in MAGETWO-19935 */
+        /* @TODO: remove this if after external usages of loadByCustomerId are refactored in MAGETWO-19935 */
         if ($customer instanceof \Magento\Customer\Model\Customer) {
             $customerId = $customer->getId();
         } else {
@@ -1248,9 +1248,9 @@ class Quote extends \Magento\Model\AbstractModel
          */
         if ($item->isNominal() && $this->hasItems() || $this->hasNominalItems()) {
             throw new \Magento\Model\Exception(
-                __(
-                    'Sorry, but items with payment agreements must be ordered one at a time To continue, please remove or buy the other items in your cart, then order this item by itself.'
-                )
+                // @codingStandardsIgnoreStart
+                __('Sorry, but items with payment agreements must be ordered one at a time To continue, please remove or buy the other items in your cart, then order this item by itself.')
+                // @codingStandardsIgnoreEnd
             );
         }
 
diff --git a/app/code/Magento/Theme/Block/Html/Head.php b/app/code/Magento/Theme/Block/Html/Head.php
index 7e0dd63a13a0520f852efa7d75528bdd1c5f16a4..7c7ba551b9126c4ce98b01fe6441e27b6193150d 100644
--- a/app/code/Magento/Theme/Block/Html/Head.php
+++ b/app/code/Magento/Theme/Block/Html/Head.php
@@ -25,6 +25,8 @@ namespace Magento\Theme\Block\Html;
 
 /**
  * Html page head block
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class Head extends \Magento\View\Element\Template
 {
@@ -81,6 +83,11 @@ class Head extends \Magento\View\Element\Template
      */
     protected $_localeResolver;
 
+    /**
+     * @var \Magento\Translation\Block\Js
+     */
+    protected $jsTranslation;
+
     /**
      * @param \Magento\View\Element\Template\Context $context
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase
@@ -89,6 +96,7 @@ class Head extends \Magento\View\Element\Template
      * @param \Magento\View\Asset\MergeService $assetMergeService
      * @param \Magento\View\Asset\MinifyService $assetMinifyService
      * @param \Magento\Locale\ResolverInterface $localeResolver
+     * @param \Magento\Translation\Block\Js $jsTranslation
      * @param array $data
      */
     public function __construct(
@@ -99,6 +107,7 @@ class Head extends \Magento\View\Element\Template
         \Magento\View\Asset\MergeService $assetMergeService,
         \Magento\View\Asset\MinifyService $assetMinifyService,
         \Magento\Locale\ResolverInterface $localeResolver,
+        \Magento\Translation\Block\Js $jsTranslation,
         array $data = array()
     ) {
         parent::__construct($context, $data);
@@ -108,6 +117,7 @@ class Head extends \Magento\View\Element\Template
         $this->_assetMinifyService = $assetMinifyService;
         $this->_pageAssets = $assets;
         $this->_localeResolver = $localeResolver;
+        $this->jsTranslation = $jsTranslation;
     }
 
     /**
@@ -430,4 +440,14 @@ class Head extends \Magento\View\Element\Template
     {
         return substr($this->_localeResolver->getLocaleCode(), 0, 2);
     }
+
+    /**
+     * Get translation js script
+     *
+     * @return string
+     */
+    public function getTranslatorScript()
+    {
+        return $this->jsTranslation->render();
+    }
 }
diff --git a/app/code/Magento/Theme/etc/module.xml b/app/code/Magento/Theme/etc/module.xml
index 7f04c333af8c63a4bbdbe04546a851a63dccbf9d..cf9c8838efc64c0d7b381aab39d93fca72b9dda8 100644
--- a/app/code/Magento/Theme/etc/module.xml
+++ b/app/code/Magento/Theme/etc/module.xml
@@ -33,6 +33,7 @@
             <module name="Magento_Customer"/>
             <module name="Magento_Backend"/>
             <module name="Magento_Cms"/>
+            <module name="Magento_Translation"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Theme/view/frontend/html/head.phtml b/app/code/Magento/Theme/view/frontend/html/head.phtml
index a28219d0e12d5cd7016abcc37fd7e7714c482395..f928e850a69344a7ccf433573a9e271f0628f13f 100644
--- a/app/code/Magento/Theme/view/frontend/html/head.phtml
+++ b/app/code/Magento/Theme/view/frontend/html/head.phtml
@@ -33,4 +33,4 @@
 <?php echo $this->getCssJsHtml() ?>
 <?php echo $this->getChildHtml() ?>
 <?php echo $this->getIncludes() ?>
-<?php echo $this->helper('Magento\Core\Helper\Js')->getTranslatorScript() ?>
+<?php echo $this->getTranslatorScript(); ?>
diff --git a/app/code/Magento/Translation/Block/Js.php b/app/code/Magento/Translation/Block/Js.php
new file mode 100644
index 0000000000000000000000000000000000000000..a04fd25fa6b4fb426cdeb57010ff4d5d46e21ab2
--- /dev/null
+++ b/app/code/Magento/Translation/Block/Js.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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Translation\Block;
+
+use Magento\View\Element\BlockInterface;
+use \Magento\Translation\Model\Js as DataProvider;
+use \Magento\Translate\InlineInterface as InlineTranslator;
+
+class Js
+{
+    /**
+     * Data provider model
+     *
+     * @var DataProvider
+     */
+    protected $dataProvider;
+
+    /**
+     * Inline translator
+     *
+     * @var InlineTranslator
+     */
+    protected $translateInline;
+
+    /**
+     * @param DataProvider $dataProvider
+     * @param InlineTranslator $translateInline
+     */
+    public function __construct(
+        DataProvider $dataProvider,
+        InlineTranslator $translateInline
+    ) {
+        $this->dataProvider = $dataProvider;
+        $this->translateInline = $translateInline;
+    }
+
+    /**
+     * Render js translation
+     *
+     * @return string
+     */
+    public function render()
+    {
+        $json = \Zend_Json::encode($this->dataProvider->getTranslateData());
+        $this->translateInline->processResponseBody($json, false);
+        $script = '(function($) {$.mage.translate.add(' . $json . ')})(jQuery);';
+        return '<script type="text/javascript">//<![CDATA[' . "\n{$script}\n" . '//]]></script>';
+    }
+}
diff --git a/app/code/Magento/Translation/Model/Js.php b/app/code/Magento/Translation/Model/Js.php
new file mode 100644
index 0000000000000000000000000000000000000000..7a6f961ab1a19a1eafd070c4e3e10a17efb9372d
--- /dev/null
+++ b/app/code/Magento/Translation/Model/Js.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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Translation\Model;
+
+class Js
+{
+    /**
+     * Translation data
+     *
+     * @var string[]
+     */
+    protected $translateData;
+
+    /**
+     * @param Js\DataProviderInterface[] $dataProviders
+     */
+    public function __construct(array $dataProviders)
+    {
+        /** @var $dataProvider Js\DataProviderInterface */
+        foreach ($dataProviders as $dataProvider) {
+            foreach ($dataProvider->getData() as $key => $translatedText) {
+                if ($key !== $translatedText) {
+                    $this->translateData[$key] = $translatedText;
+                }
+            }
+        }
+    }
+
+    /**
+     * Get translated data
+     *
+     * @return string[]
+     */
+    public function getTranslateData()
+    {
+        return $this->translateData;
+    }
+}
diff --git a/app/code/Magento/Translation/Model/Js/DataProvider.php b/app/code/Magento/Translation/Model/Js/DataProvider.php
new file mode 100644
index 0000000000000000000000000000000000000000..52bff3f69fb290ec43da7c8ac532dbee3007d480
--- /dev/null
+++ b/app/code/Magento/Translation/Model/Js/DataProvider.php
@@ -0,0 +1,176 @@
+<?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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Translation\Model\Js;
+
+class DataProvider implements DataProviderInterface
+{
+    /**
+     * Get translation data
+     *
+     * @return string[]
+     */
+    public function getData()
+    {
+        return array(
+            'Complete' => __('Complete'),
+            'Upload Security Error' => __('Upload Security Error'),
+            'Upload HTTP Error' => __('Upload HTTP Error'),
+            'Upload I/O Error' => __('Upload I/O Error'),
+            'SSL Error: Invalid or self-signed certificate' => __('SSL Error: Invalid or self-signed certificate'),
+            'TB' => __('TB'),
+            'GB' => __('GB'),
+            'MB' => __('MB'),
+            'kB' => __('kB'),
+            'B' => __('B'),
+            'Add Products' => __('Add Products'),
+            'Add Products By SKU' => __('Add Products By SKU'),
+            'Insert Widget...' => __('Insert Widget...'),
+            'Please wait, loading...' => __('Please wait, loading...'),
+            'HTML tags are not allowed' => __('HTML tags are not allowed'),
+            'Please select an option.' => __('Please select an option.'),
+            'This is a required field.' => __('This is a required field.'),
+            'Please enter a valid number in this field.' => __('Please enter a valid number in this field.'),
+            'The value is not within the specified range.' => __('The value is not within the specified range.'),
+            'Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas.' => __('Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas.'),
+            'Please use letters only (a-z or A-Z) in this field.' => __('Please use letters only (a-z or A-Z) in this field.'),
+            'Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.' => __('Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.'),
+            'Please use only letters (a-z or A-Z) or numbers (0-9) only in this field. No spaces or other characters are allowed.' => __('Please use only letters (a-z or A-Z) or numbers (0-9) only in this field. No spaces or other characters are allowed.'),
+            'Please use only letters (a-z or A-Z) or numbers (0-9) or spaces and # only in this field.' => __('Please use only letters (a-z or A-Z) or numbers (0-9) or spaces and # only in this field.'),
+            'Please enter a valid fax number. For example (123) 456-7890 or 123-456-7890.' => __('Please enter a valid fax number. For example (123) 456-7890 or 123-456-7890.'),
+            'Please enter a valid date.' => __('Please enter a valid date.'),
+            'The From Date value should be less than or equal to the To Date value.' => __('The From Date value should be less than or equal to the To Date value.'),
+            'Please enter a valid email address. For example johndoe@domain.com.' => __('Please enter a valid email address. For example johndoe@domain.com.'),
+            'Please use only visible characters and spaces.' => __('Please use only visible characters and spaces.'),
+            'Please enter 6 or more characters. Leading or trailing spaces will be ignored.' => __('Please enter 6 or more characters. Leading or trailing spaces will be ignored.'),
+            'Please enter 7 or more characters. Password should contain both numeric and alphabetic characters.' => __('Please enter 7 or more characters. Password should contain both numeric and alphabetic characters.'),
+            'Please make sure your passwords match.' => __('Please make sure your passwords match.'),
+            'Please enter a valid URL. Protocol is required (http://, https:// or ftp://)' => __('Please enter a valid URL. Protocol is required (http://, https:// or ftp://)'),
+            'Please enter a valid URL Key. For example "example-page", "example-page.html" or "anotherlevel/example-page".' => __('Please enter a valid URL Key. For example "example-page", "example-page.html" or "anotherlevel/example-page".'),
+            'Please enter a valid XML-identifier. For example something_1, block5, id-4.' => __('Please enter a valid XML-identifier. For example something_1, block5, id-4.'),
+            'Please enter a valid social security number. For example 123-45-6789.' => __('Please enter a valid social security number. For example 123-45-6789.'),
+            'Please enter a valid zip code. For example 90602 or 90602-1234.' => __('Please enter a valid zip code. For example 90602 or 90602-1234.'),
+            'Please enter a valid zip code.' => __('Please enter a valid zip code.'),
+            'Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.' => __('Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.'),
+            'Please select one of the above options.' => __('Please select one of the above options.'),
+            'Please select one of the options.' => __('Please select one of the options.'),
+            'Please select State/Province.' => __('Please select State/Province.'),
+            'Please enter a number greater than 0 in this field.' => __('Please enter a number greater than 0 in this field.'),
+            'Please enter a number 0 or greater in this field.' => __('Please enter a number 0 or greater in this field.'),
+            'Please enter a valid credit card number.' => __('Please enter a valid credit card number.'),
+            'Credit card number does not match credit card type.' => __('Credit card number does not match credit card type.'),
+            'Card type does not match credit card number.' => __('Card type does not match credit card number.'),
+            'Incorrect credit card expiration date.' => __('Incorrect credit card expiration date.'),
+            'Please enter a valid credit card verification number.' => __('Please enter a valid credit card verification number.'),
+            'Please use only letters (a-z or A-Z), numbers (0-9) or underscore(_) in this field, first character should be a letter.' => __('Please use only letters (a-z or A-Z), numbers (0-9) or underscore(_) in this field, first character should be a letter.'),
+            'Please input a valid CSS-length. For example 100px or 77pt or 20em or .5ex or 50%.' => __('Please input a valid CSS-length. For example 100px or 77pt or 20em or .5ex or 50%.'),
+            'Text length does not satisfy specified text range.' => __('Text length does not satisfy specified text range.'),
+            'Please enter a number lower than 100.' => __('Please enter a number lower than 100.'),
+            'Please select a file' => __('Please select a file'),
+            'Please enter issue number or start date for switch/solo card type.' => __('Please enter issue number or start date for switch/solo card type.'),
+            'This date is a required value.' => __('This date is a required value.'),
+            'Please enter a valid day (1-%1).' => __('Please enter a valid day (1-%1).'),
+            'Please enter a valid month (1-12).' => __('Please enter a valid month (1-12).'),
+            'Please enter a valid year (1900-%1).' => __('Please enter a valid year (1900-%1).'),
+            'Please enter a valid full date' => __('Please enter a valid full date'),
+            'Allow' => __('Allow'),
+            'Activate' => __('Activate'),
+            'Reauthorize' => __('Reauthorize'),
+            'Cancel' => __('Cancel'),
+            'Done' => __('Done'),
+            'Save' => __('Save'),
+            'File extension not known or unsupported type.' => __('File extension not known or unsupported type.'),
+            'Configure Product' => __('Configure Product'),
+            'OK' => __('OK'),
+            'Gift Options for ' => __('Gift Options for '),
+            'New Option' => __('New Option'),
+            'Add Products to New Option' => __('Add Products to New Option'),
+            'Add Products to Option "%1"' => __('Add Products to Option "%1"'),
+            'Add Selected Products' => __('Add Selected Products'),
+            'Select type of option.' => __('Select type of option.'),
+            'Please add rows to option.' => __('Please add rows to option.'),
+            'Select Product' => __('Select Product'),
+            'Import' => __('Import'),
+            'Please select items.' => __('Please select items.'),
+            'Add Products to Group' => __('Add Products to Group'),
+            'start typing to search category' => __('start typing to search category'),
+            'Choose existing category.' => __('Choose existing category.'),
+            'Create Category' => __('Create Category'),
+            'Sorry, there was an unknown error.' => __('Sorry, there was an unknown error.'),
+            'Something went wrong while loading the theme.' => __('Something went wrong while loading the theme.'),
+            'We don\'t recognize or support this file extension type.' => __('We don\'t recognize or support this file extension type.'),
+            'Error' => __('Error'),
+            'No stores were reassigned.' => __('No stores were reassigned.'),
+            'Assign theme to your live store-view:' => __('Assign theme to your live store-view:'),
+            'Default title' => __('Default title'),
+            'The URL to assign stores is not defined.' => __('The URL to assign stores is not defined.'),
+            'No' => __('No'),
+            'Yes' => __('Yes'),
+            'Some problem with revert action' => __('Some problem with revert action'),
+            'Error: unknown error.' => __('Error: unknown error.'),
+            'Some problem with save action' => __('Some problem with save action'),
+            'Delete' => __('Delete'),
+            'Folder' => __('Folder'),
+            'Delete Folder' => __('Delete Folder'),
+            'Are you sure you want to delete the folder named' => __('Are you sure you want to delete the folder named'),
+            'Delete File' => __('Delete File'),
+            'Method ' => __('Method '),
+            'Please wait...' => __('Please wait...'),
+            'Loading...' => __('Loading...'),
+            'Translate' => __('Translate'),
+            'Submit' => __('Submit'),
+            'Close' => __('Close'),
+            'Please enter a value less than or equal to %s.' => __('Please enter a value less than or equal to %s.'),
+            'Please enter a value greater than or equal to %s.' => __('Please enter a value greater than or equal to %s.'),
+            'Maximum length of this field must be equal or less than %1 symbols.' => __('Maximum length of this field must be equal or less than %1 symbols.'),
+            'No records found.' => __('No records found.'),
+            'Recent items' => __('Recent items'),
+            'Show all...' => __('Show all...'),
+            'Please enter a date in the past.' => __('Please enter a date in the past.'),
+            'Please enter a date between %min and %max.' => __('Please enter a date between %min and %max.'),
+            'Please choose to register or to checkout as a guest.' => __('Please choose to register or to checkout as a guest.'),
+            'We are not able to ship to the selected shipping address. Please choose another address or edit the current address.' => __('We are not able to ship to the selected shipping address. Please choose another address or edit the current address.'),
+            'Please specify a shipping method.' => __('Please specify a shipping method.'),
+            'We can\'t complete your order because you don\'t have a payment method available.' => __('We can\'t complete your order because you don\'t have a payment method available.'),
+            'Error happened while creating wishlist. Please try again later' => __('Error happened while creating wishlist. Please try again later'),
+            'You must select items to move' => __('You must select items to move'),
+            'You must select items to copy' => __('You must select items to copy'),
+            'You are about to delete your wish list. This action cannot be undone. Are you sure you want to continue?' => __('You are about to delete your wish list. This action cannot be undone. Are you sure you want to continue?'),
+            'Please specify payment method.' => __('Please specify payment method.'),
+            'Are you sure you want to delete this address?' => __('Are you sure you want to delete this address?'),
+            'Use gift registry shipping address' => __('Use gift registry shipping address'),
+            'You can change the number of gift registry items on the Gift Registry Info page or directly in your cart, but not while in checkout.' => __('You can change the number of gift registry items on the Gift Registry Info page or directly in your cart, but not while in checkout.'),
+            'No confirmation' => __('No confirmation'),
+            'Sorry, something went wrong.' => __('Sorry, something went wrong.'),
+            'Sorry, something went wrong. Please try again later.' => __('Sorry, something went wrong. Please try again later.'),
+            'select all' => __('select all'),
+            'unselect all' => __('unselect all'),
+            'Please agree to all Terms and Conditions before placing the orders.' => __('Please agree to all Terms and Conditions before placing the orders.'),
+            'Please choose to register or to checkout as a guest' => __('Please choose to register or to checkout as a guest'),
+            'Your order cannot be completed at this time as there is no shipping methods available for it. Please make necessary changes in your shipping address.' => __('Your order cannot be completed at this time as there is no shipping methods available for it. Please make necessary changes in your shipping address.'),
+            'Please specify shipping method.' => __('Please specify shipping method.'),
+            'Your order cannot be completed at this time as there is no payment methods available for it.' => __('Your order cannot be completed at this time as there is no payment methods available for it.'),
+        );
+    }
+}
diff --git a/app/code/Magento/Translation/Model/Js/DataProviderInterface.php b/app/code/Magento/Translation/Model/Js/DataProviderInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..4a845da2cf5c8309f976217139e95d20e9ca1ce6
--- /dev/null
+++ b/app/code/Magento/Translation/Model/Js/DataProviderInterface.php
@@ -0,0 +1,35 @@
+<?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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Translation\Model\Js;
+
+interface DataProviderInterface
+{
+    /**
+     * Get translation data
+     *
+     * @return string[]
+     */
+    public function getData();
+}
diff --git a/app/code/Magento/Translation/etc/di.xml b/app/code/Magento/Translation/etc/di.xml
index f0c02add04e02da5fdd42ae3beb76b09531ad3fe..4012f60debd3553f716a6e4977a00e2d386c2edc 100644
--- a/app/code/Magento/Translation/etc/di.xml
+++ b/app/code/Magento/Translation/etc/di.xml
@@ -63,4 +63,11 @@
             <argument name="translator" xsi:type="object">Magento\Translate</argument>
         </arguments>
     </type>
+    <type name="Magento\Translation\Model\Js">
+        <arguments>
+            <argument name="dataProviders" xsi:type="array">
+                <item name="default" xsi:type="object">Magento\Translation\Model\Js\DataProvider</item>
+            </argument>
+        </arguments>
+    </type>
 </config>
diff --git a/app/code/Magento/Core/App/FrontController/Plugin/UrlRewrite.php b/app/code/Magento/UrlRewrite/App/FrontController/Plugin/UrlRewrite.php
similarity index 84%
rename from app/code/Magento/Core/App/FrontController/Plugin/UrlRewrite.php
rename to app/code/Magento/UrlRewrite/App/FrontController/Plugin/UrlRewrite.php
index a8b2bbb50d80e8c50f052b94dcd0cb1c6fd1e012..7a709597ed3661d346668fd2143cc76530977f12 100644
--- a/app/code/Magento/Core/App/FrontController/Plugin/UrlRewrite.php
+++ b/app/code/Magento/UrlRewrite/App/FrontController/Plugin/UrlRewrite.php
@@ -23,12 +23,12 @@
  * @copyright   Copyright (c) 2014 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\UrlRewrite\App\FrontController\Plugin;
 
 class UrlRewrite
 {
     /**
-     * @var \Magento\Core\App\Request\RewriteService RewriteService
+     * @var \Magento\UrlRewrite\App\Request\RewriteService
      */
     protected $_rewriteService;
 
@@ -38,11 +38,13 @@ class UrlRewrite
     protected $_state;
 
     /**
-     * @param \Magento\Core\App\Request\RewriteService $rewriteService
+     * @param \Magento\UrlRewrite\App\Request\RewriteService $rewriteService
      * @param \Magento\App\State $state
      */
-    public function __construct(\Magento\Core\App\Request\RewriteService $rewriteService, \Magento\App\State $state)
-    {
+    public function __construct(
+        \Magento\UrlRewrite\App\Request\RewriteService $rewriteService,
+        \Magento\App\State $state
+    ) {
         $this->_rewriteService = $rewriteService;
         $this->_state = $state;
     }
diff --git a/app/code/Magento/Core/App/Request/RewriteService.php b/app/code/Magento/UrlRewrite/App/Request/RewriteService.php
similarity index 86%
rename from app/code/Magento/Core/App/Request/RewriteService.php
rename to app/code/Magento/UrlRewrite/App/Request/RewriteService.php
index b9ff9500e9c977a1a16d5cb37f8271befeeadc70..cadd7055f758d1da25f9969bd08134cfe136154c 100644
--- a/app/code/Magento/Core/App/Request/RewriteService.php
+++ b/app/code/Magento/UrlRewrite/App/Request/RewriteService.php
@@ -21,12 +21,12 @@
  * @copyright   Copyright (c) 2014 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\Request;
+namespace Magento\UrlRewrite\App\Request;
 
 class RewriteService
 {
     /**
-     * @var \Magento\Core\Model\Url\RewriteFactory
+     * @var \Magento\UrlRewrite\Model\UrlRewriteFactory
      */
     protected $_rewriteFactory;
 
@@ -42,12 +42,12 @@ class RewriteService
 
     /**
      * @param \Magento\App\RouterList $routerList
-     * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+     * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory
      * @param \Magento\App\ConfigInterface $config
      */
     public function __construct(
         \Magento\App\RouterList $routerList,
-        \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+        \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory,
         \Magento\App\ConfigInterface $config
     ) {
         $this->_rewriteFactory = $rewriteFactory;
@@ -66,7 +66,7 @@ class RewriteService
         // URL rewrite
         if (!$request->isStraight()) {
             \Magento\Profiler::start('db_url_rewrite');
-            /** @var $urlRewrite \Magento\Core\Model\Url\Rewrite */
+            /** @var $urlRewrite \Magento\UrlRewrite\Model\UrlRewrite */
             $urlRewrite = $this->_rewriteFactory->create();
             $urlRewrite->rewrite($request);
             \Magento\Profiler::stop('db_url_rewrite');
diff --git a/app/code/Magento/Core/Helper/Url/Rewrite.php b/app/code/Magento/UrlRewrite/Helper/UrlRewrite.php
similarity index 88%
rename from app/code/Magento/Core/Helper/Url/Rewrite.php
rename to app/code/Magento/UrlRewrite/Helper/UrlRewrite.php
index d6f5b33c8de30c039042cc5e487ee651746c8745..18b86e60882877cfafce9138e58bfef54c71213e 100644
--- a/app/code/Magento/Core/Helper/Url/Rewrite.php
+++ b/app/code/Magento/UrlRewrite/Helper/UrlRewrite.php
@@ -18,22 +18,12 @@
  * 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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
+namespace Magento\UrlRewrite\Helper;
 
-/**
- * Url rewrite helper
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Core\Helper\Url;
-
-class Rewrite extends \Magento\App\Helper\AbstractHelper
+class UrlRewrite extends \Magento\App\Helper\AbstractHelper
 {
     /**
      * Validation error constants
@@ -46,17 +36,17 @@ class Rewrite extends \Magento\App\Helper\AbstractHelper
     // Anchor is not supported in request path, e.g. 'foo#bar'
 
     /**
-     * @var \Magento\Core\Model\Source\Urlrewrite\Options
+     * @var \Magento\UrlRewrite\Model\Source\Urlrewrite\Options
      */
     protected $_urlrewrite;
 
     /**
      * @param \Magento\App\Helper\Context $context
-     * @param \Magento\Core\Model\Source\Urlrewrite\Options $urlrewrite
+     * @param \Magento\UrlRewrite\Model\UrlRewrite\OptionProvider $urlrewrite
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
-        \Magento\Core\Model\Source\Urlrewrite\Options $urlrewrite
+        \Magento\UrlRewrite\Model\UrlRewrite\OptionProvider $urlrewrite
     ) {
         parent::__construct($context);
         $this->_urlrewrite = $urlrewrite;
@@ -133,7 +123,7 @@ class Rewrite extends \Magento\App\Helper\AbstractHelper
     /**
      * Has redirect options set
      *
-     * @param \Magento\Core\Model\Url\Rewrite $urlRewrite
+     * @param \Magento\UrlRewrite\Model\UrlRewrite $urlRewrite
      * @return bool
      */
     public function hasRedirectOptions($urlRewrite)
diff --git a/app/code/Magento/Core/Model/Resource/Url/Rewrite.php b/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite.php
similarity index 91%
rename from app/code/Magento/Core/Model/Resource/Url/Rewrite.php
rename to app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite.php
index 11d17a1f2d57ae8034dbf51d74c2db5b5ff603f0..ee9ef28e47f69ad1e38512915558452d43dee3c8 100644
--- a/app/code/Magento/Core/Model/Resource/Url/Rewrite.php
+++ b/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * URL rewrite resource model
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -18,21 +20,12 @@
  * 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) 2014 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\Url;
+namespace Magento\UrlRewrite\Model\Resource;
 
-/**
- * Url rewrite resource model class
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Rewrite extends \Magento\Model\Resource\Db\AbstractDb
+class UrlRewrite extends \Magento\Model\Resource\Db\AbstractDb
 {
     /**
      * Define main table
@@ -63,7 +56,7 @@ class Rewrite extends \Magento\Model\Resource\Db\AbstractDb
      *
      * @param string $field
      * @param mixed $value
-     * @param \Magento\Core\Model\Url\Rewrite $object
+     * @param \Magento\UrlRewrite\Model\UrlRewrite $object
      * @return \Zend_Db_Select
      */
     protected function _getLoadSelect($field, $value, $object)
@@ -120,11 +113,11 @@ class Rewrite extends \Magento\Model\Resource\Db\AbstractDb
      * Load rewrite information for request
      * If $path is array - we must load all possible records and choose one matching earlier record in array
      *
-     * @param   \Magento\Core\Model\Url\Rewrite $object
+     * @param   \Magento\UrlRewrite\Model\UrlRewrite $object
      * @param   array|string $path
      * @return  $this
      */
-    public function loadByRequestPath(\Magento\Core\Model\Url\Rewrite $object, $path)
+    public function loadByRequestPath(\Magento\UrlRewrite\Model\UrlRewrite $object, $path)
     {
         if (!is_array($path)) {
             $path = array($path);
diff --git a/app/code/Magento/Core/Model/Resource/Url/Rewrite/Collection.php b/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite/Collection.php
similarity index 86%
rename from app/code/Magento/Core/Model/Resource/Url/Rewrite/Collection.php
rename to app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite/Collection.php
index dbce2f608f3ab2bd8f541f602d439a30dea18733..9b3f12cb545c660b5dbefb085181da2a88fa431d 100644
--- a/app/code/Magento/Core/Model/Resource/Url/Rewrite/Collection.php
+++ b/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite/Collection.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * URL rewrite collection
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -18,21 +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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
-
-
-/**
- * Url rewrite resource collection model class
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Core\Model\Resource\Url\Rewrite;
+namespace Magento\UrlRewrite\Model\Resource\UrlRewrite;
 
 class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection
 {
@@ -44,7 +35,7 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio
     protected $_storeManager;
 
     /**
-     * @param \Magento\Core\Model\EntityFactory $entityFactory
+     * @param \Magento\Data\Collection\EntityFactoryInterface $entityFactory
      * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Event\ManagerInterface $eventManager
@@ -53,7 +44,7 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio
      * @param \Magento\Model\Resource\Db\AbstractDb $resource
      */
     public function __construct(
-        \Magento\Core\Model\EntityFactory $entityFactory,
+        \Magento\Data\Collection\EntityFactoryInterface $entityFactory,
         \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Event\ManagerInterface $eventManager,
@@ -72,7 +63,7 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio
      */
     protected function _construct()
     {
-        $this->_init('Magento\Core\Model\Url\Rewrite', 'Magento\Core\Model\Resource\Url\Rewrite');
+        $this->_init('Magento\UrlRewrite\Model\UrlRewrite', 'Magento\UrlRewrite\Model\Resource\UrlRewrite');
     }
 
     /**
diff --git a/app/code/Magento/Core/Model/Url/Rewrite.php b/app/code/Magento/UrlRewrite/Model/UrlRewrite.php
similarity index 91%
rename from app/code/Magento/Core/Model/Url/Rewrite.php
rename to app/code/Magento/UrlRewrite/Model/UrlRewrite.php
index 1dbf71fbce773b26f0ef76a73eecad5ca072dfc2..8b547035a494fdc08af995b7fa6c4339aae712a6 100644
--- a/app/code/Magento/Core/Model/Url/Rewrite.php
+++ b/app/code/Magento/UrlRewrite/Model/UrlRewrite.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * URL Rewrite Model
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -18,43 +20,31 @@
  * 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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
-
+namespace Magento\UrlRewrite\Model;
 
 /**
- * Url rewrite model class
- *
- * @method \Magento\Core\Model\Resource\Url\Rewrite _getResource()
- * @method \Magento\Core\Model\Resource\Url\Rewrite getResource()
- * @method \Magento\Core\Model\Url\Rewrite setStoreId(int $value)
+ * @method \Magento\UrlRewrite\Model\UrlRewrite setStoreId(int $value)
  * @method int getCategoryId()
- * @method \Magento\Core\Model\Url\Rewrite setCategoryId(int $value)
+ * @method \Magento\UrlRewrite\Model\UrlRewrite setCategoryId(int $value)
  * @method int getProductId()
- * @method \Magento\Core\Model\Url\Rewrite setProductId(int $value)
+ * @method \Magento\UrlRewrite\Model\UrlRewrite setProductId(int $value)
  * @method string getIdPath()
- * @method \Magento\Core\Model\Url\Rewrite setIdPath(string $value)
+ * @method \Magento\UrlRewrite\Model\UrlRewritesetIdPath(string $value)
  * @method string getRequestPath()
- * @method \Magento\Core\Model\Url\Rewrite setRequestPath(string $value)
+ * @method \Magento\UrlRewrite\Model\UrlRewrite setRequestPath(string $value)
  * @method string getTargetPath()
- * @method \Magento\Core\Model\Url\Rewrite setTargetPath(string $value)
+ * @method \Magento\UrlRewrite\Model\UrlRewrite setTargetPath(string $value)
  * @method int getIsSystem()
- * @method \Magento\Core\Model\Url\Rewrite setIsSystem(int $value)
+ * @method \Magento\UrlRewrite\Model\UrlRewrite setIsSystem(int $value)
  * @method string getOptions()
- * @method \Magento\Core\Model\Url\Rewrite setOptions(string $value)
+ * @method \Magento\UrlRewrite\Model\UrlRewrite setOptions(string $value)
  * @method string getDescription()
- * @method \Magento\Core\Model\Url\Rewrite setDescription(string $value)
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
+ * @method \Magento\UrlRewrite\Model\UrlRewrite setDescription(string $value)
  */
-namespace Magento\Core\Model\Url;
-
-class Rewrite extends \Magento\Model\AbstractModel
+class UrlRewrite extends \Magento\Model\AbstractModel
 {
     const TYPE_CATEGORY = 1;
 
@@ -113,19 +103,21 @@ class Rewrite extends \Magento\Model\AbstractModel
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
+        parent::__construct($context, $registry, $resource, $resourceCollection, $data);
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_cookie = $cookie;
         $this->_storeManager = $storeManager;
         $this->_httpContext = $httpContext;
-        parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
     /**
+     * Initialize corresponding resource model
+     *
      * @return void
      */
     protected function _construct()
     {
-        $this->_init('Magento\Core\Model\Resource\Url\Rewrite');
+        $this->_init('Magento\UrlRewrite\Model\Resource\UrlRewrite');
     }
 
     /**
@@ -284,7 +276,8 @@ class Rewrite extends \Magento\Model\AbstractModel
 
         /**
          * We have two cases of incoming paths - with and without slashes at the end ("/somepath/" and "/somepath").
-         * Each of them matches two url rewrite request paths - with and without slashes at the end ("/somepath/" and "/somepath").
+         * Each of them matches two url rewrite request paths - with and without slashes at the end
+         * ("/somepath/" and "/somepath").
          * Choose any matched rewrite, but in priority order that depends on same presence of slash and query params.
          */
         $requestCases = array();
diff --git a/app/code/Magento/Core/Model/Source/Urlrewrite/Options.php b/app/code/Magento/UrlRewrite/Model/UrlRewrite/OptionProvider.php
similarity index 82%
rename from app/code/Magento/Core/Model/Source/Urlrewrite/Options.php
rename to app/code/Magento/UrlRewrite/Model/UrlRewrite/OptionProvider.php
index 8ffc2ee9288932283e38c7d1f5ffb79a69ef0fc5..572522bc4970030302222da1e94af25b093f5890 100644
--- a/app/code/Magento/Core/Model/Source/Urlrewrite/Options.php
+++ b/app/code/Magento/UrlRewrite/Model/UrlRewrite/OptionProvider.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * URL Rewrite Option Provider
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -18,22 +20,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_Core
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
+namespace Magento\UrlRewrite\Model\UrlRewrite;
 
-/**
- * UrlRewrite Options source model
- *
- * @category   Magento
- * @package    Magento_Core
- * @author     Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Core\Model\Source\Urlrewrite;
+use Magento\Option\ArrayInterface;
 
-class Options implements \Magento\Option\ArrayInterface
+class OptionProvider implements ArrayInterface
 {
     const TEMPORARY = 'R';
 
@@ -55,7 +49,7 @@ class Options implements \Magento\Option\ArrayInterface
             $this->_options = array(
                 '' => __('No'),
                 self::TEMPORARY => __('Temporary (302)'),
-                self::PERMANENT => __('Permanent (301)')
+                self::PERMANENT => __('Permanent (301)'),
             );
         }
         return $this->_options;
diff --git a/app/code/Magento/Core/Model/Source/Urlrewrite/Types.php b/app/code/Magento/UrlRewrite/Model/UrlRewrite/TypeProvider.php
similarity index 77%
rename from app/code/Magento/Core/Model/Source/Urlrewrite/Types.php
rename to app/code/Magento/UrlRewrite/Model/UrlRewrite/TypeProvider.php
index 8abd3c7b19ff89af29cb2217e4e5b9b0d587ca62..892afa728bbe22585c2d5fb5f7a3fa38984da4e2 100644
--- a/app/code/Magento/Core/Model/Source/Urlrewrite/Types.php
+++ b/app/code/Magento/UrlRewrite/Model/UrlRewrite/TypeProvider.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * URL Rewrite Type Provider
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -18,22 +20,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_Core
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
+namespace Magento\UrlRewrite\Model\UrlRewrite;
 
-/**
- * UrlRewrite Type source model
- *
- * @category   Magento
- * @package    Magento_Core
- * @author     Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Core\Model\Source\Urlrewrite;
+use Magento\Option\ArrayInterface;
 
-class Types implements \Magento\Option\ArrayInterface
+class TypeProvider implements ArrayInterface
 {
     const SYSTEM = 1;
 
@@ -52,7 +46,10 @@ class Types implements \Magento\Option\ArrayInterface
     public function getAllOptions()
     {
         if (is_null($this->_options)) {
-            $this->_options = array(self::SYSTEM => __('System'), self::CUSTOM => __('Custom'));
+            $this->_options = array(
+                self::SYSTEM => __('System'),
+                self::CUSTOM => __('Custom'),
+            );
         }
         return $this->_options;
     }
diff --git a/app/code/Magento/Newsletter/etc/adminhtml/events.xml b/app/code/Magento/UrlRewrite/etc/config.xml
similarity index 69%
rename from app/code/Magento/Newsletter/etc/adminhtml/events.xml
rename to app/code/Magento/UrlRewrite/etc/config.xml
index 3943d18e216f6dac425bfdda37c6e802fef825ef..597ed131ecbf693b407c38f1440a62258cc6a468 100644
--- a/app/code/Magento/Newsletter/etc/adminhtml/events.xml
+++ b/app/code/Magento/UrlRewrite/etc/config.xml
@@ -19,15 +19,18 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
+ * @category    Magento
+ * @package     Magento_Core
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Event/etc/events.xsd">
-    <event name="customer_save_after">
-        <observer name="newsletter_subscribe_observer" instance="Magento\Newsletter\Model\Observer" method="subscribeCustomer" />
-    </event>
-    <event name="customer_delete_after">
-        <observer name="newsletter_subscribe_observer" instance="Magento\Newsletter\Model\Observer" method="customerDeleted" />
-    </event>
+<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Core/etc/config.xsd">
+    <default>
+        <web>
+            <seo>
+                <use_rewrites>0</use_rewrites>
+            </seo>
+        </web>
+    </default>
 </config>
diff --git a/app/code/Magento/Newsletter/etc/frontend/events.xml b/app/code/Magento/UrlRewrite/etc/frontend/di.xml
similarity index 69%
rename from app/code/Magento/Newsletter/etc/frontend/events.xml
rename to app/code/Magento/UrlRewrite/etc/frontend/di.xml
index 3943d18e216f6dac425bfdda37c6e802fef825ef..b4d43a0e76d8b8f0b80611cfd59e614dec5283ea 100644
--- a/app/code/Magento/Newsletter/etc/frontend/events.xml
+++ b/app/code/Magento/UrlRewrite/etc/frontend/di.xml
@@ -23,11 +23,8 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Event/etc/events.xsd">
-    <event name="customer_save_after">
-        <observer name="newsletter_subscribe_observer" instance="Magento\Newsletter\Model\Observer" method="subscribeCustomer" />
-    </event>
-    <event name="customer_delete_after">
-        <observer name="newsletter_subscribe_observer" instance="Magento\Newsletter\Model\Observer" method="customerDeleted" />
-    </event>
+<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/ObjectManager/etc/config.xsd">
+    <type name="Magento\App\FrontController">
+        <plugin name="urlRewrite" type="Magento\UrlRewrite\App\FrontController\Plugin\UrlRewrite" sortOrder="60"/>
+    </type>
 </config>
diff --git a/app/code/Magento/UrlRewrite/etc/module.xml b/app/code/Magento/UrlRewrite/etc/module.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ab2f27dd4196c8dc9a140fda0bf114dca641e71d
--- /dev/null
+++ b/app/code/Magento/UrlRewrite/etc/module.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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Module/etc/module.xsd">
+    <module name="Magento_UrlRewrite" version="1.0.0.0" active="true">
+        <depends>
+            <module name="Magento_Catalog" />
+            <module name="Magento_Core" />
+        </depends>
+    </module>
+</config>
diff --git a/app/code/Magento/UrlRewrite/i18n/de_DE.csv b/app/code/Magento/UrlRewrite/i18n/de_DE.csv
new file mode 100644
index 0000000000000000000000000000000000000000..3f29d50645be56370ab90789b338371a83ea3322
--- /dev/null
+++ b/app/code/Magento/UrlRewrite/i18n/de_DE.csv
@@ -0,0 +1,2 @@
+"Anchor symbol (#) is not supported in url rewrite suffix","Das Doppelkreuz (#) wird beim URL-Überschreiben-Suffix nicht unterstützt"
+"Two and more slashes together are not permitted in url rewrite suffix","Zwei und mehr zusammenhängende Schrägstriche sind im URL-Rewrite-Suffix nicht zulässig"
diff --git a/app/code/Magento/UrlRewrite/i18n/en_US.csv b/app/code/Magento/UrlRewrite/i18n/en_US.csv
new file mode 100644
index 0000000000000000000000000000000000000000..4624360515163226c4ff48142927d07063e9eb73
--- /dev/null
+++ b/app/code/Magento/UrlRewrite/i18n/en_US.csv
@@ -0,0 +1,2 @@
+"Anchor symbol (#) is not supported in url rewrite suffix","Anchor symbol (#) is not supported in url rewrite suffix"
+"Two and more slashes together are not permitted in url rewrite suffix","Two and more slashes together are not permitted in url rewrite suffix"
diff --git a/app/code/Magento/UrlRewrite/i18n/es_ES.csv b/app/code/Magento/UrlRewrite/i18n/es_ES.csv
new file mode 100644
index 0000000000000000000000000000000000000000..f4dfad107e7a0dc1f275a90a6e54edc53fd260e1
--- /dev/null
+++ b/app/code/Magento/UrlRewrite/i18n/es_ES.csv
@@ -0,0 +1,2 @@
+"Anchor symbol (#) is not supported in url rewrite suffix","El símbolo ancla (#) no está soportado en el sufijo de reescritura de url"
+"Two and more slashes together are not permitted in url rewrite suffix","No se permiten dos o más barras juntas en el sufijo de la url"
diff --git a/app/code/Magento/UrlRewrite/i18n/fr_FR.csv b/app/code/Magento/UrlRewrite/i18n/fr_FR.csv
new file mode 100644
index 0000000000000000000000000000000000000000..f8cbb5498366467029fe81426f63756f81299886
--- /dev/null
+++ b/app/code/Magento/UrlRewrite/i18n/fr_FR.csv
@@ -0,0 +1,2 @@
+"Anchor symbol (#) is not supported in url rewrite suffix","Le symbole d'ancrage (#) n'est pas pris en charge dans le suffixe de réécriture de l'url"
+"Two and more slashes together are not permitted in url rewrite suffix","Deux slashs ou plus ne sont pas autorisés dans le suffixe de réécriture de l'URL"
diff --git a/app/code/Magento/UrlRewrite/i18n/nl_NL.csv b/app/code/Magento/UrlRewrite/i18n/nl_NL.csv
new file mode 100644
index 0000000000000000000000000000000000000000..c49b40a314457bdd4f91237802a80f57d5bcebfc
--- /dev/null
+++ b/app/code/Magento/UrlRewrite/i18n/nl_NL.csv
@@ -0,0 +1,2 @@
+"Anchor symbol (#) is not supported in url rewrite suffix","Anker symbool (#) is niet ondersteund in URL herschrijvings toevoeging"
+"Two and more slashes together are not permitted in url rewrite suffix","Twee of meer schuine strepen zijn niet toegestaan in URL herschrijvings navoeging"
diff --git a/app/code/Magento/UrlRewrite/i18n/pt_BR.csv b/app/code/Magento/UrlRewrite/i18n/pt_BR.csv
new file mode 100644
index 0000000000000000000000000000000000000000..4a03c4c3ed53dbb46e497ab584b8d239bed5ed22
--- /dev/null
+++ b/app/code/Magento/UrlRewrite/i18n/pt_BR.csv
@@ -0,0 +1,2 @@
+"Anchor symbol (#) is not supported in url rewrite suffix","Símbolo âncora (#) não é suportado no sufixo url reescrito"
+"Two and more slashes together are not permitted in url rewrite suffix","Duas ou mais barras juntas não são permitidas em sufixo url reescrito"
diff --git a/app/code/Magento/UrlRewrite/i18n/zh_CN.csv b/app/code/Magento/UrlRewrite/i18n/zh_CN.csv
new file mode 100644
index 0000000000000000000000000000000000000000..e9f47e3a77ba2f128b337065538df687feb09ca8
--- /dev/null
+++ b/app/code/Magento/UrlRewrite/i18n/zh_CN.csv
@@ -0,0 +1,2 @@
+"Anchor symbol (#) is not supported in url rewrite suffix","URL 重写后缀不支持固定标志 (#)"
+"Two and more slashes together are not permitted in url rewrite suffix","两个或更多斜杠在 URL 重写后缀中不被允许"
diff --git a/app/code/Magento/UrlRewrite/sql/urlrewrite_setup/install-1.0.0.0.php b/app/code/Magento/UrlRewrite/sql/urlrewrite_setup/install-1.0.0.0.php
new file mode 100644
index 0000000000000000000000000000000000000000..acc29da8a9e64462599a45011758bd2273408515
--- /dev/null
+++ b/app/code/Magento/UrlRewrite/sql/urlrewrite_setup/install-1.0.0.0.php
@@ -0,0 +1,120 @@
+<?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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+/* @var $installer \Magento\Core\Model\Resource\Setup */
+$installer = $this;
+
+$installer->startSetup();
+
+/**
+ * Create table 'core_url_rewrite'
+ */
+$table = $installer->getConnection()->newTable(
+    $installer->getTable('core_url_rewrite')
+)->addColumn(
+    'url_rewrite_id',
+    \Magento\DB\Ddl\Table::TYPE_INTEGER,
+    null,
+    array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true),
+    'Rewrite Id'
+)->addColumn(
+    'store_id',
+    \Magento\DB\Ddl\Table::TYPE_SMALLINT,
+    null,
+    array('unsigned' => true, 'nullable' => false, 'default' => '0'),
+    'Store Id'
+)->addColumn(
+    'id_path',
+    \Magento\DB\Ddl\Table::TYPE_TEXT,
+    255,
+    array(),
+    'Id Path'
+)->addColumn(
+    'request_path',
+    \Magento\DB\Ddl\Table::TYPE_TEXT,
+    255,
+    array(),
+    'Request Path'
+)->addColumn(
+    'target_path',
+    \Magento\DB\Ddl\Table::TYPE_TEXT,
+    255,
+    array(),
+    'Target Path'
+)->addColumn(
+    'is_system',
+    \Magento\DB\Ddl\Table::TYPE_SMALLINT,
+    null,
+    array('unsigned' => true, 'default' => '1'),
+    'Defines is Rewrite System'
+)->addColumn(
+    'options',
+    \Magento\DB\Ddl\Table::TYPE_TEXT,
+    255,
+    array('nullable' => true),
+    'Options'
+)->addColumn(
+    'description',
+    \Magento\DB\Ddl\Table::TYPE_TEXT,
+    255,
+    array(),
+    'Deascription'
+)->addIndex(
+    $installer->getIdxName(
+        'core_url_rewrite',
+        array('request_path', 'store_id'),
+        \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
+    ),
+    array('request_path', 'store_id'),
+    array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE)
+)->addIndex(
+    $installer->getIdxName(
+        'core_url_rewrite',
+        array('id_path', 'is_system', 'store_id'),
+        \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
+    ),
+    array('id_path', 'is_system', 'store_id'),
+    array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE)
+)->addIndex(
+    $installer->getIdxName('core_url_rewrite', array('target_path', 'store_id')),
+    array('target_path', 'store_id')
+)->addIndex(
+    $installer->getIdxName('core_url_rewrite', array('id_path')),
+    array('id_path')
+)->addIndex(
+    $installer->getIdxName('core_url_rewrite', array('store_id')),
+    array('store_id')
+)->addForeignKey(
+    $installer->getFkName('core_url_rewrite', 'store_id', 'core_store', 'store_id'),
+    'store_id',
+    $installer->getTable('core_store'),
+    'store_id',
+    \Magento\DB\Ddl\Table::ACTION_CASCADE,
+    \Magento\DB\Ddl\Table::ACTION_CASCADE
+)->setComment(
+    'Url Rewrites'
+);
+$installer->getConnection()->createTable($table);
+
+$installer->endSetup();
diff --git a/app/etc/di.xml b/app/etc/di.xml
index 189debd0ccdc805bf3cad44179dbbeb02d1635b7..305434cb7eae95639f5469e7bfe7726e70d8f7b0 100644
--- a/app/etc/di.xml
+++ b/app/etc/di.xml
@@ -61,7 +61,7 @@
     <preference for="Magento\View\Url\ConfigInterface" type="Magento\Core\Model\View\Url\Config" />
     <preference for="Magento\App\Route\ConfigInterface" type="Magento\App\Route\Config" />
     <preference for="Magento\App\Resource\ConfigInterface" type="Magento\App\Resource\Config\Proxy" />
-    <preference for="Magento\App\Cache\State\OptionsInterface" type="Magento\Core\Model\Resource\Cache" />
+    <preference for="Magento\App\Cache\State\OptionsInterface" type="Magento\App\Cache\State\Options" />
     <preference for="Magento\Oauth\OauthInterface" type="Magento\Oauth\Oauth"/>
     <preference for="Magento\View\Design\Theme\Domain\PhysicalInterface" type="Magento\Core\Model\Theme\Domain\Physical" />
     <preference for="Magento\View\Design\Theme\Domain\VirtualInterface" type="Magento\Core\Model\Theme\Domain\Virtual" />
@@ -70,7 +70,7 @@
     <preference for="Magento\Json\DecoderInterface" type="Magento\Json\Decoder" />
     <preference for="Magento\Message\ManagerInterface" type="Magento\Message\Manager" />
     <preference for="Magento\App\Config\ValueInterface" type="Magento\Core\Model\Config\Value" />
-    <preference for="Magento\Module\DependencyManagerInterface" type="Magento\Module\DependencyManager" />    
+    <preference for="Magento\Module\DependencyManagerInterface" type="Magento\Module\DependencyManager" />
     <preference for="Magento\Interception\Chain" type="Magento\Interception\Chain\Chain" />
     <preference for="Magento\Module\Output\ConfigInterface" type="Magento\Core\Model\Module\Output\Config" />
     <preference for="Magento\View\Design\Theme\CustomizationInterface" type="Magento\View\Design\Theme\Customization" />
diff --git a/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php b/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php
index 9482d50e8283d5bfb6b3ec3e719961316b73ecbd..844d9f5e4922bb78219ff451f02f56902f6793b6 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php
@@ -44,7 +44,8 @@ class ObjectManager extends \Magento\App\ObjectManager
         'Magento\ObjectManager\Config',
         'Magento\Interception\Definition',
         'Magento\ObjectManager\Definition',
-        'Magento\Core\Model\Session\Config'
+        'Magento\Core\Model\Session\Config',
+        'Magento\ObjectManager\Config\Mapper\Dom'
     );
 
     /**
diff --git a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
index 5183f56d432c1dff0ad5d382576e0af05525802f..202e6159d12c4d265fa600d2dbf5a1db078e3bdb 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
@@ -100,6 +100,7 @@ class ObjectManagerFactory extends \Magento\App\ObjectManagerFactory
 
         $appArguments = parent::createAppArguments($directoryList, $arguments);
         $this->appArgumentsProxy->setSubject($appArguments);
+        $this->factory->setArguments($appArguments->get());
         $objectManager->addSharedInstance($appArguments, 'Magento\App\Arguments');
 
         $objectManager->get('Magento\Interception\PluginList')->reset();
@@ -109,25 +110,25 @@ class ObjectManagerFactory extends \Magento\App\ObjectManagerFactory
     }
 
     /**
-     * Load primary config data
+     * Load primary config
      *
-     * @param string $configDirectoryPath
+     * @param \Magento\App\Filesystem\DirectoryList $directoryList
+     * @param mixed $argumentMapper
      * @param string $appMode
      * @return array
-     * @throws \Magento\BootstrapException
      */
-    protected function _loadPrimaryConfig($configDirectoryPath, $appMode)
-    {
+    protected function _loadPrimaryConfig(
+        \Magento\App\Filesystem\DirectoryList $directoryList,
+        $argumentMapper,
+        $appMode
+    ) {
         if (null === $this->_primaryConfigData) {
             $this->_primaryConfigData = array_replace(
-                parent::_loadPrimaryConfig($configDirectoryPath, $appMode),
+                parent::_loadPrimaryConfig($directoryList, $argumentMapper, $appMode),
                 array(
                     'Magento\View\Design\FileResolution\Strategy\Fallback\CachingProxy' => array(
                         'arguments' => array(
-                            'canSaveMap' => array(
-                                \Magento\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE => 'boolean',
-                                'value' => false
-                            )
+                            'canSaveMap' => false
                         )
                     ),
                     'default_setup' => array('type' => 'Magento\TestFramework\Db\ConnectionAdapter')
@@ -135,7 +136,7 @@ class ObjectManagerFactory extends \Magento\App\ObjectManagerFactory
             );
             $this->_primaryConfigData['preferences'] = array_replace(
                 $this->_primaryConfigData['preferences'],
-                array(
+                [
                     'Magento\Stdlib\Cookie' => 'Magento\TestFramework\Cookie',
                     'Magento\App\RequestInterface' => 'Magento\TestFramework\Request',
                     'Magento\App\Request\Http' => 'Magento\TestFramework\Request',
@@ -144,7 +145,7 @@ class ObjectManagerFactory extends \Magento\App\ObjectManagerFactory
                     'Magento\Interception\PluginList' => 'Magento\TestFramework\Interception\PluginList',
                     'Magento\Interception\ObjectManager\Config' => 'Magento\TestFramework\ObjectManager\Config',
                     'Magento\View\LayoutInterface' => 'Magento\TestFramework\View\Layout'
-                )
+                ]
             );
         }
         return $this->_primaryConfigData;
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Request.php b/dev/tests/integration/framework/Magento/TestFramework/Request.php
index 90ad2e654ea74724897815810b727644304d09dc..e6aa9fd9b403e62760ae1cb1424656c79ccbf34e 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Request.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Request.php
@@ -80,4 +80,16 @@ class Request extends \Magento\App\Request\Http
 
         return isset($this->_server[$key]) ? $this->_server[$key] : $default;
     }
+
+    /**
+     * Set the HTTP Method type.
+     *
+     * Examples are POST, PUT, GET, DELETE
+     *
+     * @param string $type
+     */
+    public function setMethod($type)
+    {
+        $this->_server['REQUEST_METHOD'] = $type;
+    }
 }
diff --git a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php
index 0690631c2a16506e4a697a2b97249a96d29b4734..7edc1aa8fce5c717258e5384a72e5dd8988a6a7f 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php
@@ -205,19 +205,24 @@ abstract class AbstractController extends \PHPUnit_Framework_TestCase
      *
      * @param \PHPUnit_Framework_Constraint $constraint Constraint to compare actual messages against
      * @param string|null $messageType Message type filter, one of the constants \Magento\Message\MessageInterface::*
-     * @param string $messageManager Class of the session model that manages messages
+     * @param string $messageManagerClass Class of the session model that manages messages
      */
     public function assertSessionMessages(
         \PHPUnit_Framework_Constraint $constraint,
         $messageType = null,
-        $messageManager = 'Magento\Message\Manager'
+        $messageManagerClass = 'Magento\Message\Manager'
     ) {
         $this->_assertSessionErrors = false;
-        /** @var $messages \Magento\Message\ManagerInterface */
-        $messages = $this->_objectManager->get($messageManager);
-        $actualMessages = array();
-        /** @var $message \Magento\Message\AbstractMessage */
-        foreach ($messages->getMessages()->getItemsByType($messageType) as $message) {
+        /** @var $messageManager \Magento\Message\ManagerInterface */
+        $messageManager = $this->_objectManager->get($messageManagerClass);
+        /** @var $messages \Magento\Message\AbstractMessage[] */
+        if (is_null($messageType)) {
+            $messages = $messageManager->getMessages()->getItems();
+        } else {
+            $messages = $messageManager->getMessages()->getItemsByType($messageType);
+        }
+        $actualMessages = [];
+        foreach ($messages as $message) {
             $actualMessages[] = $message->getText();
         }
         $this->assertThat(
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 98a41f84c4d4f54bd7fa4e3e88a3969ed7ca07e6..be4d999c8bebec798570fd0130c9c24f90524bec 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
@@ -33,21 +33,12 @@ class ControllerAbstractTest extends \Magento\TestFramework\TestCase\AbstractCon
 {
     protected $_bootstrap;
 
+    /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Message\Manager */
+    private $messageManager;
+
     protected function setUp()
     {
-        // emulate session messages
-        $messagesCollection = new \Magento\Message\Collection();
-        $messagesCollection->addMessage(
-            new \Magento\Message\Warning('some_warning')
-        )->addMessage(
-            new \Magento\Message\Error('error_one')
-        )->addMessage(
-            new \Magento\Message\Error('error_two')
-        )->addMessage(
-            new \Magento\Message\Notice('some_notice')
-        );
-        $messageManager = $this->getMock('\Magento\Message\Manager', array(), array(), '', false);
-        $messageManager->expects($this->any())->method('getMessages')->will($this->returnValue($messagesCollection));
+        $this->messageManager = $this->getMock('\Magento\Message\Manager', array(), array(), '', false);
         $request = new \Magento\TestFramework\Request(
             $this->getMock('\Magento\App\Route\ConfigInterface', array(), array(), '', false),
             $this->getMock('Magento\App\Request\PathInfoProcessorInterface', array(), array(), '', false)
@@ -64,19 +55,17 @@ class ControllerAbstractTest extends \Magento\TestFramework\TestCase\AbstractCon
             '',
             false
         );
-        $this->_objectManager->expects(
-            $this->any()
-        )->method(
-            'get'
-        )->will(
-            $this->returnValueMap(
-                array(
-                    array('Magento\App\RequestInterface', $request),
-                    array('Magento\App\ResponseInterface', $response),
-                    array('Magento\Message\Manager', $messageManager)
+        $this->_objectManager->expects($this->any())
+            ->method('get')
+            ->will(
+                $this->returnValueMap(
+                    array(
+                        array('Magento\App\RequestInterface', $request),
+                        array('Magento\App\ResponseInterface', $response),
+                        array('Magento\Message\Manager', $this->messageManager),
+                    )
                 )
-            )
-        );
+            );
     }
 
     /**
@@ -162,17 +151,14 @@ class ControllerAbstractTest extends \Magento\TestFramework\TestCase\AbstractCon
      */
     public function testAssertSessionMessagesSuccess(array $expectedMessages, $messageTypeFilter)
     {
+        $this->addSessionMessages();
         /** @var \PHPUnit_Framework_MockObject_MockObject|\PHPUnit_Framework_Constraint $constraint */
         $constraint = $this->getMock('PHPUnit_Framework_Constraint', array('toString', 'matches'));
         $constraint->expects(
             $this->once()
-        )->method(
-            'matches'
-        )->with(
-            $expectedMessages
-        )->will(
-            $this->returnValue(true)
-        );
+        )->method('matches')
+            ->with($expectedMessages)
+            ->will($this->returnValue(true));
         $this->assertSessionMessages($constraint, $messageTypeFilter);
     }
 
@@ -186,12 +172,51 @@ class ControllerAbstractTest extends \Magento\TestFramework\TestCase\AbstractCon
             'message error type filtering' => array(
                 array('error_one', 'error_two'),
                 \Magento\Message\MessageInterface::TYPE_ERROR
+            ),
+            'message success type filtering'    => array(
+                array('success!'),
+                \Magento\Message\MessageInterface::TYPE_SUCCESS
+            ),
+        );
+    }
+
+    public function testAssertSessionMessagesAll()
+    {
+        $this->addSessionMessages();
+
+        $this->assertSessionMessages(
+            $this->equalTo(
+                [
+                    'some_warning',
+                    'error_one',
+                    'error_two',
+                    'some_notice',
+                    'success!',
+                ]
             )
         );
     }
 
-    public function testAssertSessionMessagesFailure()
+    public function testAssertSessionMessagesEmpty()
     {
+        $messagesCollection =  new \Magento\Message\Collection();
+        $this->messageManager->expects($this->any())->method('getMessages')
+            ->will($this->returnValue($messagesCollection));
+
         $this->assertSessionMessages($this->isEmpty());
     }
+
+    private function addSessionMessages()
+    {
+        // emulate session messages
+        $messagesCollection = new \Magento\Message\Collection();
+        $messagesCollection
+            ->addMessage(new \Magento\Message\Warning('some_warning'))
+            ->addMessage(new \Magento\Message\Error('error_one'))
+            ->addMessage(new \Magento\Message\Error('error_two'))
+            ->addMessage(new \Magento\Message\Notice('some_notice'))
+            ->addMessage(new \Magento\Message\Success('success!'));
+        $this->messageManager->expects($this->any())->method('getMessages')
+            ->will($this->returnValue($messagesCollection));
+    }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/CacheTest.php b/dev/tests/integration/testsuite/Magento/App/Cache/State/OptionsTest.php
similarity index 90%
rename from dev/tests/integration/testsuite/Magento/Core/Model/Resource/CacheTest.php
rename to dev/tests/integration/testsuite/Magento/App/Cache/State/OptionsTest.php
index 103b2696c1eb8c527440df05bf6712cd211f9447..ca0f04841ba07f21f7cf34f78e4c74a4a4f95ce7 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/CacheTest.php
+++ b/dev/tests/integration/testsuite/Magento/App/Cache/State/OptionsTest.php
@@ -18,20 +18,18 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Core
  * @subpackage  integration_tests
  * @copyright   Copyright (c) 2014 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\Cache\State;
 
-class CacheTest extends \PHPUnit_Framework_TestCase
+class OptionsTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Resource\Cache
+     * @var \Magento\App\Cache\State\Options
      */
-    protected $_model;
+    protected $_model;  
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
@@ -41,7 +39,7 @@ class CacheTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Resource\Cache'
+            'Magento\App\Cache\State\Options'
         );
     }
 
@@ -53,7 +51,7 @@ class CacheTest extends \PHPUnit_Framework_TestCase
         );
 
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Resource\Cache',
+            'Magento\App\Cache\State\Options',
             array('resource' => $this->_resourceMock)
         );
         $this->assertEquals('prefix_core_cache_option', $this->_model->getTable('core_cache_option'));
diff --git a/dev/tests/integration/testsuite/Magento/App/FrontController/Plugin/InstallTest.php b/dev/tests/integration/testsuite/Magento/App/FrontController/Plugin/InstallTest.php
index a7ad13c98fcd7212326a6d5a2392f01d7772adbe..e76f7be0deaef132db2ad7b50ccc870e80cd42bd 100644
--- a/dev/tests/integration/testsuite/Magento/App/FrontController/Plugin/InstallTest.php
+++ b/dev/tests/integration/testsuite/Magento/App/FrontController/Plugin/InstallTest.php
@@ -48,13 +48,13 @@ class InstallTest extends \Magento\TestFramework\TestCase\AbstractController
     {
         /*reset versions*/
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Resource\Resource'
+            'Magento\Module\ResourceInterface'
         )->setDbVersion(
             'adminnotification_setup',
             false
         );
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Resource\Resource'
+            'Magento\Module\ResourceInterface'
         )->setDataVersion(
             'adminnotification_setup',
             false
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/EditTest.php
index fba63096662b5cedef064bd61404b94092ddf5e7..0be268e261718e2f55fa51502952fa32bf386387 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/EditTest.php
@@ -283,18 +283,18 @@ class EditTest extends \PHPUnit_Framework_TestCase
      */
     public function prepareLayoutDataProvider()
     {
-        /** @var $urlRewrite \Magento\Core\Model\Url\Rewrite */
+        /** @var $urlRewrite \Magento\UrlRewrite\Model\UrlRewrite */
         $urlRewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Url\Rewrite'
+            'Magento\UrlRewrite\Model\UrlRewrite'
         );
         /** @var $category \Magento\Catalog\Model\Category */
         $category = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Catalog\Model\Category',
             array('data' => array('entity_id' => 1, 'name' => 'Test category'))
         );
-        /** @var $existingUrlRewrite \Magento\Core\Model\Url\Rewrite */
+        /** @var $existingUrlRewrite \Magento\UrlRewrite\Model\UrlRewrite */
         $existingUrlRewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Url\Rewrite',
+            'Magento\UrlRewrite\Model\UrlRewrite',
             array('data' => array('url_rewrite_id' => 1))
         );
 
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/EditTest.php
index 8a68085896a55212bd774914c25cd3b0347b1be7..f6e8b66c35153b312eda9d9333245df46a70e9da 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/EditTest.php
@@ -362,9 +362,9 @@ class EditTest extends \PHPUnit_Framework_TestCase
      */
     public function prepareLayoutDataProvider()
     {
-        /** @var $urlRewrite \Magento\Core\Model\Url\Rewrite */
+        /** @var $urlRewrite \Magento\UrlRewrite\Model\UrlRewrite */
         $urlRewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Url\Rewrite'
+            'Magento\UrlRewrite\Model\UrlRewrite'
         );
         /** @var $product \Magento\Catalog\Model\Product */
         $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
@@ -376,9 +376,9 @@ class EditTest extends \PHPUnit_Framework_TestCase
             'Magento\Catalog\Model\Category',
             array('data' => array('entity_id' => 1, 'name' => 'Test category'))
         );
-        /** @var $existingUrlRewrite \Magento\Core\Model\Url\Rewrite */
+        /** @var $existingUrlRewrite \Magento\UrlRewrite\Model\UrlRewrite */
         $existingUrlRewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Url\Rewrite',
+            'Magento\UrlRewrite\Model\UrlRewrite',
             array('data' => array('url_rewrite_id' => 1))
         );
         return array(
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/EditTest.php
index 25423602792c21c31968835cb1e0b84809651206..ba701007826b44192b63f8a63f4f9ab774a5a621 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/EditTest.php
@@ -283,18 +283,18 @@ class EditTest extends \PHPUnit_Framework_TestCase
      */
     public function prepareLayoutDataProvider()
     {
-        /** @var $urlRewrite \Magento\Core\Model\Url\Rewrite */
+        /** @var $urlRewrite \Magento\UrlRewrite\Model\UrlRewrite */
         $urlRewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Url\Rewrite'
+            'Magento\UrlRewrite\Model\UrlRewrite'
         );
         /** @var $cmsPage \Magento\Cms\Model\Page */
         $cmsPage = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Cms\Model\Page',
             array('data' => array('page_id' => 1, 'title' => 'Test CMS Page'))
         );
-        /** @var $existingUrlRewrite \Magento\Core\Model\Url\Rewrite */
+        /** @var $existingUrlRewrite \Magento\UrlRewrite\Model\UrlRewrite */
         $existingUrlRewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Url\Rewrite',
+            'Magento\UrlRewrite\Model\UrlRewrite',
             array('data' => array('url_rewrite_id' => 1))
         );
 
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/EditTest.php
index 58283d76764373b9ae60b50229e9390f61704e19..0a583809942e3a2b1ae9431f1a25446109806fe2 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/EditTest.php
@@ -159,13 +159,13 @@ class EditTest extends \PHPUnit_Framework_TestCase
      */
     public function prepareLayoutDataProvider()
     {
-        /** @var $urlRewrite \Magento\Core\Model\Url\Rewrite */
+        /** @var $urlRewrite \Magento\UrlRewrite\Model\UrlRewrite */
         $urlRewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Url\Rewrite'
+            'Magento\UrlRewrite\Model\UrlRewrite'
         );
-        /** @var $existingUrlRewrite \Magento\Core\Model\Url\Rewrite */
+        /** @var $existingUrlRewrite \Magento\UrlRewrite\Model\UrlRewrite */
         $existingUrlRewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Url\Rewrite',
+            'Magento\UrlRewrite\Model\UrlRewrite',
             array('data' => array('url_rewrite_id' => 1))
         );
 
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Utility/Controller.php b/dev/tests/integration/testsuite/Magento/Backend/Utility/Controller.php
index b2fd5625ac3ce767f7960b3124a1768c54875756..6014d99921f45a6cb1c6f47bd22095f75518c502 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Utility/Controller.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Utility/Controller.php
@@ -82,13 +82,13 @@ class Controller extends \Magento\TestFramework\TestCase\AbstractController
      *
      * @param \PHPUnit_Framework_Constraint $constraint
      * @param string|null $messageType
-     * @param string $messageManager
+     * @param string $messageManagerClass
      */
     public function assertSessionMessages(
         \PHPUnit_Framework_Constraint $constraint,
         $messageType = null,
-        $messageManager = 'Magento\Message\Manager'
+        $messageManagerClass = 'Magento\Message\Manager'
     ) {
-        parent::assertSessionMessages($constraint, $messageType, $messageManager);
+        parent::assertSessionMessages($constraint, $messageType, $messageManagerClass);
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php
index 971207b24585b1855e73f061c5e1dbd8d9d53e3a..f63cf98ee4979488c0bc522eb36dbe295f181b6e 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php
@@ -82,7 +82,7 @@ class CategoryTest extends \PHPUnit_Framework_TestCase
     public function testGetUrlRewrite()
     {
         $rewrite = $this->_model->getUrlRewrite();
-        $this->assertInstanceOf('Magento\Core\Model\Url\Rewrite', $rewrite);
+        $this->assertInstanceOf('Magento\UrlRewrite\Model\UrlRewrite', $rewrite);
         $this->assertSame($rewrite, $this->_model->getUrlRewrite());
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/UrlTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/UrlTest.php
index d043ff0b126cb135735c1b706c43bc194baf533e..d8f37a05581a8e1115c7dcf12b566fd3f42b5a0b 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/UrlTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/UrlTest.php
@@ -55,7 +55,7 @@ class UrlTest extends \PHPUnit_Framework_TestCase
     public function testGetUrlRewrite()
     {
         $instance = $this->_model->getUrlRewrite();
-        $this->assertInstanceOf('Magento\Core\Model\Url\Rewrite', $instance);
+        $this->assertInstanceOf('Magento\UrlRewrite\Model\UrlRewrite', $instance);
         $this->assertSame($instance, $this->_model->getUrlRewrite());
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/UrlTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/UrlTest.php
index acc9d791f59d9c5b8f92b9d0189357b9daf491cd..f1aea2936e6ea81495c4e9de9b44a52a73aec420 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/UrlTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/UrlTest.php
@@ -49,13 +49,13 @@ class UrlTest extends \PHPUnit_Framework_TestCase
      * Retrieve loaded url rewrite
      *
      * @param string $idPath
-     * @return \Magento\Core\Model\Url\Rewrite
+     * @return \Magento\UrlRewrite\Model\UrlRewrite
      */
     protected function _loadRewrite($idPath)
     {
-        /** @var $rewrite \Magento\Core\Model\Url\Rewrite */
+        /** @var $rewrite \Magento\UrlRewrite\Model\UrlRewrite */
         $rewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Url\Rewrite'
+            'Magento\UrlRewrite\Model\UrlRewrite'
         );
         $rewrite->loadByIdPath($idPath);
         return $rewrite;
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/url_rewrites_invalid.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/url_rewrites_invalid.php
index 89acef9d39fae60ea7e32fe493e3905288c06b8b..0f34abb07825ee64ab81f712efbd687ce84ec7fd 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/_files/url_rewrites_invalid.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/url_rewrites_invalid.php
@@ -33,8 +33,8 @@ require __DIR__ . '/url_rewrites.php';
 /**
  * Invalid rewrite for product assigned to different category
  */
-/** @var $rewrite \Magento\Core\Model\Url\Rewrite */
-$rewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Core\Model\Url\Rewrite');
+/** @var $rewrite \Magento\UrlRewrite\Model\UrlRewrite */
+$rewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\UrlRewrite\Model\UrlRewrite');
 $rewrite->setStoreId(
     1
 )->setIdPath(
@@ -54,7 +54,7 @@ $rewrite->setStoreId(
 /**
  * Invalid rewrite for product assigned to category that doesn't belong to store
  */
-$rewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Core\Model\Url\Rewrite');
+$rewrite = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\UrlRewrite\Model\UrlRewrite');
 $rewrite->setStoreId(
     1
 )->setIdPath(
diff --git a/dev/tests/integration/testsuite/Magento/Core/Helper/JsTest.php b/dev/tests/integration/testsuite/Magento/Core/Helper/JsTest.php
deleted file mode 100644
index 9e322f8d53ea3ea31132792747e9698691628e0f..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Helper/JsTest.php
+++ /dev/null
@@ -1,72 +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) 2014 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 JsTest extends \PHPUnit_Framework_TestCase
-{
-    const FILE = 'blank.html';
-
-    /**
-     * @var \Magento\Core\Helper\Js
-     */
-    protected $_helper;
-
-    protected function setUp()
-    {
-        $this->_helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Helper\Js');
-    }
-
-    public function testGetTranslatorScript()
-    {
-        $this->assertEquals(
-            "<script type=\"text/javascript\">//<![CDATA[\n" .
-            '(function($) {$.mage.translate.add(' .
-            $this->_helper->encode($this->_helper->getTranslateData()) .
-            ')})(jQuery);' .
-            "\n//]]></script>",
-            $this->_helper->getTranslatorScript()
-        );
-    }
-
-    public function testGetScript()
-    {
-        $this->assertEquals(
-            "<script type=\"text/javascript\">//<![CDATA[\ntest\n//]]></script>",
-            $this->_helper->getScript('test')
-        );
-    }
-
-    public function testIncludeScript()
-    {
-        $this->assertEquals(
-            '<script type="text/javascript" src="http://localhost/pub/lib/blank.html"></script>' . "\n",
-            $this->_helper->includeScript(self::FILE)
-        );
-        $script = '<script type="text/javascript" src="http://localhost/pub/lib/images/spacer.gif"></script>';
-        $this->assertStringMatchesFormat($script, $this->_helper->includeScript('images/spacer.gif'));
-    }
-}
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 3fd053cc783f2207af84aa1f9d8b16718c49256d..8213200322a25e8851e5fefcde04264cc50b14b3 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/SetupTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/SetupTest.php
@@ -51,13 +51,13 @@ class SetupTest extends \PHPUnit_Framework_TestCase
     {
         /*reset versions*/
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Resource\Resource'
+            '\Magento\Module\ResourceInterface'
         )->setDbVersion(
             'adminnotification_setup',
             false
         );
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Resource\Resource'
+            '\Magento\Module\ResourceInterface'
         )->setDataVersion(
             'adminnotification_setup',
             false
diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/url_rewrite.php b/dev/tests/integration/testsuite/Magento/Core/_files/url_rewrite.php
index 400310348275cbad9c69d9804f331b5def2d162f..b4da9b3ad5dccbd642c86f95d229508e1c28b9e7 100644
--- a/dev/tests/integration/testsuite/Magento/Core/_files/url_rewrite.php
+++ b/dev/tests/integration/testsuite/Magento/Core/_files/url_rewrite.php
@@ -39,8 +39,8 @@ if ($cmsPage->isObjectNew()) {
 }
 
 // create URL rewrite
-/** @var $rewrite \Magento\Core\Model\Url\Rewrite */
-$rewrite = $objectManager->create('Magento\Core\Model\Url\Rewrite');
+/** @var $rewrite \Magento\UrlRewrite\Model\UrlRewrite */
+$rewrite = $objectManager->create('Magento\UrlRewrite\Model\UrlRewrite');
 $rewrite->setIdPath(
     'cms_page/' . $cmsPage->getId()
 )->setRequestPath(
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php
index 608455b8a6367f01d135bf86c78f3bedeaed3dc4..fc8bb5111dc93b69ce567496ee88e6a8967073ed 100755
--- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php
@@ -22,27 +22,26 @@
  * @copyright   Copyright (c) 2014 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\Controller;
 
+use Magento\Message\MessageInterface;
 use Magento\TestFramework\Helper\Bootstrap;
 
 class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
 {
     /**
      * Login the user
+     *
+     * @param string $customerId Customer to mark as logged in for the session
+     * @return void
      */
-    protected function _login()
+    protected function login($customerId)
     {
-        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
-        $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Customer\Model\Session',
-            array($logger)
-        );
-        $service = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Customer\Service\V1\CustomerAccountService'
-        );
-        $customer = $service->authenticate('customer@example.com', 'password');
-        $session->setCustomerDataAsLoggedIn($customer);
+        /** @var \Magento\Customer\Model\Session $session */
+        $session = Bootstrap::getObjectManager()
+            ->get('Magento\Customer\Model\Session');
+        $session->loginById($customerId);
     }
 
     /**
@@ -51,7 +50,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testIndexAction()
     {
-        $this->_login();
+        $this->login(1);
         $this->dispatch('customer/account/index');
 
         $body = $this->getResponse()->getBody();
@@ -77,7 +76,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testLogoutAction()
     {
-        $this->_login();
+        $this->login(1);
         $this->dispatch('customer/account/logout');
         $this->assertRedirect($this->stringContains('customer/account/logoutSuccess'));
     }
@@ -88,15 +87,11 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
     public function testCreatepasswordAction()
     {
         /** @var \Magento\Customer\Model\Customer $customer */
-        $customer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Customer\Model\Customer'
-        )->load(
-            1
-        );
+        $customer = Bootstrap::getObjectManager()
+            ->create('Magento\Customer\Model\Customer')->load(1);
 
-        $token = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Customer\Helper\Data'
-        )->generateResetPasswordLinkToken();
+        $token = Bootstrap::getObjectManager()->get('Magento\Customer\Helper\Data')
+            ->generateResetPasswordLinkToken();
         $customer->changeResetPasswordLinkToken($token);
 
         $this->getRequest()->setParam('token', $token);
@@ -113,15 +108,11 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
     public function testCreatepasswordActionInvalidToken()
     {
         /** @var \Magento\Customer\Model\Customer $customer */
-        $customer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Customer\Model\Customer'
-        )->load(
-            1
-        );
+        $customer = Bootstrap::getObjectManager()
+            ->create('Magento\Customer\Model\Customer')->load(1);
 
-        $token = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Customer\Helper\Data'
-        )->generateResetPasswordLinkToken();
+        $token = Bootstrap::getObjectManager()->get('Magento\Customer\Helper\Data')
+            ->generateResetPasswordLinkToken();
         $customer->changeResetPasswordLinkToken($token);
 
         $this->getRequest()->setParam('token', 'INVALIDTOKEN');
@@ -141,11 +132,8 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
     public function testConfirmActionAlreadyActive()
     {
         /** @var \Magento\Customer\Model\Customer $customer */
-        $customer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Customer\Model\Customer'
-        )->load(
-            1
-        );
+        $customer = Bootstrap::getObjectManager()
+            ->create('Magento\Customer\Model\Customer')->load(1);
 
         $this->getRequest()->setParam('key', 'abc');
         $this->getRequest()->setParam('id', $customer->getId());
@@ -162,66 +150,31 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
     public function testNoConfirmCreatePostAction()
     {
         // Setting data for request
-        $this->getRequest()->setServer(
-            array('REQUEST_METHOD' => 'POST')
-        )->setParam(
-            'firstname',
-            'firstname1'
-        )->setParam(
-            'lastname',
-            'lastname1'
-        )->setParam(
-            'company',
-            ''
-        )->setParam(
-            'email',
-            'test1@email.com'
-        )->setParam(
-            'password',
-            'password'
-        )->setParam(
-            'confirmation',
-            'password'
-        )->setParam(
-            'telephone',
-            '5123334444'
-        )->setParam(
-            'street',
-            array('1234 fake street', '')
-        )->setParam(
-            'city',
-            'Austin'
-        )->setParam(
-            'region_id',
-            57
-        )->setParam(
-            'region',
-            ''
-        )->setParam(
-            'postcode',
-            '78701'
-        )->setParam(
-            'country_id',
-            'US'
-        )->setParam(
-            'default_billing',
-            '1'
-        )->setParam(
-            'default_shipping',
-            '1'
-        )->setParam(
-            'is_subscribed',
-            '0'
-        )->setPost(
-            'create_address',
-            true
-        );
+        $this->getRequest()
+            ->setServer(array('REQUEST_METHOD' => 'POST'))
+            ->setParam('firstname', 'firstname1')
+            ->setParam('lastname', 'lastname1')
+            ->setParam('company', '')
+            ->setParam('email', 'test1@email.com')
+            ->setParam('password', 'password')
+            ->setParam('confirmation', 'password')
+            ->setParam('telephone', '5123334444')
+            ->setParam('street', array('1234 fake street', ''))
+            ->setParam('city', 'Austin')
+            ->setParam('region_id', 57)
+            ->setParam('region', '')
+            ->setParam('postcode', '78701')
+            ->setParam('country_id', 'US')
+            ->setParam('default_billing', '1')
+            ->setParam('default_shipping', '1')
+            ->setParam('is_subscribed', '0')
+            ->setPost('create_address', true);
 
         $this->dispatch('customer/account/createPost');
         $this->assertRedirect($this->stringContains('customer/account/index/'));
         $this->assertSessionMessages(
-            $this->equalTo(array('Thank you for registering with Main Website Store.')),
-            \Magento\Message\MessageInterface::TYPE_SUCCESS
+            $this->equalTo(['Thank you for registering with Main Website Store.']),
+            MessageInterface::TYPE_SUCCESS
         );
     }
 
@@ -234,74 +187,36 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
     {
         // Setting data for request
         $email = 'test2@email.com';
-        $this->getRequest()->setServer(
-            array('REQUEST_METHOD' => 'POST')
-        )->setParam(
-            'firstname',
-            'firstname2'
-        )->setParam(
-            'lastname',
-            'lastname2'
-        )->setParam(
-            'company',
-            ''
-        )->setParam(
-            'email',
-            $email
-        )->setParam(
-            'password',
-            'password'
-        )->setParam(
-            'confirmation',
-            'password'
-        )->setParam(
-            'telephone',
-            '5123334444'
-        )->setParam(
-            'street',
-            array('1234 fake street', '')
-        )->setParam(
-            'city',
-            'Austin'
-        )->setParam(
-            'region_id',
-            57
-        )->setParam(
-            'region',
-            ''
-        )->setParam(
-            'postcode',
-            '78701'
-        )->setParam(
-            'country_id',
-            'US'
-        )->setParam(
-            'default_billing',
-            '1'
-        )->setParam(
-            'default_shipping',
-            '1'
-        )->setParam(
-            'is_subscribed',
-            '1'
-        )->setPost(
-            'create_address',
-            true
-        );
+        $this->getRequest()
+            ->setServer(array('REQUEST_METHOD' => 'POST'))
+            ->setParam('firstname', 'firstname2')
+            ->setParam('lastname', 'lastname2')
+            ->setParam('company', '')
+            ->setParam('email', $email)
+            ->setParam('password', 'password')
+            ->setParam('confirmation', 'password')
+            ->setParam('telephone', '5123334444')
+            ->setParam('street', array('1234 fake street', ''))
+            ->setParam('city', 'Austin')
+            ->setParam('region_id', 57)
+            ->setParam('region', '')
+            ->setParam('postcode', '78701')
+            ->setParam('country_id', 'US')
+            ->setParam('default_billing', '1')
+            ->setParam('default_shipping', '1')
+            ->setParam('is_subscribed', '1')
+            ->setPost('create_address', true);
 
         $this->dispatch('customer/account/createPost');
         $this->assertRedirect($this->stringContains('customer/account/index/'));
         $this->assertSessionMessages(
-            $this->equalTo(
-                array(
-                    'Account confirmation is required. Please, check your email for the confirmation link. ' .
-                    'To resend the confirmation email please ' .
-                    '<a href="http://localhost/index.php/customer/account/confirmation/email/' .
-                    $email .
-                    '/">click here</a>.'
-                )
-            ),
-            \Magento\Message\MessageInterface::TYPE_SUCCESS
+            $this->equalTo([
+                'Account confirmation is required. Please, check your email for the confirmation link. ' .
+                'To resend the confirmation email please ' .
+                '<a href="http://localhost/index.php/customer/account/confirmation/email/' .
+                $email . '/">click here</a>.'
+            ]),
+            MessageInterface::TYPE_SUCCESS
         );
     }
 
@@ -311,73 +226,34 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
     public function testExistingEmailCreatePostAction()
     {
         // Setting data for request
-        $this->getRequest()->setServer(
-            array('REQUEST_METHOD' => 'POST')
-        )->setParam(
-            'firstname',
-            'firstname'
-        )->setParam(
-            'lastname',
-            'lastname'
-        )->setParam(
-            'company',
-            ''
-        )->setParam(
-            'email',
-            'customer@example.com'
-        )->setParam(
-            'password',
-            'password'
-        )->setParam(
-            'confirmation',
-            'password'
-        )->setParam(
-            'telephone',
-            '5123334444'
-        )->setParam(
-            'street',
-            array('1234 fake street', '')
-        )->setParam(
-            'city',
-            'Austin'
-        )->setParam(
-            'region_id',
-            57
-        )->setParam(
-            'region',
-            ''
-        )->setParam(
-            'postcode',
-            '78701'
-        )->setParam(
-            'country_id',
-            'US'
-        )->setParam(
-            'default_billing',
-            '1'
-        )->setParam(
-            'default_shipping',
-            '1'
-        )->setParam(
-            'is_subscribed',
-            '1'
-        )->setPost(
-            'create_address',
-            true
-        );
+        $this->getRequest()
+            ->setServer(array('REQUEST_METHOD' => 'POST'))
+            ->setParam('firstname', 'firstname')
+            ->setParam('lastname', 'lastname')
+            ->setParam('company', '')
+            ->setParam('email', 'customer@example.com')
+            ->setParam('password', 'password')
+            ->setParam('confirmation', 'password')
+            ->setParam('telephone', '5123334444')
+            ->setParam('street', array('1234 fake street', ''))
+            ->setParam('city', 'Austin')
+            ->setParam('region_id', 57)
+            ->setParam('region', '')
+            ->setParam('postcode', '78701')
+            ->setParam('country_id', 'US')
+            ->setParam('default_billing', '1')
+            ->setParam('default_shipping', '1')
+            ->setParam('is_subscribed', '1')
+            ->setPost('create_address', true);
 
         $this->dispatch('customer/account/createPost');
         $this->assertRedirect($this->stringContains('customer/account/create/'));
         $this->assertSessionMessages(
-            $this->equalTo(
-                array(
-                    'There is already an account with this email address. ' .
-                    'If you are sure that it is your email address, ' .
-                    '<a href="http://localhost/index.php/customer/account/forgotpassword/">click here</a>' .
-                    ' to get your password and access your account.'
-                )
-            ),
-            \Magento\Message\MessageInterface::TYPE_ERROR
+            $this->equalTo(['There is already an account with this email address. ' .
+                'If you are sure that it is your email address, ' .
+                '<a href="http://localhost/index.php/customer/account/forgotpassword/">click here</a>' .
+                ' to get your password and access your account.']),
+            MessageInterface::TYPE_ERROR
         );
     }
 
@@ -387,15 +263,11 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
     public function testOpenActionCreatepasswordAction()
     {
         /** @var \Magento\Customer\Model\Customer $customer */
-        $customer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Customer\Model\Customer'
-        )->load(
-            1
-        );
+        $customer = Bootstrap::getObjectManager()
+            ->create('Magento\Customer\Model\Customer')->load(1);
 
-        $token = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Customer\Helper\Data'
-        )->generateResetPasswordLinkToken();
+        $token = Bootstrap::getObjectManager()->get('Magento\Customer\Helper\Data')
+            ->generateResetPasswordLinkToken();
         $customer->changeResetPasswordLinkToken($token);
 
         $this->getRequest()->setParam('token', $token);
@@ -420,17 +292,15 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testInactiveUserConfirmationAction()
     {
-        $this->getRequest()->setServer(
-            array('REQUEST_METHOD' => 'POST')
-        )->setPost(
-            array('email' => 'customer@needAconfirmation.com')
-        );
+        $this->getRequest()
+            ->setServer(['REQUEST_METHOD' => 'POST'])
+            ->setPost(['email' => 'customer@needAconfirmation.com']);
 
         $this->dispatch('customer/account/confirmation');
         $this->assertRedirect($this->stringContains('customer/account/index'));
         $this->assertSessionMessages(
-            $this->equalTo(array('Please, check your email for confirmation key.')),
-            \Magento\Message\MessageInterface::TYPE_SUCCESS
+            $this->equalTo(['Please, check your email for confirmation key.']),
+            MessageInterface::TYPE_SUCCESS
         );
     }
 
@@ -439,17 +309,17 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testActiveUserConfirmationAction()
     {
-        $this->getRequest()->setServer(
-            array('REQUEST_METHOD' => 'POST')
-        )->setPost(
-            array('email' => 'customer@example.com')
-        );
+        $this->getRequest()
+            ->setServer(['REQUEST_METHOD' => 'POST'])
+            ->setPost([
+                'email' => 'customer@example.com'
+            ]);
 
         $this->dispatch('customer/account/confirmation');
         $this->assertRedirect($this->stringContains('customer/account/index'));
         $this->assertSessionMessages(
-            $this->equalTo(array('This email does not require confirmation.')),
-            \Magento\Message\MessageInterface::TYPE_SUCCESS
+            $this->equalTo(['This email does not require confirmation.']),
+            MessageInterface::TYPE_SUCCESS
         );
     }
 
@@ -457,30 +327,34 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
     {
         $email = 'customer@example.com';
 
-        $this->getRequest()->setPost(array('email' => $email));
+        $this->getRequest()
+            ->setPost([
+                'email' => $email
+            ]);
 
         $this->dispatch('customer/account/forgotPasswordPost');
         $this->assertRedirect($this->stringContains('customer/account/'));
         $this->assertSessionMessages(
-            $this->equalTo(
-                array(
-                    "If there is an account associated with {$email} you will receive an email " .
-                    'with a link to reset your password.'
-                )
-            ),
-            \Magento\Message\MessageInterface::TYPE_SUCCESS
+            $this->equalTo([
+                "If there is an account associated with {$email} you will receive an email " .
+                'with a link to reset your password.'
+            ]),
+            MessageInterface::TYPE_SUCCESS
         );
     }
 
     public function testForgotPasswordPostWithBadEmailAction()
     {
-        $this->getRequest()->setPost(array('email' => 'bad@email'));
+        $this->getRequest()
+            ->setPost([
+                'email' => 'bad@email'
+            ]);
 
         $this->dispatch('customer/account/forgotPasswordPost');
         $this->assertRedirect($this->stringContains('customer/account/forgotpassword'));
         $this->assertSessionMessages(
-            $this->equalTo(array('Please correct the email address.')),
-            \Magento\Message\MessageInterface::TYPE_ERROR
+            $this->equalTo(['Please correct the email address.']),
+            MessageInterface::TYPE_ERROR
         );
     }
 
@@ -489,21 +363,19 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testResetPasswordPostNoTokenAction()
     {
-        $this->getRequest()->setParam(
-            'id',
-            1
-        )->setParam(
-            'token',
-            '8ed8677e6c79e68b94e61658bd756ea5'
-        )->setPost(
-            array('password' => 'new-password', 'confirmation' => 'new-password')
-        );
+        $this->getRequest()
+            ->setParam('id', 1)
+            ->setParam('token', '8ed8677e6c79e68b94e61658bd756ea5')
+            ->setPost([
+                'password' => 'new-password',
+                'confirmation' => 'new-password'
+            ]);
 
         $this->dispatch('customer/account/resetPasswordPost');
         $this->assertRedirect($this->stringContains('customer/account/'));
         $this->assertSessionMessages(
-            $this->equalTo(array('There was an error saving the new password.')),
-            \Magento\Message\MessageInterface::TYPE_ERROR
+            $this->equalTo(['There was an error saving the new password.']),
+            MessageInterface::TYPE_ERROR
         );
     }
 
@@ -513,21 +385,19 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testResetPasswordPostAction()
     {
-        $this->getRequest()->setQuery(
-            'id',
-            1
-        )->setQuery(
-            'token',
-            '8ed8677e6c79e68b94e61658bd756ea5'
-        )->setPost(
-            array('password' => 'new-password', 'confirmation' => 'new-password')
-        );
+        $this->getRequest()
+            ->setQuery('id', 1)
+            ->setQuery('token', '8ed8677e6c79e68b94e61658bd756ea5')
+            ->setPost([
+                'password' => 'new-password',
+                'confirmation' => 'new-password'
+            ]);
 
         $this->dispatch('customer/account/resetPasswordPost');
         $this->assertRedirect($this->stringContains('customer/account/login'));
         $this->assertSessionMessages(
-            $this->equalTo(array('Your password has been updated.')),
-            \Magento\Message\MessageInterface::TYPE_SUCCESS
+            $this->equalTo(['Your password has been updated.']),
+            MessageInterface::TYPE_SUCCESS
         );
     }
 
@@ -536,7 +406,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testEditAction()
     {
-        $this->_login();
+        $this->login(1);
 
         $this->dispatch('customer/account/edit');
 
@@ -544,11 +414,8 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
         $this->assertEquals(200, $this->getResponse()->getHttpResponseCode(), $body);
         $this->assertContains('<div class="field name firstname required">', $body);
         // Verify the password check box is not checked
-        $this->assertContains(
-            '<input type="checkbox" name="change_password" id="change-password" value="1" ' .
-            'title="Change Password" class="checkbox"/>',
-            $body
-        );
+        $this->assertContains('<input type="checkbox" name="change_password" id="change-password" value="1" ' .
+            'title="Change Password" class="checkbox"/>', $body);
     }
 
     /**
@@ -556,7 +423,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testChangePasswordEditAction()
     {
-        $this->_login();
+        $this->login(1);
 
         $this->dispatch('customer/account/edit/changepass/1');
 
@@ -564,45 +431,40 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
         $this->assertEquals(200, $this->getResponse()->getHttpResponseCode(), $body);
         $this->assertContains('<div class="field name firstname required">', $body);
         // Verify the password check box is checked
-        $this->assertContains(
-            '<input type="checkbox" name="change_password" id="change-password" value="1" ' .
-            'title="Change Password" checked="checked" class="checkbox"/>',
-            $body
-        );
+        $this->assertContains('<input type="checkbox" name="change_password" id="change-password" value="1" ' .
+            'title="Change Password" checked="checked" class="checkbox"/>', $body);
     }
 
+
     /**
      * @magentoDataFixture Magento/Customer/_files/customer.php
      */
     public function testEditPostAction()
     {
         /** @var $customerAccountService \Magento\Customer\Service\V1\CustomerAccountServiceInterface */
-        $customerAccountService = Bootstrap::getObjectManager()->get(
-            'Magento\Customer\Service\V1\CustomerAccountServiceInterface'
-        );
+        $customerAccountService = Bootstrap::getObjectManager()
+            ->get('Magento\Customer\Service\V1\CustomerAccountServiceInterface');
         $customer = $customerAccountService->getCustomer(1);
         $this->assertEquals('Firstname', $customer->getFirstname());
         $this->assertEquals('Lastname', $customer->getLastname());
         $this->assertEquals('customer@example.com', $customer->getEmail());
 
-        $this->_login();
-        $this->getRequest()->setServer(
-            array('REQUEST_METHOD' => 'POST')
-        )->setPost(
-            array(
-                'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(),
+        $this->login(1);
+        $this->getRequest()
+            ->setServer(['REQUEST_METHOD' => 'POST'])
+            ->setPost([
+                'form_key'  => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(),
                 'firstname' => 'John',
-                'lastname' => 'Doe',
-                'email' => 'johndoe@email.com'
-            )
-        );
+                'lastname'  => 'Doe',
+                'email'     => 'johndoe@email.com'
+            ]);
 
         $this->dispatch('customer/account/editPost');
 
         $this->assertRedirect($this->stringEndsWith('customer/account/'));
         $this->assertSessionMessages(
-            $this->equalTo(array('The account information has been saved.')),
-            \Magento\Message\MessageInterface::TYPE_SUCCESS
+            $this->equalTo(['The account information has been saved.']),
+            MessageInterface::TYPE_SUCCESS
         );
 
         $customer = $customerAccountService->getCustomer(1);
@@ -617,41 +479,37 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
     public function testChangePasswordEditPostAction()
     {
         /** @var $customerAccountService \Magento\Customer\Service\V1\CustomerAccountServiceInterface */
-        $customerAccountService = Bootstrap::getObjectManager()->get(
-            'Magento\Customer\Service\V1\CustomerAccountServiceInterface'
-        );
+        $customerAccountService = Bootstrap::getObjectManager()
+            ->get('Magento\Customer\Service\V1\CustomerAccountServiceInterface');
         $customer = $customerAccountService->getCustomer(1);
         $this->assertEquals('Firstname', $customer->getFirstname());
         $this->assertEquals('Lastname', $customer->getLastname());
         $this->assertEquals('customer@example.com', $customer->getEmail());
 
         /** @var $customerAccountService \Magento\Customer\Service\V1\CustomerAccountServiceInterface */
-        $customerAccountService = Bootstrap::getObjectManager()->get(
-            'Magento\Customer\Service\V1\CustomerAccountServiceInterface'
-        );
-
-        $this->_login();
-        $this->getRequest()->setServer(
-            array('REQUEST_METHOD' => 'POST')
-        )->setPost(
-            array(
-                'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(),
-                'firstname' => 'John',
-                'lastname' => 'Doe',
-                'email' => 'johndoe@email.com',
-                'change_password' => 1,
+        $customerAccountService = Bootstrap::getObjectManager()
+            ->get('Magento\Customer\Service\V1\CustomerAccountServiceInterface');
+
+        $this->login(1);
+        $this->getRequest()
+            ->setServer(['REQUEST_METHOD' => 'POST'])
+            ->setPost([
+                'form_key'         => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(),
+                'firstname'        => 'John',
+                'lastname'         => 'Doe',
+                'email'            => 'johndoe@email.com',
+                'change_password'  => 1,
                 'current_password' => 'password',
-                'password' => 'new-password',
-                'confirmation' => 'new-password'
-            )
-        );
+                'password'         => 'new-password',
+                'confirmation'     => 'new-password'
+            ]);
 
         $this->dispatch('customer/account/editPost');
 
         $this->assertRedirect($this->stringEndsWith('customer/account/'));
         $this->assertSessionMessages(
-            $this->equalTo(array('The account information has been saved.')),
-            \Magento\Message\MessageInterface::TYPE_SUCCESS
+            $this->equalTo(['The account information has been saved.']),
+            MessageInterface::TYPE_SUCCESS
         );
 
         $customer = $customerAccountService->getCustomer(1);
@@ -665,24 +523,22 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testMissingDataEditPostAction()
     {
-        $this->_login();
-        $this->getRequest()->setServer(
-            array('REQUEST_METHOD' => 'POST')
-        )->setPost(
-            array(
-                'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(),
+        $this->login(1);
+        $this->getRequest()
+            ->setServer(['REQUEST_METHOD' => 'POST'])
+            ->setPost([
+                'form_key'  => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(),
                 'firstname' => 'John',
-                'lastname' => 'Doe',
-                'email' => 'bad-email'
-            )
-        );
+                'lastname'  => 'Doe',
+                'email'     => 'bad-email'
+            ]);
 
         $this->dispatch('customer/account/editPost');
 
         $this->assertRedirect($this->stringEndsWith('customer/account/edit/'));
         $this->assertSessionMessages(
-            $this->equalTo(array('Invalid input')),
-            \Magento\Message\MessageInterface::TYPE_ERROR
+            $this->equalTo(['Invalid input']),
+            MessageInterface::TYPE_ERROR
         );
     }
 
@@ -691,28 +547,26 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testWrongPasswordEditPostAction()
     {
-        $this->_login();
-        $this->getRequest()->setServer(
-            array('REQUEST_METHOD' => 'POST')
-        )->setPost(
-            array(
-                'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(),
-                'firstname' => 'John',
-                'lastname' => 'Doe',
-                'email' => 'johndoe@email.com',
-                'change_password' => 1,
+        $this->login(1);
+        $this->getRequest()
+            ->setServer(['REQUEST_METHOD' => 'POST'])
+            ->setPost([
+                'form_key'         => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(),
+                'firstname'        => 'John',
+                'lastname'         => 'Doe',
+                'email'            => 'johndoe@email.com',
+                'change_password'  => 1,
                 'current_password' => 'wrong-password',
-                'password' => 'new-password',
-                'confirmation' => 'new-password'
-            )
-        );
+                'password'         => 'new-password',
+                'confirmation'     => 'new-password'
+            ]);
 
         $this->dispatch('customer/account/editPost');
 
         $this->assertRedirect($this->stringEndsWith('customer/account/edit/'));
         $this->assertSessionMessages(
-            $this->equalTo(array("Password doesn't match for this account.")),
-            \Magento\Message\MessageInterface::TYPE_ERROR
+            $this->equalTo(["Password doesn't match for this account."]),
+            MessageInterface::TYPE_ERROR
         );
     }
 
@@ -721,28 +575,26 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
      */
     public function testWrongConfirmationEditPostAction()
     {
-        $this->_login();
-        $this->getRequest()->setServer(
-            array('REQUEST_METHOD' => 'POST')
-        )->setPost(
-            array(
-                'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(),
-                'firstname' => 'John',
-                'lastname' => 'Doe',
-                'email' => 'johndoe@email.com',
-                'change_password' => 1,
+        $this->login(1);
+        $this->getRequest()
+            ->setServer(['REQUEST_METHOD' => 'POST'])
+            ->setPost([
+                'form_key'         => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(),
+                'firstname'        => 'John',
+                'lastname'         => 'Doe',
+                'email'            => 'johndoe@email.com',
+                'change_password'  => 1,
                 'current_password' => 'password',
-                'password' => 'new-password',
-                'confirmation' => 'new-password-no-match'
-            )
-        );
+                'password'         => 'new-password',
+                'confirmation'     => 'new-password-no-match'
+            ]);
 
         $this->dispatch('customer/account/editPost');
 
         $this->assertRedirect($this->stringEndsWith('customer/account/edit/'));
         $this->assertSessionMessages(
-            $this->equalTo(array('Confirm your new password')),
-            \Magento\Message\MessageInterface::TYPE_ERROR
+            $this->equalTo(['Confirm your new password']),
+            MessageInterface::TYPE_ERROR
         );
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
index 00d0399ce5179b96ed62b0fb57b132f434757424..40e9a576d4a8b6aff2e1c7977512d54b1aacc643 100755
--- a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php
@@ -72,6 +72,9 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         Bootstrap::getObjectManager()->get('Magento\Backend\Model\Session')->getMessages(true);
     }
 
+    /**
+     * @magentoDbIsolation enabled
+     */
     public function testSaveActionWithEmptyPostData()
     {
         $this->getRequest()->setPost(array());
@@ -79,6 +82,9 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         $this->assertRedirect($this->stringStartsWith($this->_baseControllerUrl));
     }
 
+    /**
+     * @magentoDbIsolation enabled
+     */
     public function testSaveActionWithInvalidFormData()
     {
         $post = array('account' => array('middlename' => 'test middlename', 'group_id' => 1));
@@ -175,6 +181,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller
          * Check that errors was generated and set to session
          */
         $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR);
+
         /**
          * Check that customer data were set to session
          */
@@ -203,6 +210,12 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         $this->assertRedirect(
             $this->stringStartsWith($this->_baseControllerUrl . 'edit/id/' . $customerId . '/back/1')
         );
+
+        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+        $subscriber = $objectManager->get("Magento\Newsletter\Model\SubscriberFactory")->create();
+        $this->assertEmpty($subscriber->getId());
+        $subscriber->loadByCustomerId($customerId);
+        $this->assertEmpty($subscriber->getId());
     }
 
     /**
@@ -252,7 +265,8 @@ class IndexTest extends \Magento\Backend\Utility\Controller
                     'postcode' => '',
                     'telephone' => ''
                 )
-            )
+            ),
+            'subscription' => ''
         );
         $this->getRequest()->setPost($post);
         $this->getRequest()->setParam('customer_id', 1);
@@ -290,6 +304,56 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         $newAddress = $this->customerAddressService->getDefaultShippingAddress($customerId);
         $this->assertEquals('new firstname', $newAddress->getFirstname());
 
+        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+        $subscriber = $objectManager->get("Magento\Newsletter\Model\SubscriberFactory")->create();
+        $this->assertEmpty($subscriber->getId());
+        $subscriber->loadByCustomerId($customerId);
+        $this->assertNotEmpty($subscriber->getId());
+        $this->assertEquals(1, $subscriber->getStatus());
+
+        $this->assertRedirect($this->stringStartsWith($this->_baseControllerUrl . 'index/key/'));
+    }
+
+    /**
+     * @magentoDataFixture Magento/Newsletter/_files/subscribers.php
+     */
+    public function testSaveActionExistingCustomerUnsubscribeNewsletter()
+    {
+        $customerId = 1;
+        /** @var $objectManager \Magento\TestFramework\ObjectManager */
+        $objectManager = Bootstrap::getObjectManager();
+
+        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+        $subscriber = $objectManager->get("Magento\Newsletter\Model\SubscriberFactory")->create();
+        $this->assertEmpty($subscriber->getId());
+        $subscriber->loadByCustomerId($customerId);
+        $this->assertNotEmpty($subscriber->getId());
+        $this->assertEquals(1, $subscriber->getStatus());
+
+        $post = array(
+            'customer_id' => $customerId,
+        );
+        $this->getRequest()->setPost($post);
+        $this->getRequest()->setParam('customer_id', 1);
+        $this->dispatch('backend/customer/index/save');
+
+        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+        $subscriber = $objectManager->get("Magento\Newsletter\Model\SubscriberFactory")->create();
+        $this->assertEmpty($subscriber->getId());
+        $subscriber->loadByCustomerId($customerId);
+        $this->assertNotEmpty($subscriber->getId());
+        $this->assertEquals(3, $subscriber->getStatus());
+
+        /**
+         * Check that success message is set
+         */
+        $this->assertSessionMessages(
+            $this->equalTo(array('You saved the customer.')),
+            \Magento\Message\MessageInterface::TYPE_SUCCESS
+        );
+
+
+
         $this->assertRedirect($this->stringStartsWith($this->_baseControllerUrl . 'index/key/'));
     }
 
@@ -536,8 +600,8 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         // Pre-condition
         /** @var \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory */
         $subscriberFactory = Bootstrap::getObjectManager()->get('Magento\Newsletter\Model\SubscriberFactory');
-        $this->assertNull($subscriberFactory->create()->loadByCustomer(1)->getSubscriberStatus());
-        $this->assertNull($subscriberFactory->create()->loadByCustomer(2)->getSubscriberStatus());
+        $this->assertNull($subscriberFactory->create()->loadByCustomerId(1)->getSubscriberStatus());
+        $this->assertNull($subscriberFactory->create()->loadByCustomerId(2)->getSubscriberStatus());
         // Setup
         $this->getRequest()->setParam('customer', array(1, 2));
 
@@ -552,14 +616,17 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         );
         $this->assertEquals(
             Subscriber::STATUS_SUBSCRIBED,
-            $subscriberFactory->create()->loadByCustomer(1)->getSubscriberStatus()
+            $subscriberFactory->create()->loadByCustomerId(1)->getSubscriberStatus()
         );
         $this->assertEquals(
             Subscriber::STATUS_SUBSCRIBED,
-            $subscriberFactory->create()->loadByCustomer(2)->getSubscriberStatus()
+            $subscriberFactory->create()->loadByCustomerId(2)->getSubscriberStatus()
         );
     }
 
+    /**
+     * @magentoDbIsolation enabled
+     */
     public function testMassSubscriberActionNoSelection()
     {
         $this->dispatch('backend/customer/index/massSubscribe');
@@ -571,6 +638,9 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         );
     }
 
+    /**
+     * @magentoDbIsolation enabled
+     */
     public function testMassSubscriberActionInvalidId()
     {
         $this->getRequest()->setParam('customer', array(4200));
@@ -592,8 +662,8 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         // Pre-condition
         /** @var \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory */
         $subscriberFactory = Bootstrap::getObjectManager()->get('Magento\Newsletter\Model\SubscriberFactory');
-        $this->assertNull($subscriberFactory->create()->loadByCustomer(1)->getSubscriberStatus());
-        $this->assertNull($subscriberFactory->create()->loadByCustomer(2)->getSubscriberStatus());
+        $this->assertNull($subscriberFactory->create()->loadByCustomerId(1)->getSubscriberStatus());
+        $this->assertNull($subscriberFactory->create()->loadByCustomerId(2)->getSubscriberStatus());
         // Setup
         $this->getRequest()->setParam('customer', array(1, 4200, 2));
 
@@ -612,11 +682,11 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         );
         $this->assertEquals(
             Subscriber::STATUS_SUBSCRIBED,
-            $subscriberFactory->create()->loadByCustomer(1)->getSubscriberStatus()
+            $subscriberFactory->create()->loadByCustomerId(1)->getSubscriberStatus()
         );
         $this->assertEquals(
             Subscriber::STATUS_SUBSCRIBED,
-            $subscriberFactory->create()->loadByCustomer(2)->getSubscriberStatus()
+            $subscriberFactory->create()->loadByCustomerId(2)->getSubscriberStatus()
         );
     }
 
@@ -634,6 +704,9 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         $this->assertRedirect($this->stringContains('customer/index'));
     }
 
+    /**
+     * @magentoDbIsolation enabled
+     */
     public function testInvalidIdMassDeleteAction()
     {
         $this->getRequest()->setPost('customer', array(1));
@@ -646,6 +719,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller
 
     /**
      * Valid group Id but no customer Ids specified
+     * @magentoDbIsolation enabled
      */
     public function testMassDeleteActionNoCustomerIds()
     {
@@ -695,6 +769,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller
 
     /**
      * Valid group Id but no data fixture so no customer exists with customer Id = 1
+     * @magentoDbIsolation enabled
      */
     public function testMassAssignGroupActionInvalidCustomerId()
     {
@@ -708,6 +783,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller
 
     /**
      * Valid group Id but no customer Ids specified
+     * @magentoDbIsolation enabled
      */
     public function testMassAssignGroupActionNoCustomerIds()
     {
@@ -750,9 +826,9 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         // Setup
         /** @var \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory */
         $subscriberFactory = Bootstrap::getObjectManager()->get('Magento\Newsletter\Model\SubscriberFactory');
-        $subscriberFactory->create()->updateSubscription(1, true);
-        $subscriberFactory->create()->updateSubscription(2, true);
-        $this->getRequest()->setParam('customer', array(1, 2));
+        $subscriberFactory->create()->subscribeCustomerById(1);
+        $subscriberFactory->create()->subscribeCustomerById(2);
+        $this->getRequest()->setParam('customer', [1, 2]);
 
         // Test
         $this->dispatch('backend/customer/index/massUnsubscribe');
@@ -765,14 +841,17 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         );
         $this->assertEquals(
             Subscriber::STATUS_UNSUBSCRIBED,
-            $subscriberFactory->create()->loadByCustomer(1)->getSubscriberStatus()
+            $subscriberFactory->create()->loadByCustomerId(1)->getSubscriberStatus()
         );
         $this->assertEquals(
             Subscriber::STATUS_UNSUBSCRIBED,
-            $subscriberFactory->create()->loadByCustomer(2)->getSubscriberStatus()
+            $subscriberFactory->create()->loadByCustomerId(2)->getSubscriberStatus()
         );
     }
 
+    /**
+     * @magentoDbIsolation enabled
+     */
     public function testMassUnsubscriberActionNoSelection()
     {
         $this->dispatch('backend/customer/index/massUnsubscribe');
@@ -784,6 +863,9 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         );
     }
 
+    /**
+     * @magentoDbIsolation enabled
+     */
     public function testMassUnsubscriberActionInvalidId()
     {
         $this->getRequest()->setParam('customer', array(4200));
@@ -805,9 +887,9 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         // Setup
         /** @var \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory */
         $subscriberFactory = Bootstrap::getObjectManager()->get('Magento\Newsletter\Model\SubscriberFactory');
-        $subscriberFactory->create()->updateSubscription(1, true);
-        $subscriberFactory->create()->updateSubscription(2, true);
-        $this->getRequest()->setParam('customer', array(1, 4200, 2));
+        $subscriberFactory->create()->subscribeCustomerById(1);
+        $subscriberFactory->create()->subscribeCustomerById(2);
+        $this->getRequest()->setParam('customer', [1, 4200, 2]);
 
         // Test
         $this->dispatch('backend/customer/index/massUnsubscribe');
@@ -824,11 +906,11 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         );
         $this->assertEquals(
             Subscriber::STATUS_UNSUBSCRIBED,
-            $subscriberFactory->create()->loadByCustomer(1)->getSubscriberStatus()
+            $subscriberFactory->create()->loadByCustomerId(1)->getSubscriberStatus()
         );
         $this->assertEquals(
             Subscriber::STATUS_UNSUBSCRIBED,
-            $subscriberFactory->create()->loadByCustomer(2)->getSubscriberStatus()
+            $subscriberFactory->create()->loadByCustomerId(2)->getSubscriberStatus()
         );
     }
 
@@ -945,6 +1027,9 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         $this->assertContains('\"Country\" is a required value.', $body);
     }
 
+    /**
+     * @magentoDbIsolation enabled
+     */
     public function testResetPasswordActionNoCustomerId()
     {
         // No customer ID in post, will just get redirected to base
@@ -952,6 +1037,9 @@ class IndexTest extends \Magento\Backend\Utility\Controller
         $this->assertRedirect($this->stringStartsWith($this->_baseControllerUrl));
     }
 
+    /**
+     * @magentoDbIsolation enabled
+     */
     public function testResetPasswordActionBadCustomerId()
     {
         // Bad customer ID in post, will just get redirected to base
diff --git a/dev/tests/integration/testsuite/Magento/Interception/GeneralTest.php b/dev/tests/integration/testsuite/Magento/Interception/GeneralTest.php
index 2c063ebe0a6a095bcf3e55775f1391c15921e962..35a7fb1be9e3e3611d3cf8b99117921acca67303 100644
--- a/dev/tests/integration/testsuite/Magento/Interception/GeneralTest.php
+++ b/dev/tests/integration/testsuite/Magento/Interception/GeneralTest.php
@@ -47,12 +47,9 @@ class GeneralTest extends \PHPUnit_Framework_TestCase
         $relations = new \Magento\ObjectManager\Relations\Runtime($classReader);
         $definitions = new \Magento\ObjectManager\Definition\Runtime($classReader);
         $config = new \Magento\Interception\ObjectManager\Config($relations, $definitions);
-        $argInterpreter = new \Magento\Data\Argument\Interpreter\Composite(array(), 'type');
-        $argObjectFactory = new \Magento\ObjectManager\Config\Argument\ObjectFactory($config);
         $factory = new \Magento\ObjectManager\Factory\Factory(
             $config,
-            $argInterpreter,
-            $argObjectFactory,
+            null,
             $definitions
         );
 
@@ -112,7 +109,7 @@ class GeneralTest extends \PHPUnit_Framework_TestCase
                 'Magento\Interception\Definition' => $interceptionDefinitions
             )
         );
-        $argObjectFactory->setObjectManager($this->_objectManager);
+        $factory->setObjectManager($this->_objectManager);
         $config->setInterceptionConfig($interceptionConfig);
         $config->extend(
             array(
diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..142dd56174668d79dc14a2bb5be5400e3f703df5
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.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.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Newsletter\Controller;
+
+/**
+ * @magentoDbIsolation enabled
+ */
+class ManageTest extends \Magento\TestFramework\TestCase\AbstractController
+{
+    /**
+     * @var \Magento\Customer\Model\Session
+     */
+    protected $customerSession;
+    /**
+     * @var \Magento\Core\Model\Session
+     */
+    protected $coreSession;
+
+    protected function setUp()
+    {
+        parent::setUp();
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->customerSession = $objectManager->get('Magento\Customer\Model\Session');
+        $this->customerSession->setCustomerId(1);
+        $this->coreSession = $objectManager->get('Magento\Core\Model\Session');
+        $this->coreSession->setData('_form_key', 'formKey');
+    }
+
+    protected function tearDown()
+    {
+        $this->customerSession->setCustomerId(null);
+        $this->coreSession->unsData('_form_key');
+    }
+
+    /**
+     * @magentoDataFixture Magento/Customer/_files/customer.php
+     */
+    public function testSaveAction()
+    {
+        $this->getRequest()
+            ->setParam('form_key', 'formKey')
+            ->setParam('is_subscribed', '1');
+        $this->dispatch('newsletter/manage/save');
+
+        $this->assertRedirect($this->stringContains('customer/account/'));
+
+        /**
+         * Check that errors
+         */
+        $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR);
+
+        /**
+         * Check that success message
+         */
+        $this->assertSessionMessages(
+            $this->equalTo(['We saved the subscription.']),
+            \Magento\Message\MessageInterface::TYPE_SUCCESS
+        );
+    }
+
+    /**
+     * @magentoDataFixture Magento/Customer/_files/customer.php
+     */
+    public function testSaveActionRemoveSubscription()
+    {
+        $this->getRequest()
+            ->setParam('form_key', 'formKey')
+            ->setParam('is_subscribed', '0');
+        $this->dispatch('newsletter/manage/save');
+
+        $this->assertRedirect($this->stringContains('customer/account/'));
+
+        /**
+         * Check that errors
+         */
+        $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR);
+
+        /**
+         * Check that success message
+         */
+        $this->assertSessionMessages(
+            $this->equalTo(['We removed the subscription.']),
+            \Magento\Message\MessageInterface::TYPE_SUCCESS
+        );
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/SubscriberTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/SubscriberTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..de09e1ea8d26188d24dddbf4ff5ab6fe64faca74
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/SubscriberTest.php
@@ -0,0 +1,109 @@
+<?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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */ 
+namespace Magento\Newsletter\Controller;
+
+use Magento\Message\MessageInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+use Magento\TestFramework\TestCase\AbstractController;
+
+/**
+ * Test Subscriber
+ */
+class SubscriberTest extends AbstractController
+{
+    public function testNewAction()
+    {
+        $this->getRequest()->setMethod('POST');
+
+        $this->dispatch('newsletter/subscriber/new');
+
+        $this->assertSessionMessages($this->isEmpty());
+        $this->assertRedirect($this->anything());
+    }
+
+    /**
+     * @magentoDbIsolation enabled
+     */
+    public function testNewActionUnusedEmail()
+    {
+        $this->getRequest()->setMethod('POST');
+        $this->getRequest()->setPost([
+            'email' => 'not_used@example.com'
+        ]);
+
+        $this->dispatch('newsletter/subscriber/new');
+
+        $this->assertSessionMessages($this->equalTo(['Thank you for your subscription.']));
+        $this->assertRedirect($this->anything());
+    }
+
+    /**
+     * @magentoDataFixture Magento/Customer/_files/customer.php
+     */
+    public function testNewActionUsedEmail()
+    {
+        $this->getRequest()->setMethod('POST');
+        $this->getRequest()->setPost([
+            'email' => 'customer@example.com'
+        ]);
+
+        $this->dispatch('newsletter/subscriber/new');
+
+        $this->assertSessionMessages($this->equalTo([
+                'There was a problem with the subscription: This email address is already assigned to another user.'
+            ]));
+        $this->assertRedirect($this->anything());
+    }
+
+    /**
+     * @magentoDataFixture Magento/Customer/_files/customer.php
+     */
+    public function testNewActionOwnerEmail()
+    {
+        $this->getRequest()->setMethod('POST');
+        $this->getRequest()->setPost([
+            'email' => 'customer@example.com'
+        ]);
+        $this->login(1);
+
+        $this->dispatch('newsletter/subscriber/new');
+
+        $this->assertSessionMessages($this->equalTo(['Thank you for your subscription.']));
+        $this->assertRedirect($this->anything());
+    }
+
+    /**
+     * Login the user
+     *
+     * @param string $customerId Customer to mark as logged in for the session
+     * @return void
+     */
+    protected function login($customerId)
+    {
+        /** @var \Magento\Customer\Model\Session $session */
+        $session = Bootstrap::getObjectManager()
+            ->get('Magento\Customer\Model\Session');
+        $session->loginById($customerId);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..da41c854b76af16ca5698a65ade7b35900e48a06
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php
@@ -0,0 +1,162 @@
+<?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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\Newsletter\Model\Plugin;
+
+use Magento\TestFramework\Helper\Bootstrap;
+
+/**
+ * @magentoAppIsolation enabled
+ */
+class PluginTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Customer Account Service
+     *
+     * @var \Magento\Customer\Service\V1\CustomerAccountServiceInterface
+     */
+    private $accountService;
+
+    public function setUp()
+    {
+        $this->accountService = Bootstrap::getObjectManager()
+            ->get('Magento\Customer\Service\V1\CustomerAccountServiceInterface');
+    }
+
+    /**
+     * @magentoAppArea adminhtml
+     * @magentoDataFixture Magento/Newsletter/_files/subscribers.php
+     */
+    public function testCustomerCreated()
+    {
+        $objectManager = Bootstrap::getObjectManager();
+
+        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+        $subscriber = $objectManager->create('Magento\Newsletter\Model\Subscriber');
+        $subscriber->loadByEmail('customer_two@example.com');
+        $this->assertTrue($subscriber->isSubscribed());
+        $this->assertEquals(0, (int)$subscriber->getCustomerId());
+
+        /** @var \Magento\Customer\Service\V1\Data\CustomerBuilder $customerBuilder */
+        $customerBuilder = $objectManager->get('Magento\Customer\Service\V1\Data\CustomerBuilder');
+        $customerBuilder->setFirstname('Firstname')
+            ->setLastname('Lastname')
+            ->setEmail('customer_two@example.com');
+        /** @var \Magento\Customer\Service\V1\Data\CustomerDetailsBuilder $customerDetailsBuilder */
+        $customerDetailsBuilder = $objectManager->get('Magento\Customer\Service\V1\Data\CustomerDetailsBuilder');
+        $customerDetailsBuilder->setCustomer($customerBuilder->create());
+        $createdCustomer = $this->accountService->createAccount($customerDetailsBuilder->create());
+
+        $subscriber->loadByEmail('customer_two@example.com');
+        $this->assertTrue($subscriber->isSubscribed());
+        $this->assertEquals($createdCustomer->getId(), (int)$subscriber->getCustomerId());
+    }
+
+
+    /**
+     * @magentoAppArea adminhtml
+     * @magentoDbIsolation enabled
+     */
+    public function testCustomerCreatedNotSubscribed()
+    {
+        $this->verifySubscriptionNotExist('customer@example.com');
+
+        $objectManager = Bootstrap::getObjectManager();
+        /** @var \Magento\Customer\Service\V1\Data\CustomerBuilder $customerBuilder */
+        $customerBuilder = $objectManager->get('Magento\Customer\Service\V1\Data\CustomerBuilder');
+        $customerBuilder->setFirstname('Firstname')
+            ->setLastname('Lastname')
+            ->setEmail('customer@example.com');
+        /** @var \Magento\Customer\Service\V1\Data\CustomerDetailsBuilder $customerDetailsBuilder */
+        $customerDetailsBuilder = $objectManager->get('Magento\Customer\Service\V1\Data\CustomerDetailsBuilder');
+        $customerDetailsBuilder->setCustomer($customerBuilder->create());
+        $this->accountService->createAccount($customerDetailsBuilder->create());
+
+        $this->verifySubscriptionNotExist('customer@example.com');
+    }
+
+    /**
+     * @magentoAppArea adminhtml
+     * @magentoDataFixture Magento/Newsletter/_files/subscribers.php
+     */
+    public function testCustomerUpdatedEmail()
+    {
+        $objectManager = Bootstrap::getObjectManager();
+
+        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+        $subscriber = $objectManager->create('Magento\Newsletter\Model\Subscriber');
+        $subscriber->loadByEmail('customer@example.com');
+        $this->assertTrue($subscriber->isSubscribed());
+        $this->assertEquals(1, (int)$subscriber->getCustomerId());
+
+        $customer = $this->accountService->getCustomer(1);
+        /** @var \Magento\Customer\Service\V1\Data\CustomerBuilder $customerBuilder */
+        $customerBuilder = $objectManager->get('Magento\Customer\Service\V1\Data\CustomerBuilder');
+        $customerBuilder->populate($customer)
+            ->setEmail('new@example.com');
+        /** @var \Magento\Customer\Service\V1\Data\CustomerDetailsBuilder $customerDetailsBuilder */
+        $customerDetailsBuilder = $objectManager->get('Magento\Customer\Service\V1\Data\CustomerDetailsBuilder');
+        $customerDetailsBuilder->setCustomer($customerBuilder->create());
+        $this->accountService->updateCustomer($customerDetailsBuilder->create());
+
+        $subscriber->loadByEmail('new@example.com');
+        $this->assertTrue($subscriber->isSubscribed());
+        $this->assertEquals(1, (int)$subscriber->getCustomerId());
+    }
+
+    /**
+     * @magentoAppArea adminhtml
+     * @magentoDataFixture Magento/Newsletter/_files/subscribers.php
+     */
+    public function testCustomerDeletedAdminArea()
+    {
+        $objectManager = Bootstrap::getObjectManager();
+
+        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+        $subscriber = $objectManager->create('Magento\Newsletter\Model\Subscriber');
+        $subscriber->loadByEmail('customer@example.com');
+        $this->assertTrue($subscriber->isSubscribed());
+
+        $this->accountService->deleteCustomer(1);
+
+        $this->verifySubscriptionNotExist('customer@example.com');
+    }
+
+    /**
+     * Verify a subscription doesn't exist for a given email address
+     *
+     * @param string $email
+     * @return \Magento\Newsletter\Model\Subscriber
+     */
+    private function verifySubscriptionNotExist($email)
+    {
+        $objectManager = Bootstrap::getObjectManager();
+
+        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+        $subscriber = $objectManager->create('Magento\Newsletter\Model\Subscriber');
+        $subscriber->loadByEmail($email);
+        $this->assertFalse($subscriber->isSubscribed());
+        $this->assertEquals(0, (int)$subscriber->getId());
+        return $subscriber;
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Resource/Problem/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Resource/Problem/CollectionTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d1cf82a28333c37ebb89535a382c49bdd7d94831
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Resource/Problem/CollectionTest.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.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Newsletter\Model\Resource\Problem;
+
+use Magento\TestFramework\Helper\Bootstrap;
+
+class CollectionTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Newsletter\Model\Resource\Problem\Collection
+     */
+    protected $_collection;
+
+    protected function setUp()
+    {
+        $this->_collection = Bootstrap::getObjectManager()
+            ->create('Magento\Newsletter\Model\Resource\Problem\Collection');
+    }
+
+    /**
+     * @magentoDataFixture Magento/Newsletter/_files/problems.php
+     */
+    public function testAddCustomersData()
+    {
+        /** @var \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService */
+        $customerAccountService = Bootstrap::getObjectManager()
+            ->create('Magento\Customer\Service\V1\CustomerAccountServiceInterface');
+        $customer = $customerAccountService->getCustomerDetails(1)->getCustomer();
+        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+        $subscriber = Bootstrap::getObjectManager()
+            ->create('Magento\Newsletter\Model\Subscriber')->loadByEmail($customer->getEmail());
+        /** @var \Magento\Newsletter\Model\Problem $problem */
+        $problem = Bootstrap::getObjectManager()
+            ->create('Magento\Newsletter\Model\Problem')->addSubscriberData($subscriber);
+
+        $item = $this->_collection->addSubscriberInfo()->load()->getFirstItem();
+
+        $this->assertEquals($problem->getProblemErrorCode(), $item->getErrorCode());
+        $this->assertEquals($problem->getProblemErrorText(), $item->getErrorText());
+        $this->assertEquals($problem->getSubscriberId(), $item->getSubscriberId());
+        $this->assertEquals($customer->getEmail(), $item->getSubscriberEmail());
+        $this->assertEquals($customer->getFirstname(), $item->getCustomerFirstName());
+        $this->assertEquals($customer->getLastname(), $item->getCustomerLastName());
+        $this->assertContains($customer->getFirstname(), $item->getCustomerName());
+    }
+
+}
diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Resource/Subscriber/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Resource/Subscriber/CollectionTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d711fb4cf113be292c36595f132e07e492f791f8
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Resource/Subscriber/CollectionTest.php
@@ -0,0 +1,57 @@
+<?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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Newsletter\Model\Resource\Subscriber;
+
+class CollectionTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Newsletter\Model\Resource\Subscriber\Collection
+     */
+    protected $_collectionModel;
+
+    protected function setUp()
+    {
+        $this->_collectionModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->create('Magento\Newsletter\Model\Resource\Subscriber\Collection');
+    }
+
+    /**
+     * @magentoDataFixture Magento/Newsletter/_files/subscribers.php
+     */
+    public function testShowCustomerInfo()
+    {
+        $this->_collectionModel->showCustomerInfo()->load();
+
+        /** @var \Magento\Newsletter\Model\Subscriber[] $subscribers */
+        $subscribers = $this->_collectionModel->getItems();
+        $this->assertCount(2, $subscribers);
+        $subscriber = array_shift($subscribers);
+        $this->assertEquals('Firstname', $subscriber->getCustomerFirstname(), $subscriber->getSubscriberEmail());
+        $this->assertEquals('Lastname', $subscriber->getCustomerLastname(), $subscriber->getSubscriberEmail());
+        $subscriber = array_shift($subscribers);
+        $this->assertNull($subscriber->getCustomerFirstname(), $subscriber->getSubscriberEmail());
+        $this->assertNull($subscriber->getCustomerLastname(), $subscriber->getSubscriberEmail());
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Resource/SubscriberTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Resource/SubscriberTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..2e5d73b7d08dff46ef8917713a28f40448bdc607
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Resource/SubscriberTest.php
@@ -0,0 +1,72 @@
+<?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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Newsletter\Model\Resource;
+
+use Magento\TestFramework\Helper\Bootstrap;
+
+class SubscriberTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Newsletter\Model\Resource\Subscriber
+     */
+    protected $_resourceModel;
+
+    protected function setUp()
+    {
+        $this->_resourceModel = Bootstrap::getObjectManager()
+            ->create('Magento\Newsletter\Model\Resource\Subscriber');
+    }
+
+    /**
+     * @magentoDataFixture Magento/Newsletter/_files/subscribers.php
+     */
+    public function testLoadByCustomerDataWithCustomerId()
+    {
+        /** @var \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService */
+        $customerAccountService = Bootstrap::getObjectManager()
+            ->create('Magento\Customer\Service\V1\CustomerAccountServiceInterface');
+        $customerData = $customerAccountService->getCustomerDetails(1)->getCustomer();
+        $result = $this->_resourceModel->loadByCustomerData($customerData);
+
+        $this->assertEquals(1, $result['customer_id']);
+        $this->assertEquals('customer@example.com', $result['subscriber_email']);
+    }
+
+    /**
+     * @magentoDataFixture Magento/Newsletter/_files/subscribers.php
+     * @magentoDataFixture Magento/Customer/_files/two_customers.php
+     */
+    public function testLoadByCustomerDataWithoutCustomerId()
+    {
+        /** @var \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService */
+        $customerAccountService = Bootstrap::getObjectManager()
+            ->create('Magento\Customer\Service\V1\CustomerAccountServiceInterface');
+        $customerData = $customerAccountService->getCustomerDetails(2)->getCustomer();
+        $result = $this->_resourceModel->loadByCustomerData($customerData);
+
+        $this->assertEquals(0, $result['customer_id']);
+        $this->assertEquals('customer_two@example.com', $result['subscriber_email']);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/SubscriberTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/SubscriberTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..9c1fdf6dc08e5787b8184cb39477c085eab4870e
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/SubscriberTest.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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Newsletter\Model;
+
+class SubscriberTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var Subscriber
+     */
+    protected $_model;
+
+    protected function setUp()
+    {
+        $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+            'Magento\Newsletter\Model\Subscriber'
+        );
+    }
+
+    /**
+     * @magentoDataFixture Magento/Newsletter/_files/subscribers.php
+     */
+    public function testLoadByCustomerId()
+    {
+        $this->assertSame($this->_model, $this->_model->loadByCustomerId(1));
+        $this->assertEquals('customer@example.com', $this->_model->getSubscriberEmail());
+    }
+
+    /**
+     * @magentoDataFixture Magento/Newsletter/_files/subscribers.php
+     * @magentoAppArea     frontend
+     */
+    public function testUnsubscribeSubscribe()
+    {
+        // Unsubscribe and verify
+        $this->assertSame($this->_model, $this->_model->loadByCustomerId(1));
+        $this->assertEquals($this->_model, $this->_model->unsubscribe());
+        $this->assertEquals(Subscriber::STATUS_UNSUBSCRIBED, $this->_model->getSubscriberStatus());
+
+        // Subscribe and verify
+        $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $this->_model->subscribe('customer@example.com'));
+        $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $this->_model->getSubscriberStatus());
+    }
+
+    /**
+     * @magentoDataFixture Magento/Newsletter/_files/subscribers.php
+     * @magentoAppArea     frontend
+     */
+    public function testUnsubscribeSubscribeByCustomerId()
+    {
+        // Unsubscribe and verify
+        $this->assertSame($this->_model, $this->_model->unsubscribeCustomerById(1));
+        $this->assertEquals(Subscriber::STATUS_UNSUBSCRIBED, $this->_model->getSubscriberStatus());
+
+        // Subscribe and verify
+        $this->assertSame($this->_model, $this->_model->subscribeCustomerById(1));
+        $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $this->_model->getSubscriberStatus());
+    }
+}
+ 
\ No newline at end of file
diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/_files/problems.php b/dev/tests/integration/testsuite/Magento/Newsletter/_files/problems.php
new file mode 100644
index 0000000000000000000000000000000000000000..326025748cb0ae5139f7e1346dceb9175558dd2f
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/_files/problems.php
@@ -0,0 +1,36 @@
+<?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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+require __DIR__ . '/queue.php';
+
+$problem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+    ->create('Magento\Newsletter\Model\problem');
+// $firstSubscriberId comes from subscribers.php
+$problem->setSubscriberId($firstSubscriberId)
+    ->setQueueId($queue->getQueueId())
+    ->setProblemErrorCode(11)
+    ->setProblemErrorText('error text')
+    ->save();
+
+
diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/_files/subscribers.php b/dev/tests/integration/testsuite/Magento/Newsletter/_files/subscribers.php
index c947eabecd07c125fdbd27e7c2f8189b6b4b3253..c6185c303d57fdce0aa8fd33c015197cf8109eb9 100644
--- a/dev/tests/integration/testsuite/Magento/Newsletter/_files/subscribers.php
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/_files/subscribers.php
@@ -26,33 +26,30 @@
  */
 
 require __DIR__ . '/../../../Magento/Core/_files/store.php';
+require __DIR__ . '/../../../Magento/Customer/_files/customer.php';
 
-$currentStore = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-    'Magento\Core\Model\StoreManagerInterface'
-)->getStore()->getId();
-$otherStore = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-    'Magento\Core\Model\StoreManagerInterface'
-)->getStore(
-    'fixturestore'
-)->getId();
+$currentStore = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+    ->get('Magento\Core\Model\StoreManagerInterface')->getStore()->getId();
+$otherStore = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+    ->get('Magento\Core\Model\StoreManagerInterface')->getStore('fixturestore')->getId();
 
-$subscriber = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-    'Magento\Newsletter\Model\Subscriber'
-);
-$subscriber->setStoreId(
-    $currentStore
-)->setSubscriberEmail(
-    'test1@example.com'
-)->setSubscriberStatus(
-    \Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED
-)->save();
-$subscriber = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-    'Magento\Newsletter\Model\Subscriber'
-);
-$subscriber->setStoreId(
-    $otherStore
-)->setSubscriberEmail(
-    'test2@example.com'
-)->setSubscriberStatus(
-    \Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED
-)->save();
+/** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+$subscriber = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+    ->create('Magento\Newsletter\Model\Subscriber');
+$subscriber->setStoreId($currentStore)
+    ->setCustomerId(1)
+    ->setSubscriberEmail('customer@example.com')
+    ->setSubscriberStatus(\Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED)
+    ->save()
+;
+$firstSubscriberId = $subscriber->getId();
+
+$subscriber = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+    ->create('Magento\Newsletter\Model\Subscriber');
+$subscriber->setStoreId($otherStore)
+    // Intentionally setting ID to 0 instead of 2 to test fallback mechanism in Subscriber model
+    ->setCustomerId(0)
+    ->setSubscriberEmail('customer_two@example.com')
+    ->setSubscriberStatus(\Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED)
+    ->save()
+;
diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/ObjectManagerTest.php b/dev/tests/integration/testsuite/Magento/ObjectManager/ObjectManagerTest.php
index d83415db31880f198c4b072f2e9c8e14d96391ac..c23172c4f3600445050980db73c465e112b34ba5 100644
--- a/dev/tests/integration/testsuite/Magento/ObjectManager/ObjectManagerTest.php
+++ b/dev/tests/integration/testsuite/Magento/ObjectManager/ObjectManagerTest.php
@@ -93,22 +93,13 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
     public static function setUpBeforeClass()
     {
         $config = new \Magento\ObjectManager\Config\Config();
-
-        $dirList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\App\Filesystem\DirectoryList'
-        );
-        $loader = new \Magento\App\Arguments\Loader($dirList);
-        $arguments = new \Magento\App\Arguments(array(), $loader);
-        $const = new \Magento\Data\Argument\Interpreter\Constant();
-        $argInterpreter = new \Magento\App\Arguments\ArgumentInterpreter($arguments, $const);
-        $argObjectFactory = new \Magento\ObjectManager\Config\Argument\ObjectFactory($config);
-        $factory = new \Magento\ObjectManager\Factory\Factory($config, $argInterpreter, $argObjectFactory);
+        $factory = new \Magento\ObjectManager\Factory\Factory($config);
 
         self::$_objectManager = new \Magento\ObjectManager\ObjectManager($factory, $config);
         self::$_objectManager->configure(
             array('preferences' => array(self::TEST_INTERFACE => self::TEST_INTERFACE_IMPLEMENTATION))
         );
-        $argObjectFactory->setObjectManager(self::$_objectManager);
+        $factory->setObjectManager(self::$_objectManager);
     }
 
     public static function tearDownAfterClass()
diff --git a/dev/tests/integration/testsuite/Magento/Core/Helper/Url/RewriteTest.php b/dev/tests/integration/testsuite/Magento/UrlRewrite/Helper/UrlRewriteTest.php
similarity index 91%
rename from dev/tests/integration/testsuite/Magento/Core/Helper/Url/RewriteTest.php
rename to dev/tests/integration/testsuite/Magento/UrlRewrite/Helper/UrlRewriteTest.php
index 8dc1a337975740effaf8ff8de3eb5a913ef2229d..7c1c66ddf34dfda9dfd4f37d62fe97e7a91fbd28 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Helper/Url/RewriteTest.php
+++ b/dev/tests/integration/testsuite/Magento/UrlRewrite/Helper/UrlRewriteTest.php
@@ -18,25 +18,23 @@
  * 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) 2014 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\Url;
+namespace Magento\UrlRewrite\Helper;
 
-class RewriteTest extends \PHPUnit_Framework_TestCase
+class UrlRewriteTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Helper\Url\Rewrite
+     * @var \Magento\UrlRewrite\Helper\UrlRewrite
      */
     protected $_helper;
 
     protected function setUp()
     {
         $this->_helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Core\Helper\Url\Rewrite'
+            'Magento\UrlRewrite\Helper\UrlRewrite'
         );
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Url/RewriteTest.php b/dev/tests/integration/testsuite/Magento/UrlRewrite/Model/UrlRewriteTest.php
similarity index 95%
rename from dev/tests/integration/testsuite/Magento/Core/Model/Url/RewriteTest.php
rename to dev/tests/integration/testsuite/Magento/UrlRewrite/Model/UrlRewriteTest.php
index bc7629ba295e29f91ab1b2fcd1bf41f8c2939382..46bdfd1aa778a71462c072f707d4488463b90728 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Url/RewriteTest.php
+++ b/dev/tests/integration/testsuite/Magento/UrlRewrite/Model/UrlRewriteTest.php
@@ -18,25 +18,23 @@
  * 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) 2014 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\Url;
+namespace Magento\UrlRewrite\Model;
 
-class RewriteTest extends \PHPUnit_Framework_TestCase
+class UrlRewriteTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\Model\Url\Rewrite
+     * @var \Magento\UrlRewrite\Model\UrlRewrite
      */
     protected $_model;
 
     protected function setUp()
     {
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Core\Model\Url\Rewrite'
+            'Magento\UrlRewrite\Model\UrlRewrite'
         );
     }
 
@@ -58,7 +56,7 @@ class RewriteTest extends \PHPUnit_Framework_TestCase
 
         try {
             $read = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-                'Magento\Core\Model\Url\Rewrite'
+                'Magento\UrlRewrite\Model\UrlRewrite'
             );
             $read->setStoreId(
                 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
@@ -100,7 +98,7 @@ class RewriteTest extends \PHPUnit_Framework_TestCase
 
         try {
             $read = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-                'Magento\Core\Model\Url\Rewrite'
+                'Magento\UrlRewrite\Model\UrlRewrite'
             );
             $read->setStoreId(
                 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
diff --git a/dev/tests/integration/testsuite/Magento/View/PublicationTest.php b/dev/tests/integration/testsuite/Magento/View/PublicationTest.php
index 6713a818d90954c98a6735c97269a552327f322d..ff17317d32de07a04e19785451aedbfd1fa4381a 100644
--- a/dev/tests/integration/testsuite/Magento/View/PublicationTest.php
+++ b/dev/tests/integration/testsuite/Magento/View/PublicationTest.php
@@ -349,9 +349,7 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
                 'Magento\View\Design\Fallback\Factory' => array(
                     'arguments' => array(
                         'filesystem' => array(
-                            'value' => 'Magento\View\MockedFilesystem',
-                            'name' => 'filesystem',
-                            \Magento\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE => 'object'
+                            'instance' => 'Magento\View\MockedFilesystem',
                         )
                     )
                 )
@@ -598,20 +596,12 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
                 array(
                     'Magento\View\Publisher\CssFile' => array(
                         'arguments' => array(
-                            'allowDuplication' => array(
-                                'name' => 'allowDuplication',
-                                \Magento\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE => 'boolean',
-                                'value' => $allowDuplication
-                            )
+                            'allowDuplication' => $allowDuplication
                         )
                     ),
                     'Magento\View\Publisher\File' => array(
                         'arguments' => array(
-                            'allowDuplication' => array(
-                                'name' => 'allowDuplication',
-                                \Magento\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE => 'boolean',
-                                'value' => $allowDuplication
-                            )
+                            'allowDuplication' => $allowDuplication
                         )
                     )
                 )
diff --git a/dev/tests/performance/framework/Magento/TestFramework/Application.php b/dev/tests/performance/framework/Magento/TestFramework/Application.php
index 1485f2535663843c69f89798984dc3fb2cf84c77..8b5486df62f92e0d0ca90c04c18aa11201923ce5 100644
--- a/dev/tests/performance/framework/Magento/TestFramework/Application.php
+++ b/dev/tests/performance/framework/Magento/TestFramework/Application.php
@@ -285,4 +285,15 @@ class Application
         }
         return $this->_objectManager;
     }
+
+    /**
+     * Reset object manager
+     *
+     * @return \Magento\ObjectManager
+     */
+    public function resetObjectManager()
+    {
+        $this->_objectManager = null;
+        return $this;
+    }
 }
diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
index b5a22f477ac4b7dfe26c619c5c79ee5dc041ba4c..f6e808e2b3aa625297046a37aa4bddd1755c4cb4 100644
--- a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
+++ b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
@@ -599,6 +599,7 @@ class Files
             '/downloader/app/',
             '/downloader/lib/',
             '/dev/tools/',
+            '/dev/tools/performance_toolkit/framework/',
             '/dev/tests/api-functional/framework/',
             '/dev/tests/integration/framework/',
             '/dev/tests/integration/framework/tests/unit/testsuite/',
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php
index 36f30006e0ed640f7a68bf263a76c9d6893e442e..ee2fcd49b6cd5d58d0ed1c3e72f48d71321496c7 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php
@@ -87,8 +87,30 @@ class CompilerTest extends \PHPUnit_Framework_TestCase
         );
 
         $this->_command = 'php ' . $basePath . '/dev/tools/Magento/Tools/Di/compiler.php --generation=%s --di=%s';
+
+        $booleanUtils = new \Magento\Stdlib\BooleanUtils();
+        $constInterpreter = new \Magento\Data\Argument\Interpreter\Constant();
+        $argumentInterpreter = new \Magento\Data\Argument\Interpreter\Composite(
+            [
+                'boolean' => new \Magento\Data\Argument\Interpreter\Boolean($booleanUtils),
+                'string' => new \Magento\Data\Argument\Interpreter\String($booleanUtils),
+                'number' => new \Magento\Data\Argument\Interpreter\Number(),
+                'null' => new \Magento\Data\Argument\Interpreter\NullType(),
+                'object' => new \Magento\Data\Argument\Interpreter\Object($booleanUtils),
+                'const' => $constInterpreter,
+                'init_parameter' => new \Magento\App\Arguments\ArgumentInterpreter($constInterpreter)
+            ],
+            \Magento\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE
+        );
+        // Add interpreters that reference the composite
+        $argumentInterpreter->addInterpreter(
+            'array',
+            new \Magento\Data\Argument\Interpreter\ArrayType($argumentInterpreter)
+        );
+
         $this->_mapper = new \Magento\ObjectManager\Config\Mapper\Dom(
-            new \Magento\Stdlib\BooleanUtils(),
+            $argumentInterpreter,
+            $booleanUtils,
             new \Magento\ObjectManager\Config\Mapper\ArgumentParser()
         );
         $this->_validator = new \Magento\Code\Validator();
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/ArgumentsTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/ArgumentsTest.php
index ddec81d35de99679d34a8aba2779c4ab5814b47a..fa61754b98579ed7e03b61e01b6bedc1631d6be2 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/ArgumentsTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/ArgumentsTest.php
@@ -55,7 +55,7 @@ class ArgumentsTest extends \Magento\Test\Integrity\Phrase\AbstractTestCase
         $rootDir = \Magento\TestFramework\Utility\Files::init()->getPathToSource();
         $this->blackList = array(
             // the file below is the only file where strings are translated without corresponding arguments
-            $rootDir . str_replace('/', DIRECTORY_SEPARATOR, '/app/code/Magento/Core/Helper/Js.php')
+            $rootDir . str_replace('/', DIRECTORY_SEPARATOR, '/app/code/Magento/Translation/Model/Js/DataProvider.php')
         );
     }
 
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 d14355f50a526fe5949d03bddc87a81a854be63e..2b5a2ba2c496870fcb3a6ec8fdfbc89a502bef00 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/JsTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/JsTest.php
@@ -59,6 +59,7 @@ class JsTest extends \Magento\Test\Integrity\Phrase\AbstractTestCase
 
         $registeredPhrases = $this->_getRegisteredPhrases();
 
+        require_once BP . '/app/code/Magento/Backend/App/Area/FrontNameResolver.php';
         foreach ($this->_getJavascriptPhrases(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) as $phrase) {
             if (!in_array($phrase['phrase'], $registeredPhrases)) {
                 $unregisteredMessages[] = sprintf(
@@ -121,7 +122,9 @@ class JsTest extends \Magento\Test\Integrity\Phrase\AbstractTestCase
      */
     protected function _getRegisteredPhrases()
     {
-        $jsHelperFile = __DIR__ . '../../../../../../../../../app/code/Magento/Core/Helper/Js.php';
+        $jsHelperFile = realpath(
+            __DIR__ . '/../../../../../../../../app/code/Magento/Translation/Model/Js/DataProvider.php'
+        );
 
         $this->_phraseCollector->parse($jsHelperFile);
 
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 1766f231afb5c27f3202bfb237d99a95766f1f20..4671fad457a24913da2b40bc0c7a8a88f7a3ca7a 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
@@ -806,6 +806,7 @@ return array(
     array('Magento\Core\Model\Resource\Entity\Table', 'Magento\Model\Resource\Entity\Table'),
     array('Magento\Core\Model\Resource\Flag', 'Magento\Flag\Resource'),
     array('Magento\Core\Model\Resource\Iterator', 'Magento\Model\Resource\Iterator'),
+    array('Magento\Core\Model\Resource\Resource', 'Magento\Install\Model\Resource\Resource'),
     array('Magento\Core\Model\Resource\Type\AbstractType', 'Magento\Model\Resource\Type\AbstractType'),
     array('Magento\Core\Model\Resource\Type\Db', 'Magento\Model\Resource\Type\Db'),
     array('Magento\Core\Model\Resource\Type\Db\Pdo\Mysql', 'Magento\Model\Resource\Type\Db\Pdo\Mysql'),
@@ -1970,6 +1971,7 @@ return array(
     ),
     array('Magento\Core\Model\Layout\Argument\Updater', 'Magento\View\Layout\Argument\Interpreter\Decorator\Updater'),
     array('Magento\Core\Model\Layout\Argument\UpdaterInterface', 'Magento\View\Layout\Argument\UpdaterInterface'),
+    array('Magento\Core\Model\Layout\Filter\Acl', 'Magento\Backend\Model\Layout\Filter\Acl'),
     array('Magento\View\Layout\Argument\HandlerInterface', 'Magento\Data\Argument\InterpreterInterface'),
     array('Magento\View\Layout\Argument\HandlerFactory', 'Magento\Data\Argument\Interpreter\Composite'),
     array('Magento\Phrase\Renderer\Factory'),
@@ -2022,6 +2024,7 @@ return array(
     array('Recurring\Profile', 'Recurring\Payment'), // recurring profile was renamed to recurring payment
     array('Magento\Catalog\Helper\Product\Flat'),
     array('Magento\Catalog\Helper\Flat\AbstractFlat'),
+    array('Magento\Core\App\Action\Plugin\Install', 'Magento\Install\App\Action\Plugin\Install'),
     array('Magento\Core\App\Action\Plugin\Session', 'Magento\Core\Block\RequireCookie'),
     array(
         'Magento\Core\Model\LocaleInterface',
@@ -2165,4 +2168,39 @@ return array(
     ['Magento\Backend\Model\Translate\Inline'],
     ['Magento\Backend\Model\Translate\Inline\ConfigFactory'],
     ['Magento\Translate\Inline\ConfigFactory'],
+    array('Magento\Core\Model\Template', 'Magento\Email\Model\AbstractTemplate'),
+    array('Magento\Core\Helper\Js'),
+    array('Magento\Backend\Helper\Media\Js'),
+    array(
+        'Magento\Core\Model\Resource\Url\Rewrite\Collection',
+        'Magento\UrlRewrite\Model\Resource\UrlRewrite\Collection'
+    ),
+    array(
+        'Magento\Core\Model\Resource\Url\Rewrite',
+        'Magento\UrlRewrite\Model\Resource\UrlRewrite'
+    ),
+    array(
+        'Magento\Core\Model\Url\Rewrite',
+        'Magento\UrlRewrite\Model\UrlRewrite'
+    ),
+    array(
+        'Magento\Core\Model\Source\Urlrewrite\Options',
+        'Magento\UrlRewrite\Model\UrlRewrite\OptionProvider'
+    ),
+    array(
+        'Magento\Core\Model\Source\Urlrewrite\Types',
+        'Magento\UrlRewrite\Model\UrlRewrite\TypeProvider'
+    ),
+    array(
+        'Magento\Core\Helper\Url\Rewrite',
+        'Magento\UrlRewrite\Helper\UrlRewrite'
+    ),
+    array(
+        'Magento\Core\App\FrontController\Plugin\UrlRewrite',
+        'Magento\UrlRewrite\App\FrontController\Plugin\UrlRewrite'
+    ),
+    array(
+        'Magento\Core\App\Request\RewriteService',
+        'Magento\UrlRewrite\App\Request\RewriteService'
+    ),
 );
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 762f6fc6c6c71cca701978bb7e2fb1b82810026f..1003f04019e4b6c794c00da78f0c72f04c464bdc 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
@@ -670,6 +670,7 @@ return array(
     array('load', 'Magento\Core\Model\Layout\Update', 'Magento\Core\Model\Layout\Merge'),
     array('loadBaseContents', 'Magento\Email\Model\Template'),
     array('loadBase', 'Magento\Core\Model\Config'),
+    array('loadByCustomer', 'Magento\Newsletter\Model\Resource\Subscriber', 'loadByCustomerData'),
     array('loadDb', 'Magento\Core\Model\Config'),
     array('loadDiConfiguration', 'Magento\Core\Model\Config'),
     array('loadEventObservers', 'Magento\Core\Model\Config'),
@@ -1348,24 +1349,6 @@ return array(
     array('_getSession', 'Magento\CatalogSearch\Controller\Result'),
     array('addPriceBlockType', 'Magento\Rss\Block\Catalog\AbstractCatalog'),
     array('getAttributeDisabledTypes', 'Magento\Catalog\Helper\Data'),
-    array('setArguments', 'Magento\ObjectManager\Factory', 'Magento\App\Arguments\ArgumentInterpreter'),
-    array('setArguments', 'Magento\ObjectManager\Factory\Factory', 'Magento\App\Arguments\ArgumentInterpreter'),
-    array('setArguments', 'Magento\Interception\FactoryDecorator', 'Magento\App\Arguments\ArgumentInterpreter'),
-    array(
-        'setObjectManager',
-        'Magento\ObjectManager\Factory',
-        'Magento\ObjectManager\Config\Argument\ObjectFactory::setObjectManager'
-    ),
-    array(
-        'setObjectManager',
-        'Magento\ObjectManager\Factory\Factory',
-        'Magento\ObjectManager\Config\Argument\ObjectFactory::setObjectManager'
-    ),
-    array(
-        'setObjectManager',
-        'Magento\Interception\FactoryDecorator',
-        'Magento\ObjectManager\Config\Argument\ObjectFactory::setObjectManager'
-    ),
     array(
         '_processArrayNode',
         'Magento\ObjectManager\Config\Mapper\Dom',
@@ -1585,6 +1568,7 @@ return array(
     array('quoteSubmitAfter', 'Magento\Customer\Model\Observer'),
     array('loadByCustomer', 'Magento\Wishlist\Model\Wishlist'),
     ['_sessionVarCallback', 'Magento\Url', 'Replaced with inlined closure'],
+    array('processReinitConfig', 'Magento\Core\Model\Observer'),
     array(
         'reviewsAction',
         'Magento\Catalog\Controller\Adminhtml\Product',
@@ -1592,7 +1576,6 @@ return array(
     ),
     ['_insertInlineScriptsHtml', 'Magento\DesignEditor\Model\Translate\Inline', 'addInlineScript'],
     ['initializeTranslation', 'Magento\Backend\Model\Observer'],
-    ['getTranslateJson', 'Magento\Core\Helper\Js'],
     ['_isEmptyTranslateArg', 'Magento\Translate'],
     ['_getTranslatedString', 'Magento\Translate'],
     ['initLocale', 'Magento\Translate'],
diff --git a/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php b/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php
index 71895ee10704e41646bb0b6a8ec7277577437b1d..0fba8a1596a812bdc20293eac5d9ab5e2d41163c 100644
--- a/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php
+++ b/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php
@@ -101,12 +101,12 @@ class ObjectManager
     /**
      * Retrieve specific mock of core resource model
      *
-     * @return \Magento\Core\Model\Resource\Resource|\PHPUnit_Framework_MockObject_MockObject
+     * @return \Magento\Module\ResourceInterface|\PHPUnit_Framework_MockObject_MockObject
      */
     protected function _getResourceModelMock()
     {
         $resourceMock = $this->_testObject->getMock(
-            'Magento\Core\Model\Resource\Resource',
+            'Magento\Install\Model\Resource\Resource',
             array('getIdFieldName', '__sleep', '__wakeup'),
             array(),
             '',
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 0f48d33875a3b86d574c0a982912193c0bad952b..fe80118fb58c0d519e2bd567e0599a3ba5602257 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
@@ -99,7 +99,7 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
 
         /** @var $resourceMock \Magento\Core\Model\Resource\Resource */
         $resourceMock = $this->getMock(
-            'Magento\Core\Model\Resource\Resource',
+            'Magento\Install\Model\Resource\Resource',
             array('_getReadAdapter', 'getIdFieldName', '__sleep', '__wakeup'),
             array(),
             '',
diff --git a/dev/tests/unit/testsuite/Magento/App/Arguments/ArgumentInterpreterTest.php b/dev/tests/unit/testsuite/Magento/App/Arguments/ArgumentInterpreterTest.php
index 90b08ce8a9f680fb91a8528154ecbb400b67cd03..4e3d4e619b125d0373fcf2d33a74ab08d565c575 100644
--- a/dev/tests/unit/testsuite/Magento/App/Arguments/ArgumentInterpreterTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Arguments/ArgumentInterpreterTest.php
@@ -30,14 +30,8 @@ class ArgumentInterpreterTest extends \PHPUnit_Framework_TestCase
      */
     private $object;
 
-    /**
-     * @var \Magento\App\Arguments|\PHPUnit_Framework_MockObject_MockObject
-     */
-    private $arguments;
-
     protected function setUp()
     {
-        $this->arguments = $this->getMock('\Magento\App\Arguments', array('get'), array(), '', false);
         $const = $this->getMock('\Magento\Data\Argument\Interpreter\Constant', array('evaluate'), array(), '', false);
         $const->expects(
             $this->once()
@@ -48,39 +42,12 @@ class ArgumentInterpreterTest extends \PHPUnit_Framework_TestCase
         )->will(
             $this->returnValue('init_param_value')
         );
-        $this->object = new ArgumentInterpreter($this->arguments, $const);
+        $this->object = new ArgumentInterpreter($const);
     }
 
     public function testEvaluate()
     {
-        $expected = 'test_value';
-        $this->arguments->expects(
-            $this->once()
-        )->method(
-            'get'
-        )->with(
-            'init_param_value'
-        )->will(
-            $this->returnValue($expected)
-        );
+        $expected = array('argument' => 'init_param_value');
         $this->assertEquals($expected, $this->object->evaluate(array('value' => 'FIXTURE_INIT_PARAMETER')));
     }
-
-    /**
-     * @expectedException \Magento\Data\Argument\MissingOptionalValueException
-     * @expectedExceptionMessage Value of application argument 'init_param_value' is not defined.
-     */
-    public function testEvaluateException()
-    {
-        $this->arguments->expects(
-            $this->once()
-        )->method(
-            'get'
-        )->with(
-            'init_param_value'
-        )->will(
-            $this->returnValue(null)
-        );
-        $this->object->evaluate(array('value' => 'FIXTURE_INIT_PARAMETER'));
-    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/App/Cache/StateTest.php b/dev/tests/unit/testsuite/Magento/App/Cache/StateTest.php
index 5c6900f25569e857a3a9636f6276da40b6f58d72..a66b477d244e18ed795cda602dcc520305aa0c00 100644
--- a/dev/tests/unit/testsuite/Magento/App/Cache/StateTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Cache/StateTest.php
@@ -31,7 +31,7 @@ class StateTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Core\Model\Resource\Cache|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Cache\State\Options|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_resource;
 
@@ -135,7 +135,7 @@ class StateTest extends \PHPUnit_Framework_TestCase
             $this->returnValue($this->_cacheFrontend)
         );
 
-        $this->_resource = $this->getMock('Magento\Core\Model\Resource\Cache', array(), array(), '', false);
+        $this->_resource = $this->getMock('Magento\App\Cache\State\Options', array(), array(), '', false);
         $this->_resource->expects(
             $this->any()
         )->method(
diff --git a/dev/tests/unit/testsuite/Magento/App/RouterListTest.php b/dev/tests/unit/testsuite/Magento/App/RouterListTest.php
index 1ddc5c037ab27622344ef4d83a19280e00a0efb3..0906f2c4c8e2d0050cc47538a2864469615f9fd2 100644
--- a/dev/tests/unit/testsuite/Magento/App/RouterListTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/RouterListTest.php
@@ -45,9 +45,9 @@ class RouterListTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_routerList = array(
-            'adminRouter' => array('instance' => 'AdminClass', 'disable' => true, 'sortOrder' => 10),
-            'frontendRouter' => array('instance' => 'FrontClass', 'disable' => false, 'sortOrder' => 10),
-            'default' => array('instance' => 'DefaultClass', 'disable' => false, 'sortOrder' => 5)
+            'adminRouter' => array('class' => 'AdminClass', 'disable' => true, 'sortOrder' => 10),
+            'frontendRouter' => array('class' => 'FrontClass', 'disable' => false, 'sortOrder' => 10),
+            'default' => array('class' => 'DefaultClass', 'disable' => false, 'sortOrder' => 5)
         );
 
         $this->_objectManagerMock = $this->getMock('Magento\ObjectManager');
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php
index 36be6cda4f245552edc5ae2337fe1a9bc74a0584..8646a071a76552e71e2b0901d45e2a4fb9407679 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php
@@ -82,7 +82,7 @@ class FieldsetTest extends \PHPUnit_Framework_TestCase
         );
         $groupMock->expects($this->once())->method('getFieldsetCss')->will($this->returnValue('test_fieldset_css'));
 
-        $this->_helperMock = $this->getMock('Magento\Core\Helper\Js', array(), array(), '', false, false);
+        $this->_helperMock = $this->getMock('Magento\View\Helper\Js', array(), array(), '', false, false);
 
         $data = array(
             'request' => $this->_requestMock,
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php
index bc4ddad74dbb1738b3bae364c69e354f9f28794b..afff0a5fca13004eb002bbbb0a19415c7f6e1c44 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php
@@ -250,7 +250,9 @@ class DashboardTest extends \PHPUnit_Framework_TestCase
             $response = $this->getMock('Magento\App\Response\Http', array(), array(), '', false);
             $response->headersSentThrowsException = false;
         }
-        $rewriteFactory = $this->getMock('Magento\Core\Model\Url\RewriteFactory', array('create'), array(), '', false);
+        $rewriteFactory = $this->getMock(
+            'Magento\UrlRewrite\Model\UrlRewriteFactory', array('create'), array(), '', false
+        );
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
         $varienFront = $helper->getObject('Magento\App\FrontController', array('rewriteFactory' => $rewriteFactory));
 
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/ConfigTest.php
index af723b9a82bd3013f2dfec1d81af67efe711275d..9462383369d5d7e72fa22da8f0b40d3fecca5480 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/ConfigTest.php
@@ -97,7 +97,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             'Magento\DB\TransactionFactory',
             array('create'), array(), '', false
         );
-        $this->_appConfigMock = $this->getMock('Magento\App\ConfigInterface', array(), array(), '', false);
+        $this->_appConfigMock = $this->getMock('Magento\App\ReinitableConfigInterface', array(), array(), '', false);
         $this->_configLoaderMock = $this->getMock(
             'Magento\Backend\Model\Config\Loader',
             array('getConfigByPath'),
@@ -155,7 +155,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         $this->_configLoaderMock->expects($this->any())->method('getConfigByPath')->will($this->returnValue(array()));
 
         $this->_eventManagerMock->expects(
-            $this->at(1)
+            $this->at(0)
         )->method(
             'dispatch'
         )->with(
@@ -164,7 +164,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         );
 
         $this->_eventManagerMock->expects(
-            $this->at(1)
+            $this->at(0)
         )->method(
             'dispatch'
         )->with(
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/ViewTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/ViewTest.php
index 83f9912c3126b992c0f8561e94db46650834b140..69cb92d0339eb4e9b453f9332a414644bfc1b61c 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/ViewTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/ViewTest.php
@@ -38,7 +38,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $aclFilter = $this->getMock('Magento\Core\Model\Layout\Filter\Acl', array(), array(), '', false);
+        $aclFilter = $this->getMock('Magento\Backend\Model\Layout\Filter\Acl', array(), array(), '', false);
         $this->_layoutMock = $this->getMock('Magento\Core\Model\Layout', array(), array(), '', false);
         $layoutProcessor = $this->getMock('Magento\View\Layout\ProcessorInterface');
         $node = new \Magento\Simplexml\Element('<node/>');
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListProductTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListProductTest.php
index 6760bef48ceb7f648828df96d349033ae2d7b9a2..8c83c7bc77393d28a1e939e12f29e80744507491 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListProductTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListProductTest.php
@@ -40,14 +40,68 @@ class ListProductTest extends \PHPUnit_Framework_TestCase
      */
     protected $layerMock;
 
+    /**
+     * @var \Magento\Core\Helper\PostData|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $postDataHelperMock;
+
+    /**
+     * @var \Magento\Catalog\Model\Product|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    /**
+     * @var \Magento\Checkout\Helper\Cart|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $cartHelperMock;
+
+    /**
+     * @var \Magento\Catalog\Model\Product\Type\Simple|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $typeInstanceMock;
+
     protected function setUp()
     {
         $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
         $this->registryMock = $this->getMock('Magento\Registry', array(), array(), '', false);
         $this->layerMock = $this->getMock('Magento\Catalog\Model\Layer', array(), array(), '', false);
+        $this->postDataHelperMock = $this->getMock(
+            'Magento\Core\Helper\PostData',
+            array(),
+            array(),
+            '',
+            false
+        );
+        $this->typeInstanceMock = $this->getMock(
+            'Magento\Catalog\Model\Product\Type\Simple',
+            array(),
+            array(),
+            '',
+            false,
+            false
+        );
+        $this->productMock = $this->getMock(
+            'Magento\Catalog\Model\Product',
+            array(),
+            array(),
+            '',
+            false
+        );
+        $this->cartHelperMock = $this->getMock(
+            'Magento\Checkout\Helper\Cart',
+            array(),
+            array(),
+            '',
+            false
+        );
         $this->block = $objectManager->getObject(
             'Magento\Catalog\Block\Product\ListProduct',
-            array('registry' => $this->registryMock, 'catalogLayer' => $this->layerMock)
+            array(
+                'registry' => $this->registryMock,
+                'catalogLayer' => $this->layerMock,
+                'cartHelper' => $this->cartHelperMock,
+                'postDataHelper' => $this->postDataHelperMock
+            )
         );
     }
 
@@ -61,18 +115,13 @@ class ListProductTest extends \PHPUnit_Framework_TestCase
         $productTag = 'catalog_product_1';
         $categoryTag = 'catalog_category_1';
 
-        $product = $this->getMock(
-            'Magento\Catalog\Model\Product',
-            array('getIdentities', '__wakeup'),
-            array(),
-            '',
-            false
-        );
-        $product->expects($this->once())->method('getIdentities')->will($this->returnValue(array($productTag)));
+        $this->productMock->expects($this->once())
+            ->method('getIdentities')
+            ->will($this->returnValue(array($productTag)));
 
         $itemsCollection = new \ReflectionProperty('Magento\Catalog\Block\Product\ListProduct', '_productCollection');
         $itemsCollection->setAccessible(true);
-        $itemsCollection->setValue($this->block, array($product));
+        $itemsCollection->setValue($this->block, array($this->productMock));
 
         $currentCategory = $this->getMock('Magento\Catalog\Model\Category', array(), array(), '', false);
         $currentCategory->expects($this->once())
@@ -88,4 +137,43 @@ class ListProductTest extends \PHPUnit_Framework_TestCase
             $this->block->getIdentities()
         );
     }
+
+    public function testGetAddToCartPostParams()
+    {
+        $url = 'http://localhost.com/dev/';
+        $id = 1;
+        $uenc = strtr(base64_encode($url), '+/=', '-_,');
+        $data = array('product' => $id, \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $uenc);
+        $expectedPostData = json_encode(
+            array(
+                'action' => $url,
+                'data' => array('product' => $id, 'uenc' => $uenc)
+            )
+        );
+
+        $this->typeInstanceMock->expects($this->once())
+            ->method('hasRequiredOptions')
+            ->with($this->equalTo($this->productMock))
+            ->will($this->returnValue(false));
+        $this->cartHelperMock->expects($this->any())
+            ->method('getAddUrl')
+            ->with($this->equalTo($this->productMock), $this->equalTo(array()))
+            ->will($this->returnValue($url));
+        $this->productMock->expects($this->once())
+            ->method('getEntityId')
+            ->will($this->returnValue($id));
+        $this->productMock->expects($this->once())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($this->typeInstanceMock));
+        $this->postDataHelperMock->expects($this->once())
+            ->method('getEncodedUrl')
+            ->with($this->equalTo($url))
+            ->will($this->returnValue($uenc));
+        $this->postDataHelperMock->expects($this->once())
+            ->method('getPostData')
+            ->with($this->equalTo($url), $this->equalTo($data))
+            ->will($this->returnValue($expectedPostData));
+        $result = $this->block->getAddToCartPostParams($this->productMock);
+        $this->assertEquals($expectedPostData, $result);
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/HelperTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/HelperTest.php
index bcb405236f33e636ff01c59cf658b1c96a1c75d3..61c2284c5ce8aa86e9f76e1e00df5ec5570933e7 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/HelperTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/HelperTest.php
@@ -30,11 +30,6 @@ class HelperTest extends \PHPUnit_Framework_TestCase
      */
     protected $requestMock;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $jsHelperMock;
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -78,7 +73,6 @@ class HelperTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false);
-        $this->jsHelperMock = $this->getMock('Magento\Backend\Helper\Js', array(), array(), '', false);
         $this->storeMock = $this->getMock('Magento\Core\Model\Store', array(), array(), '', false);
         $this->websiteMock = $this->getMock('Magento\Core\Model\Website', array(), array(), '', false);
         $this->storeManagerMock = $this->getMock('Magento\Core\Model\StoreManagerInterface');
@@ -135,7 +129,6 @@ class HelperTest extends \PHPUnit_Framework_TestCase
 
         $this->helper = new Helper(
             $this->requestMock,
-            $this->jsHelperMock,
             $this->storeManagerMock,
             $this->stockFilterMock,
             $this->productLinksMock
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php
index ff5d83f68710b24ef3da410ee719efe398590b5d..b70054fa9f3a6808d722a32ce8381c0e24fb24ee 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php
@@ -47,7 +47,7 @@ class UrlTest extends \PHPUnit_Framework_TestCase
         )->getMock();
 
         $rewriteFactory = $this->getMockBuilder(
-            'Magento\Core\Model\Url\RewriteFactory'
+            'Magento\UrlRewrite\Model\UrlRewriteFactory'
         )->disableOriginalConstructor()->setMethods(
             array('create')
         )->getMock();
diff --git a/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/MessageBoxTest.php b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/MessageBoxTest.php
index 77514b8a137cc3ea8c1dd2afdaa46c2f34e16463..fd07ae05e1337b7d86e0f40d3b5ccde37cabe440 100644
--- a/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/MessageBoxTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/MessageBoxTest.php
@@ -55,7 +55,7 @@ class MessageBoxTest extends \PHPUnit_Framework_TestCase
     protected $requestMock;
 
     /**
-     * @var \Magento\View\Element\Messages|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Message\Manager|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $messageManagerMock;
 
@@ -74,13 +74,12 @@ class MessageBoxTest extends \PHPUnit_Framework_TestCase
      */
     public function setUp()
     {
-        $this->cookieMock = $this->getMock('Magento\Stdlib\Cookie', array('set', 'get'), array(), '', false);
+        $this->cookieMock = $this->getMock('Magento\Stdlib\Cookie', array(), array(), '', false);
         $this->requestMock = $this->getMock('Magento\App\Request\Http', array('isPost'), array(), '', false);
         $this->configMock = $this->getMock('Magento\PageCache\Model\Config', array('isEnabled'), array(), '', false);
-        $this->messageManagerMock = $this->getMockBuilder('Magento\Message\ManagerInterface')
-            ->setMethods(array('getMessages', 'getCount'))
+        $this->messageManagerMock = $this->getMockBuilder('Magento\Message\Manager')
             ->disableOriginalConstructor()
-            ->getMockForAbstractClass();
+            ->getMock();
 
         $this->msgBox = new MessageBox(
             $this->cookieMock,
@@ -101,13 +100,9 @@ class MessageBoxTest extends \PHPUnit_Framework_TestCase
      */
     public function testAfterDispatch()
     {
-        $messageCollectionMock = $this->getMock('Magento\Message\Collection', array('getCount'), array(), '', false);
-        $messageCollectionMock->expects($this->once())
-            ->method('getCount')
-            ->will($this->returnValue(5));
         $this->messageManagerMock->expects($this->once())
-            ->method('getMessages')
-            ->will($this->returnValue($messageCollectionMock));
+            ->method('hasMessages')
+            ->will($this->returnValue(true));
         $this->requestMock->expects($this->once())
             ->method('isPost')
             ->will($this->returnValue(true));
@@ -119,7 +114,8 @@ class MessageBoxTest extends \PHPUnit_Framework_TestCase
             ->with(
                 $this->equalTo(\Magento\Core\App\FrontController\Plugin\MessageBox::COOKIE_NAME),
                 1,
-                $this->equalTo(\Magento\Core\App\FrontController\Plugin\MessageBox::COOKIE_PERIOD)
+                $this->equalTo(\Magento\Core\App\FrontController\Plugin\MessageBox::COOKIE_PERIOD),
+                '/'
             );
         $this->assertInstanceOf(
             '\Magento\App\ResponseInterface',
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/NoRouteHandlerListTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/NoRouteHandlerListTest.php
index eddfc0a5a865e987769a16022205930e8dfab86f..eb91cbeac3cb5b44813ec1df02f8be62efa596f3 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/NoRouteHandlerListTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/NoRouteHandlerListTest.php
@@ -39,8 +39,8 @@ class NoRouteHandlerListTest extends \PHPUnit_Framework_TestCase
     {
         $this->_objectManagerMock = $this->getMock('Magento\ObjectManager');
         $handlersList = array(
-            'default_handler' => array('instance' => 'Magento\Core\App\Router\NoRouteHandler', 'sortOrder' => 100),
-            'backend_handler' => array('instance' => 'Magento\Backend\App\Router\NoRouteHandler', 'sortOrder' => 10)
+            'default_handler' => array('class' => 'Magento\Core\App\Router\NoRouteHandler', 'sortOrder' => 100),
+            'backend_handler' => array('class' => 'Magento\Backend\App\Router\NoRouteHandler', 'sortOrder' => 10)
         );
 
         $this->_model = new \Magento\App\Router\NoRouteHandlerList($this->_objectManagerMock, $handlersList);
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php
index 95db716f13af1890665e9ae2381214da54486b60..747686cf3d66580365dcd00b7187aeeec35bc834 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php
@@ -50,11 +50,6 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
      */
     protected $_assetsMock;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_configMock;
-
     /**
      * @var \Magento\Core\Model\Observer
      */
@@ -107,14 +102,6 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
             false,
             false
         );
-        $this->_configMock = $this->getMock(
-            '\Magento\App\ReinitableConfigInterface',
-            array(),
-            array(),
-            '',
-            false,
-            false
-        );
 
         $this->_assetFactory = $this->getMock(
             'Magento\View\Asset\PublicFileFactory',
@@ -131,7 +118,6 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
                 'cacheFrontendPool' => $this->_frontendPoolMock,
                 'design' => $designMock,
                 'assets' => $this->_assetsMock,
-                'config' => $this->_configMock,
                 'assetFileFactory' => $this->_assetFactory
             )
         );
@@ -143,7 +129,6 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
         $this->_frontendPoolMock = null;
         $this->_themeCustomization = null;
         $this->_assetsMock = null;
-        $this->_configMock = null;
         $this->_model = null;
     }
 
@@ -190,11 +175,4 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
         $observer = new \Magento\Event\Observer();
         $this->_model->applyThemeCustomization($observer);
     }
-
-    public function testProcessReinitConfig()
-    {
-        $observer = new \Magento\Event\Observer();
-        $this->_configMock->expects($this->once())->method('reinit');
-        $this->_model->processReinitConfig($observer);
-    }
 }
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 ea825e1ed73f83d71c111220b0aeaf1d669cbcfb..5d0c371866a9d1924fe5580b452955d8764ce8e2 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
@@ -268,7 +268,7 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
             $this->getMock('Magento\App\ConfigInterface', 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\Install\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),
             $this->getMock('Magento\Core\Model\Resource\Setup\MigrationFactory', array(), array(), '', false),
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php
index a0141f2a82703716eeccf3ec9bdb1b61d16a576e..c2b5bd8f56921f6ac0d4cbf381d2491b9cb4ad6c 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php
@@ -243,7 +243,7 @@ class EditorTest extends \PHPUnit_Framework_TestCase
         );
 
         $inlineMock = $this->getMock('Magento\Translate\Inline', array(), array(), '', false);
-        $aclFilterMock = $this->getMock('Magento\Core\Model\Layout\Filter\Acl', array(), array(), '', false);
+        $aclFilterMock = $this->getMock('Magento\Backend\Model\Layout\Filter\Acl', array(), array(), '', false);
 
         return array(
             array(
@@ -257,7 +257,7 @@ class EditorTest extends \PHPUnit_Framework_TestCase
             array('Magento\AuthorizationInterface', $authMock),
             array('Magento\Backend\Model\Session', $backendSession),
             array('Magento\Translate\Inline', $inlineMock),
-            array('Magento\Core\Model\Layout\Filter\Acl', $aclFilterMock)
+            array('Magento\Backend\Model\Layout\Filter\Acl', $aclFilterMock)
         );
     }
 }
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 1c2e9a8d9cff5d26521bf308b9c99ec07abbcbd2..b0629957cd45c86d1478056164b7092184ed0d24 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
@@ -190,7 +190,9 @@ class StandardTest extends \PHPUnit_Framework_TestCase
         $helperMock = $this->_getHelperMock($isVde);
         $backendSessionMock = $this->_getBackendSessionMock($isVde, $isLoggedIn);
         $stateMock = $this->_getStateModelMock($routers);
-        $rewriteServiceMock = $this->getMock('Magento\Core\App\Request\RewriteService', array(), array(), '', false);
+        $rewriteServiceMock = $this->getMock(
+            'Magento\UrlRewrite\App\Request\RewriteService', array(), array(), '', false
+        );
         $routerListMock = $this->getMock('Magento\App\RouterList',
             array(
                 'current',
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/AreaEmulatorTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/AreaEmulatorTest.php
index 2f7ea5e3b8ebd97a9e271e78d2210eaa05c9b1db..9f52a3947804b42fc3e175812d4c3008067d0182 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/AreaEmulatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/AreaEmulatorTest.php
@@ -46,10 +46,7 @@ class AreaEmulatorTest extends \PHPUnit_Framework_TestCase
         $configuration = array(
             'Magento\Core\Model\Layout' => array(
                 'arguments' => array(
-                    'area' => array(
-                        \Magento\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE => 'string',
-                        'value' => 'test_area'
-                    )
+                    'area' => 'test_area'
                 )
             )
         );
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/AbstractTemplateTest.php
similarity index 88%
rename from dev/tests/unit/testsuite/Magento/Core/Model/TemplateTest.php
rename to dev/tests/unit/testsuite/Magento/Email/Model/AbstractTemplateTest.php
index 82ad5fcf7e74d8c17fcb3981434646fdbf976c94..0fcea1ee3a52b6ec4b620a4816f8896fe28ef8b7 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/TemplateTest.php
+++ b/dev/tests/unit/testsuite/Magento/Email/Model/AbstractTemplateTest.php
@@ -26,16 +26,16 @@
  */
 
 /**
- * Test class for \Magento\Core\Model\Template.
+ * Test class for \Magento\Email\Model\AbstractTemplate.
  */
-namespace Magento\Core\Model;
+namespace Magento\Email\Model;
 
-class TemplateTest extends \PHPUnit_Framework_TestCase
+class AbstractTemplateTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * Template mock
      *
-     * @var \Magento\Core\Model\Template
+     * @var AbstractTemplate
      */
     protected $_model;
 
@@ -43,9 +43,9 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
     {
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
         $this->_model = $this->getMockForAbstractClass(
-            'Magento\Core\Model\Template',
+            'Magento\Email\Model\AbstractTemplate',
             $helper->getConstructArguments(
-                'Magento\Core\Model\Template',
+                'Magento\Email\Model\AbstractTemplate',
                 array(
                     'design' => $this->getMock('Magento\View\DesignInterface'),
                     'data' => array('area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, 'store' => 1)
diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/InstallTest.php b/dev/tests/unit/testsuite/Magento/Install/App/Action/Plugin/InstallTest.php
similarity index 94%
rename from dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/InstallTest.php
rename to dev/tests/unit/testsuite/Magento/Install/App/Action/Plugin/InstallTest.php
index c821be3268dec33dd9bd3cb3ff1ab0d9744f60c5..715444df815f7bf55d1952c750f90ad54ac71b43 100644
--- a/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/InstallTest.php
+++ b/dev/tests/unit/testsuite/Magento/Install/App/Action/Plugin/InstallTest.php
@@ -21,12 +21,12 @@
  * @copyright   Copyright (c) 2014 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\Action\Plugin;
+namespace Magento\Install\App\Action\Plugin;
 
 class InstallTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\App\Action\Plugin\Install
+     * @var \Magento\Install\App\Action\Plugin\Install
      */
     protected $_plugin;
 
@@ -70,7 +70,7 @@ class InstallTest extends \PHPUnit_Framework_TestCase
         };
         $this->subjectMock = $this->getMock('Magento\App\Action\Action', array(), array(), '', false);
         $this->requestMock = $this->getMock('Magento\App\RequestInterface');
-        $this->_plugin = new \Magento\Core\App\Action\Plugin\Install(
+        $this->_plugin = new \Magento\Install\App\Action\Plugin\Install(
             $this->_appStateMock,
             $this->_response,
             $this->_urlMock,
diff --git a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php
index 54e7b92e0b896bd147972f0cdea0c30b8c7664c4..c1b609c6b57c606623db798f69d2f4af9935e2ef 100644
--- a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php
+++ b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php
@@ -44,7 +44,7 @@ class IntegrationTest extends \PHPUnit_Framework_TestCase
     /** @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */
     protected $_objectManagerMock;
 
-    /** @var \Magento\Core\Model\Layout\Filter\Acl|\PHPUnit_Framework_MockObject_MockObject */
+    /** @var \Magento\Backend\Model\Layout\Filter\Acl|\PHPUnit_Framework_MockObject_MockObject */
     protected $_layoutFilterMock;
 
     /** @var \Magento\App\ConfigInterface|\PHPUnit_Framework_MockObject_MockObject */
@@ -121,7 +121,7 @@ class IntegrationTest extends \PHPUnit_Framework_TestCase
             'Magento\Event\ManagerInterface'
         )->disableOriginalConstructor()->getMock();
         $this->_layoutFilterMock = $this->getMockBuilder(
-            'Magento\Core\Model\Layout\Filter\Acl'
+            'Magento\Backend\Model\Layout\Filter\Acl'
         )->disableOriginalConstructor()->getMock();
         $this->_backendSessionMock = $this->getMockBuilder(
             'Magento\Backend\Model\Session'
@@ -884,7 +884,7 @@ HANDLE;
     {
         $map = array(
             array('Magento\App\ConfigInterface', $this->_configMock),
-            array('Magento\Core\Model\Layout\Filter\Acl', $this->_layoutFilterMock),
+            array('Magento\Backend\Model\Layout\Filter\Acl', $this->_layoutFilterMock),
             array('Magento\Backend\Model\Session', $this->_backendSessionMock),
             array('Magento\TranslateInterface', $this->_translateModelMock),
             array('Magento\Config\ScopeInterface', $this->_configScopeMock)
diff --git a/dev/tests/unit/testsuite/Magento/Message/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Message/ManagerTest.php
index 9a3d95d0fe013b157acc723370aec5336b9dd7ad..f5096d4f7e4ca3928d7e1055eeb602979d607b31 100644
--- a/dev/tests/unit/testsuite/Magento/Message/ManagerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Message/ManagerTest.php
@@ -258,6 +258,7 @@ class ManagerTest extends \PHPUnit_Framework_TestCase
      */
     public function testAddMessage($type, $methodName)
     {
+        $this->assertFalse($this->model->hasMessages());
         $message = 'Message';
         $messageCollection = $this->getMock('Magento\Message\Collection', array('addMessage'), array(), '', false);
         $this->session->expects($this->any())
@@ -265,11 +266,11 @@ class ManagerTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($messageCollection));
         $this->eventManager->expects($this->once())
             ->method('dispatch')->with('core_session_abstract_add_message');
-
         $this->messageFactory->expects($this->once())
             ->method('create')->with($type, $message)
             ->will($this->returnValue($this->messageMock));
         $this->model->$methodName($message, 'group');
+        $this->assertTrue($this->model->hasMessages());
     }
 
     public function addMessageDataProvider()
diff --git a/dev/tests/unit/testsuite/Magento/Newsletter/Controller/ManageTest.php b/dev/tests/unit/testsuite/Magento/Newsletter/Controller/ManageTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..217eecc6fd161c8b229895b6eadf5960269a8039
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Newsletter/Controller/ManageTest.php
@@ -0,0 +1,166 @@
+<?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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\Newsletter\Controller;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class ManageTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Newsletter\Controller\Manage
+     */
+    private $controller;
+
+    /**
+     * @var \Magento\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $requestMock;
+
+    /**
+     * @var \Magento\App\ResponseInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $responseMock;
+
+    /**
+     * @var \Magento\Message\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $messageManagerMock;
+
+    /**
+     * @var \Magento\App\Response\RedirectInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $redirectMock;
+
+    /**
+     * @var \Magento\Customer\Model\Session|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $customerSessionMock;
+
+    /**
+     * @var \Magento\Core\App\Action\FormKeyValidator|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $formKeyValidatorMock;
+
+    /**
+     * @var \Magento\Customer\Service\V1\CustomerAccountServiceInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $customerAccountServiceMock;
+
+    protected function setUp()
+    {
+        $this->requestMock = $this->getMockBuilder('Magento\App\RequestInterface')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->responseMock = $this->getMockBuilder('Magento\App\ResponseInterface')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->messageManagerMock = $this->getMockBuilder('Magento\Message\ManagerInterface')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->redirectMock = $this->getMockBuilder('Magento\App\Response\RedirectInterface')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->customerSessionMock = $this->getMockBuilder('Magento\Customer\Model\Session')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->customerSessionMock->expects($this->any())
+            ->method('isLoggedIn')
+            ->will($this->returnValue(true));
+        $this->formKeyValidatorMock = $this->getMockBuilder('Magento\Core\App\Action\FormKeyValidator')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->customerAccountServiceMock =
+            $this->getMockBuilder('Magento\Customer\Service\V1\CustomerAccountServiceInterface')
+                ->disableOriginalConstructor()
+                ->getMock();
+        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $this->controller = $objectManager->getObject('Magento\Newsletter\Controller\Manage', [
+                'request' => $this->requestMock,
+                'response' => $this->responseMock,
+                'messageManager' => $this->messageManagerMock,
+                'redirect' => $this->redirectMock,
+                'customerSession' => $this->customerSessionMock,
+                'formKeyValidator' => $this->formKeyValidatorMock,
+                'customerAccountService' => $this->customerAccountServiceMock
+            ]);
+    }
+
+    public function testSaveActionInvalidFormKey()
+    {
+        $this->formKeyValidatorMock->expects($this->once())
+            ->method('validate')
+            ->will($this->returnValue(false));
+        $this->redirectMock->expects($this->once())
+            ->method('redirect')
+            ->with($this->responseMock, 'customer/account/', []);
+        $this->messageManagerMock->expects($this->never())
+            ->method('addSuccess');
+        $this->messageManagerMock->expects($this->never())
+            ->method('addError');
+        $this->controller->saveAction();
+    }
+
+    public function testSaveActionNoCustomerInSession()
+    {
+        $this->formKeyValidatorMock->expects($this->once())
+            ->method('validate')
+            ->will($this->returnValue(true));
+        $this->customerSessionMock->expects($this->any())
+            ->method('getCustomerId')
+            ->will($this->returnValue(null));
+        $this->redirectMock->expects($this->once())
+            ->method('redirect')
+            ->with($this->responseMock, 'customer/account/', []);
+        $this->messageManagerMock->expects($this->never())
+            ->method('addSuccess');
+        $this->messageManagerMock->expects($this->once())
+            ->method('addError')
+            ->with('Something went wrong while saving your subscription.');
+        $this->controller->saveAction();
+    }
+
+    public function testSaveActionWithException()
+    {
+        $this->formKeyValidatorMock->expects($this->once())
+            ->method('validate')
+            ->will($this->returnValue(true));
+        $this->customerSessionMock->expects($this->any())
+            ->method('getCustomerId')
+            ->will($this->returnValue(1));
+        $this->customerAccountServiceMock->expects($this->any())
+            ->method('getCustomer')
+            ->will($this->throwException(new \Magento\Exception\NoSuchEntityException('customerId', 'value')));
+        $this->redirectMock->expects($this->once())
+            ->method('redirect')
+            ->with($this->responseMock, 'customer/account/', []);
+        $this->messageManagerMock->expects($this->never())
+            ->method('addSuccess');
+        $this->messageManagerMock->expects($this->once())
+            ->method('addError')
+            ->with('Something went wrong while saving your subscription.');
+        $this->controller->saveAction();
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Argument/Interpreter/ObjectTest.php b/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Argument/Interpreter/ObjectTest.php
deleted file mode 100644
index 747a0e5fe9322d9da12d26715967103972b38ad8..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Argument/Interpreter/ObjectTest.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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\ObjectManager\Config\Argument\Interpreter;
-
-use Magento\Stdlib\BooleanUtils;
-
-class ObjectTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @param array $data
-     * @param string $className
-     * @param bool $isShared
-     * @dataProvider evaluateDataProvider
-     */
-    public function testEvaluate($data, $className, $isShared)
-    {
-        $expected = new \StdClass();
-        $factory = $this->getMock(
-            '\Magento\ObjectManager\Config\Argument\ObjectFactory',
-            array('create'),
-            array(),
-            '',
-            false
-        );
-        $factory->expects(
-            $this->once()
-        )->method(
-            'create'
-        )->with(
-            $className,
-            $isShared
-        )->will(
-            $this->returnValue($expected)
-        );
-        $interpreter = new Object(new BooleanUtils(), $factory);
-        $this->assertSame($expected, $interpreter->evaluate($data));
-    }
-
-    /**
-     * @return array
-     */
-    public function evaluateDataProvider()
-    {
-        return array(
-            array(array('value' => 'Class'), 'Class', false),
-            array(array('value' => 'Class', 'shared' => false), 'Class', false),
-            array(array('value' => 'Class', 'shared' => 0), 'Class', false),
-            array(array('value' => 'Class', 'shared' => '0'), 'Class', false),
-            array(array('value' => 'Class', 'shared' => 'false'), 'Class', false),
-            array(array('value' => 'Class', 'shared' => true), 'Class', true),
-            array(array('value' => 'Class', 'shared' => 1), 'Class', true),
-            array(array('value' => 'Class', 'shared' => '1'), 'Class', true),
-            array(array('value' => 'Class', 'shared' => 'true'), 'Class', true)
-        );
-    }
-
-    /**
-     * @param array $data
-     * @dataProvider evaluateErrorDataProvider
-     * @expectedException \InvalidArgumentException
-     * @expectedExceptionMessage Object class name is missing.
-     */
-    public function testEvaluateNoClass($data)
-    {
-        $factory = $this->getMock('\Magento\ObjectManager\Config\Argument\ObjectFactory', array(), array(), '', false);
-        $interpreter = new Object(new BooleanUtils(), $factory);
-        $interpreter->evaluate($data);
-    }
-
-    /**
-     * @return array
-     */
-    public function evaluateErrorDataProvider()
-    {
-        return array(
-            array(array()),
-            array(array('value' => '')),
-            array(array('value' => false)),
-            array(array('value' => 0))
-        );
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Argument/ObjectFactoryTest.php b/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Argument/ObjectFactoryTest.php
deleted file mode 100644
index d9b37f898cd30295ad7b6cbfcae82ff3faa7bd5e..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Argument/ObjectFactoryTest.php
+++ /dev/null
@@ -1,106 +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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\ObjectManager\Config\Argument;
-
-class ObjectFactoryTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\ObjectManager
-     */
-    private $objectManager;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\ObjectManager\Config
-     */
-    private $config;
-
-    protected function setUp()
-    {
-        $this->objectManager = $this->getMockForAbstractClass('\Magento\ObjectManager');
-        $this->config = $this->getMockForAbstractClass('\Magento\ObjectManager\Config');
-    }
-
-    public function testSetGetObjectManager()
-    {
-        $factory = new ObjectFactory($this->config);
-        $factory->setObjectManager($this->objectManager);
-        $this->objectManager->expects($this->once())->method('create');
-        $factory->create('type', false);
-    }
-
-    /**
-     * @expectedException \LogicException
-     * @expectedExceptionMessage Object manager has not been assigned yet.
-     */
-    public function testGetObjectManagerException()
-    {
-        $factory = new ObjectFactory($this->config);
-        $factory->create('type', false);
-    }
-
-    /**
-     * @param bool $isShared
-     * @param string $expectedMethod
-     * @dataProvider createDataProvider
-     */
-    public function testCreateLookup($isShared, $expectedMethod)
-    {
-        $value = new \StdClass();
-        $factory = new ObjectFactory($this->config, $this->objectManager);
-        $this->objectManager->expects(
-            $this->once()
-        )->method(
-            $expectedMethod
-        )->with(
-            'type'
-        )->will(
-            $this->returnValue($value)
-        );
-        $this->config->expects($this->once())->method('isShared')->with('type')->will($this->returnValue($isShared));
-        $this->assertSame($value, $factory->create('type'));
-    }
-
-    /**
-     * Returns "is shared" and expectation of which ObjectManager method should be called depending on it
-     *
-     * @return array
-     */
-    public function createDataProvider()
-    {
-        return array(array(true, 'get'), array(false, 'create'));
-    }
-
-    /**
-     * @param bool $isShared
-     * @param string $expectedMethod
-     * @dataProvider createDataProvider
-     */
-    public function testCreateNoLookup($isShared, $expectedMethod)
-    {
-        $factory = new ObjectFactory($this->config, $this->objectManager);
-        $this->objectManager->expects($this->once())->method($expectedMethod)->with('type');
-        $this->config->expects($this->never())->method('isShared');
-        $factory->create('type', $isShared);
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/DomTest.php b/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/DomTest.php
index e544fa4a0f26fee8c3cf199b27c87ec35270b634..798efab9fc3a381e66e60c4a43347df73edfe30a 100644
--- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/DomTest.php
+++ b/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/DomTest.php
@@ -30,6 +30,11 @@ class DomTest extends \PHPUnit_Framework_TestCase
      */
     protected $_mapper;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $argumentInterpreter;
+
     protected function setUp()
     {
         $argumentParser = $this->getMock('\Magento\ObjectManager\Config\Mapper\ArgumentParser');
@@ -50,7 +55,17 @@ class DomTest extends \PHPUnit_Framework_TestCase
             $this->returnValueMap(array(array('true', true), array('false', false)))
         );
 
-        $this->_mapper = new Dom($booleanUtils, $argumentParser);
+        $this->argumentInterpreter = $this->getMock('Magento\Data\Argument\InterpreterInterface');
+        $this->argumentInterpreter->expects(
+            $this->any()
+        )->method(
+            'evaluate'
+        )->with(
+            array('xsi:type' => 'string', 'value' => 'test value')
+        )->will(
+            $this->returnValue('test value')
+        );
+        $this->_mapper = new Dom($this->argumentInterpreter, $booleanUtils, $argumentParser);
     }
 
     public function testConvert()
@@ -74,7 +89,7 @@ class DomTest extends \PHPUnit_Framework_TestCase
     {
         $this->assertNotEmpty($argument->getAttribute('name'));
         $this->assertNotEmpty($argument->getAttribute('xsi:type'));
-        return 'test value';
+        return array('xsi:type' => 'string', 'value' => 'test value');
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/FactoryTest.php b/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/FactoryTest.php
index e37756545c3f0e4a14dc6732a8f6e18a65bdd523..9201e6528f82774d38ce02b6b5177019923bd73f 100644
--- a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/FactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/FactoryTest.php
@@ -25,7 +25,6 @@ namespace Magento\ObjectManager\Factory;
 
 use Magento\ObjectManager\Config\Config;
 use Magento\ObjectManager\ObjectManager;
-use Magento\ObjectManager\Config\Argument\ObjectFactory;
 
 class FactoryTest extends \PHPUnit_Framework_TestCase
 {
@@ -39,29 +38,17 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
      */
     private $config;
 
-    /**
-     * @var ObjectFactory
-     */
-    private $objectFactory;
-
     /**
      * @var ObjectManager
      */
     private $objectManager;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    private $interpreterMock;
-
     protected function setUp()
     {
         $this->config = new Config();
-        $this->objectFactory = new ObjectFactory($this->config);
-        $this->interpreterMock = $this->getMockForAbstractClass('\Magento\Data\Argument\InterpreterInterface');
-        $this->factory = new Factory($this->config, $this->interpreterMock, $this->objectFactory);
+        $this->factory = new Factory($this->config);
         $this->objectManager = new ObjectManager($this->factory, $this->config);
-        $this->objectFactory->setObjectManager($this->objectManager);
+        $this->factory->setObjectManager($this->objectManager);
     }
 
     public function testCreateNoArgs()
@@ -89,12 +76,11 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
 
         $this->factory = new Factory(
             $configMock,
-            $this->interpreterMock,
-            $this->objectFactory,
+            null,
             $definitionsMock
         );
         $this->objectManager = new ObjectManager($this->factory, $this->config);
-        $this->objectFactory->setObjectManager($this->objectManager);
+        $this->factory->setObjectManager($this->objectManager);
         $this->factory->create('Magento\ObjectManager\Factory\Fixture\OneScalar', array('foo' => 'bar'));
     }
 
@@ -112,16 +98,10 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
         $this->config->extend(
             array(
                 'Magento\ObjectManager\Factory\Fixture\OneScalar' => array(
-                    'arguments' => array('foo' => array('value' => 'bar'))
+                    'arguments' => array('foo' => 'bar')
                 )
             )
         );
-        $this->interpreterMock
-            ->expects($this->once())
-            ->method('evaluate')
-            ->with(array('value' => 'bar'))
-            ->will($this->returnValue('bar'))
-        ;
         /** @var \Magento\ObjectManager\Factory\Fixture\Two $result */
         $result = $this->factory->create('Magento\ObjectManager\Factory\Fixture\Two');
         $this->assertInstanceOf('\Magento\ObjectManager\Factory\Fixture\Two', $result);
@@ -163,12 +143,12 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
         $definitions = $this->getMockForAbstractClass('\Magento\ObjectManager\Definition');
         // should be more than defined in "switch" of create() method
         $definitions->expects($this->once())->method('getParameters')->with($type)->will($this->returnValue(array(
-            array('one', 'int', false, null), array('two', 'int', false, null), array('three', 'int', false, null),
-            array('four', 'int', false, null), array('five', 'int', false, null), array('six', 'int', false, null),
-            array('seven', 'int', false, null), array('eight', 'int', false, null), array('nine', 'int', false, null),
-            array('ten', 'int', false, null),
+            array('one', null, false, null), array('two', null, false, null), array('three', null, false, null),
+            array('four', null, false, null), array('five', null, false, null), array('six', null, false, null),
+            array('seven', null, false, null), array('eight', null, false, null), array('nine', null, false, null),
+            array('ten', null, false, null),
         )));
-        $factory = new Factory($this->config, $this->interpreterMock, $this->objectFactory, $definitions);
+        $factory = new Factory($this->config, null, $definitions);
         $result = $factory->create($type, array(
             'one' => 1, 'two' => 2, 'three' => 3, 'four' => 4, 'five' => 5,
             'six' => 6, 'seven' => 7, 'eight' => 8, 'nine' => 9, 'ten' => 10,
diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/ObjectManagerTest.php b/dev/tests/unit/testsuite/Magento/ObjectManager/ObjectManagerTest.php
index 4a9faf1169195b6f493f7853dab67667d46a3e4f..1fa30d9a6fbf260c170a6fb4ce34f49d7665927c 100644
--- a/dev/tests/unit/testsuite/Magento/ObjectManager/ObjectManagerTest.php
+++ b/dev/tests/unit/testsuite/Magento/ObjectManager/ObjectManagerTest.php
@@ -40,30 +40,15 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
      */
     protected $_object;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_argInterpreterMock;
-
     protected function setUp()
     {
-        $this->_argInterpreterMock = $this->getMock(
-            '\Magento\Data\Argument\InterpreterInterface',
-            array(),
-            array(),
-            '',
-            false
-        );
         $config = new \Magento\ObjectManager\Config\Config(new \Magento\ObjectManager\Relations\Runtime());
-        $argObjectFactory = new \Magento\ObjectManager\Config\Argument\ObjectFactory($config);
-        $factory = new \Magento\ObjectManager\Factory\Factory(
-            $config,
-            $this->_argInterpreterMock,
-            $argObjectFactory,
-            null
-        );
+        $factory = new \Magento\ObjectManager\Factory\Factory($config, null, null, array(
+            'first_param' => 'first_param_value',
+            'second_param' => 'second_param_value'
+        ));
         $this->_object = new \Magento\ObjectManager\ObjectManager($factory, $config);
-        $argObjectFactory->setObjectManager($this->_object);
+        $factory->setObjectManager($this->_object);
     }
 
     public function testCreateCreatesNewInstanceEveryTime()
@@ -143,20 +128,6 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
 
     public function testCreateResolvesScalarParametersAutomatically()
     {
-        $childAMock = $this->getMock('Magento\Test\Di\Child\A', array(), array(), '', false);
-        $this->_argInterpreterMock->expects(
-            $this->any()
-        )->method(
-            'evaluate'
-        )->will(
-            $this->returnValueMap(
-                array(
-                    array(array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\Child\A'), $childAMock),
-                    array(array('xsi:type' => 'string', 'value' => 'scalarValue'), 'scalarValue')
-                )
-            )
-        );
-
         $this->_object->configure(
             array(
                 'preferences' => array(
@@ -165,8 +136,8 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
                 ),
                 'Magento\Test\Di\Aggregate\AggregateParent' => array(
                     'arguments' => array(
-                        'child' => array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\Child\A'),
-                        'scalar' => array('xsi:type' => 'string', 'value' => 'scalarValue')
+                        'child' => array('instance' => 'Magento\Test\Di\Child\A'),
+                        'scalar' => 'scalarValue'
                     )
                 )
             )
@@ -191,7 +162,7 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
                 ),
                 'Magento\Test\Di\DiInterface' => array('shared' => 0),
                 'Magento\Test\Di\Aggregate\AggregateParent' => array(
-                    'arguments' => array('scalar' => array('xsi:type' => 'string', 'value' => 'scalarValue'))
+                    'arguments' => array('scalar' => 'scalarValue')
                 )
             )
         );
@@ -233,26 +204,6 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
 
     public function testCreateCreatesPreconfiguredInstance()
     {
-        $this->_argInterpreterMock->expects(
-            $this->any()
-        )->method(
-            'evaluate'
-        )->will(
-            $this->returnValueMap(
-                array(
-                    array(array('xsi:type' => 'string', 'value' => 'configuredScalar'), 'configuredScalar'),
-                    array(
-                        array('xsi:type' => 'string', 'value' => 'configuredSecondScalar'),
-                        'configuredSecondScalar'
-                    ),
-                    array(
-                        array('xsi:type' => 'string', 'value' => 'configuredOptionalScalar'),
-                        'configuredOptionalScalar'
-                    )
-                )
-            )
-        );
-
         $this->_object->configure(
             array(
                 'preferences' => array(
@@ -262,9 +213,9 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
                 'customChildType' => array(
                     'type' => 'Magento\Test\Di\Aggregate\Child',
                     'arguments' => array(
-                        'scalar' => array('xsi:type' => 'string', 'value' => 'configuredScalar'),
-                        'secondScalar' => array('xsi:type' => 'string', 'value' => 'configuredSecondScalar'),
-                        'secondOptionalScalar' => array('xsi:type' => 'string', 'value' => 'configuredOptionalScalar')
+                        'scalar' => 'configuredScalar',
+                        'secondScalar' => 'configuredSecondScalar',
+                        'secondOptionalScalar' => 'configuredOptionalScalar'
                     )
                 )
             )
@@ -280,32 +231,14 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
 
     public function testParameterShareabilityConfigurationIsApplied()
     {
-        $diParentMock = $this->getMock('Magento\Test\Di\DiParent', array(), array(), '', false);
-        $this->_argInterpreterMock->expects($this->any())->method('evaluate')->will(
-            $this->returnCallback(
-                function (array $array) use ($diParentMock) {
-                    if ($array === array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\DiParent')) {
-                        return $diParentMock;
-                    } elseif ($array === array(
-                        'xsi:type' => 'object',
-                        'value' => 'Magento\Test\Di\DiParent',
-                        'shared' => false
-                    )
-                    ) {
-                        return $this->getMock('Magento\Test\Di\DiParent', array(), array(), '', false);
-                    }
-                }
-            )
-        );
-
         $this->_object->configure(
             array(
                 'customChildType' => array(
                     'type' => 'Magento\Test\Di\Aggregate\Child',
                     'arguments' => array(
-                        'interface' => array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\DiParent'),
-                        'scalar' => array('xsi:type' => 'string', 'value' => 'configuredScalar'),
-                        'secondScalar' => array('xsi:type' => 'string', 'value' => 'configuredSecondScalar')
+                        'interface' => array('instance' => 'Magento\Test\Di\DiParent'),
+                        'scalar' => 'configuredScalar',
+                        'secondScalar' => 'configuredSecondScalar'
                     )
                 )
             )
@@ -320,8 +253,7 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
                 'customChildType' => array(
                     'arguments' => array(
                         'interface' => array(
-                            'xsi:type' => 'object',
-                            'value' => 'Magento\Test\Di\DiParent',
+                            'instance' => 'Magento\Test\Di\DiParent',
                             'shared' => false
                         )
                     )
@@ -336,25 +268,14 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
 
     public function testTypeShareabilityConfigurationIsApplied()
     {
-        $diParentMock = $this->getMock('Magento\Test\Di\DiParent', array(), array(), '', false);
-        $this->_argInterpreterMock->expects(
-            $this->any()
-        )->method(
-            'evaluate'
-        )->will(
-            $this->returnValueMap(
-                array(array(array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\DiParent'), $diParentMock))
-            )
-        );
-
         $this->_object->configure(
             array(
                 'customChildType' => array(
                     'type' => 'Magento\Test\Di\Aggregate\Child',
                     'arguments' => array(
-                        'interface' => array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\DiParent'),
-                        'scalar' => array('xsi:type' => 'string', 'value' => 'configuredScalar'),
-                        'secondScalar' => array('xsi:type' => 'string', 'value' => 'configuredSecondScalar')
+                        'interface' => array('instance' => 'Magento\Test\Di\DiParent'),
+                        'scalar' => 'configuredScalar',
+                        'secondScalar' => 'configuredSecondScalar'
                     )
                 )
             )
@@ -377,33 +298,15 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
 
     public function testParameterShareabilityConfigurationOverridesTypeShareability()
     {
-        $diParentMock = $this->getMock('Magento\Test\Di\DiParent', array(), array(), '', false);
-        $this->_argInterpreterMock->expects($this->any())->method('evaluate')->will(
-            $this->returnCallback(
-                function (array $array) use ($diParentMock) {
-                    if ($array === array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\DiParent')) {
-                        return $this->_object->create('Magento\Test\Di\DiParent');
-                    } elseif ($array === array(
-                        'xsi:type' => 'object',
-                        'value' => 'Magento\Test\Di\DiParent',
-                        'shared' => true
-                    )
-                    ) {
-                        return $diParentMock;
-                    }
-                }
-            )
-        );
-
         $this->_object->configure(
             array(
                 'Magento\Test\Di\DiParent' => array('shared' => false),
                 'customChildType' => array(
                     'type' => 'Magento\Test\Di\Aggregate\Child',
                     'arguments' => array(
-                        'interface' => array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\DiParent'),
-                        'scalar' => array('xsi:type' => 'string', 'value' => 'configuredScalar'),
-                        'secondScalar' => array('xsi:type' => 'string', 'value' => 'configuredSecondScalar')
+                        'interface' => array('instance' => 'Magento\Test\Di\DiParent'),
+                        'scalar' => 'configuredScalar',
+                        'secondScalar' => 'configuredSecondScalar'
                     )
                 )
             )
@@ -418,8 +321,7 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
                 'customChildType' => array(
                     'arguments' => array(
                         'interface' => array(
-                            'xsi:type' => 'object',
-                            'value' => 'Magento\Test\Di\DiParent',
+                            'instance' => 'Magento\Test\Di\DiParent',
                             'shared' => true
                         )
                     )
@@ -434,66 +336,37 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
 
     public function testGlobalArgumentsCanBeConfigured()
     {
-        $this->_argInterpreterMock->expects(
-            $this->any()
-        )->method(
-            'evaluate'
-        )->will(
-            $this->returnValueMap(
-                array(
-                    array(array('xsi:type' => 'init_parameter', 'value' => 'one'), 'first_val'),
-                    array(array('xsi:type' => 'init_parameter', 'value' => 'two'), 'second_val')
-                )
-            )
-        );
-
         $this->_object->configure(
             array(
                 'preferences' => array('Magento\Test\Di\DiInterface' => 'Magento\Test\Di\DiParent'),
                 'Magento\Test\Di\Aggregate\AggregateParent' => array(
                     'arguments' => array(
-                        'scalar' => array('xsi:type' => 'init_parameter', 'value' => 'one'),
-                        'optionalScalar' => array('xsi:type' => 'init_parameter', 'value' => 'two')
+                        'scalar' => array('argument' => 'first_param'),
+                        'optionalScalar' => array('argument' => 'second_param')
                     )
                 )
             )
         );
         /** @var $result \Magento\Test\Di\Aggregate\AggregateParent */
         $result = $this->_object->create('Magento\Test\Di\Aggregate\AggregateParent');
-        $this->assertEquals('first_val', $result->scalar);
-        $this->assertEquals('second_val', $result->optionalScalar);
+        $this->assertEquals('first_param_value', $result->scalar);
+        $this->assertEquals('second_param_value', $result->optionalScalar);
     }
 
     public function testConfiguredArgumentsAreInherited()
     {
-        $diParentMock = $this->getMock('Magento\Test\Di\DiParent', array(), array(), '', false);
-        $this->_argInterpreterMock->expects(
-            $this->any()
-        )->method(
-            'evaluate'
-        )->will(
-            $this->returnValueMap(
-                array(
-                    array(array('xsi:type' => 'init_parameter', 'value' => 'one'), 'first_val'),
-                    array(array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\DiParent'), $diParentMock),
-                    array(array('xsi:type' => 'string', 'value' => 'parentOptionalScalar'), 'parentOptionalScalar'),
-                    array(array('xsi:type' => 'string', 'value' => 'childSecondScalar'), 'childSecondScalar')
-                )
-            )
-        );
-
         $this->_object->configure(
             array(
                 'Magento\Test\Di\Aggregate\AggregateParent' => array(
                     'arguments' => array(
-                        'interface' => array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\DiParent'),
-                        'scalar' => array('xsi:type' => 'init_parameter', 'value' => 'one'),
-                        'optionalScalar' => array('xsi:type' => 'string', 'value' => 'parentOptionalScalar')
+                        'interface' => array('instance' => 'Magento\Test\Di\DiParent'),
+                        'scalar' => array('argument' => 'first_param'),
+                        'optionalScalar' => 'parentOptionalScalar'
                     )
                 ),
                 'Magento\Test\Di\Aggregate\Child' => array(
                     'arguments' => array(
-                        'secondScalar' => array('xsi:type' => 'string', 'value' => 'childSecondScalar')
+                        'secondScalar' => 'childSecondScalar'
                     )
                 )
             )
@@ -502,44 +375,28 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
         /** @var $result \Magento\Test\Di\Aggregate\AggregateParent */
         $result = $this->_object->create('Magento\Test\Di\Aggregate\Child');
         $this->assertInstanceOf('Magento\Test\Di\DiParent', $result->interface);
-        $this->assertEquals('first_val', $result->scalar);
+        $this->assertEquals('first_param_value', $result->scalar);
         $this->assertEquals('childSecondScalar', $result->secondScalar);
         $this->assertEquals('parentOptionalScalar', $result->optionalScalar);
     }
 
     public function testConfiguredArgumentsOverrideInheritedArguments()
     {
-        $diChildMock = $this->getMock('Magento\Test\Di\Child', array(), array(), '', false);
-        $this->_argInterpreterMock->expects(
-            $this->any()
-        )->method(
-            'evaluate'
-        )->will(
-            $this->returnValueMap(
-                array(
-                    array(array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\Child'), $diChildMock),
-                    array(array('xsi:type' => 'init_parameter', 'value' => 'two'), 'second_val'),
-                    array(array('xsi:type' => 'string', 'value' => 'childSecondScalar'), 'childSecondScalar'),
-                    array(array('xsi:type' => 'string', 'value' => 'childOptionalScalar'), 'childOptionalScalar')
-                )
-            )
-        );
-
         $this->_object->configure(
             array(
                 'Magento\Test\Di\Aggregate\AggregateParent' => array(
                     'arguments' => array(
-                        'interface' => array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\DiParent'),
-                        'scalar' => array('xsi:type' => 'init_parameter', 'value' => 'one'),
-                        'optionalScalar' => array('xsi:type' => 'string', 'value' => 'parentOptionalScalar')
+                        'interface' => array('instance' => 'Magento\Test\Di\DiParent'),
+                        'scalar' => array('argument' => 'first_param'),
+                        'optionalScalar' => 'parentOptionalScalar'
                     )
                 ),
                 'Magento\Test\Di\Aggregate\Child' => array(
                     'arguments' => array(
-                        'interface' => array('xsi:type' => 'object', 'value' => 'Magento\Test\Di\Child'),
-                        'scalar' => array('xsi:type' => 'init_parameter', 'value' => 'two'),
-                        'secondScalar' => array('xsi:type' => 'string', 'value' => 'childSecondScalar'),
-                        'optionalScalar' => array('xsi:type' => 'string', 'value' => 'childOptionalScalar')
+                        'interface' => array('instance' => 'Magento\Test\Di\Child'),
+                        'scalar' => array('argument' => 'second_param'),
+                        'secondScalar' => 'childSecondScalar',
+                        'optionalScalar' => 'childOptionalScalar'
                     )
                 )
             )
@@ -548,7 +405,7 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
         /** @var $result \Magento\Test\Di\Aggregate\AggregateParent */
         $result = $this->_object->create('Magento\Test\Di\Aggregate\Child');
         $this->assertInstanceOf('Magento\Test\Di\Child', $result->interface);
-        $this->assertEquals('second_val', $result->scalar);
+        $this->assertEquals('second_param_value', $result->scalar);
         $this->assertEquals('childSecondScalar', $result->secondScalar);
         $this->assertEquals('childOptionalScalar', $result->optionalScalar);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Request/RewriteServiceTest.php b/dev/tests/unit/testsuite/Magento/UrlRewrite/App/Request/RewriteServiceTest.php
similarity index 89%
rename from dev/tests/unit/testsuite/Magento/Core/App/Request/RewriteServiceTest.php
rename to dev/tests/unit/testsuite/Magento/UrlRewrite/App/Request/RewriteServiceTest.php
index 16268abf467f79e3e8aae94b3116545d87fe57d8..d3b2ccaccea93b227c342e63fc7f1e57e15db0c1 100644
--- a/dev/tests/unit/testsuite/Magento/Core/App/Request/RewriteServiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/UrlRewrite/App/Request/RewriteServiceTest.php
@@ -21,12 +21,12 @@
  * @copyright   Copyright (c) 2014 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\Request;
+namespace Magento\UrlRewrite\App\Request;
 
 class RewriteServiceTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Core\App\Request\RewriteService
+     * @var \Magento\UrlRewrite\App\Request\RewriteService
      */
     protected $_model;
 
@@ -56,14 +56,14 @@ class RewriteServiceTest extends \PHPUnit_Framework_TestCase
         $this->_configMock = $this->getMock('\Magento\App\ConfigInterface', array(), array(), '', false);
         $this->_requestMock = $this->getMock('\Magento\App\Request\Http', array(), array(), '', false);
         $this->_rewriteFactoryMock = $this->getMock(
-            '\Magento\Core\Model\Url\RewriteFactory',
+            '\Magento\UrlRewrite\Model\UrlRewriteFactory',
             array('create'),
             array(),
             '',
             false
         );
 
-        $this->_model = new \Magento\Core\App\Request\RewriteService(
+        $this->_model = new \Magento\UrlRewrite\App\Request\RewriteService(
             $this->_routerListMock,
             $this->_rewriteFactoryMock,
             $this->_configMock
@@ -80,7 +80,7 @@ class RewriteServiceTest extends \PHPUnit_Framework_TestCase
     public function testApplyRewritesWhenRequestIsNotStraight()
     {
         $this->_requestMock->expects($this->once())->method('isStraight')->will($this->returnValue(false));
-        $urlRewriteMock = $this->getMock('\Magento\Core\Model\Url\Rewrite', array(), array(), '', false);
+        $urlRewriteMock = $this->getMock('\Magento\UrlRewrite\Model\UrlRewrite', array(), array(), '', false);
         $this->_rewriteFactoryMock->expects(
             $this->once()
         )->method(
diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/Url/RewriteTest.php b/dev/tests/unit/testsuite/Magento/UrlRewrite/Helper/UrlRewriteTest.php
similarity index 86%
rename from dev/tests/unit/testsuite/Magento/Core/Helper/Url/RewriteTest.php
rename to dev/tests/unit/testsuite/Magento/UrlRewrite/Helper/UrlRewriteTest.php
index 7c75be7115dcc5d3206c6dfc8ca68e7bc8e2fbdb..b2b3d52a98d9ba7fb9cd5132eb972def0d8995b1 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Helper/Url/RewriteTest.php
+++ b/dev/tests/unit/testsuite/Magento/UrlRewrite/Helper/UrlRewriteTest.php
@@ -18,19 +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_Core
  * @subpackage  unit_tests
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
+namespace Magento\UrlRewrite\Helper;
 
-/**
- * Test for \Magento\Core\Helper\Url\RewriteTest
- */
-namespace Magento\Core\Helper\Url;
-
-class RewriteTest extends \PHPUnit_Framework_TestCase
+class UrlRewriteTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * Test hasRedirectOptions
@@ -40,7 +34,7 @@ class RewriteTest extends \PHPUnit_Framework_TestCase
     public function testHasRedirectOptions($option, $expected)
     {
         $optionsMock = $this->getMock(
-            'Magento\Core\Model\Source\Urlrewrite\Options',
+            'Magento\UrlRewrite\Model\UrlRewrite\OptionProvider',
             array('getRedirectOptions'),
             array(),
             '',
@@ -48,7 +42,7 @@ class RewriteTest extends \PHPUnit_Framework_TestCase
             false
         );
         $optionsMock->expects($this->any())->method('getRedirectOptions')->will($this->returnValue(array('R', 'RP')));
-        $helper = new \Magento\Core\Helper\Url\Rewrite(
+        $helper = new \Magento\UrlRewrite\Helper\UrlRewrite(
             $this->getMock('Magento\App\Helper\Context', array(), array(), '', false, false),
             $optionsMock
         );
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Source/Urlrewrite/OptionsTest.php b/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/UrlRewrite/OptionProviderTest.php
similarity index 79%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Source/Urlrewrite/OptionsTest.php
rename to dev/tests/unit/testsuite/Magento/UrlRewrite/Model/UrlRewrite/OptionProviderTest.php
index 7c8ee511d531d5c29835c891c2d0b87d34f3f639..dee5cb6f3ab0a1b19383c45b0791f7331e45c996 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Source/Urlrewrite/OptionsTest.php
+++ b/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/UrlRewrite/OptionProviderTest.php
@@ -26,18 +26,18 @@
  */
 
 /**
- * Test class for \Magento\Core\Model\Source\Urlrewrite\OptionsTest.
+ * Test class for \Magento\UrlRewrite\Model\UrlRewrite\OptionProvider.
  */
-namespace Magento\Core\Model\Source\Urlrewrite;
+namespace Magento\UrlRewrite\Model\UrlRewrite;
 
-class OptionsTest extends \PHPUnit_Framework_TestCase
+class OptionProviderTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @covers \Magento\Core\Model\Source\Urlrewrite\Options::getAllOptions
+     * @covers \Magento\UrlRewrite\Model\UrlRewrite\OptionProvider::getAllOptions
      */
     public function testGetAllOptions()
     {
-        $model = new \Magento\Core\Model\Source\Urlrewrite\Options();
+        $model = new \Magento\UrlRewrite\Model\UrlRewrite\OptionProvider();
         $options = $model->getAllOptions();
         $this->assertInternalType('array', $options);
         $expectedOptions = array('' => 'No', 'R' => 'Temporary (302)', 'RP' => 'Permanent (301)');
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Source/Urlrewrite/TypesTest.php b/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/UrlRewrite/TypeProviderTest.php
similarity index 77%
rename from dev/tests/unit/testsuite/Magento/Core/Model/Source/Urlrewrite/TypesTest.php
rename to dev/tests/unit/testsuite/Magento/UrlRewrite/Model/UrlRewrite/TypeProviderTest.php
index 4114ea3004f7ef4505301530260ede9657396afd..c2976bceb312beeba52a8268064631725fd4cf87 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Source/Urlrewrite/TypesTest.php
+++ b/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/UrlRewrite/TypeProviderTest.php
@@ -18,26 +18,20 @@
  * 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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
+namespace Magento\UrlRewrite\Model\UrlRewrite;
 
-/**
- * Test class for \Magento\Core\Model\Source\Urlrewrite\Types.
- */
-namespace Magento\Core\Model\Source\Urlrewrite;
-
-class TypesTest extends \PHPUnit_Framework_TestCase
+class TypeProviderTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @covers \Magento\Core\Model\Source\Urlrewrite\Types::getAllOptions
+     * @covers \Magento\UrlRewrite\Model\UrlRewrite\TypeProvider::getAllOptions
      */
     public function testGetAllOptions()
     {
-        $model = new \Magento\Core\Model\Source\Urlrewrite\Types();
+        $model = new \Magento\UrlRewrite\Model\UrlRewrite\TypeProvider();
         $options = $model->getAllOptions();
         $this->assertInternalType('array', $options);
         $expectedOptions = array(1 => 'System', 0 => 'Custom');
diff --git a/dev/tests/unit/testsuite/Magento/Validator/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Validator/BuilderTest.php
index 16c4572b318892d0c42c85dd0d7f24eb258b712a..5fa381ed27344789458e9764ec852e9af801189b 100644
--- a/dev/tests/unit/testsuite/Magento/Validator/BuilderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Validator/BuilderTest.php
@@ -47,17 +47,10 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
     {
         $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
 
-        $argInterpreter = $this->getMock('\Magento\Data\Argument\InterpreterInterface', array(), array(), '', false);
-        $argObjectFactory = $this->getMock(
-            '\Magento\ObjectManager\Config\Argument\ObjectFactory',
-            array(),
-            array(),
-            '',
-            false
-        );
         $config = new \Magento\ObjectManager\Config\Config(new \Magento\ObjectManager\Relations\Runtime());
-        $factory = new \Magento\ObjectManager\Factory\Factory($config, $argInterpreter, $argObjectFactory, null);
+        $factory = new \Magento\ObjectManager\Factory\Factory($config);
         $this->_realObjectManager = new \Magento\ObjectManager\ObjectManager($factory, $config);
+        $factory->setObjectManager($this->_realObjectManager);
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Validator/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Validator/ConfigTest.php
index e0dd14b4fc381cb7ea51543287c0189ba12123c8..ef3718b17841d07efadae5ad70efefa10a5c8a3f 100644
--- a/dev/tests/unit/testsuite/Magento/Validator/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Validator/ConfigTest.php
@@ -65,36 +65,11 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         foreach ($files as $path) {
             $configFiles[$path] = file_get_contents($path);
         }
-        $argInterpreter = $this->getMock('\Magento\Data\Argument\InterpreterInterface', array(), array(), '', false);
-
-        $argObjectFactory = $this->getMock(
-            '\Magento\ObjectManager\Config\Argument\ObjectFactory',
-            array(),
-            array(),
-            '',
-            false
-        );
-
         $config = new \Magento\ObjectManager\Config\Config(new \Magento\ObjectManager\Relations\Runtime());
-        $factory = new \Magento\ObjectManager\Factory\Factory($config, $argInterpreter, $argObjectFactory, null);
+        $factory = new \Magento\ObjectManager\Factory\Factory($config);
         $realObjectManager = new \Magento\ObjectManager\ObjectManager($factory, $config);
-
-        $constraintFactory = new \Magento\Validator\ConstraintFactory($realObjectManager);
-        $validatorFactory = new \Magento\ValidatorFactory($realObjectManager);
-        $universalFactory = new \Magento\Validator\UniversalFactory($realObjectManager);
-        $argObjectFactory->expects(
-            $this->any()
-        )->method(
-            'create'
-        )->will(
-            $this->returnValueMap(
-                array(
-                    array('Magento\Validator\ConstraintFactory', null, $constraintFactory),
-                    array('Magento\ValidatorFactory', null, $validatorFactory),
-                    array('Magento\Validator\UniversalFactory', null, $universalFactory)
-                )
-            )
-        );
+        $factory->setObjectManager($realObjectManager);
+        $universalFactory = $realObjectManager->get('\Magento\Validator\UniversalFactory');
         $this->_config = $this->_objectManager->getObject(
             'Magento\Validator\Config',
             array('configFiles' => $configFiles, 'builderFactory' => $universalFactory)
diff --git a/dev/tests/integration/testsuite/Magento/App/ObjectManager/ConfigLoader/PrimaryTest.php b/dev/tests/unit/testsuite/Magento/View/Helper/JsTest.php
similarity index 60%
rename from dev/tests/integration/testsuite/Magento/App/ObjectManager/ConfigLoader/PrimaryTest.php
rename to dev/tests/unit/testsuite/Magento/View/Helper/JsTest.php
index abe48f9b62588897395448adde870ac5b103fd01..bfaebea8cc32e35e3040a4a32bb8a28c1df82538 100644
--- a/dev/tests/integration/testsuite/Magento/App/ObjectManager/ConfigLoader/PrimaryTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Helper/JsTest.php
@@ -21,20 +21,20 @@
  * @copyright   Copyright (c) 2014 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\ConfigLoader;
+namespace Magento\View\Helper;
 
-use Magento\TestFramework\ObjectManager;
-
-class PrimaryTest extends \PHPUnit_Framework_TestCase
+class JsTest extends \PHPUnit_Framework_TestCase
 {
-    public function testLoad()
+
+    /**
+     * @covers \Magento\View\Helper\Js::getScript
+     */
+    public function testGetScript()
     {
-        /** @var \Magento\App\ObjectManager\ConfigLoader\Primary $loader */
-        $loader = ObjectManager::getInstance()->get('Magento\App\ObjectManager\ConfigLoader\Primary');
-        $result = $loader->load();
-        $this->assertNotEmpty($result);
-        $this->assertInternalType('array', $result);
-        $this->assertArrayHasKey('preferences', $result);
-        $this->assertArrayHasKey('Magento\App\State', $result);
+        $helper = new \Magento\View\Helper\Js();
+        $this->assertEquals(
+            "<script type=\"text/javascript\">//<![CDATA[\ntest\n//]]></script>",
+            $helper->getScript('test')
+        );
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Wishlist/Controller/IndexTest.php b/dev/tests/unit/testsuite/Magento/Wishlist/Controller/IndexTest.php
index 0b159a3417d2f53734db11770dc857431ca37e65..afec8bf396abd5fa8255d434e2041947b06fc6b7 100644
--- a/dev/tests/unit/testsuite/Magento/Wishlist/Controller/IndexTest.php
+++ b/dev/tests/unit/testsuite/Magento/Wishlist/Controller/IndexTest.php
@@ -136,7 +136,9 @@ class IndexTest extends \PHPUnit_Framework_TestCase
         if (!$objectManager) {
             $objectManager = new \Magento\ObjectManager\ObjectManager();
         }
-        $rewriteFactory = $this->getMock('Magento\Core\Model\Url\RewriteFactory', array('create'), array(), '', false);
+        $rewriteFactory = $this->getMock(
+            'Magento\UrlRewrite\Model\UrlRewriteFactory', array('create'), array(), '', false
+        );
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
         $varienFront = $helper->getObject('Magento\App\FrontController', array('rewriteFactory' => $rewriteFactory));
 
diff --git a/lib/Magento/App/AreaList/Proxy.php b/lib/Magento/App/AreaList/Proxy.php
new file mode 100644
index 0000000000000000000000000000000000000000..38442be3a7804f5b94545b1b52ad142b2a3a96ef
--- /dev/null
+++ b/lib/Magento/App/AreaList/Proxy.php
@@ -0,0 +1,172 @@
+<?php
+/**
+ * Application area list
+ *
+ * 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) 2014 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\AreaList;
+
+class Proxy extends \Magento\App\AreaList
+{
+    /**
+     * Object Manager instance
+     *
+     * @var \Magento\ObjectManager
+     */
+    protected $_objectManager = null;
+
+    /**
+     * Proxied instance name
+     *
+     * @var string
+     */
+    protected $_instanceName = null;
+
+    /**
+     * Proxied instance
+     *
+     * @var \Magento\Locale\Resolver
+     */
+    protected $_subject = null;
+
+    /**
+     * Instance shareability flag
+     *
+     * @var bool
+     */
+    protected $_isShared = null;
+
+    /**
+     * Proxy constructor
+     *
+     * @param \Magento\ObjectManager $objectManager
+     * @param string $instanceName
+     * @param bool $shared
+     */
+    public function __construct(
+        \Magento\ObjectManager $objectManager,
+        $instanceName = 'Magento\App\AreaList',
+        $shared = true
+    ) {
+        $this->_objectManager = $objectManager;
+        $this->_instanceName = $instanceName;
+        $this->_isShared = $shared;
+    }
+    
+    /**
+     * @return array
+     */
+    public function __sleep()
+    {
+        return array('_subject', '_isShared');
+    }
+
+    /**
+     * Retrieve ObjectManager from global scope
+     *
+     * @return void
+     */
+    public function __wakeup()
+    {
+        $this->_objectManager = \Magento\App\ObjectManager::getInstance();
+    }
+
+    /**
+     * Clone proxied instance
+     *
+     * @return void
+     */
+    public function __clone()
+    {
+        $this->_subject = clone $this->_getSubject();
+    }
+
+    /**
+     * Get proxied instance
+     *
+     * @return \Magento\Locale\Resolver
+     */
+    protected function _getSubject()
+    {
+        if (!$this->_subject) {
+            $this->_subject = true === $this->_isShared
+                ? $this->_objectManager->get($this->_instanceName)
+                : $this->_objectManager->create($this->_instanceName);
+        }
+        return $this->_subject;
+    }
+
+
+    /**
+     * Retrieve area code by front name
+     *
+     * @param string $frontName
+     * @return null|string
+     */
+    public function getCodeByFrontName($frontName)
+    {
+        return $this->_getSubject()->getCodeByFrontName($frontName);
+    }
+
+    /**
+     * Retrieve area front name by code
+     *
+     * @param string $areaCode
+     * @return string
+     */
+    public function getFrontName($areaCode)
+    {
+        return $this->_getSubject()->getFrontName($areaCode);
+    }
+
+    /**
+     * Retrieve area codes
+     *
+     * @return string[]
+     */
+    public function getCodes()
+    {
+        return $this->_getSubject()->getCodes();
+    }
+
+    /**
+     * Retrieve default area router id
+     *
+     * @param string $areaCode
+     * @return string
+     */
+    public function getDefaultRouter($areaCode)
+    {
+        return $this->_getSubject()->getDefaultRouter($areaCode);
+    }
+
+    /**
+     * Retrieve application area
+     *
+     * @param   string $code
+     * @return  \Magento\Core\Model\App\Area
+     */
+    public function getArea($code)
+    {
+        return $this->_getSubject()->getArea($code);
+    }
+}
diff --git a/lib/Magento/App/Arguments/ArgumentInterpreter.php b/lib/Magento/App/Arguments/ArgumentInterpreter.php
index eaf2324f6b2daf1a9790256557c26e5fd0a187c0..5dce1cf0ad63db62dbe8dea4cb590987df4ba1ca 100644
--- a/lib/Magento/App/Arguments/ArgumentInterpreter.php
+++ b/lib/Magento/App/Arguments/ArgumentInterpreter.php
@@ -33,23 +33,16 @@ use Magento\App\Arguments;
  */
 class ArgumentInterpreter implements InterpreterInterface
 {
-    /**
-     * @var Arguments
-     */
-    private $arguments;
-
     /**
      * @var Constant
      */
     private $constInterpreter;
 
     /**
-     * @param Arguments $arguments
      * @param Constant $constInterpreter
      */
-    public function __construct(Arguments $arguments, Constant $constInterpreter)
+    public function __construct(Constant $constInterpreter)
     {
-        $this->arguments = $arguments;
         $this->constInterpreter = $constInterpreter;
     }
 
@@ -60,11 +53,6 @@ class ArgumentInterpreter implements InterpreterInterface
      */
     public function evaluate(array $data)
     {
-        $argumentName = $this->constInterpreter->evaluate($data);
-        $result = $this->arguments->get($argumentName);
-        if ($result === null) {
-            throw new MissingOptionalValueException("Value of application argument '{$argumentName}' is not defined.");
-        }
-        return $result;
+        return array('argument' => $this->constInterpreter->evaluate($data));
     }
 }
diff --git a/app/code/Magento/Core/Model/Resource/Cache.php b/lib/Magento/App/Cache/State/Options.php
similarity index 87%
rename from app/code/Magento/Core/Model/Resource/Cache.php
rename to lib/Magento/App/Cache/State/Options.php
index 4ec67829de437c945e29ff55a0d06765ce12b4d2..26392552d347b894b7ea360c448544be7688852d 100644
--- a/app/code/Magento/Core/Model/Resource/Cache.php
+++ b/lib/Magento/App/Cache/State/Options.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Cache state options provider
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -18,21 +20,12 @@
  * 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) 2014 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\Cache\State;
 
-/**
- * Core Cache resource model
- *
- * @category    Magento
- * @package     Magento_Core
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Cache extends \Magento\Model\Resource\Db\AbstractDb implements \Magento\App\Cache\State\OptionsInterface
+class Options extends \Magento\Model\Resource\Db\AbstractDb implements \Magento\App\Cache\State\OptionsInterface
 {
     /**
      * Define main table
diff --git a/lib/Magento/App/EntryPoint/EntryPoint.php b/lib/Magento/App/EntryPoint/EntryPoint.php
index ceeec368d72729ddf570eb682d3013812ca8f4f9..e2a5990ea1ac523c5765d2db2993b4f0aed11b9c 100644
--- a/lib/Magento/App/EntryPoint/EntryPoint.php
+++ b/lib/Magento/App/EntryPoint/EntryPoint.php
@@ -59,7 +59,6 @@ class EntryPoint implements EntryPointInterface
         $this->_rootDir = $rootDir;
         $this->_parameters = $parameters;
         $this->_locator = $objectManager;
-        $this->_parameters[State::PARAM_MODE] = State::MODE_DEVELOPER;
     }
 
     /**
diff --git a/lib/Magento/App/ObjectManager/ConfigLoader/Primary.php b/lib/Magento/App/ObjectManager/ConfigLoader/Primary.php
deleted file mode 100644
index cb1dcb72a1a67d235d4d8d78b0d116ba5a731c13..0000000000000000000000000000000000000000
--- a/lib/Magento/App/ObjectManager/ConfigLoader/Primary.php
+++ /dev/null
@@ -1,81 +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) 2014 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\ConfigLoader;
-
-/**
- * Primary configuration loader for application object manager
- */
-class Primary
-{
-    /**
-     * Application mode
-     *
-     * @var string
-     */
-    protected $_appMode;
-
-    /**
-     * @var \Magento\App\Filesystem\DirectoryList
-     */
-    protected $_directoryList;
-
-    /**
-     * @param \Magento\App\Filesystem\DirectoryList $directoryList
-     * @param string $appMode
-     */
-    public function __construct(
-        \Magento\App\Filesystem\DirectoryList $directoryList,
-        $appMode = \Magento\App\State::MODE_DEFAULT
-    ) {
-        $this->_directoryList = $directoryList;
-        $this->_appMode = $appMode;
-    }
-
-    /**
-     * Retrieve merged configuration from primary config files
-     *
-     * @return array
-     */
-    public function load()
-    {
-        $reader = new \Magento\ObjectManager\Config\Reader\Dom(
-            new \Magento\App\Arguments\FileResolver\Primary(
-                new \Magento\App\Filesystem(
-                    $this->_directoryList,
-                    new \Magento\Filesystem\Directory\ReadFactory(),
-                    new \Magento\Filesystem\Directory\WriteFactory()
-                ),
-                new \Magento\Config\FileIteratorFactory()
-            ),
-            new \Magento\ObjectManager\Config\Mapper\Dom(
-                new \Magento\Stdlib\BooleanUtils(),
-                new \Magento\ObjectManager\Config\Mapper\ArgumentParser()
-            ),
-            new \Magento\ObjectManager\Config\SchemaLocator(),
-            new \Magento\App\Arguments\ValidationState($this->_appMode)
-        );
-
-        return $reader->read('primary');
-    }
-}
diff --git a/lib/Magento/App/ObjectManagerFactory.php b/lib/Magento/App/ObjectManagerFactory.php
index 572430d5d7c4f028051dc9cdb9247a216dbd19b6..3bb06bff79c603a5fb932a985284bd7372a0cf4f 100644
--- a/lib/Magento/App/ObjectManagerFactory.php
+++ b/lib/Magento/App/ObjectManagerFactory.php
@@ -49,6 +49,13 @@ class ObjectManagerFactory
      */
     protected $_configClassName = 'Magento\Interception\ObjectManager\Config';
 
+    /**
+     * Factory
+     *
+     * @var \Magento\ObjectManager\Factory
+     */
+    protected $factory;
+
     /**
      * Create object manager
      *
@@ -85,36 +92,42 @@ class ObjectManagerFactory
         $diConfig = new $configClass($relations, $definitions);
         $appMode = $appArguments->get(State::PARAM_MODE, State::MODE_DEFAULT);
 
-        $configData = $this->_loadPrimaryConfig($directoryList, $appMode);
+        $booleanUtils = new \Magento\Stdlib\BooleanUtils();
+        $argInterpreter = $this->createArgumentInterpreter($booleanUtils);
+
+        $argumentMapper = new \Magento\ObjectManager\Config\Mapper\Dom($argInterpreter);
+        $configData = $this->_loadPrimaryConfig($directoryList, $argumentMapper, $appMode);
 
         if ($configData) {
             $diConfig->extend($configData);
         }
 
-        $booleanUtils = new \Magento\Stdlib\BooleanUtils();
-        $argFactory = new \Magento\ObjectManager\Config\Argument\ObjectFactory($diConfig);
-        $argInterpreter = $this->createArgumentInterpreter($booleanUtils, $argFactory, $appArguments);
-        $factory = new \Magento\ObjectManager\Factory\Factory($diConfig, $argInterpreter, $argFactory, $definitions);
+        $this->factory = new \Magento\ObjectManager\Factory\Factory(
+            $diConfig,
+            null,
+            $definitions,
+            $appArguments->get()
+        );
 
         $className = $this->_locatorClassName;
+
+        $sharedInstances = [
+            'Magento\App\Arguments' => $appArguments,
+            'Magento\App\Filesystem\DirectoryList' => $directoryList,
+            'Magento\Filesystem\DirectoryList' => $directoryList,
+            'Magento\ObjectManager\Relations' => $relations,
+            'Magento\Interception\Definition' => $definitionFactory->createPluginDefinition(),
+            'Magento\ObjectManager\Config' => $diConfig,
+            'Magento\ObjectManager\Definition' => $definitions,
+            'Magento\Stdlib\BooleanUtils' => $booleanUtils,
+            'Magento\ObjectManager\Config\Mapper\Dom' => $argumentMapper,
+            $configClass => $diConfig
+        ];
+
         /** @var \Magento\ObjectManager $objectManager */
-        $objectManager = new $className(
-            $factory,
-            $diConfig,
-            array(
-                'Magento\App\Arguments' => $appArguments,
-                'Magento\App\Filesystem\DirectoryList' => $directoryList,
-                'Magento\Filesystem\DirectoryList' => $directoryList,
-                'Magento\ObjectManager\Relations' => $relations,
-                'Magento\Interception\Definition' => $definitionFactory->createPluginDefinition(),
-                'Magento\ObjectManager\Config' => $diConfig,
-                'Magento\ObjectManager\Definition' => $definitions,
-                'Magento\Stdlib\BooleanUtils' => $booleanUtils,
-                $configClass => $diConfig
-            )
-        );
+        $objectManager = new $className($this->factory, $diConfig, $sharedInstances);
 
-        $argFactory->setObjectManager($objectManager);
+        $this->factory->setObjectManager($objectManager);
         ObjectManager::setInstance($objectManager);
 
         /** @var \Magento\App\Filesystem\DirectoryList\Verification $verification */
@@ -157,26 +170,22 @@ class ObjectManagerFactory
      * Return newly created instance on an argument interpreter, suitable for processing DI arguments
      *
      * @param \Magento\Stdlib\BooleanUtils $booleanUtils
-     * @param \Magento\ObjectManager\Config\Argument\ObjectFactory $objFactory
-     * @param Arguments $appArguments
      * @return \Magento\Data\Argument\InterpreterInterface
      */
     protected function createArgumentInterpreter(
-        \Magento\Stdlib\BooleanUtils $booleanUtils,
-        \Magento\ObjectManager\Config\Argument\ObjectFactory $objFactory,
-        Arguments $appArguments
+        \Magento\Stdlib\BooleanUtils $booleanUtils
     ) {
         $constInterpreter = new \Magento\Data\Argument\Interpreter\Constant();
         $result = new \Magento\Data\Argument\Interpreter\Composite(
-            array(
+            [
                 'boolean' => new \Magento\Data\Argument\Interpreter\Boolean($booleanUtils),
                 'string' => new \Magento\Data\Argument\Interpreter\String($booleanUtils),
                 'number' => new \Magento\Data\Argument\Interpreter\Number(),
                 'null' => new \Magento\Data\Argument\Interpreter\NullType(),
+                'object' => new \Magento\Data\Argument\Interpreter\Object($booleanUtils),
                 'const' => $constInterpreter,
-                'object' => new \Magento\ObjectManager\Config\Argument\Interpreter\Object($booleanUtils, $objFactory),
-                'init_parameter' => new \Magento\App\Arguments\ArgumentInterpreter($appArguments, $constInterpreter)
-            ),
+                'init_parameter' => new \Magento\App\Arguments\ArgumentInterpreter($constInterpreter)
+            ],
             \Magento\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE
         );
         // Add interpreters that reference the composite
@@ -196,19 +205,36 @@ class ObjectManagerFactory
     }
 
     /**
-     * Load primary config data
+     * Load primary config
      *
      * @param DirectoryList $directoryList
+     * @param mixed $argumentMapper
      * @param string $appMode
      * @return array
      * @throws \Magento\BootstrapException
      */
-    protected function _loadPrimaryConfig($directoryList, $appMode)
+    protected function _loadPrimaryConfig(DirectoryList $directoryList, $argumentMapper, $appMode)
     {
         $configData = null;
-        $primaryLoader = new \Magento\App\ObjectManager\ConfigLoader\Primary($directoryList, $appMode);
         try {
-            $configData = $primaryLoader->load();
+            $fileResolver = new \Magento\App\Arguments\FileResolver\Primary(
+                new \Magento\App\Filesystem(
+                    $directoryList,
+                    new \Magento\Filesystem\Directory\ReadFactory(),
+                    new \Magento\Filesystem\Directory\WriteFactory()
+                ),
+                new \Magento\Config\FileIteratorFactory()
+            );
+            $schemaLocator = new \Magento\ObjectManager\Config\SchemaLocator();
+            $validationState = new \Magento\App\Arguments\ValidationState($appMode);
+
+            $reader = new \Magento\ObjectManager\Config\Reader\Dom(
+                $fileResolver,
+                $argumentMapper,
+                $schemaLocator,
+                $validationState
+            );
+            $configData = $reader->read('primary');
         } catch (\Exception $e) {
             throw new \Magento\BootstrapException($e->getMessage());
         }
@@ -234,13 +260,13 @@ class ObjectManagerFactory
     ) {
         return $objectManager->create(
             'Magento\Interception\PluginList\PluginList',
-            array(
+            [
                 'relations' => $relations,
                 'definitions' => $definitionFactory->createPluginDefinition(),
                 'omConfig' => $diConfig,
                 'classDefinitions' => $definitions instanceof
                 \Magento\ObjectManager\Definition\Compiled ? $definitions : null
-            )
+            ]
         );
     }
 }
diff --git a/lib/Magento/App/Router/NoRouteHandlerList.php b/lib/Magento/App/Router/NoRouteHandlerList.php
index 6280e77a215e7b428396348508c995402405e54d..d9a55d3db96bd0430325d1b4dc5dd701e6b5d9e7 100644
--- a/lib/Magento/App/Router/NoRouteHandlerList.php
+++ b/lib/Magento/App/Router/NoRouteHandlerList.php
@@ -66,8 +66,8 @@ class NoRouteHandlerList
             //sorting handlers list
             $sortedHandlersList = array();
             foreach ($this->_handlerList as $handlerInfo) {
-                if (isset($handlerInfo['instance']) && isset($handlerInfo['sortOrder'])) {
-                    $sortedHandlersList[$handlerInfo['instance']] = $handlerInfo['sortOrder'];
+                if (isset($handlerInfo['class']) && isset($handlerInfo['sortOrder'])) {
+                    $sortedHandlersList[$handlerInfo['class']] = $handlerInfo['sortOrder'];
                 }
             }
 
diff --git a/lib/Magento/App/RouterList.php b/lib/Magento/App/RouterList.php
index 504594515429688555220806551bd118e8a4c729..bfb3cc531ee3e867bbfb4bc7d90989a18c51cf74 100644
--- a/lib/Magento/App/RouterList.php
+++ b/lib/Magento/App/RouterList.php
@@ -51,7 +51,7 @@ class RouterList implements RouterListInterface
         $this->_routerList = array_filter(
             $routerList,
             function ($item) {
-                return (!isset($item['disable']) || !$item['disable']) && $item['instance'];
+                return (!isset($item['disable']) || !$item['disable']) && $item['class'];
             }
         );
         uasort($this->_routerList, array($this, '_compareRoutersSortOrder'));
@@ -67,7 +67,7 @@ class RouterList implements RouterListInterface
     {
         if (!isset($this->_routerList[$routerId]['object'])) {
             $this->_routerList[$routerId]['object'] = $this->_objectManager->create(
-                $this->_routerList[$routerId]['instance']
+                $this->_routerList[$routerId]['class']
             );
         }
         return $this->_routerList[$routerId]['object'];
diff --git a/lib/Magento/AppInterface.php b/lib/Magento/AppInterface.php
index 8bf3f0de2937000242ba3effeee83c8ca4bf6eb5..b5c09bccfe4afb8c21b868fab32d6c0c66c17373 100644
--- a/lib/Magento/AppInterface.php
+++ b/lib/Magento/AppInterface.php
@@ -35,7 +35,7 @@ interface AppInterface
     /**
      * Magento version
      */
-    const VERSION = '2.0.0.0-dev71';
+    const VERSION = '2.0.0.0-dev72';
 
     /**
      * Launch application
diff --git a/lib/Magento/ObjectManager/Config/Argument/Interpreter/Object.php b/lib/Magento/Data/Argument/Interpreter/Object.php
similarity index 58%
rename from lib/Magento/ObjectManager/Config/Argument/Interpreter/Object.php
rename to lib/Magento/Data/Argument/Interpreter/Object.php
index c31bb77be3d74c299cc251ec06cb9a60c4bd3a65..8c12bac9d911bb429cd77edc796fc31dc8e56aa6 100644
--- a/lib/Magento/ObjectManager/Config/Argument/Interpreter/Object.php
+++ b/lib/Magento/Data/Argument/Interpreter/Object.php
@@ -1,5 +1,6 @@
 <?php
 /**
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,51 +22,40 @@
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
-namespace Magento\ObjectManager\Config\Argument\Interpreter;
+namespace Magento\Data\Argument\Interpreter;
 
-use Magento\ObjectManager\Config;
-use Magento\ObjectManager\Config\Argument\ObjectFactory;
 use Magento\Data\Argument\InterpreterInterface;
 use Magento\Stdlib\BooleanUtils;
 
-/**
- * Interpreter that creates an instance by a type name taking into account whether it's shared or not
- */
 class Object implements InterpreterInterface
 {
     /**
-     * @var BooleanUtils
-     */
-    private $booleanUtils;
-
-    /**
-     * @var ObjectFactory
+     * @var \Magento\Stdlib\BooleanUtils
      */
-    private $objectFactory;
+    protected $booleanUtils;
 
     /**
      * @param BooleanUtils $booleanUtils
-     * @param ObjectFactory $objectFactory
      */
-    public function __construct(BooleanUtils $booleanUtils, ObjectFactory $objectFactory)
+    public function __construct(BooleanUtils $booleanUtils)
     {
         $this->booleanUtils = $booleanUtils;
-        $this->objectFactory = $objectFactory;
     }
 
     /**
-     * {@inheritdoc}
-     * @return object
+     * Compute and return effective value of an argument
+     *
+     * @param array $data
+     * @return mixed
      * @throws \InvalidArgumentException
+     * @throws \UnexpectedValueException
      */
     public function evaluate(array $data)
     {
-        if (empty($data['value'])) {
-            throw new \InvalidArgumentException('Object class name is missing.');
+        $result = array('instance' => $data['value']);
+        if (isset($data['shared'])) {
+            $result['shared'] = $this->booleanUtils->toBoolean($data['shared']);
         }
-        $className = $data['value'];
-        $isShared = isset($data['shared']) ? $this->booleanUtils->toBoolean($data['shared']) : null;
-        $result = $this->objectFactory->create($className, $isShared);
         return $result;
     }
 }
diff --git a/lib/Magento/Message/Manager.php b/lib/Magento/Message/Manager.php
index fd66a2065650b1dec7795ff33b1f08214d7cbcd5..74e357a0d6bcb23569615118028a01330614728d 100644
--- a/lib/Magento/Message/Manager.php
+++ b/lib/Magento/Message/Manager.php
@@ -57,10 +57,15 @@ class Manager implements ManagerInterface
     protected $logger;
 
     /**
-     * @var $string
+     * @var string
      */
     protected $defaultGroup;
 
+    /**
+     * @var bool
+     */
+    protected $hasMessages = false;
+
     /**
      * @param Session $session
      * @param Factory $messageFactory
@@ -138,6 +143,7 @@ class Manager implements ManagerInterface
      */
     public function addMessage(MessageInterface $message, $group = null)
     {
+        $this->hasMessages = true;
         $this->getMessages(false, $group)->addMessage($message);
         $this->eventManager->dispatch('core_session_abstract_add_message');
         return $this;
@@ -275,4 +281,14 @@ class Manager implements ManagerInterface
         $this->addMessage($this->messageFactory->create(MessageInterface::TYPE_ERROR, $alternativeText), $group);
         return $this;
     }
+
+    /**
+     * Returns false if there are any messages for customer, true - in other case
+     *
+     * @return bool
+     */
+    public function hasMessages()
+    {
+        return $this->hasMessages;
+    }
 }
diff --git a/lib/Magento/Model/AbstractModel.php b/lib/Magento/Model/AbstractModel.php
index 0b38933e505896e6d9df3c0cf64c74115e1660af..b6ef85b794cd25359049758cbf37c59934208c3a 100644
--- a/lib/Magento/Model/AbstractModel.php
+++ b/lib/Magento/Model/AbstractModel.php
@@ -316,7 +316,10 @@ abstract class AbstractModel extends \Magento\Object
      */
     protected function _getEventData()
     {
-        return array('data_object' => $this, $this->_eventObject => $this);
+        return array(
+            'data_object'       => $this,
+            $this->_eventObject => $this,
+        );
     }
 
     /**
diff --git a/lib/Magento/Module/ResourceInterface.php b/lib/Magento/Module/ResourceInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..5876ade60cca6e9d7750484eff8f961591e18425
--- /dev/null
+++ b/lib/Magento/Module/ResourceInterface.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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\Module;
+
+interface ResourceInterface
+{
+    /**
+     * Get Module version from DB
+     *
+     * @param string $resName
+     * @return false|string
+     */
+    public function getDbVersion($resName);
+
+    /**
+     * Set module version into DB
+     *
+     * @param string $resName
+     * @param string $version
+     * @return int
+     */
+    public function setDbVersion($resName, $version);
+
+    /**
+     * Get resource data version
+     *
+     * @param string $resName
+     * @return string|false
+     */
+    public function getDataVersion($resName);
+
+    /**
+     * Specify resource data version
+     *
+     * @param string $resName
+     * @param string $version
+     * @return null
+     */
+    public function setDataVersion($resName, $version);
+}
diff --git a/lib/Magento/ObjectManager/Config/Argument/ObjectFactory.php b/lib/Magento/ObjectManager/Config/Argument/ObjectFactory.php
deleted file mode 100644
index 115951f8ec918728205e2a2449178c3db2e4b7d8..0000000000000000000000000000000000000000
--- a/lib/Magento/ObjectManager/Config/Argument/ObjectFactory.php
+++ /dev/null
@@ -1,93 +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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\ObjectManager\Config\Argument;
-
-use Magento\ObjectManager;
-use Magento\ObjectManager\Config;
-
-/**
- * Factory that creates an instance by a type name taking into account whether it's shared or not
- */
-class ObjectFactory
-{
-    /**
-     * @var Config
-     */
-    private $config;
-
-    /**
-     * @var ObjectManager
-     */
-    private $objectManager;
-
-    /**
-     * @param Config $config
-     * @param ObjectManager $objectManager
-     */
-    public function __construct(Config $config, ObjectManager $objectManager = null)
-    {
-        $this->config = $config;
-        $this->objectManager = $objectManager;
-    }
-
-    /**
-     * Assign object manager instance
-     *
-     * @param ObjectManager $objectManager
-     * @return void
-     */
-    public function setObjectManager(ObjectManager $objectManager)
-    {
-        $this->objectManager = $objectManager;
-    }
-
-    /**
-     * Retrieve instance of the object manager
-     *
-     * @return ObjectManager
-     * @throws \LogicException
-     */
-    protected function getObjectManager()
-    {
-        if (!$this->objectManager) {
-            throw new \LogicException('Object manager has not been assigned yet.');
-        }
-        return $this->objectManager;
-    }
-
-    /**
-     * Return new or shared instance of a given type
-     *
-     * @param string $type
-     * @param bool|null $isShared NULL - use the sharing configuration
-     * @return object
-     */
-    public function create($type, $isShared = null)
-    {
-        $objectManager = $this->getObjectManager();
-        $isShared = isset($isShared) ? $isShared : $this->config->isShared($type);
-        $result = $isShared ? $objectManager->get($type) : $objectManager->create($type);
-        return $result;
-    }
-}
diff --git a/lib/Magento/ObjectManager/Config/Config.php b/lib/Magento/ObjectManager/Config/Config.php
index 0b520e9f665b34b14e7773947c79e1e4cfe4aa14..62cd64d2bfe13db2b7c19514d73cc65eeb32bf46 100644
--- a/lib/Magento/ObjectManager/Config/Config.php
+++ b/lib/Magento/ObjectManager/Config/Config.php
@@ -132,11 +132,9 @@ class Config implements \Magento\ObjectManager\Config
      */
     public function getArguments($type)
     {
-        return isset(
-            $this->_mergedArguments[$type]
-        ) ? $this->_mergedArguments[$type] : $this->_collectConfiguration(
-            $type
-        );
+        return isset($this->_mergedArguments[$type])
+            ? $this->_mergedArguments[$type]
+            : $this->_collectConfiguration($type);
     }
 
     /**
diff --git a/lib/Magento/ObjectManager/Config/Mapper/Dom.php b/lib/Magento/ObjectManager/Config/Mapper/Dom.php
index 2b4523ffa5f31a94ad183d2db5b2fbdebb1ed24d..4e9fe89c067c9e6e16021845028a98b3d9e23c3d 100644
--- a/lib/Magento/ObjectManager/Config/Mapper/Dom.php
+++ b/lib/Magento/ObjectManager/Config/Mapper/Dom.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\ObjectManager\Config\Mapper;
 
+use Magento\Data\Argument\InterpreterInterface;
 use Magento\Stdlib\BooleanUtils;
 
 class Dom implements \Magento\Config\ConverterInterface
@@ -37,14 +38,24 @@ class Dom implements \Magento\Config\ConverterInterface
      */
     private $argumentParser;
 
+    /**
+     * @var InterpreterInterface
+     */
+    private $argumentInterpreter;
+
     /**
      * @param BooleanUtils $booleanUtils
      * @param ArgumentParser $argumentParser
+     * @param InterpreterInterface $argumentInterpreter
      */
-    public function __construct(BooleanUtils $booleanUtils, ArgumentParser $argumentParser)
-    {
-        $this->booleanUtils = $booleanUtils;
-        $this->argumentParser = $argumentParser;
+    public function __construct(
+        InterpreterInterface $argumentInterpreter,
+        BooleanUtils $booleanUtils = null,
+        ArgumentParser $argumentParser = null
+    ) {
+        $this->argumentInterpreter = $argumentInterpreter;
+        $this->booleanUtils = $booleanUtils ?: new BooleanUtils();
+        $this->argumentParser = $argumentParser ?: new ArgumentParser();
     }
 
     /**
@@ -105,7 +116,9 @@ class Dom implements \Magento\Config\ConverterInterface
                                     }
                                     $argumentName = $argumentNode->attributes->getNamedItem('name')->nodeValue;
                                     $argumentData = $this->argumentParser->parse($argumentNode);
-                                    $typeArguments[$argumentName] = $argumentData;
+                                    $typeArguments[$argumentName] = $this->argumentInterpreter->evaluate(
+                                        $argumentData
+                                    );
                                 }
                                 break;
                             case 'plugin':
diff --git a/lib/Magento/ObjectManager/Factory/Factory.php b/lib/Magento/ObjectManager/Factory/Factory.php
index 69c2e3c2e7ae18656bbe47a554c40fbf6a3453ad..07ed691f9348a3d5374251eceda1399264031b4f 100644
--- a/lib/Magento/ObjectManager/Factory/Factory.php
+++ b/lib/Magento/ObjectManager/Factory/Factory.php
@@ -26,48 +26,60 @@ namespace Magento\ObjectManager\Factory;
 class Factory implements \Magento\ObjectManager\Factory
 {
     /**
+     * Object manager
+     *
+     * @var \Magento\ObjectManager
+     */
+    protected $objectManager;
+
+    /**
+     * Object manager config
+     *
      * @var \Magento\ObjectManager\Config
      */
-    protected $_config;
+    protected $config;
 
     /**
      * Definition list
      *
      * @var \Magento\ObjectManager\Definition
      */
-    protected $_definitions;
+    protected $definitions;
 
     /**
+     * Object creation stack
+     *
      * @var array
      */
-    private $_creationStack = array();
-
-    /**
-     * @var \Magento\Data\Argument\InterpreterInterface
-     */
-    protected $_argInterpreter;
-
-    /**
-     * @var \Magento\ObjectManager\Config\Argument\ObjectFactory
-     */
-    protected $_argObjectFactory;
+    protected $creationStack = array();
 
     /**
      * @param \Magento\ObjectManager\Config $config
-     * @param \Magento\Data\Argument\InterpreterInterface $argInterpreter
-     * @param \Magento\ObjectManager\Config\Argument\ObjectFactory $argObjectFactory
+     * @param \Magento\ObjectManager $objectManager
      * @param \Magento\ObjectManager\Definition $definitions
+     * @param array $globalArguments
      */
     public function __construct(
         \Magento\ObjectManager\Config $config,
-        \Magento\Data\Argument\InterpreterInterface $argInterpreter,
-        \Magento\ObjectManager\Config\Argument\ObjectFactory $argObjectFactory,
-        \Magento\ObjectManager\Definition $definitions = null
+        \Magento\ObjectManager $objectManager = null,
+        \Magento\ObjectManager\Definition $definitions = null,
+        $globalArguments = array()
     ) {
-        $this->_config = $config;
-        $this->_argInterpreter = $argInterpreter;
-        $this->_argObjectFactory = $argObjectFactory;
-        $this->_definitions = $definitions ?: new \Magento\ObjectManager\Definition\Runtime();
+        $this->config = $config;
+        $this->objectManager = $objectManager;
+        $this->definitions = $definitions ?: new \Magento\ObjectManager\Definition\Runtime();
+        $this->globalArguments = $globalArguments;
+    }
+
+    /**
+     * Set object manager
+     *
+     * @param \Magento\ObjectManager $objectManager
+     * @return void
+     */
+    public function setObjectManager(\Magento\ObjectManager $objectManager)
+    {
+        $this->objectManager = $objectManager;
     }
 
     /**
@@ -75,7 +87,7 @@ class Factory implements \Magento\ObjectManager\Factory
      *
      * @param string $requestedType
      * @param array $parameters
-     * @param array $argumentValues
+     * @param array $arguments
      * @return array
      * @throws \UnexpectedValueException
      * @throws \BadMethodCallException
@@ -83,43 +95,78 @@ class Factory implements \Magento\ObjectManager\Factory
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      * @SuppressWarnings(PHPMD.NPathComplexity)
      */
-    protected function _resolveArguments($requestedType, array $parameters, array $argumentValues = array())
+    protected function _resolveArguments($requestedType, array $parameters, array $arguments = array())
     {
-        $result = array();
-        $arguments = $this->_config->getArguments($requestedType);
+        $resolvedArguments = array();
+        $arguments = count($arguments)
+            ? array_replace($this->config->getArguments($requestedType), $arguments)
+            : $this->config->getArguments($requestedType);
         foreach ($parameters as $parameter) {
             list($paramName, $paramType, $paramRequired, $paramDefault) = $parameter;
-            if (array_key_exists($paramName, $argumentValues)) {
-                $value = $argumentValues[$paramName];
-            } else if (array_key_exists($paramName, $arguments)) {
-                $argumentData = $arguments[$paramName];
-                if (!is_array($argumentData)) {
-                    throw new \UnexpectedValueException(
-                        sprintf(
-                            'Invalid parameter configuration provided for $%s argument of %s.',
-                            $paramName,
-                            $requestedType
-                        )
-                    );
-                }
-                try {
-                    $value = $this->_argInterpreter->evaluate($argumentData);
-                } catch (\Magento\Data\Argument\MissingOptionalValueException $e) {
-                    $value = $paramDefault;
-                }
+            $argument = null;
+            if (array_key_exists($paramName, $arguments)) {
+                $argument = $arguments[$paramName];
             } else if ($paramRequired) {
-                if (!$paramType) {
+                if ($paramType) {
+                    $argument = array('instance' => $paramType);
+                } else {
+                    $this->creationStack = array();
                     throw new \BadMethodCallException(
-                        sprintf('Missing required argument $%s of %s.', $paramName, $requestedType)
+                        'Missing required argument $' . $paramName . ' of ' . $requestedType . '.'
                     );
                 }
-                $value = $this->_argObjectFactory->create($paramType);
             } else {
-                $value = $paramDefault;
+                $argument = $paramDefault;
+            }
+            if ($paramType && !is_object($argument) && $argument !== $paramDefault) {
+                if (!is_array($argument) || !isset($argument['instance'])) {
+                    throw new \UnexpectedValueException(
+                        'Invalid parameter configuration provided for $' . $paramName . ' argument of ' . $requestedType
+                    );
+                }
+                $argumentType = $argument['instance'];
+                $isShared = (isset($argument['shared']) ? $argument['shared'] :$this->config->isShared($argumentType));
+                $argument = $isShared
+                    ? $this->objectManager->get($argumentType)
+                    : $this->objectManager->create($argumentType);
+            } else if (is_array($argument)) {
+                if (isset($argument['argument'])) {
+                    $argKey = $argument['argument'];
+                    $argument = isset($this->globalArguments[$argKey]) ? $this->globalArguments[$argKey] : $paramDefault;
+                } else if (!empty($argument)) {
+                    $this->parseArray($argument);
+                }
+            }
+            $resolvedArguments[] = $argument;
+        }
+        return $resolvedArguments;
+    }
+
+    /**
+     * Parse array argument
+     *
+     * @param array $array
+     * @return void
+     */
+    protected function parseArray(&$array)
+    {
+        foreach ($array as $key => $item) {
+            if (is_array($item)) {
+                if (isset($item['instance'])) {
+                    $itemType = $item['instance'];
+                    $isShared = (isset($item['shared'])) ? $item['shared'] : $this->config->isShared($itemType);
+                    $array[$key] = $isShared
+                        ? $this->objectManager->get($itemType)
+                        : $this->objectManager->create($itemType);
+                } elseif (isset($item['argument'])) {
+                    $array[$key] = isset($this->globalArguments[$item['argument']])
+                        ? $this->globalArguments[$item['argument']]
+                        : null;
+                } else {
+                    $this->parseArray($item);
+                }
             }
-            $result[] = $value;
         }
-        return $result;
     }
 
     /**
@@ -134,18 +181,22 @@ class Factory implements \Magento\ObjectManager\Factory
      */
     public function create($requestedType, array $arguments = array())
     {
-        $type = $this->_config->getInstanceType($requestedType);
-        $parameters = $this->_definitions->getParameters($type);
+        $type = $this->config->getInstanceType($requestedType);
+        $parameters = $this->definitions->getParameters($type);
         if ($parameters == null) {
             return new $type();
         }
-        $this->_assertNoCircularDependency($requestedType);
-        $this->_creationStack[$requestedType] = $requestedType;
+        if (isset($this->creationStack[$requestedType])) {
+            $lastFound = end($this->creationStack);
+            $this->creationStack = array();
+            throw new \LogicException("Circular dependency: {$requestedType} depends on {$lastFound} and vice versa.");
+        }
+        $this->creationStack[$requestedType] = $requestedType;
         try {
             $args = $this->_resolveArguments($requestedType, $parameters, $arguments);
-            unset($this->_creationStack[$requestedType]);
+            unset($this->creationStack[$requestedType]);
         } catch (\Exception $e) {
-            unset($this->_creationStack[$requestedType]);
+            unset($this->creationStack[$requestedType]);
             throw $e;
         }
         switch (count($args)) {
@@ -172,18 +223,13 @@ class Factory implements \Magento\ObjectManager\Factory
     }
 
     /**
-     * Prevent circular dependencies using creation stack
+     * Set global arguments
      *
-     * @param string $type
-     * @throws \LogicException
+     * @param array $arguments
      * @return void
      */
-    private function _assertNoCircularDependency($type)
+    public function setArguments($arguments)
     {
-        if (isset($this->_creationStack[$type])) {
-            $lastFound = end($this->_creationStack);
-            $this->_creationStack = array();
-            throw new \LogicException("Circular dependency: {$type} depends on {$lastFound} and vice versa.");
-        }
+        $this->globalArguments = $arguments;
     }
 }
diff --git a/lib/Magento/View/Element/AbstractBlock.php b/lib/Magento/View/Element/AbstractBlock.php
index 40886401533c62ee6ebd5e4f31ad6459205f686e..8a537071039840875f157c1c9c727a2f8350f62b 100644
--- a/lib/Magento/View/Element/AbstractBlock.php
+++ b/lib/Magento/View/Element/AbstractBlock.php
@@ -198,7 +198,6 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface
         $this->filterManager = $context->getFilterManager();
         $this->_localeDate = $context->getLocaleDate();
         $this->inlineTranslation = $context->getInlineTranslation();
-        $this->_isScopePrivate  = false;
         parent::__construct($data);
         $this->_construct();
     }
diff --git a/lib/Magento/View/Helper/Js.php b/lib/Magento/View/Helper/Js.php
new file mode 100644
index 0000000000000000000000000000000000000000..f2666819451c340b5bcaddcfab7aa7785c8e9553
--- /dev/null
+++ b/lib/Magento/View/Helper/Js.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * JavaScript helper
+ *
+ * @author      Magento Core Team <core@magentocommerce.com>
+ *
+ * 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) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\View\Helper;
+
+class Js
+{
+    /**
+     * Retrieve framed javascript
+     *
+     * @param   string $script
+     * @return  string
+     */
+    public function getScript($script)
+    {
+        return '<script type="text/javascript">//<![CDATA[' . "\n{$script}\n" . '//]]></script>';
+    }
+}